[gdal-dev] ogr gml

2011-01-05 Thread Sebastian E. Ovide
Hi All,

ogrinfo is skiping some fields my gml files

for example the
fields addressStatus, matchStatus, physicalStatus, positionalQuality
and structureType are not read...



11
2009-10-12
Address

Matched
Existing
Final
Permanent Building

AP6DJK8352W7DAUGJG


405525.600,628349.000



16
WEST END
CHATTON
ALNWICK
NE66 5PP
1Z

2003-04-18




any ideas ?
-- 
Sebastian E. Ovide
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] ogr gml

2011-01-05 Thread Even Rouault
Sebastian,

you didn't mention the GDAL version you are using. There has been a lot of
improvements done in the GML driver in GDAL trunk over the last few months and
theoritically you should now be able to see the fields that are not immediate
children of the Feature element. You can try GDAL 1.8.0beta2 (or if you're not
in a position to compile code by yourself : gdal-dev in OSGEO4W or Tamas
Szekeres daily builds at http://vbkto.dyndns.org/sdk/ (the -devel packages) if
you're on windows, or FWTools 3.0.1 if you're on Linux)

Best regards,

Even

> Hi All,
>
> ogrinfo is skiping some fields my gml files
>
> for example the
> fields addressStatus, matchStatus, physicalStatus, positionalQuality
> and structureType are not read...
>
> 
> 
> 11
> 2009-10-12
> Address
> 
> Matched
> Existing
> Final
> Permanent Building
> 
> AP6DJK8352W7DAUGJG
> 
> 
> 405525.600,628349.000
> 
> 
> 
> 16
> WEST END
> CHATTON
> ALNWICK
> NE66 5PP
> 1Z
> 
> 2003-04-18
> 
> 
> 
>
> any ideas ?
> --
> Sebastian E. Ovide
>


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] ogr gml

2011-01-05 Thread christopher.schmidt

On Jan 5, 2011, at 11:13 AM, ext Sebastian E. Ovide wrote:

> Hi All,
> 
> ogrinfo is skiping some fields my gml files 
> 
> for example the fields addressStatus, matchStatus, physicalStatus, 
> positionalQuality and structureType are not read...

Those are complex fields, which OGR doesn't handle.

-- Chris

> 
> 
> 11
> 2009-10-12
> Address
> 
> Matched
> Existing
> Final
> Permanent Building
> 
> AP6DJK8352W7DAUGJG
> 
> 
> 405525.600,628349.000
> 
> 
> 
> 16
> WEST END
> CHATTON
> ALNWICK
> NE66 5PP
> 1Z
> 
> 2003-04-18
> 
> 
> 
> 
> any ideas ?
> -- 
> Sebastian E. Ovide
> 
> 
> 
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] ogr gml

2011-01-05 Thread Ralf Suhr
Hi Chris,

if you have a newer gdal version (1.8). ogrinfo will produce:

Layer name: AddressPoint
Geometry: Point
Feature Count: 1
Extent: (405525.60, 628349.00) - (405525.60, 628349.00)
Layer SRS WKT:
(unknown)
version: Integer (0.0)
versionDate: String (10.0)
theme: String (7.0)
matchStatus: String (7.0)
physicalStatus: String (8.0)
positionalQuality: String (5.0)
structureType: String (18.0)
OSAPR: String (18.0)
buildingNumber: Integer (0.0)
thoroughfare: String (8.0)
dependentLocality: String (7.0)
postTown: String (7.0)
postCode: String (8.0)
deliveryPointSuffix: String (2.0)
postalAddressDate: String (10.0)
OGRFeature(AddressPoint):0
  version (Integer) = 11
  versionDate (String) = 2009-10-12
  theme (String) = Address
  matchStatus (String) = Matched
  physicalStatus (String) = Existing
  positionalQuality (String) = Final
  structureType (String) = Permanent Building
  OSAPR (String) = AP6DJK8352W7DAUGJG
  buildingNumber (Integer) = 16
  thoroughfare (String) = WEST END
  dependentLocality (String) = CHATTON
  postTown (String) = ALNWICK
  postCode (String) = NE66 5PP
  deliveryPointSuffix (String) = 1Z
  postalAddressDate (String) = 2003-04-18
  POINT (405525.6 628349.0)

Gr
Ralf

