On 17-1-2010 22:02, Mateusz Loskot wrote:
Does that mean that I can use ogrinfo on a gzipped archive, like
gdalinfo (http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip)?
Yes, it does but...as long as OGR driver performs filesystem
operations using VSI*L API. The problem is that only few of them use VSI*L.
As an example, I just updated OGR GeoJSON driver to use VSI*L API:
http://trac.osgeo.org/gdal/changeset/18573
As you can see, it is not a complex task, but may be time consuming and
tedious, and requires quite a lot of testing.
After these changes are applied, it is possible to (un)gzip GeoJSON
datasets:
1) Translate Shapefile to GeoJSON file compressed using GZip:
$ ogr2ogr -f GeoJSON /vsigzip/./points.geojson.gz points.shp
2) Read GZip compressed GeoJSON dataset:
$ ogrinfo /vsigzip/./points.geojson.gz
$ ogrinfo /vsigzip/./points.geojson.gz OGRGeoJSON
It would be a nice archive functionality.
Yes, indeed.
The work requires to step in to each OGR driver directory,
grep .cpp files for VSI verify what VSI API is used.driver:
For example, OGR Shapefile driver would, in theory, need to get
updated VSI calls in about 50 places:
$ grep VSI *.cpp | wc -ls
47
I'm quite sure volunteers would be appreciated.
Thanks Mateusz. I am going to look at GeoJSON as an ASCII data archiving
format, as long as long as a full-fledged GML driver isn't available I
have always liked JSON more then XML.
Jan
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev