John Preston ha scritto:
> I have some shape files that I want to use in geoserver (read only), but 
> they are stored within zip files, and I don't want to have to unzip them 
> to other directories. I was thinking of writing my own datastore based 
> on the existing one for shape files, and just changing the I/O methods 
> to access the files where ever they actually were. Does anyone have a 
> comment on my choice of method.

You can go and look the shapefile datastore into the GeoTools
library. Most of the code assumes NIO can be used, and most of it
it's not trivial either.

You can try to hunt down a very old version of GeoTools where
the shapefile datastore was still able to use plain streams,
probably around 2.1 release time. A bit of warning thought,
due to compression you'll loose the ability to perform random
scans. A gut feeling estimate is that a version serving out of
a zip file will be an order of magnitude slower for sequential
scans, and at least two if you start to need using spatial
indexes to access the data.

If you don't want to have your filesystem littered with many
small files, have you considered using a spatial enabled database
instead? PostGIS can give you very good performance with a very
low footprint on your system. H2 is an embedded database that
can do good too and can be already used in GeoServer 1.7.x, thought
it does not have spatial indexes (but given that you're planning
to use zipped shapefiles, you probably don't care to start with?).

Cheers
Andrea

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to