Am Mittwoch 05 Januar 2011, 17:19:41 schrieb christopher.schm...@nokia.com:
> On Jan 5, 2011, at 11:13 AM, ext Sebastian E. Ovide wrote:
> > Hi All,
> > 
> > ogrinfo is skiping some fields my gml files
> > 
> > for example the fields addressStatus, matchStatus, physicalStatus,
> > positionalQuality and structureType are not read...
> 
> Those are complex fields, which OGR doesn't handle.
> 
> -- Chris
> 
> > 
> > 
> > 11
> > 2009-10-12
> > Address
> > 
> > Matched
> > Existing
> >  > accuracy='Surveyed'>Final
> > Permanent Building
> > 
> > AP6DJK8352W7DAUGJG
> > 
> > 
> > 405525.600,628349.000
> > 
> > 
> > 
> > 16
> > WEST END
> > CHATTON
> > ALNWICK
> > NE66 5PP
> > 1Z
> > 
> > 2003-04-18
> > 
> > 
> > 
> > 
> > any ideas ?
> 
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] ogr gml

2011-01-06 Thread Sebastian E. Ovide
That is a good news !

On Wed, Jan 5, 2011 at 5:02 PM, Ralf Suhr  wrote:

> Hi Chris,
>
> if you have a newer gdal version (1.8). ogrinfo will produce:
>
> Layer name: AddressPoint
> Geometry: Point
> Feature Count: 1
> Extent: (405525.60, 628349.00) - (405525.60, 628349.00)
> Layer SRS WKT:
> (unknown)
> version: Integer (0.0)
> versionDate: String (10.0)
> theme: String (7.0)
> matchStatus: String (7.0)
> physicalStatus: String (8.0)
> positionalQuality: String (5.0)
> structureType: String (18.0)
> OSAPR: String (18.0)
> buildingNumber: Integer (0.0)
> thoroughfare: String (8.0)
> dependentLocality: String (7.0)
> postTown: String (7.0)
> postCode: String (8.0)
> deliveryPointSuffix: String (2.0)
> postalAddressDate: String (10.0)
> OGRFeature(AddressPoint):0
>  version (Integer) = 11
>  versionDate (String) = 2009-10-12
>  theme (String) = Address
>  matchStatus (String) = Matched
>  physicalStatus (String) = Existing
>  positionalQuality (String) = Final
>  structureType (String) = Permanent Building
>  OSAPR (String) = AP6DJK8352W7DAUGJG
>  buildingNumber (Integer) = 16
>  thoroughfare (String) = WEST END
>  dependentLocality (String) = CHATTON
>  postTown (String) = ALNWICK
>  postCode (String) = NE66 5PP
>  deliveryPointSuffix (String) = 1Z
>  postalAddressDate (String) = 2003-04-18
>  POINT (405525.6 628349.0)
>
> Gr
> Ralf
>
> Am Mittwoch 05 Januar 2011, 17:19:41 schrieb christopher.schm...@nokia.com
> :
> > On Jan 5, 2011, at 11:13 AM, ext Sebastian E. Ovide wrote:
> > > Hi All,
> > >
> > > ogrinfo is skiping some fields my gml files
> > >
> > > for example the fields addressStatus, matchStatus, physicalStatus,
> > > positionalQuality and structureType are not read...
> >
> > Those are complex fields, which OGR doesn't handle.
> >
> > -- Chris
> >
> > > 
> > > 
> > > 11
> > > 2009-10-12
> > > Address
> > > 
> > > Matched
> > > Existing
> > >  > > accuracy='Surveyed'>Final
> > > Permanent Building
> > > 
> > > AP6DJK8352W7DAUGJG
> > > 
> > > 
> > > 405525.600,628349.000
> > > 
> > > 
> > > 
> > > 16
> > > WEST END
> > > CHATTON
> > > ALNWICK
> > > NE66 5PP
> > > 1Z
> > > 
> > > 2003-04-18
> > > 
> > > 
> > > 
> > >
> > > any ideas ?
> >
> > ___
> > gdal-dev mailing list
> > gdal-dev@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Sebastian E. Ovide
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] ogr gml Box handling

2022-12-22 Thread Andrew Terry
Hi,

Trying to pull in the bounding box / envelope "Box" when loading gml with 
ogr2ogr



257023.700,620210.000 257023.700,620210.000



I've tried boundedBy in my gfs file.

