Re: [gdal-dev] GML / NAS code redundancy

2014-04-16 Thread Even Rouault
Le mercredi 16 avril 2014 13:16:16, Martin Landa a écrit : > Hi, > > 2014-04-05 12:36 GMT+02:00 Martin Landa : > > First is related to GML registry. The input file contains different > > layers based on its internal type (TypSouboru). For each of these > > types are prepared separated GFS file. >

Re: [gdal-dev] GML / NAS code redundancy

2014-04-16 Thread Martin Landa
Hi, 2014-04-05 12:36 GMT+02:00 Martin Landa : > First is related to GML registry. The input file contains different > layers based on its internal type (TypSouboru). For each of these > types are prepared separated GFS file. > > > uri="urn:cz:isvs:ruian:schemas:VymennyForm

Re: [gdal-dev] GML / NAS code redundancy

2014-04-06 Thread Martin Landa
2014-04-06 13:05 GMT+02:00 Even Rouault : [...] >> yes, but it will not influence user scripts, eg. python code which is >> using CopyLayer()... > > I've just checked that CopyLayer() should have the same behaviour as the > algorithm in ogr2ogr. ah, I see, you are right. Martin -- Martin Landa

Re: [gdal-dev] GML / NAS code redundancy

2014-04-06 Thread Even Rouault
Le dimanche 06 avril 2014 13:00:33, Martin Landa a écrit : > Hi, > > 2014-04-06 12:52 GMT+02:00 Even Rouault : > > The "fix" would be more in ogr2ogr that currently has the following logic : > > does the output driver support multiple geometry fields ? > > > > - yes : does the source

Re: [gdal-dev] GML / NAS code redundancy

2014-04-06 Thread Martin Landa
Hi, 2014-04-06 12:52 GMT+02:00 Even Rouault : > The "fix" would be more in ogr2ogr that currently has the following logic : > does the output driver support multiple geometry fields ? > - yes : does the source layer has several geometry fields ? > - yes : use CreateGeomF

Re: [gdal-dev] GML / NAS code redundancy

2014-04-06 Thread Even Rouault
Hi Martin, > > 2014-04-05 23:50 GMT+02:00 Even Rouault : > > Done. See http://trac.osgeo.org/gdal/changeset/27132 > > it's working perfectly! > > I found out a small inconsistency when converting data to PostGIS. For > layers which have multiple geometries, column name refers to 'name' > tag -

Re: [gdal-dev] GML / NAS code redundancy

2014-04-06 Thread Martin Landa
Dear Even, 2014-04-05 23:50 GMT+02:00 Even Rouault : > Done. See http://trac.osgeo.org/gdal/changeset/27132 it's working perfectly! I found out a small inconsistency when converting data to PostGIS. For layers which have multiple geometries, column name refers to 'name' tag - which is something

Re: [gdal-dev] GML / NAS code redundancy

2014-04-05 Thread Martin Landa
Hi, 2014-04-05 23:50 GMT+02:00 Even Rouault : [...] >> Hum, this isn't yet possible, but I can try to see if I can add support >> for > >> that. > > Done. See http://trac.osgeo.org/gdal/changeset/27132 thanks a lot! Martin ___ gdal-dev mailing list gd

Re: [gdal-dev] GML / NAS code redundancy

2014-04-05 Thread Even Rouault
> > Is there any way how to set names also for geometry tags? Similar to > > properties, eg. > > > > > > > > myname > > tagname > > > > > > > > I would like to name them without 'geometry|' part... > > Hum, this isn't yet possible, but I can try to see if I can ad

Re: [gdal-dev] GML / NAS code redundancy

2014-04-05 Thread Even Rouault
Le samedi 05 avril 2014 22:53:20, Martin Landa a écrit : > Hi, > > 2014-04-05 22:38 GMT+02:00 Even Rouault : > > [...] > > > Hum, this isn't yet possible, but I can try to see if I can add support > > for that. > > thanks! > > > This is really wanted. The SRS is a property of a geometry column

Re: [gdal-dev] GML / NAS code redundancy

2014-04-05 Thread Martin Landa
Hi, 2014-04-05 22:38 GMT+02:00 Even Rouault : [...] > Hum, this isn't yet possible, but I can try to see if I can add support for > that. thanks! > This is really wanted. The SRS is a property of a geometry column. There are > cases where 2 geometry columns could have a different SRS. Sure, b

Re: [gdal-dev] GML / NAS code redundancy

2014-04-05 Thread Even Rouault
Le samedi 05 avril 2014 22:24:14, Martin Landa a écrit : > Hi Even, > > 2014-04-05 22:10 GMT+02:00 Even Rouault : > > there is another issue which I would like to solve. > > The layers contain multiple geometries (MultiPoint and MultiPolygon), > the relevant tags are > > > > > > >

Re: [gdal-dev] GML / NAS code redundancy

2014-04-05 Thread Martin Landa
Hi Even, 2014-04-05 22:10 GMT+02:00 Even Rouault : there is another issue which I would like to solve. The layers contain multiple geometries (MultiPoint and MultiPolygon), the relevant tags are In related GFS I have defined: cities cities|city urn:ogc:def:c

Re: [gdal-dev] GML / NAS code redundancy

2014-04-05 Thread Even Rouault
Martin, > > I will prepare such patch tomorrow. Good > > ah, this seems to be much more better solution! It seems to work, I > will do more tests later tomorrow. Try to run the autotest/ogr/ogr_gml_read.py tests to check that it doesn't cause regressions. And it would be good if you could ad

