1

I loaded the Natural Earth Quick Start Kit in QGIS 2.8.5, enabled on-the-fly CRS transformation, and changed the CRS to World_Robinson, and this is what shows up:

enter image description here

When zoomed in it looks fine. To be precise, the glitch start to happen somewhere between 1:45,000,000 and 1:46,000,000.

Any idea what's causing this? Am I doing something wrong here?

EDIT: I don't think this is a duplicate issue. At least the "Settings -> Options, Rendering tab, uncheck Enable feature simplification by default for newly added layers" fix does nothing for this problem.

EDIT 2: This isn't limited to Robinson. Pretty much every CRS I tried has graphical glitches when viewing the whole world. And every CRS works fine when zoomed in (at 1:20,000,000 everything works).

  • 1
    Does it help if you reproject the layer to Robinson using Save as ..., and load only that layer? – AndreJ Jan 5 '16 at 15:02
  • Which format do I choose when I do Save as...? I tried a few of them but could not import any of them as a layer when I start a new project. Sorry, this is my first time using QGIS. – My other car is a cadr Jan 5 '16 at 16:15
  • ESRI Shapefile is the standard format for vector data. – AndreJ Jan 5 '16 at 18:00
3

I've seen this a few times with Robinson and similar projections. Artifacts like these are caused by polygons which cross the antimeridian (180 degrees west). This happens on some, but not all, of the Natural Earth shapefiles.

Here's the 10m scale provinces from Natural Earth Starter kit, you can see the artifacts. Zooming in removes these, because the problem polygons now fall outside the drawing area (canvas extent) so they aren't drawn.. This is why the problem is scale-dependent.

robinson with glitches

Quickest way to fix this is to call ogr2ogr with the -wrapdateline option. This makes sure everything gets clipped to the antimeridian, and writes it to a new shapefile.

ogr2ogr -wrapdateline -t_srs EPSG:4326 /tmp/fixed_4326.shp ne_10m_admin_1_states_provinces_shp.shp

This is a command line tool, which should be installed along with QGIS.

This gave a couple of geometry errors, but still managed to write the new shapefile.

ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 179.99999997866655 -84.515235437277511 at 179.99999997866655 -84.515235437277511
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 179.99999997866655 -84.515235437277511 at 179.99999997866655 -84.515235437277511

Loading in fixed_4326.shp, the problem is fixed.

Robinson, no glitches

(I did this in 2.12.2 Pisa, your mileage may vary with 2.8)

The other thing i see is bounding boxes (in pink). These appear as trapezoids, with straight edges. To get nice curved edges on these, you'll need to densify them. See this answer on how to densify for Robinson projection

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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