I've also tried seeing if I can pull through as a string using:


  bbox
  boundedBy|Box|coordinates
  String


Any tips - if it's even possible?

Thanks

Andy
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] ogr gml Box handling

2022-12-22 Thread Rahkonen Jukka
Hi,

Sorry but I do not understand at all what you want to do. Would you, if you 
read your question?
Do you have some GML data that has a bounding box for each feature and you 
would like to convert the bbox into something? Would that be a second geometry 
for the attribute if the target format supports multiple geometries? Or an 
attribute that contains the bbox expressed as WKT of GeoJSON? Please give 
complete GML test data sample and an example about  what would be the ideal 
result.

In your example the bounding box seems to be a point so probably the data 
contains also just one point but probably you want to deal with more generic 
data.

-Jukka Rahkonen-

Lähettäjä: gdal-dev  Puolesta Andrew Terry
Lähetetty: torstai 22. joulukuuta 2022 15.08
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] ogr gml Box handling

Hi,

Trying to pull in the bounding box / envelope "Box" when loading gml with 
ogr2ogr



257023.700,620210.000 257023.700,620210.000



I've tried boundedBy in my gfs file.

I've also tried seeing if I can pull through as a string using:


  bbox
  boundedBy|Box|coordinates
  String


Any tips - if it's even possible?

Thanks

Andy
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] ogr gml Box handling

2022-12-22 Thread Andrew Terry
Hi Jukka,

Thanks for responding and apologies for not including enough context.

I'm converting GML into a SQL file form during testing using a command like:

ogr2ogr --config GML_GFS_TEMPLATE test.gfs --config PG_USE_COPY YES 
-skipfailures -lco spatial_index=NONE -lco create_table=off -lco schema=test 
-lco create_schema=off -f PGDump output.sql input.gml

An example GML with one feature would be:



Ordnance Survey, (c) Crown Copyright. All rights reserved, 
2022-10-27

unknown

2022-10-27T00:10:00
2022-09-15




254337.630,617076.680 254337.630,617076.680


Roads Tracks And Paths
Deleted
2022-09-26




It defines an item's unique fid and some basic attributes along with the "Box" 
as a bounding box / envelope indication of its location.

Ultimately, the purpose is to form an indication of a feature to be deleted - 
in this case a point but not always.

ogr2ogr will load the data but doesn't understand the geometry type - and I 
note a bounding box doesn't seem to be mentioned under types in the 
documentation

A positive result would be any way to retain the content of gml:coordinates as 
a geometry or even as text which I could then handle within postgres as 
something I could turn into a geometry. My assumption has been that I would 
need to modify the gfs created by org2ogr to try and explicitly pull this 
element out

Thanks

Andy


From: Rahkonen Jukka 
Sent: 22 December 2022 13:20
To: Andrew Terry ; gdal-dev@lists.osgeo.org
Subject: Re: ogr gml Box handling

Hi,

Sorry but I do not understand at all what you want to do. Would you, if you 
read your question?
Do you have some GML data that has a bounding box for each feature and you 
would like to convert the bbox into something? Would that be a second geometry 
for the attribute if the target format supports multiple geometries? Or an 
attribute that contains the bbox expressed as WKT of GeoJSON? Please give 
complete GML test data sample and an example about  what would be the ideal 
result.

In your example the bounding box seems to be a point so probably the data 
contains also just one point but probably you want to deal with more generic 
data.

-Jukka Rahkonen-

Lähettäjä: gdal-dev 
mailto:gdal-dev-boun...@lists.osgeo.org>> 
Puolesta Andrew Terry
Lähetetty: torstai 22. joulukuuta 2022 15.08
Vastaanottaja: gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>
Aihe: [gdal-dev] ogr gml Box handling

Hi,

Trying to pull in the bounding box / envelope "Box" when loading gml with 
ogr2ogr



257023.700,620210.000 257023.700,620210.000



I've tried boundedBy in my gfs file.

I've also tried seeing if I can pull through as a string using:


  bbox
  boundedBy|Box|coordinates
  String


Any tips - if it's even possible?

Thanks

Andy
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] ogr gml Box handling

2022-12-22 Thread Even Rouault

Andrew,

the GMLAS driver will fetch it as a string:

$ ogrinfo GMLAS:input.gml -oo remove_unused_layers=yes -al -q
Warning 1: Unhandled type: gMonthDay
Warning 1: Unhandled type: gMonthDay

