Tag Archives: SHP

Shapefile of reconstructable graticule lines for GPlates

5-Degree spaced graticule lines using the Seton et al plate polygons, reconstructed to 100 Ma.

I have generated a shapefile with reconstructable, global graticule lines (5 degree spacing) for the Seton et al. plate model continental polygons. Download the file here. This file is released under a Creative Commons Attribution Share-Alike 3.0 license and was created with CreateGraticuleLines.py (Link to BitBucket site).


ogr2ogr in the 3rd Dimension

I had to convert shapefile data from 2D lines/points to files consisting of 3 fields (x,y,z) for further processing using the GMT5. I was about to write some Python code to do that myself when I realised a new (GDAL >1.8) option in the ogr2ogr tool:

-zvalue Uses the specified field to fill the Z coordinate of geometries.

Turning an attribute from a shapefile into a z-Value for GMT files ogr2ogr and this flag is easy and helps to avoid ArcGIS’ 3D Analyst’s “Feature Attribute to Z-Value” function.

Simple usage:
ogr2ogr -F"GMT" OutFileWithZValues.gmt InFileWithZAttribute.shp -zfield"Thickness"

Done. Even works the other way around – from an OGR GMT file with Z-values in the 3rd column to a 2.5D shapefile:

ogr2ogr -F"ESRI Shapefile" OutFileWithZAttribute.shp InFileWithZValues.gmt -nlt LINESTRING25D