Ticket #1183 (new defect)

Opened 8 years ago

Last modified 5 years ago

Oracle WKTEXT Translation

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords: SRS OGRSpatialReference oracle oci
Cc: neteler, stephan.holl@…, warmerdam, Kosta

Description (last modified by warmerdam) (diff)

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 Download (458 bytes) - added by mloskot 7 years ago.
File with the Oracle WKT making problems
test.py Download (0.5 KB) - added by mloskot 7 years ago.
Python script reading the Oracle WKT using importFromWkt() method

Change History

Changed 8 years ago 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. 

Changed 8 years ago by warmerdam

More fun mateusz...

Changed 7 years ago by warmerdam

  • cc warmerdam added
  • priority changed from high to normal
  • description modified (diff)
  • milestone set to 1.4.2

Changed 7 years ago by mloskot

File with the Oracle WKT making problems

Changed 7 years ago by mloskot

Python script reading the Oracle WKT using importFromWkt() method

Changed 7 years ago 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?

Changed 7 years ago 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.

Changed 7 years ago 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.

Changed 7 years ago by mloskot

  • keywords OCI SRS OGRSpatialReference added

Changed 7 years ago by warmerdam

  • milestone changed from 1.5.0 to 1.5.1

OCI issues deferred to 1.5.1.

Changed 7 years ago by neteler

  • cc neteler added; neteler@… removed

Changed 7 years ago by neteler

  • cc stephan.holl@… added; holl@… removed

Changed 7 years ago by warmerdam

  • milestone changed from 1.5.1 to 1.5.2

Changed 6 years ago by Kosta

  • cc Kosta added

Changed 6 years ago by mloskot

  • keywords oracle oci added

Changed 6 years ago by mloskot

  • keywords OCI removed

Changed 6 years ago 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 ?

Changed 6 years ago 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.

Changed 6 years ago 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.

Changed 5 years ago by hobu

  • milestone changed from 1.6.1 to 1.7.0

CS-Map is now public, but no one has had time to work on this effort. Is it likely that it would be part of a larger effort to include CS-Map as an alternative coordinate system description engine?

Anyway, kicking forward to 1.7, but I expect it will be after that...

Changed 5 years ago by warmerdam

  • owner changed from mloskot to warmerdam
  • status changed from assigned to new
  • milestone 1.7.0 deleted

I don't anticipate action on this soon.

Note: See TracTickets for help on using tickets.