Layer name: departedfeature
OGRFeature(departedfeature):1
  ogr_pkid (String) = FDD58DEB0E04A917AB5BAEA4DFA65C70_DepartedFeature_1
  fid (String) = osgb100849991256
  osgb_boundedby_box_srsname (String) = osgb:BNG
  osgb_boundedby_box_coordinates_decimal (String) = .
  osgb_boundedby_box_coordinates_cs (String) = ,
  osgb_boundedby_box_coordinates_ts (String) =
  osgb_boundedby_box_coordinates (String) = 254337.630,617076.680 
254337.630,617076.680

  theme (StringList) = (1:Roads Tracks And Paths)
  reasonfordeparture (String) = Deleted
  deletiondate (Date) = 2022/09/26

Even


Le 22/12/2022 à 14:48, Andrew Terry a écrit :


Hi Jukka,

Thanks for responding and apologies for not including enough context.

I’m converting GML into a SQL file form during testing using a command 
like:


ogr2ogr --config GML_GFS_TEMPLATE test.gfs --config PG_USE_COPY YES 
-skipfailures -lco spatial_index=NONE -lco create_table=off -lco 
schema=test -lco create_schema=off -f PGDump output.sql input.gml


An example GML with one feature would be:



xmlns:osgb='http://www.ordnancesurvey.co.uk/xml/namespaces/osgb' 
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
xmlns:xs='http://www.w3.org/2001/XMLSchema' 
xmlns:gml='http://www.opengis.net/gml' 
xmlns:xlink='http://www.w3.org/1999/xlink' 
xsi:schemaLocation='http://www.ordnancesurvey.co.uk/xml/namespaces/osgb 
http://www.ordnancesurvey.co.uk/xml/schema/v9/OSDNFFeatures.xsd' 
fid='LOCAL_ID_0'>


Ordnance Survey, (c) Crown Copyright. All rights 
reserved, 2022-10-27




unknown



2022-10-27T00:10:00

2022-09-15









254337.630,617076.680 
254337.630,617076.680






Roads Tracks And Paths

Deleted

2022-09-26







It defines an item’s unique fid and some basic attributes along with 
the “Box” as a bounding box / envelope indication of its location.


Ultimately, the purpose is to form an indication of a feature to be 
deleted – in this case a point but not always.


ogr2ogr will load the data but doesn’t understand the geometry type – 
and I note a bounding box doesn’t seem to be mentioned under types in 
the documentation


A positive result would be any way to retain the content of 
gml:coordinates as a geometry or even as text which I could then 
handle within postgres as something I could turn into a geometry. My 
assumption has been that I would need to modify the gfs created by 
org2ogr to try and explicitly pull this element out


Thanks

Andy

*From:*Rahkonen Jukka 
*Sent:* 22 December 2022 13:20
*To:* Andrew Terry ; 
gdal-dev@lists.osgeo.org

*Subject:* Re: ogr gml Box handling

Hi,

Sorry but I do not understand at all what you want to do. Would you, 
if you read your question?


Do you have some GML data that has a bounding box for each feature and 
you would like to convert the bbox into something? Would that be a 
second geometry for the attribute if the target format supports 
multiple geometries? Or an attribute that contains the bbox expressed 
as WKT of GeoJSON? Please give complete GML test data sample and an 
example about  what would be the ideal result.


In your example the bounding box seems to be a point so probably the 
data contains also just one point but probably you want to deal with 
more generic data.


-Jukka Rahkonen-

*Lähettäjä:*gdal-dev  *Puolesta 
*Andrew Terry

*Lähetetty:* torstai 22. joulukuuta 2022 15.08
*Vastaanottaja:* gdal-dev@lists.osgeo.org
*Aihe:* [gdal-dev] ogr gml Box handling

Hi,

Trying to pull in the bounding box / envelope “Box” when loading gml 
with ogr2ogr






257023.700,620210.000 
257023.700,620210.000






I’ve tried boundedBy in my 
gfs file.


I’ve also tried seeing if I can pull through as a string using:

    

  bbox

boundedBy|Box|coordinates

  String

    

Any tips – if it’s even possible?

Thanks

Andy


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] ogr gml Box handling

2022-12-22 Thread Andrew Terry
Thanks Even,

I’ll try that out

Andy



Andrew,

the GMLAS driver will fetch it as a string:

