1

I have some vector layers in Oracle and PostGIS, point, line and polygon, and i want to reproject those layer in a different projection but i don't want to export the projected layer, i want to do it on the original layer because i have related tables with the feature ID. I know about on the fly projection but i want to permanent transform the data.

  • 1
    What have you tried? What happens when you use ST_TRANSFORM in an update statement? – Devdatta Tengshe Jul 5 '17 at 9:48
1

In both databases you can't transform into the same column, if the column is registered. Both databases hold the projection srid inside the geometry.

If you insert a geometry with a different projection, maybe you break a constraint or maybe the spatial index rebuild failed.

Best way is write the transformation result into a new table or column. Check the result. Delete the spatial index, De-register the original column. Update the new geometries to the original column. Register the column and create a new spatial index.

  • Have you tried this before and in which database type? – Shefqet LULJA Jul 5 '17 at 15:56
  • I wrote years ago an import/export service for Oracle, who used a staging table with two geometry columns, for auto correction of the incoming geometries. That's equivalent to your use case. My experience with postgis, say it's the same her. – Andreas W. Bartels Jul 5 '17 at 20:21

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.