[Postgres+SDE] ST_Transform with different spatial references

6377
13
04-03-2015 05:49 AM
FlorianCADOZ
Occasional Contributor

Hi everyone, I need help !!

I'm under PostgreSQL with ArcSDE and I have to reproject a data from WGS84 to RGF93 (French system with a different geographic coordinate system than WGS84)...

The solution is maybe here : ArcGIS Help (10.2, 10.2.1, and 10.2.2)

But on this page, there is no explanation for my problem with PostgreSQL ?!!!

Is anyone has a solution ?

Thx a lot for answers !

0 Kudos
13 Replies
StevenEmbree_II
New Contributor

Florian,

It appears as though you're using an SDE geodatabase within PostgreSQL. Please correct me if I'm wrong. If you are, using the ST_TRANSFORM is not recommended, as it does not update all of the required SDE repository tables. To correctly change the spatial references, you should use tools available within ArcGIS Desktop to accomplish that task. Please see the following:

ST_TRANSFORM

ST_Transform—Help | ArcGIS for Desktop

I hope that helps!

CarrieDavis
Occasional Contributor

Florian,

I'm not familiar with a way to automate the re projection process with SQL.  The project tool is available with the arcpy python library if you need to automate the process.  There is a python sample contained in the 10.3 documentation.  Project—Help | ArcGIS for Desktop .

0 Kudos
FazertyCazerty
New Contributor

Hi everyone,

- Neil Ayres :

No it doesn't overlay because : the origin data are lon/lat in WGS84 (SRID : 4326), my database is in L93 (SRID : 2154) and I would like to inject the origin data (in WGS84) into a layer (in L93), so yes it makes sense to reproject the lon/lat from WGS84 (SRID : 4326) to L93 (SRID : 2154), maybe with a transformation like WGS84_1984_To_RGF_1993 or the transformation used in ArcGIS which is WGS_1984_To_NTF_NTv2+NTF_To_RGF_1993_1 but certainly not RGF_1993_To_WGS_1984 (SRID-transformation : 1671) because if for reproject from WGS84 to RGF93, i'm not sure that if the 1671-transformation worked, ArcMap would prefer to use the WGS_1984_To_NTF_NTv2+NTF_To_RGF_1993_1 transformation rather than the RGF_1993_To_WGS_1984 which looks simpler...

- Steven Embree II :

Yes I'm using ArcSDE within Postgresql, but I have to use the SQL/SDE queries without using ArcMap because my goal is to schedulling some tasks like : Creating point from lon/lat WGS84 data --> Reprojecting it in L93 --> Insert it into my sde/PG database...

I don't understand you're message, are you telling me that the sde queries malfunction ?

- Carrie Davis :

No my script is in Java and it lunch some queries in XPath and SQL sometimes, on the other side, I really don't know Python and I really would like to do this in SQL...

Is it me or this transformation is not possible in SQL with the sde.st_transform under Postgres ?

Thx everyone for your reponses

0 Kudos
CarrieDavis
Occasional Contributor

Hi Florian,

You are correct.  Applying a transformation is not possible with the ST_transform.  Sorry to inform you that this would limit your ability to do this re-project in SQL.  There is a Java API but this is not my expertise. 

ArcGIS Runtime for Java 10.2.4 API Reference

0 Kudos