$ ogrinfo GMLAS:input.gml -oo remove_unused_layers=yes -al -q
Warning 1: Unhandled type: gMonthDay
Warning 1: Unhandled type: gMonthDay

Layer name: departedfeature
OGRFeature(departedfeature):1
  ogr_pkid (String) = FDD58DEB0E04A917AB5BAEA4DFA65C70_DepartedFeature_1
  fid (String) = osgb100849991256
  osgb_boundedby_box_srsname (String) = osgb:BNG
  osgb_boundedby_box_coordinates_decimal (String) = .
  osgb_boundedby_box_coordinates_cs (String) = ,
  osgb_boundedby_box_coordinates_ts (String) =
  osgb_boundedby_box_coordinates (String) = 254337.630,617076.680 
254337.630,617076.680
  theme (StringList) = (1:Roads Tracks And Paths)
  reasonfordeparture (String) = Deleted
  deletiondate (Date) = 2022/09/26

Even


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] OGR GML writer dataset creation options not working

2013-04-03 Thread Matt Langley
I'm trying to convert some shapefiles to GML using both ogr2ogr and python
code. In both cases I'm having trouble making the 'dataset creation options'
work preoperly.

Setting the XSISCHEMAURI seems to work. i.e

/ogr2ogr -f GML test.gml shape_folder -dsco XSISCHEMAURI=http:\\mytest.com/

If I set PREFIX to something other than 'ogr' I still see 'ogr' as the
prefix in the output files. i.e.

/ogr2ogr -f GML test.gml shape_folder -dsco PREFIX=tst/

If I set the format to GML3 I am still getting an output XSD for GML2. i.e.

/ogr2ogr -f GML test.gml shape_folder -dsco FORMAT=GML3/

I also can't seem to get XSISCHEMA, TARGET_NAMESPACE, GML3_LONGSRS or
SPACE_INDENTATION to work.

I'm sure I am doing something wrong. Have been playing with this all day and
can't work out what. I get the same behaviour setting these options in
python code when calling the CreateDataSource method.

I have a very recent standard install of FWTools (2.4.7).

Help appreciated, as I need to be able to set the FORMAT, TARGET_NAMESPACE
etc.

Cheers,
Matt



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/OGR-GML-writer-dataset-creation-options-not-working-tp5044462.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] OGR GML writer dataset creation options not working

2013-04-03 Thread Matt Langley
I also should note, that when trying to apply mutliple -dsco options I have
used this syntax:

ogr2ogr -f GML test.gml shape_folder -dsco PREFIX=tst -dsco
TARGET_NAMESPACE=http://tst.com.au/

In the case above neither the PREFIX or TARGET_NAMESPACE seem to get set in
the output.



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/OGR-GML-writer-dataset-creation-options-not-working-tp5044462p5044464.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] OGR GML writer dataset creation options not working

2013-04-04 Thread Even Rouault
Selon Matt Langley :

> I'm trying to convert some shapefiles to GML using both ogr2ogr and python
> code. In both cases I'm having trouble making the 'dataset creation options'
> work preoperly.
>
> Setting the XSISCHEMAURI seems to work. i.e
>
> /ogr2ogr -f GML test.gml shape_folder -dsco XSISCHEMAURI=http:mytest.com/
>
> If I set PREFIX to something other than 'ogr' I still see 'ogr' as the
> prefix in the output files. i.e.
>
> /ogr2ogr -f GML test.gml shape_folder -dsco PREFIX=tst/
>
> If I set the format to GML3 I am still getting an output XSD for GML2. i.e.
>
> /ogr2ogr -f GML test.gml shape_folder -dsco FORMAT=GML3/
>
> I also can't seem to get XSISCHEMA, TARGET_NAMESPACE, GML3_LONGSRS or
> SPACE_INDENTATION to work.
>
> I'm sure I am doing something wrong. Have been playing with this all day and
> can't work out what. I get the same behaviour setting these options in
> python code when calling the CreateDataSource method.
>
> I have a very recent standard install of FWTools (2.4.7).

FWTools is not exactly "recent". It is no longer maintained and ships with a pre
version of GDAL 1.6 if I remember correctly. The options PREFIX and
TARGET_NAMESPACE are documented as being available in GDAL 1.10, which is not
yet released (in a few weeks hopefully). However they are already implemented in
the current developmenet version. If you want a Windows build of it, have a look
at http://gisinternals.com/sdk/ (the "MSVC (WinYY) -development" packages at
the top of the first array)









