Saturday 4 February 2017

carto - CartoDB QGIS plugin: export/import projection shift?


Original datasource is a postgis db table "Verkavelingen" using epsg 31370 as is my project file EPSG:31370 OTF


I have used CartoDB QGIS plugin to export that table to a dataset on CartoDB "verkavelingen20151107" and import that dataset back again in QGIS.



As you can see below my data has 'shifted' somehow and is not on its original location... Same shift happening when viewing data on the CartoDB website.


Using CartoDB SQL command SELECT ST_Srid(the_geom) FROM verkavelingen20151107 I see my data is in 4326.


Using OpenLayers plugin in QGIS my original dataset shows up fine on Google/OSM background layers.


I'm using QGIS 2.12 & postgresql 9.4.5


Can someone help me out ?


qgis_cartodb_pj_shift



Answer



This query:



SELECT ST_Srid(the_geom) FROM verkavelingen20151107




will always return 4326 as the_geom type is fixed by the system, and CartoDB always supposes that 4326 is the projection of the data unless the source file specifies it otherwise.


If you're using QGIS, I would recommend to transform your layer to 4326 before uploading to CartoDB.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...