I'm trying to use the workflow described by @aflaciano at How to render area that crosses 180°? I did the following:
- downloaded and installed gdal-111-1600-x64-core.msi from here on my Windows 7 64 bit pc.
- downloaded data from http://www.naturalearthdata.com
- used the following batch-file adapted from @aflaciano:
rem Clip world.shp between -169° and +180° of longitude in order to exclude the Chukotka Peninsula (1st part):
rem ==========================================================================================================
ogr2ogr world_clip.shp ne_110m_admin_0_countries.shp -clipsrc -169 -90 180 90
rem Shift and clip world.shp between +180° and +191° of longitude in order to include the Chukotka Peninsula (2nd part):
rem ====================================================================================================================
ogr2ogr Chukotka_Peninsula.shp ne_110m_admin_0_countries.shp -dialect sqlite -sql "SELECT sov_a3, ShiftCoords(geometry,360,0) FROM ne_110m_admin_0_countries" -clipsrc 180 -90 191 90
rem Merge the two parts:
rem ====================
ogr2ogr world_shifted.shp world_clip.shp
ogr2ogr -update -append world_shifted.shp Chukotka_Peninsula.shp -nln world_shifted
rem Finally, dissolve countries boundaries of world_shifted.shp obtaining world_output.shp:
rem =======================================================================================
ogr2ogr world_output.shp world_shifted.shp -dialect sqlite -sql "select ST_Union(Geometry),sov_a3 FROM world_shifted GROUP BY sov_a3"
At step 3 last line of the batch-file I must have done an error, because dissolve does not work for me, but I get no error message:
ogr2ogr world_output.shp world_shifted.shp -dialect sqlite -sql "select ST_Union(Geometry),sov_a3 FROM world_shifted GROUP BY sov_a3"
I tried also other variables for dissolve, e.g. sovereignt or admin, geounit, adm0_a3


(I used sov-a3 instead of CNTRY_NAME, btw) 3) no errors, less rows than before query, so it seems ok question of a rockie: how can I save this query into a new db or shapefile, so that I can use it in software like qgis ???
– Kurt Jun 02 '14 at 16:49create table output as select CastToMultiPolygon(ST_Union(ST_SnapToGrid(Geometry,0.00001))) as geometry, sov_a3 FROM world_shifted GROUP BY sov_a34) refresh the table of contents in spatialite-gui, select column "geometry" from the output table with right click, run Recover geometry column (4326, XY, multipolygon) 5) Refresh. Now you can export the table as shapefile with right click on "geometry" or open directly with QGIS. – user30184 Jun 02 '14 at 17:15SQL query returned an empty ResultSet This is not an error
any hints?
– Kurt Jun 02 '14 at 17:34