Importing data - Invalid geometry: duplicate vertex found


I am trying to import a shp archive (dbf, shp, shx) into Immerse, without success:

import_geo_table failed: invalid geometry: duplicate vertex found Feature: 10

Now, the message is pretty clear, but how could I identify and solve this duplicate vertex problem ?

Same problem for the data in geojson format from:

Some additional detail:

From the above link keeping only the first polygon, the import is fine ( meaning no error "duplicate vertex found appears).

But the data aren’t fine:

NOME_PRO mapd_geo_coords mapd_geo_indices mapd_geo_linedrawinfo mapd_geo_polydrawinfo
Vercelli <Error> <Error> <Error> <Error>

How to import correctly the geojson file?

MapD Import and Render GeoJSON Shapes

Please could someone just showing me a valid geojson file format for importing in MapD?


The issue is due to a limitation in the library/algorithm we’re currently using to process the polygons in preparation for rendering. The library has issues triangulating the polygon if there are two vertices at the same location. We’re planning on switching to a different algorithm which can handle these cases, but I don’t believe we have a timeline for that yet.

What do you plan on using polygons/geometry for?

QGIS can be used to check the validity of your geometry. Open your file and then select Vector -> Geometry Tools -> Check validity. It actually looks like there are four instances where you have duplicate vertices.


i downloaded the 2016 files in shp format from istat site, converted into geojson with ogr2ogr and imported into immerse without any problem; fi you want to save bandwidth and performance or fix overlapping vertexes you can use mapshaper.

this is the link of online service


After having simplified the ISTAT shp file I have no more errors nor invalid layers in QGIS.

BUT still, importing in MapD raises the “duplicate vertex found” error.

If I keep only the first shape in the json file for testing porpoise (COD_PRO=“Vercelli”), the import is fine but again the data aren’t:

COD_REG	COD_CM	COD_PRO	DEN_CMPRO	PROVINCIA	SIGLA	FLAG_CMPRO	SHAPE_Leng	SHAPE_Area	mapd_geo_coords	mapd_geo_indices	mapd_geo_linedrawinfo	mapd_geo_polydrawinfo
1	0	2	Vercelli	Vercelli	VC	2	418,133.4059	2,082,312,243.94	<Error>	<Error>	<Error>	<Error>

Here the link to the file without errors in QGIS:!cgIAhDIY!BJwuEH0i2QDAduCKOsHdyGvCgIuDcl9RYzxGlqXLWc8


Thanks for your excellent support aznable, now Choropleth is working fine.

What i learnt:

  1. Chrome in Centos does not show the additional json file in the listbox of the Choropleth. Use Firefox.

  2. A number of simplifications are needed to the geojson shapefile in order to avoid duplicate vertexes and intersecting segments.
    This task is time-consuming I hope the switching to a different algorithm in Mapd will happen soon.

  3. It is necessary putting the geojson shapefile in $MAPD_HOME/frontend/geojson, and integrate the geoconfig.json in the same dir with the name and definition of the new shapefile.

  4. @Staff: The User Guide is lacking the above info, it would be useful adding them.

Thank you.


Do You remember which simplifications helped? Struggling with the same thing. Tried different options om mapshaper with no success. Still getting duplicate vertex error.


We resolved using shapes in geojson format directly on immerse without loading them on mapd-core


My file is getting rejected by immerse too. Having the same duplicate vertex error. Tried lots of different simplifications with no result yet.


Never got such an error; have you placed the file on /frontend/geojson directory and added the config entry on geojson.cfg file?
You don’t need to import your shapes into mapd database to use a chorophlet in immerse


Yes. Then restarted immerse. It runs with no warnings but I don’t see a new geojson in the list


strange thing
Tried to change some random strings in mapd/frontend/geojson/geoconfig.json and I don’t see them reflected in immerse UI. service restart didn’t help. Am I missing something?


You could try deleting whole cache file on your browser


Resolved with Browser cache. Thanks


The cache makes me crazy the first time I tried :wink: