Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't insert values into table after projection conversion #11

Open
julianobn opened this issue Jan 13, 2017 · 3 comments
Open

Can't insert values into table after projection conversion #11

julianobn opened this issue Jan 13, 2017 · 3 comments

Comments

@julianobn
Copy link

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?

@darbonc
Copy link

darbonc commented Jan 16, 2017

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

@julianobn
Copy link
Author

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.

@darbonc
Copy link

darbonc commented Jan 16, 2017

Sorry. I had confused ESRI and EPSG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants