By Thomas Zuberbühler

2019-02-07 15:12:13 8 Comments

According to, there is no way to describe topological relations in a shapefile. I am aware that this can be done using a Geodatabase and I have heard of TopoJSON.

If there are any other alternatives which GIS Software works with them?


@aidenprice 2019-02-11 05:10:44

For the coding inclined you could consider Mapbox's Geobuf format. It's basically a binary representation of GeoJSON/TopoJSON data (protocol buffers for those who want the technical details).

There's a Python version here. I haven't found a good, open source, Python library to generate TopoJSON from geometries yet (at least for server side work). But you can use QGIS or PostGIS to create topogolies.

The format's main shortcoming is that no desktop app will open it directly (but that's to be expected from something brand new and not yet stable). You would need to write your own JavaScript/Python code to decompress the data and then create the geometry objects. So, for example, you could write some Python code in QGIS and open it there.

@klewis 2019-02-07 18:08:05

You can run the ArcGIS Tool Polygon_Neighbors on a Polygon Shapefile. The output is a Table that lists the neighbors to each Polygon. There is also an option to analyse Overlaps. This tool works with any license level. This ArcGIS functionality seems to contradict your statement, "there is no way to describe topological relations in a shapefile".

@Richard Law 2019-02-07 19:56:08

That doesn't contradict the statement; that tool just creates a separate output.

@klewis 2019-02-07 20:31:45

@richard law - the table can be joined back to the Shapefile on FID.

@Richard Law 2019-02-08 01:00:30

Sure, but that's not part of the Shapefile specification, and has no semantic meaning.

@lambertj 2019-02-07 16:06:29

GeoPackage is another, open, alternative format that supports vector and raster data. It is based on SQLite, and data is stored in a single file. As far as I'm aware, GeoPackage supports topology. GeoPackage is supported by a range of GIS software packages, including GDAL, QGIS, R, Python, and (to a more limited extent) ESRI products. You can see more about the file specification here.

@Thomas Zuberbühler 2019-02-07 16:37:52

I was looking into GeoPackage but unfortunately did not find any evidence that it supports topology. Any sources?

Related Questions

Sponsored Content

0 Answered Questions

Topological Editing of Two different layers in QGIS

2 Answered Questions

1 Answered Questions

[SOLVED] Solve wrong topological error after union?

1 Answered Questions

[SOLVED] Merge adjacent polygons

0 Answered Questions

12 Answered Questions

0 Answered Questions

Overlapping despite topological editing

1 Answered Questions

2 Answered Questions

3 Answered Questions

[SOLVED] Batch conversion of Shapefiles to Topojson

Sponsored Content