___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] OGR GML and other drivers producing text output: stdout, /dev/stdout and /vsistdout/ (was: ogr2ogr - output WKT to console?)

2011-09-01 Thread Hermann Peifer

On 01/09/2011 00:28, Even Rouault wrote:

Le jeudi 01 septembre 2011 00:19:52, Elijah Robison a écrit :


ogr2ogr -f "GML" "/vsistdout/"
"C:\xData\CountyUpdate\GeoFix\feb16_polygons.shp" -sql "select * from
feb16_polygons where objectid= 2126"

ogr2ogr -f "KML" "/vsistdout/"
"C:\xData\CountyUpdate\GeoFix\feb16_polygons.shp" -sql "select * from
feb16_polygons where objectid= 2126"

ogr2ogr -f "GeoJSON" "/vsistdout/"
"C:\xData\CountyUpdate\GeoFix\feb16_polygons.shp" -sql "select * from
feb16_polygons where objectid= 2126"


You can also add the BNA, PGDump, GeoRSS and GPX drivers to the list



About the GML driver:

I was just wondering where the .xsd file is written to when using: 
ogr2ogr -f gml /vsistdout/. According to the gml file's 
xsi:schemaLocation attribute, the schema file is `.xsd', see [1]. I 
can't find `.xsd' locally.


When using /dev/stdout rather than /vsistdout/, I receive an error, 
which tells me that the schema file can't be created, see [2].


Another observation with the gml driver: stdout is defined as an alias 
for /vsistdout/ (rather than /dev/stdout). When using the alias, 
xsi:schemaLocation tells me that the schema file is `stdout.xsd', see 
[3]. I can't find `stdout.xsd' locally.



About other drivers producing text output:

There seem to be several options about how to alias (/dev/)stdout and 
/vsistdout/. The current practice is perhaps somewhat inconsistent, see 
[4]. IMO, Even's recently added /dev/stdout -> /vsistdout/ alias looks 
most appropriate, I am however not so sure about non-Unix OSs.


Finally, only drv_pgdump.html seems to mention /vsistdout/ as an option 
for writing to standard output, see [5]. Perhaps other relevant driver 
pages should also mention this option ?



Would it be worth creating a ticket (or two) related to the above 
observations?



Hermann


[1]

$ ogr2ogr -f gml /vsistdout/ test.shp

http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://ogr.maptools.org/ .xsd"
 xmlns:ogr="http://ogr.maptools.org/";
 xmlns:gml="http://www.opengis.net/gml";>
  

(...)


[2]

ERROR 4: Failed to open file /dev/stdout.xsd for schema output.


[3]

$ ogr2ogr -f gml stdout test.shp

http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://ogr.maptools.org/ stdout.xsd"
 xmlns:ogr="http://ogr.maptools.org/";
 xmlns:gml="http://www.opengis.net/gml";>
  

(...)


[4]

./gpx/ogrgpxdatasource.cpp:if( EQUAL(pszFilename,"stdout") || 
EQUAL(pszFilename,"/vsistdout/"))
./gml/ogrgmldatasource.cpp:if( EQUAL(pszFilename,"stdout") || 
EQUAL(pszFilename,"/vsistdout/"))
./kml/ogrkmldatasource.cpp:if( EQUAL(pszName, "stdout") || 
EQUAL(pszName, "/vsistdout/") )

./csv/ogrcsvdriver.cpp:if (strcmp(pszName, "/dev/stdout") == 0)
./bna/ogrbnadatasource.cpp:if( EQUAL(pszFilename,"stdout") )
./georss/ogrgeorssdatasource.cpp:if( EQUAL(pszFilename,"stdout") )
./geojson/ogrgeojsondatasource.cpp:if( EQUAL( pszName, "stdout" ) )


[5]

$ find ogr/ -name '*.html' | xargs grep "/vsistdout/"
ogr/ogrsf_frmts/pgdump/drv_pgdump.html:to specify /vsistdout/ as output 
file to output on the standard output.
ogr/ogrsf_frmts/pgdump/drv_pgdump.html:% ogr2ogr --config PG_USE_COPY 
YES -f PGDump /vsistdout/ abc.shp | psql -d my_dbname -f -

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev