Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am fairly new to GIS data and as such please feel free to ask for extra data I might not have provided.

I have some regional data from Natural Earth, more specifically this: http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-1-states-provinces/ (States and Provinces, first download).

This uses a longlat-projection, which I wish to turn into a miller projection. However, several of the regions get "mangled" by the transformation. It seems to only affect those sitting at the border of the map (far west / far east), more specifically:

(In the format "Country - Region name") Antarctica - ATA-00 (Antarctica aggregation) Brazil - Goiás Fiji - Northern Russia - Chukchi Autonomous Okrug Zambia - Eastern

If I manually go in and edit the nodes touching the edge, it seems to fix the problem. However, I am trying to automate the process, so I can automatically generate new data from the shapefile when a new release is made.

Is there any smart way of overcoming this issue? The error presents itself as if the feature is trying to combine all the polygons into one, drawing ugly lines across the entire map to connect them. An example can be seen here: http://i.imgur.com/bzJ5V.png (taken from QGIS). The result is the same whether through a script (using GDAL) or through the QGIS program.

share|improve this question
1  
I've always called those artifacts, "zingers" (they zing across the map). They occur when a vertex at or near +/-180 (or the antimeridian, meridian 180 degrees from the central meridian) gets projected to the opposite side of a projected CRS from the previous vertex. Usually, the projection algorithm needs to clip lines and polygons and close polygons. Sometimes adding more vertices near +/-180 will help. –  mkennedy Dec 19 '12 at 17:46
    
As said, manually moving the vertices slightly away from the 180 degree "edge" alleviated the problem. Perhaps I can make a script that moves 180-degree nodes slightly away from the edge. –  Christian P. Dec 21 '12 at 9:03
add comment

closed as too localized by underdark Jun 17 '13 at 20:24

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

A recent, perhaps-related issue (see James Fee's blog and related discussion) suggests that ogr2ogr will solve issues with bad shapefiles from NaturalEarth. Ogr2ogr might help if it was used before transforming the data.

ogr2ogr new_file.shp original_file.shp

You can even try transforming the data at the same time with the -t_srs option.

share|improve this answer
    
The file does render correctly from the original, the error only occurs post-transformation. I'll try it out still and see if it fixes the problem. –  Christian P. Dec 21 '12 at 9:06
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.