[Gdal-dev] Shapefile feature deletion and feature count
warmerdam at pobox.com
Sat Mar 10 20:13:45 EST 2007
Andrea Aime wrote:
> Frank Warmerdam ha scritto:
>> Perhaps the GeoTools API should try being more fine grained with regard
>> to writing features.
> Geotools is basically there to serve Geoserver and uDig. In both
> applications, you either are a good read only data source, or a fully
> transactional one that allows to support WFS-T and interactive editing.
> There's no useful middle ground...
No offence, but I hope that there aren't other potentially uses of
GeoTools reading that it is there to serve Geoserver and uDig - they
may feel that other use cases are not taken seriously.
That said, there are very few drivers that are "fully interactive
> Hum, that approach I suggested (rewrite on a separate data set, then
> copy back) is the approach we're using for shapefiles in order
> to provide transactional support. It's not fast, but works.
> To copy back data I guess I need the original format to support
> layer deletion, otherwise I'm stuck
> going right to the filesystem with a detailed knowledge of how
> the files are organized. Can I assume all file based formats do
> support it?
No, many (most?) do not.
>> Ultimately the question arises about how important it is to provide
>> write access through OGR for GeoTools.
> Yeah, good question. Well, my initial interest was provide read access,
> that has been a success, so far (I still have to try out
> geometry and attribute filters).
> I then went to write side because that would have made the datastore
> more useful for both WFS-T and interactive editing in uDig.
> A partial write support, that provides only appending, would be
> good enough to make OGR be used for WFS basic too, so that we can
> return features not only in GML2/3 and shapefile, but also in a slew
> of other formats as well. I was hesitant to limit myself to it, because
> there is basically no way to specify this "middle ground" capability
> to users.
> Well, thank you for you insights. I think with some more work I'll
> be able to release an OGR based data store that can be used
> for WFS basic/WMS serving :-)
Well, barring a pressing need, I'd suggest focusing on the read-only
approach. I also would strongly suggest a "write only" use case for
GeoTools datastores. There are many format drivers for which it is
very difficult to support full interactive editing, but for which a
"writer" is quite practical. This observation is fundamental to how
OGR is implemented and most OGR uses only use read-through and
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 | President OSGeo, http://osgeo.org
More information about the Gdal-dev