Reading and writing Esri shapefiles in Delphi

 Delphi, GIS  Comments Off on Reading and writing Esri shapefiles in Delphi
Jan 212017

Esri Shapefile is a popular file format in geographic information systems (GIS). Probably because the format has been extensively documented (whitepaper in PDF format).

In my day job at a company that does road condition surveys I work with quite a lot of data in shapefile format, so in order to read and write them I wrote two Delphi units. These units have been in existence for quite a while but until recently they could only process rather basic file types with points and polylines. After having the need to process additional types, I have updated (and bugfixed) them, so they now can read the following shape types:

  • Point, PointZ, PointM
  • Polygon, PolygonZ, PolygonM
  • Polyline, PolylineZ, PolylineM
  • MultiPoint, MultiPointZ, MultiPointM

Please note that they only accesses the .shp file, not the accompanying .dbf, .proj, .shx and other files. The .dbf files are simply dbase files, so you could use e.g. tdbf for them (But check the tdbf license!). The .proj files are text.

The writer is more basic yet, it can only write Point shapes.

Both are part of dzlib, my general purpose library, and available under the Mozilla Public License from the svn repository on SourceForge OSDN:

 Posted by on 2017-01-21 at 14:12

dzEditorLineEndsFix 1.0.3 released

 Delphi, Windows, Windows 8.1  Comments Off on dzEditorLineEndsFix 1.0.3 released
Jan 212017

I have released a new version of my dzEditorLineEndsFix tool for Delphi 2006 to 2010. There is only one change: I removed the balloon hint it used to show at startup. It started to annoy the hell out of me (and I’m probably not the only one).

The tool also now has its own page on this blog.

 Posted by on 2017-01-21 at 13:11