Opened 9 years ago

Closed 6 months ago

#1183 closed defect (fixed)

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)

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 (2)

oci.wkt (458 bytes) - added by mloskot 8 years ago.
File with the Oracle WKT making problems
test.py (557 bytes) - added by mloskot 8 years ago.
Python script reading the Oracle WKT using importFromWkt() method

Download all attachments as: .zip

Change History (23)

comment:1 Changed 9 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. 

comment:2 Changed 9 years ago by warmerdam

More fun mateusz...

comment:5 Changed 8 years ago by warmerdam

  • Cc warmerdam added
  • Description modified (diff)
  • Milestone set to 1.4.2
  • Priority changed from high to normal

Changed 8 years ago by mloskot

File with the Oracle WKT making problems

Changed 8 years ago by mloskot

Python script reading the Oracle WKT using importFromWkt() method

comment:6 Changed 8 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?

comment:7 Changed 8 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.

comment:8 Changed 8 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.

comment:9 Changed 8 years ago by mloskot

  • Keywords OCI SRS OGRSpatialReference added

comment:10 Changed 8 years ago by warmerdam

  • Milestone changed from 1.5.0 to 1.5.1

OCI issues deferred to 1.5.1.

comment:11 Changed 8 years ago by neteler

  • Cc neteler added; neteler@… removed

comment:12 Changed 8 years ago by neteler

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

comment:13 Changed 7 years ago by warmerdam

  • Milestone changed from 1.5.1 to 1.5.2

comment:14 Changed 7 years ago by Kosta

  • Cc Kosta added

comment:15 Changed 7 years ago by mloskot

  • Keywords oracle oci added

comment:16 Changed 7 years ago by mloskot

  • Keywords OCI removed

comment:17 Changed 7 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 ?

comment:18 Changed 7 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.

comment:19 Changed 7 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.

comment:20 Changed 6 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...

comment:21 Changed 6 years ago by warmerdam

  • Milestone 1.7.0 deleted
  • Owner changed from mloskot to warmerdam
  • Status changed from assigned to new

I don't anticipate action on this soon.

comment:22 Changed 7 months ago by jratike80

Oracle has a support for standard EPSG-codes since long beginning from version 10g. I believe and hope that there is no need for any WKT based morphToOracle any more and we can close this ticket as won't fix. I will wait a week or two for feedback.

comment:23 Changed 6 months ago by jratike80

  • Resolution set to fixed
  • Status changed from new to closed

Seven weeks passed without feedback, closing.

Note: See TracTickets for help on using tickets.