Opened 18 years ago

Closed 9 years 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: Markus 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 Mateusz Łoskot 17 years ago.
File with the Oracle WKT making problems
test.py (557 bytes ) - added by Mateusz Łoskot 17 years ago.
Python script reading the Oracle WKT using importFromWkt() method

Download all attachments as: .zip

Change History (23)

comment:1 by warmerdam, 18 years ago

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 by warmerdam, 18 years ago

More fun mateusz...

comment:5 by warmerdam, 17 years ago

Cc: warmerdam added
Description: modified (diff)
Milestone: 1.4.2
Priority: highnormal

by Mateusz Łoskot, 17 years ago

Attachment: oci.wkt added

File with the Oracle WKT making problems

by Mateusz Łoskot, 17 years ago

Attachment: test.py added

Python script reading the Oracle WKT using importFromWkt() method

comment:6 by Mateusz Łoskot, 17 years ago

Status: newassigned

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 by warmerdam, 17 years ago

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 by warmerdam, 17 years ago

Milestone: 1.4.21.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 by Mateusz Łoskot, 17 years ago

Keywords: OCI SRS OGRSpatialReference added

comment:10 by warmerdam, 16 years ago

Milestone: 1.5.01.5.1

OCI issues deferred to 1.5.1.

comment:11 by Markus Neteler, 16 years ago

Cc: Markus Neteler added; neteler@… removed

comment:12 by Markus Neteler, 16 years ago

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

comment:13 by warmerdam, 16 years ago

Milestone: 1.5.11.5.2

comment:14 by Kosta, 16 years ago

Cc: Kosta added

comment:15 by mloskot, 16 years ago

Keywords: oracle oci added

comment:16 by mloskot, 16 years ago

Keywords: OCI removed

comment:17 by Mateusz Łoskot, 16 years ago

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 by warmerdam, 16 years ago

Milestone: 1.5.31.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 by Mateusz Łoskot, 16 years ago

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 by hobu, 15 years ago

Milestone: 1.6.11.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 by warmerdam, 14 years ago

Milestone: 1.7.0
Owner: changed from Mateusz Łoskot to warmerdam
Status: assignednew

I don't anticipate action on this soon.

comment:22 by Jukka Rahkonen, 9 years ago

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 by Jukka Rahkonen, 9 years ago

Resolution: fixed
Status: newclosed

Seven weeks passed without feedback, closing.

Note: See TracTickets for help on using tickets.