- Shapefiles
- *.shp
- *.shx
- *.dbf
- *.prj
- *.cpg
-
Geotiff
- *.tiff
-
GeoJSON (Geographic JSON)
-
TopoJSON (Topographic JSON)
-
KML (Keyhole Markup Language)
Developed for use by Google Earth. Keyhole Markup Language is an XML notation for expressing geographic annotation and visualization within Internet-based, two-dimensional maps and three-dimensional Earth browsers.
-
GPX (GPS Exchange Format)
GPX is an XML schema designed as a common GPS data format for software applications.
- *.cpg
-
WKT (Well Known Text)
Well-known text is a text markup language for representing vector geometry objects on a map, spatial reference systems of spatial objects and transformations between spatial reference systems.
shp -> json
❯ brew install gdal
❯ which ogr2ogr
❯ ogr2ogr -f GeoJSON us_states.json cb_2016_us_state_20m.shp
❯ topojson -o us_states_topo.json --id-property GEOID --properties name=NAME us_states.json
shp -> geojson
csv -> geojson
<OGRVRTDataSource>
<OGRVRTLayer name="source">
<SrcDataSource>/PATH/TO/source.csv</SrcDataSource>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding="PointFromColumns" x="LONGITUDE COLUMN HERE" y="LATITUDE COLUMN HERE"/>
</OGRVRTLayer>
</OGRVRTDataSource>
❯ ogr2ogr -f GEOJson geo_result.json source.vrt