Re: [gdal-dev] GML / NAS code redundancy

2014-04-05 Thread Martin Landa
Hi Even, 2014-04-05 13:17 GMT+02:00 Even Rouault : > gmlregistry.diff looks fine, but it would be good to document elementValue in > drv_gml.html I will prepare such patch tomorrow. > All in all, I think that the more simpler solution would be to drop that patch > and rather modify the call to S

Re: [gdal-dev] GML / NAS code redundancy

2014-04-05 Thread Even Rouault
Martin, gmlregistry.diff looks fine, but it would be good to document elementValue in drv_gml.html As far as gmlhandler.diff is concerned, serveral issues : - naming convention : "CPLString pszFilteredElementName" should be "CPLString osFilteredElementName" - if ( pszElementName[m_poReader->Get

Re: [gdal-dev] GML / NAS code redundancy

2014-04-05 Thread Martin Landa
Dear Even, 2014-03-19 11:17 GMT+01:00 Even Rouault : > Just for Martin's enlightment, the GML driver manages to recognize several > layers in that case since the RekisteriyksikonTietoja is the top feature > present in the first bytes of the file, and the other feature types are sub > feature type

Re: [gdal-dev] GML / NAS code redundancy

2014-03-19 Thread Even Rouault
Le mardi 18 mars 2014 23:04:56, Jukka Rahkonen a écrit : > Even Rouault mines-paris.org> writes: > > Selon Martin Landa gmail.com>: > > > Hi, > > > > > > 2014-03-18 17:50 GMT+01:00 Even Rouault mines- paris.org>: > > > > I haven't looket at the file but from the above, the logic of the > > > >

Re: [gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Jukka Rahkonen
Even Rouault mines-paris.org> writes: > > Selon Martin Landa gmail.com>: > > > Hi, > > > > 2014-03-18 17:50 GMT+01:00 Even Rouault mines-paris.org>: > > > I haven't looket at the file but from the above, the logic of the > > application > > > schema registry would need to be extended since it

Re: [gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Even Rouault
Le mardi 18 mars 2014 18:33:21, Martin Landa a écrit : > Hi Even, > > 2014-03-18 18:04 GMT+01:00 Even Rouault : > > increase the szHeader size). Add in the GML registry your feature types > > and make them point to the same .gfs file that define all the feature > > types ! The only > > I do not u

Re: [gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Martin Landa
Hi Even, 2014-03-18 18:04 GMT+01:00 Even Rouault : > increase the szHeader size). Add in the GML registry your feature types and > make > them point to the same .gfs file that define all the feature types ! The only I do not understand this part, point to the same GFS file? This file is generate

Re: [gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Even Rouault
Selon Martin Landa : > Hi, > > 2014-03-18 17:50 GMT+01:00 Even Rouault : > > I haven't looket at the file but from the above, the logic of the > application > > schema registry would need to be extended since it currently only supports > one > > feature type per file. You would need to ingest the

Re: [gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Martin Landa
Hi, 2014-03-18 17:50 GMT+01:00 Even Rouault : > I haven't looket at the file but from the above, the logic of the application > schema registry would need to be extended since it currently only supports one > feature type per file. You would need to ingest the full file to recognize > which > fea

Re: [gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Martin Landa
Hi Even, 2014-03-18 17:50 GMT+01:00 Even Rouault : [...] > I haven't looket at the file but from the above, the logic of the application > schema registry would need to be extended since it currently only supports one > feature type per file. You would need to ingest the full file to recognize

Re: [gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Even Rouault
Selon Martin Landa : > Hi, > > 2014-03-18 17:25 GMT+01:00 Even Rouault : > > >> right, after digging into the code I discovered that `featureType` > >> from `gml_registry.xml` is checked only in header (first 2048 bytes) > >> [1]. This check fails in my case because features are not included in >

Re: [gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Martin Landa
Hi, 2014-03-18 17:25 GMT+01:00 Even Rouault : >> right, after digging into the code I discovered that `featureType` >> from `gml_registry.xml` is checked only in header (first 2048 bytes) >> [1]. This check fails in my case because features are not included in >> szHeader buffer. Could be that I

Re: [gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Even Rouault
Selon Martin Landa : > Hi, > > 2014-03-18 16:35 GMT+01:00 Even Rouault : > > some categories of application schemas easier. See the "Registry for GML > > application schemas" paragraph of http://gdal.org/ogr/drv_gml.html. Perhaps > your > > use case could fit into that. > > right, after digging in

Re: [gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Martin Landa
Hi, 2014-03-18 16:35 GMT+01:00 Even Rouault : > some categories of application schemas easier. See the "Registry for GML > application schemas" paragraph of http://gdal.org/ogr/drv_gml.html. Perhaps > your > use case could fit into that. right, after digging into the code I discovered that `feat

Re: [gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Even Rouault
Martin, Yes I agree that there's code duplication, and some of it could have been avoided. I guess this was to avoid to make the GML driver too dirty with NAS stuff, or regress. Personnaly I've hacked a lot in the GML driver over the past few years to add support for various application schemas a

[gdal-dev] GML / NAS code redundancy

2014-03-18 Thread Martin Landa
Hi all, recently I started to write a new OGR driver for specific national exchange format which based on GML. I started studying code of GML and NAS driver which are both based on IGMLDriver. I discovered that part of the code is duplicated in NASDriver compared to GMLDriver. The differencies are