atolcd/pentaho-gis-plugins

Can't insert values into table after projection conversion

julianobn opened this issue · 3 comments

I'm trying to do a coordinate system conversion over a field through Coordinate System Operation (before: EPSG:4019, after: ESRI:102015), but I'm getting an error at the subsequent Table Output step. I've tried to manually do the INSERT INTO operation at the PostgreSQL terminal, after getting the fields values at the PDI Logging tab. The reason is that the content the Geometry field have generated to the query used at Table Output is POINT (...) without specifying the SRID before -- when I put SRID=102015;POINT (...) it works. Otherwise, I get the same error the Logging tab show:

Geometry SRID (0) does not match column SRID (102015)

In other words, without explicitly putting SRID=...;, PostGIS thinks the SRID is 0.

One possible solution is manually insert the SRID before the SQL command, but I'm having trouble in trying to convert the Geometry field into String field -- even the toString() method doesn't work!

Can anybody suggests anything?

Normally, You can use the function "Assign coordinate system to geometry" to set the Geometry SRID before use the step "Table output".

Yes, precisely!
I'm setting the geometry to EPSG:4019 -- which is the projection QGIS points out to the feature --, and then converting it to ESRI:102015. One detail that might be important is that although AtolCD plugin has both projection systems, PostGIS has, by default, only the first one. I've had to insert ESRI:102015 manually to the spatial_ref_sys table.

Sorry. I had confused ESRI and EPSG.