Chapter 2 — Data Formats
3 min readJan 5, 2023
2.1 Vector Data File
a) GeoJSON
An example of a FeatureCollection that includes a point, line and polygon geometry
with some attributes stored as properties
:
{ "type": "FeatureCollection",
"features": [
{ "type": "Feature",
"geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
"properties": {"prop0": "value0"}
},
{ "type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
]
},
"properties": {
"prop0": "value0",
"prop1": 0.0
}
},
{ "type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
[100.0, 1.0], [100.0, 0.0] ]
]
},
"properties": {
"prop0": "value0",
"prop1": {"this": "that"}
}
}
]
}
b) GeoPackage
Its filename usually ends in .gpkg
. Applications such as QGIS, R and ArcGIS will recognize this format.
c) Shapefile
The shapefile format is a geospatial vector data format for geographic information system (GIS) software.
The list of files that define a “shapefile” is shown in the following table. Note that each file has a specific…