[gdal-dev] GML elevation
Nikolaos Hatzopoulos
nhatzop at gmail.com
Mon Aug 8 23:14:25 EDT 2011
GDAL 1.7.2
ogrinfo my.gml Borehole
Had to open data source read-only.
INFO: Open of `my.gml'
using driver `GML' successful.
Layer name: Borehole
Geometry: Unknown (any)
Feature Count: 1
Extent: (-28.413900, 121.142000) - (-28.413900, 121.142000)
Layer SRS WKT:
(unknown)
name: String (71.0)
sampledFeature: String (0.0)
OGRFeature(Borehole):0
name (String) = WTB5
sampledFeature (String) =
POINT (-28.413900000000002 121.141999999999996)
GDAL 1.8.1
java -Djava.library.path=. -cp gdal.jar:build/apps ogrinfo
/home/nickhatz/my.gml Borehole
INFO: Open of `/home/nickhatz/my.gml'
using driver `GML' successful.
Layer name: Borehole
Geometry: Point
Feature Count: 1
Extent: (121.142, -28.4139) - (121.142, -28.4139)
Layer SRS WKT:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4326"],
AXIS["Latitude",NORTH],
AXIS["Longitude",EAST]]
gml_id: String (0.0)
name: StringList (0.0)
sampledFeature: String (0.0)
elevation: Real (0.0)
driller: String (0.0)
dateOfDrilling: String (10.0)
drillingMethod: String (12.0)
startPoint: String (22.0)
inclinationType: String (8.0)
lowerCorner: Real (0.0)
upperCorner: Real (0.0)
coreCustodian: String (0.0)
OGRFeature(Borehole):5
gml_id (String) = gsml.borehole.WTB5
name (StringList) = (2:,...)
sampledFeature (String) =
elevation (Real) = 45
driller (String) =
dateOfDrilling (String) = 2004-09-17
drillingMethod (String) = diamond core
startPoint (String) = natural ground surface
inclinationType (String) = vertical
lowerCorner (Real) = 106
upperCorner (Real) = 249
coreCustodian (String) =
POINT (121.142 -28.4139)
What version are you running?
--Nikos
On Mon, Aug 8, 2011 at 6:45 PM, Frank Warmerdam <warmerdam at pobox.com> wrote:
> On Mon, Aug 8, 2011 at 6:39 PM, Nikolaos Hatzopoulos <nhatzop at gmail.com>
> wrote:
> >
> System.out.println("Elevation"+poDS.GetLayerByIndex(0).GetFeature(0).GetFieldAsString("elevation"));
> >
> > ERROR 1: No such a field 'elevation'
>
>
> Niko,
>
> Odd, for me ogrinfo reports:
>
> ...
> gml_id: String (0.0)
> name: StringList (0.0)
> sampledFeature: String (0.0)
> elevation: Real (0.0)
> driller: String (0.0)
> dateOfDrilling: String (10.0)
> drillingMethod: String (12.0)
> startPoint: String (22.0)
> inclinationType: String (8.0)
> lowerCorner: Real (0.0)
> upperCorner: Real (0.0)
> coreCustodian: String (0.0)
> OGRFeature(Borehole):5
> gml_id (String) = gsml.borehole.WTB5
> name (StringList) = (2:,...)
> sampledFeature (String) =
> elevation (Real) = 45
> driller (String) =
> ...
>
> Fetching with a field name of "elevation" should have worked.
> Check your ogrinfo report on the file and see if you see something
> different.
>
> Best regards,
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Software Developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110808/fff6b93d/attachment.html
More information about the gdal-dev
mailing list