Opened 7 years ago
Closed 5 years ago
#6852 closed enhancement (wontfix)
OGRSpatialReference::importFromXML() doesn't support GML 3.2 SRS definitions
Reported by: | bphamhuu | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | OGR_SRS | Version: | 1.11.4 |
Severity: | normal | Keywords: | GML 3.2.1, GML EPSG, read GML |
Cc: |
Description
I'm using gdal java to build an web application and I need to convert the GML 3.2.1 from opengis.net to wkt or proj4.
my current GDAL version: GDAL 1.11.4, released 2016/01/25
Here is simple Java code which could read the GML (not from opengis.net)
SpatialReference targetSpatialReference = new SpatialReference(); sourceSpatialReference.ImportFromXML(xml); with xml is GML from: http://spatialreference.org/ref/epsg/4326/gml/
Can I ask why gdal could read this GML which is not valid GML 3.2.1 Schema http://schemas.opengis.net/gml/3.2.1/,
but not this GML http://www.opengis.net/def/crs/EPSG/0/4326 which is valid ?
Change History (6)
comment:1 by , 7 years ago
Component: | JavaBindings → OGR_SRS |
---|---|
Milestone: | 1.11.6 |
Owner: | changed from | to
Priority: | high → normal |
Summary: | GDAL reads GML from opengis.net and translates to wkt ? → OGRSpatialReference::importFromXML() doesn't support GML 3.2 SRS definitions |
comment:2 by , 7 years ago
Component: | OGR_SRS → JavaBindings |
---|---|
Milestone: | → 1.11.6 |
Owner: | changed from | to
Priority: | normal → high |
Summary: | OGRSpatialReference::importFromXML() doesn't support GML 3.2 SRS definitions → GDAL reads GML from opengis.net and translates to wkt ? |
comment:3 by , 7 years ago
Component: | JavaBindings → OGR_SRS |
---|---|
Milestone: | 1.11.6 |
Owner: | changed from | to
Priority: | high → normal |
Summary: | GDAL reads GML from opengis.net and translates to wkt ? → OGRSpatialReference::importFromXML() doesn't support GML 3.2 SRS definitions |
@jukka gdalsrsinfo http://www.opengis.net/def/crs/EPSG/0/4326 doesn't read the GML document at this address. This kind of URL is hardcoded to be resolved locally as EPSG:XXXX
comment:4 by , 7 years ago
It would be good as it could be fixed in GDAL 1.11.x version as I don't want to build GDAL manually and only want to install the compiled GDAL from the Linux repository.
I hope your test in GDAL 2.2 could work with CRS not from ESPG as well, e.g: http://access.planetserver.eu:8081/def/crs/PS/0/Mars-equidistant which is a clone of CRS resolver from OGC: opengis.net/def and added a new GML CRS for Mars planet.
So, what I want for this ticket is GDAL could read the GML from any CRS definitions which follow the OGC GML 3.2.1 schema and then convert them to WKT, as someone could define arbitrary CRS beside the EPSG CRSs.
comment:5 by , 7 years ago
Note: http://access.planetserver.eu:8081/def/crs/PS/0/Mars-equidistant happens to be the output of GDAL, but the XML exporter is pretty limited currently and only supports a few projection methods. So the definition of this link lacks the projection part and cannot be read back...
comment:6 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
Bug tracker is not the correct place for asking question, use gdal-dev mailing list instead. It is serving also GDAL users.
With this GDAL version:
GDAL 2.2.0dev, released 2016/99/99
I am getting a result that looks correct to me: