Glad it worked out for you :-)
The idea of command line tools is a good one; Andrea and myself have often
thought of starting a "tools" module for GeoTools that gathered up some of
the functionality of the library for command line use. Perhaps you would be
interested in starting an unsupported module on this topic? It could be a
lot of fun.
I made a general "reshape" operations for uDig that I would be willing to
add to the mix:
-
http://udig.refractions.net/confluence/display/EN/Processing+the+Geometry+in+a+Shapefile
-
http://udig.refractions.net/confluence/display/EN/Adding+a+column+to+a+shapefile
It uses CQL to allow you to define a new shapefile in terms of the previous
one :-)
Jody
On Wed, Feb 18, 2009 at 5:48 AM, Dave Murray-Rust <[email protected]>wrote:
> Hi Jody,
>
>
> On 13 Feb 2009, at 05:26, Jody Garnett wrote:
>
> I'm getting the following error when I try to modify features in a
>> shapefile I've created:
>>
>> I've had a look through the source for DiffFeatureWriter, and I can't
>> understand the meaning of the comments - it looks like it is supposed
>> to refuse to write any features - is this correct?
>>
>> DiffFeatureWriter stores the features you want to write into memory;
>> waiting until transaction commit is called before writing the shapefile out.
>>
>
> Thanks for the followup! I figured out what my issue was, and put it on the
> list - basically misusing transactions - along with a suggestion that the
> error message could be made to more closely relate to the issue, i.e. some
> kind of TransactionClosedException or similar.
>
>
>
>> I have not made a feature writer example for the user guide yet; I do not
>> use it much. Here is a good example of how to write a shapefile:
>> - http://docs.codehaus.org/display/GEOTDOC/06+CSV2SHP+Lab
>>
>> And also this:
>> - http://docs.codehaus.org/display/GEOTDOC/05+SHP2SHP+Lab
>>
>> Is this what were talking about as example 5?
>>
>
> Yup, that's exactly what I meant. They're good docs, I'd just failed to
> understand the transaction model.
>
> I've now developed a relatively general shapefile converter class which
> handles some of the stuff around reading/writing shapefiles. Would you be
> interested in adding this kind of thing into Geotools? More generally, I'm
> slowly developing a bunch of simple command line tools for doing things like
> randomizing attributes, setting all attributes to certain values, taking the
> first x polygons from a shapefile etc. with the idea that they may be useful
> for people who aren't that big on GIS, but want to fiddle with their
> shapefiles programatically.
>
> Cheers,
> dave
>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users