Catfood.Shapefile 2.00

Updated on Sunday, March 12, 2023

I just released Catfood.Shapefile 2.00, my .NET parser for ESRI Shapefiles.

The big change is that I have migrated to .NET Standard 2.0. This makes it possible to use from .NET Core as well as classic .NET Framework from 4.6.1 up. If you need to use an older version of .NET Framework then you'll want to stick with Catfood.Shapefile 1.60.

Catfood.Shapefile is now also available via NuGet. This is the recommended way to install. The source code is still available on GitHub.

Add your comment...

Related Posts

You Might Also Like

(All Code Posts)

Assassination Coordinates

Testing out some shapefile code with a zoom into San Francisco. This uses five different shapefiles:

Country borders are from Eric Muller's fips-10 shapefile.

States and US Counties come from the United States Census Bureau.

San Francisco 5 foot elevation contours from DataSF.

Finally the street map for San Francisco is from data.gov.

These are almost all based on different projections and I did my best to actually line everything up but if you're heading over for coffee it's probably best to stick with Google Maps.

Add your comment...

Related Posts

You Might Also Like

(All Etc Posts)

(Published to the Fediverse as: Assassination Coordinates #etc #video #sanfrancisco #shapefile #animation Animation that zooms from a global map to the streets of San Francisco using five different shapefiles. )

Visualizing Coronavirus Cases and Deaths by Country and US County

Updated on Saturday, September 23, 2023

Cases and Deaths by Country

Week on Week Incremental

Visualizing Coronavirus Deaths by Country (Daily Incremental)

Cumulative

Visualizing Coronavirus Deaths by Country (Cumulative)

Cases and Deaths by US County

Week on Week Incremental

Visualizing Coronavirus Deaths by US County (Daily Incremental)

Cumulative

Visualizing Coronavirus Deaths by US County (Cumulative)

This post visualizes global and US county level coronavirus data from Johns Hopkins University. Four videos show both cumulative and week on week progression (comparing seven day moving averages) of the disease together with four images that show the most recent snapshot. It used to be updated weekly, this stopped August 5, 2023.

Cases and deaths are shown simultaneously using blue for cases and red for deaths. Where both are high a region will be a shade of purple. Regions with no data are dark gray.

The week on week incremental visualization is useful to see the history and current state of the spread of coronavirus. Each region is shaded based on the highest number of daily cases and deaths for that region and is relative to population. For example if the highest number of deaths reported on any day in San Francisco county is seven, then any day that has seven deaths will be the brightest shade of red. This shows where COVID-19 is relatively bad over time.

The cumulative visualization is shaded relative to the highest total death and case count for any region, relative to population.

As the location and date of the peak in week on week and cumulative cases and deaths change over time the videos will be different each time you watch. Bookmark this post and check back for weekly updates.

(This is the fifth version of this post as I have changed the data source and methodology several times. I usually preserve the previous version of any post but the changes are large enough that in this case I have removed them).

Cases and Deaths by Country

Week on Week Incremental

 

Cumulative

 

Cases and Deaths by US County

Week on Week Incremental

 

Cumulative

 

Add your comment...

Related Posts

You Might Also Like

(All Etc Posts)

(Published to the Fediverse as: Visualizing Coronavirus Cases and Deaths by Country and US County #etc #coronavirus #shapefile #h5v Videos showing the spread of confirmed COVID-19 cases and death by country and US county/state per capita from 2020 to 2023. )

Reviews and Links for February 2012

Updated on Friday, May 22, 2020

The Snowman by Jo Nesbø

4/5

Very good, enjoying the entire Harry Hole series. Wishing for translations of the first two now!

 

The Devil's Star by Jo Nesbø

3/5

Slightly weaker than the others in the series I've read so far but still knocked it back quickly.

 

The Redbreast by Jo Nesbø

4/5

Best so far on my quest to read through Nesbo...

 

Nemesis by Jo Nesbø

4/5

On a Jo Nesbo binge...

 

The Leopard by Jo Nesbø

4/5

Compelling crime thriller, rather worryingly one of series featuring Harry Hole so I'm going to have to go back to the beginning and read all of them.

 

Links

Catfood.Shapefile 1.51: http://t.co/BKtkx9Zq (ESRI Shapefile Parser, fixed release binary issue).

4 of 5 stars to The Snowman by Jo Nesbø http://t.co/IrvdrDBf

Breaking Good: how to synthesize Pseudoephedrine (Sudafed) From N-Methylamphetamine (crystal meth): http://t.co/fviYaj5P

ITHCWY: Catfood.Shapefile 1.50: I've just released a small update to my C# Shapefile library on Codeplex. Catfood… http://t.co/lXoGoBsY

4 of 5 stars to The Redbreast by Jo Nesbø http://t.co/PqrOQnQL

Epic #Bernal Panorama: http://t.co/zVqZYosG - via @bernalwood

Neal Stephenson on getting big stuff done http://t.co/6PHS1VD1 #todo @myEN

Stop Colbert: http://t.co/kBtSC7NV via @NancyPelosi

Wolfram|Alpha Pro: http://t.co/G88eWq6Y #tools @myEN

A History of the Sky for One Year: http://t.co/UKMjosCK (very cool)

+1: A U.S. appeals court rules Prop. 8 unconstitutional: http://t.co/TZgdKU9k #fb

ITHCWY: Badge Driven Development: Microsoft has released Visual Studio Achievements, an extension that brings… http://t.co/5BOyNF03

ITHCWY: GGNRA Dog Management Plan Update: I love it when making some noise works. The NPS is pushing its dog… http://t.co/fzqaJWM2

Unicode Character 'PILE OF POO' (U+1F4A9): http://t.co/LkGffsvW

http://t.co/NA6TOdQk #todo @myEN

BBC News - Can the US Army embrace atheists? http://t.co/5ubkKT7r

Running an API at HUGE Scale - Webinar: http://t.co/tEnxdRBM #API

4 of 5 stars to The Leopard by Jo Nesbø http://t.co/tIIPs1M5

ITHCWY: Reviews and Links for January 2012: Damned by Chuck Palahniuk 3/5 Very much a vehicle for Palahniuk to rant… http://t.co/6kvApyf1

Add your comment...

Related Posts

You Might Also Like

(All Etc Posts)

Catfood.Shapefile 1.40

Updated on Monday, September 19, 2022

I’ve just released a small update to Catfood.Shapefile. Stephan Stapel, who implemented PolyLineM support, has contributed a patch that improves the class hierarchy. CodePlex user originSH suggested supporting the ACE driver for 64-bit systems. I’ve added a constructor overload that allows you to use predefined Jet and ACE connection strings or provide your own templates if necessary. Thanks to Stephan and originSH.

Catfood.Shapefile is a .NET library for enumerating ESRI shapefiles. I originally wrote the library to help me build some complex layers in Catfood Earth. Since then it’s picked up thousands of users and some really valuable suggestions and patches from the CodePlex community. I’m very glad a took a couple of hours to open source the library back in 2009.

Add your comment...

Related Posts

You Might Also Like

(All Code Posts)

PolyLineM support in Catfood.Shapefile

Updated on Sunday, May 23, 2021

I’ve just updated Catfood.Shapefile, my ESRI Shapefile parser for .NET, with PolyLineM support thanks to a contribution from Stephan Stapel. The solution for the new version has also been updated to Visual Studio 2010.

Download Catfood.Shapefile.dll 1.30 from CodePlex.

Add your comment...

Related Posts

You Might Also Like

(All Code Posts)

ESRI Shapefile Library Update

Updated on Sunday, May 23, 2021

I've just released a small update for my ESRI Shapefile Reader project on GitHub. The only change is a patch from SolutionMania that fixes a problem when the shapefile name is also a reserved name in the metadata database. The patch escapes the name preventing an exception from being thrown.

Catfood.Shapefile.dll is a .NET 2.0 forward only parser for reading an ESRI Shapefile. Download 1.20 from GitHub.

Add your comment...

Related Posts

You Might Also Like

(All Code Posts)

Catfood.Shapefile.dll 1.10

Updated on Sunday, May 23, 2021

I've just released v1.10 of my ESRI Shapefile Reader (Catfood.Shapefile.dll). This is a .NET 2.0 forward only parser for reading shapefile content.

Sharon Tickell was kind enough to report two bugs with suggested updates. These have both been fixed in 1.10.

While working on these fixes I also discovered that there are no 64-bit Jet drivers (since releasing the first version I've upgraded to a 64-bit box for development). This is an easy fix, just target any application using Catfood.Shapefile.dll at x86. I've updated the demo application accordingly.

Download Catfood.Shapefile.dll from GitHub.

Add your comment...

Related Posts

You Might Also Like

(All Code Posts)

ESRI Shapefile Reader in .NET

Updated on Sunday, March 12, 2023

ESRI Shapefile Reader in C#/.NET

Catfood.Shapefile is a .NET read-only, forward-only parser for Esri shapefiles. With Catfood.Shapefile it’s easy to enumerate all the shapes in a shapefile together with their metadata.

From version 2.00 Catfood.Shapefile is available via NuGet. It has also been migrated to .NET Standard 2.0. This means it is compatible with .NET Framework 4.61 or better and .NET Core 2.0 or better. If you use an older version of .NET then you should continue using Catfood.Shapefile 1.60. The source code is on GitHub.

Esri (originally Environmental Systems Research Institute) shapefiles are a GIS (geographic information systems) file format that can store a wide variety of geographic information. I originally started working with these files to add country borders to Catfood Earth.

Shapefiles actually consist of a number of different files with different extensions. There are three mandatory extensions: .shp, .shx and .dbf and so a shapefile containing borders might be distributed as borders.shp, borders.shx and borders.dbf. The .shp file contains the actual shape data in vector format, often lines or polygons. The .shx file is an index to the shapes. Finally the .dbf file is a database of metadata associated with the shapes. Catfood.Shapefile requires these three files.

There are several optional extensions that might be included with a shapefile. .prj contains the geographical projection, .xml is an alternate metadata format, .sbn and .sbx index for spatial queries, and .cpg defines the code page used by the shapefile.

Here is some sample code for a .NET 6 console application to print basic information about a shapefile and the first point in the first polygon:

To use this, create a new console application, paste the code into Program.cs and add Catfood.Shapefile via NuGet.

The default constructor uses a database connection string that uses the Jet driver. This is only available for 32-bit applications and you will need to target Windows x86 to use it. An overload is available that allows you to specify a custom connection string to access metadata.

Catfood.Shapefile supports Null, Point, MultiPoint, PolyLine, PolyLineM and Polygon shapes. Three dimensional shapes (PointZ, PolyLineZ and PolygonZ) are not currently supported. There is also currently no support for writing shapefiles. If you add any of this please send a pull request on GitHub!

I am grateful to the developers who have contributed to Catfood.Shapefile over the years. Most are credited in the release notes below. If you need help or have feedback please leave a comment on this post.

Updates

Catfood.Shapefile 2.00

I just released Catfood.Shapefile 2.00, my .NET parser for ESRI Shapefiles.

The big change is that I have migrated to .NET Standard 2.0. This makes it possible to use from .NET Core as well as classic .NET Framework from 4.6.1 up. If you need to use an older version of .NET Framework then you'll want to stick with Catfood.Shapefile 1.60.

Catfood.Shapefile is now also available via NuGet. This is the recommended way to install. The source code is still available on GitHub.

Catfood.Shapefile 1.60

I just released Catfood.Shapefile 1.60. This contains a fix from Libor Weigl that factors out the enumerator so that you can still access the shapefile after enumeration.

Catfood.Shapefile is a .NET library for parsing ESRI Shapefiles.

(previously)

Shapefile Update

A few people have asked for 3D shape support in my ESRI Shapefile library. I've never got around to it, but CodePlex user ekleiman has forked a version in his ESRI Shapefile to Image Convertor that supports PointZ, PolygonZ and PolyLineZ shapes. If that's what you need please check it out.

Catfood.Shapefile 1.50

I've just released a small update to my C# Shapefile library on Codeplex. Catfood.Shapefile 1.50 fixes a couple of bugs related to metadata and adds the ability to access metadata records directly via IDataRecord. 

Catfood.Shapefile 1.40

I’ve just released a small update to Catfood.Shapefile. Stephan Stapel, who implemented PolyLineM support, has contributed a patch that improves the class hierarchy. CodePlex user originSH suggested supporting the ACE driver for 64-bit systems. I’ve added a constructor overload that allows you to use predefined Jet and ACE connection strings or provide your own templates if necessary. Thanks to Stephan and originSH.

Catfood.Shapefile is a .NET library for enumerating ESRI shapefiles. I originally wrote the library to help me build some complex layers in Catfood Earth. Since then it’s picked up thousands of users and some really valuable suggestions and patches from the CodePlex community. I’m very glad a took a couple of hours to open source the library back in 2009.

PolyLineM support in Catfood.Shapefile

I’ve just updated Catfood.Shapefile, my ESRI Shapefile parser for .NET, with PolyLineM support thanks to a contribution from Stephan Stapel. The solution for the new version has also been updated to Visual Studio 2010.

Download Catfood.Shapefile.dll 1.30 from CodePlex.

ESRI Shapefile Library Update

I've just released a small update for my ESRI Shapefile Reader project on GitHub. The only change is a patch from SolutionMania that fixes a problem when the shapefile name is also a reserved name in the metadata database. The patch escapes the name preventing an exception from being thrown.

Catfood.Shapefile.dll is a .NET 2.0 forward only parser for reading an ESRI Shapefile. Download 1.20 from GitHub.

Catfood.Shapefile.dll 1.10

I've just released v1.10 of my ESRI Shapefile Reader (Catfood.Shapefile.dll). This is a .NET 2.0 forward only parser for reading shapefile content.

Sharon Tickell was kind enough to report two bugs with suggested updates. These have both been fixed in 1.10.

While working on these fixes I also discovered that there are no 64-bit Jet drivers (since releasing the first version I've upgraded to a 64-bit box for development). This is an easy fix, just target any application using Catfood.Shapefile.dll at x86. I've updated the demo application accordingly.

Download Catfood.Shapefile.dll from GitHub.

Add your comment...

Related Posts

You Might Also Like

(All Code Posts)

(Published to the Fediverse as: ESRI Shapefile Reader in .NET #code #shapefile #esri #github #codeplex #polylinem #c# #.net #nuget Catfood.Shapefile is a .NET library that provides easy access to Esri shapefiles (.shp, .shx, .dbf), available on NuGet and GitHub. )