Ticket #1183 (assigned defect)

Opened 2 years ago

Last modified 1 day ago

Oracle WKTEXT Translation

Reported by: warmerdam Assigned to: mloskot (accepted)
Priority: normal Milestone: 1.6.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: SRS OGRSpatialReference oracle oci
Cc: neteler, stephan.holl@intevation.de, warmerdam, Kosta

Description (Last modified by warmerdam)

The following WKTEXT value from Oracle is not handled properly in OGR bccause the PROJECTION[] name has a space in it. We need morph to/from oracle methods in ogrocidatasource.cpp to remap projection names and other identified oddities of Oracle format.

PROJCS["GK Zone 4 (DHDN)", GEOGCS [ "", DATUM ["", SPHEROID ["Bessel 1841",
6377397.155, 299.1528128], 582.000000, 105.000000, 414.000000, -1.040000,
-0.350000, 3.080000, 8.300000 ], PRIMEM [ "Greenwich", 0.000000 ], UNIT
["Decimal Degree", 0.01745329251994330]], PROJECTION ["Transverse Mercator"],
PARAMETER ["Scale_Factor", 1.000000], PARAMETER ["Central_Meridian", 12.000000],
PARAMETER ["False_Easting", 4500000.000000], UNIT ["Meter", 1.000000000000]]

Attachments

oci.wkt (458 bytes) - added by mloskot on 04/27/07 02:29:07.
File with the Oracle WKT making problems
test.py (0.5 kB) - added by mloskot on 04/27/07 02:29:57.
Python script reading the Oracle WKT using importFromWkt() method

Change History

05/11/06 15:00:23 changed by warmerdam

I see the DATUM also has a bunch of unlabelled numeric parameters
were are presumably TOWGS84 values.  It would be nice to handle them properly
too. 

07/17/06 13:45:05 changed by warmerdam

More fun mateusz...

04/04/07 23:20:31 changed by warmerdam

  • priority changed from high to normal.
  • cc changed from neteler@itc.it, holl@gdf-hannover.de to neteler@itc.it, holl@gdf-hannover.de, warmerdam.
  • description changed.
  • milestone set to 1.4.2.

04/27/07 02:29:07 changed by mloskot

  • attachment oci.wkt added.

File with the Oracle WKT making problems

04/27/07 02:29:57 changed by mloskot

  • attachment test.py added.

Python script reading the Oracle WKT using importFromWkt() method

04/27/07 02:32:48 changed by mloskot

  • status changed from new to assigned.

Frank,

This issue is not clear to me and I'd need more details.

What does it mean that OGR does not handle the WKT properly? Does OGR crash or can't read this WKT?

I attached test.py script with very simple test of how the reported WKT is parsed and here is what I get:

mloskot:~/dev/gdal/bugs/1183$ ./test.py
Type      : projected
PROJCS    : GK Zone 4 (DHDN)
GEOGCS    : 
DATUM     : 
SPHEROID  : Bessel 1841
PRIMEM    : Greenwich
PROJECTION: Transverse Mercator

The space in PROJECTION name seems to be parsed correctly, isn't it?

04/27/07 15:20:40 changed by warmerdam

Matuesz,

OGR expects "Transverse_Mercator" as the PROJECTION[] name for Transverse Mercator projections. The above will note validate, nor be successfully interchanged with anything else.

I think we need to review the contents of the WKT for Oracle for a few different versions. I've heard things improved to be more OGC compatible in 10g, though I don't know that for sure. Ultimately it seems likely we will need something like the morphToESRI(), morphFromESRI() methods used for the ESRI variant of WKT.

04/27/07 15:22:56 changed by warmerdam

  • milestone changed from 1.4.2 to 1.5.0.

BTW, I suspect this is too complex an issue to fix for in the 1.4 branch, so I'm setting this to 1.5.0 milestone. If it turns out there are some simple things we can do to improve function in 1.4 branch, then that's great too.

10/29/07 01:31:56 changed by mloskot

  • keywords set to OCI SRS OGRSpatialReference.

12/04/07 12:59:53 changed by warmerdam

  • milestone changed from 1.5.0 to 1.5.1.

OCI issues deferred to 1.5.1.

12/29/07 11:46:15 changed by neteler

  • cc changed from neteler@itc.it, holl@gdf-hannover.de, warmerdam to neteler, holl@gdf-hannover.de, warmerdam.

12/29/07 11:47:26 changed by neteler

  • cc changed from neteler, holl@gdf-hannover.de, warmerdam to neteler, stephan.holl@intevation.de, warmerdam.

03/04/08 16:20:07 changed by warmerdam

  • milestone changed from 1.5.1 to 1.5.2.

05/28/08 12:18:25 changed by Kosta

  • cc changed from neteler, stephan.holl@intevation.de, warmerdam to neteler, stephan.holl@intevation.de, warmerdam, Kosta.

07/08/08 06:07:01 changed by mloskot

  • keywords changed from OCI SRS OGRSpatialReference to OCI SRS OGRSpatialReference oracle oci.

07/08/08 06:08:07 changed by mloskot

  • keywords changed from OCI SRS OGRSpatialReference oracle oci to SRS OGRSpatialReference oracle oci.

07/11/08 15:22:28 changed by mloskot

Frank,

I'd like to take this ticket up. Could you give some update for your comments, about how to solve properly? Should I just look at other morphers and catch WKT differences specific for Oracle, and implement morphTo/FromOracle ?

07/11/08 16:46:25 changed by warmerdam

  • milestone changed from 1.5.3 to 1.6.0.

Mateusz,

Yes, please proceed with a morphToOracle() / morphFromOracle().

I would appreciate it if you could write up some description of the issues with Oracle WKT - perhaps as a trac wiki topic for now.

It might make sense to just do this morph work in trunk rather than trying to address 1.5 branch.

07/24/08 16:43:19 changed by mloskot

On the MetaCRS list, we (Frank) asked for comments and experiences on dealing with Oracle WKT CS definitions. Norm Olsen gave us very helpful notes.

Source code of CS-Map project is going to be public soon. As Norm confirmed, it already includes mapping tables of Oracle WKT specifics to OGC format, etc.

So we have decided to defer work on this ticket for a few weeks and wait for CS-Map sources.