2

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

2 Answers 2

0

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.

2
  • Tested and works :-) I assumed that CartoDB would reproject on-the-fly to 4326 if original crs was given. Cheers for following up my question ! Commented Nov 16, 2015 at 20:18
  • I'd say I should be doing the reprojection too. If you have an example when this does not happen so that we could reproduce and check internally what the system does, don't hesitate to let me know.
    – iriberri
    Commented Nov 17, 2015 at 9:09
0

I had a similar issue while mapping data from UrbIS Data using the Apache2/mod_tile/renderd/Mapnik/CartoCSS stack.

The mapped data did not align with official the OSM map in QGIS, but was shifted by some 100m.

My issues where solved by specifying the projection of the input data with the proj4 string from SR-ORG:56 instead of the one from EPSG:31370 in the Cartocss mml file.

Which is surprising to me because I think in other places we specify EPSG:31370 as srid for this data without issue. Would be curious to know why there is another 'version' of this projection and what's the background, but leaving this here as another thing to try if someone has issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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