Thanks MD.

I don't know when I'll get to this, but when I get it done I'll make
the code available to others. Would you be willing to add a method to
the Envelope class whose signature looks something like this?:

public List<Envelope> subdivideEnvelope(int rows, int columns)

If you don't think this is a good addition, then I'll park it in my
own utility class.

SS

On Tue, Jan 27, 2009 at 5:21 PM, Martin Davis <mbda...@refractions.net> wrote:
> It sounds like you want to create a grid of specified extent and size (= #
> of horizontal and vertical cells).  It's pretty straightforward to code this
> up as a nested loop which creates Envelopes.
>
> I don't know of any Java code that's packaged up and ready to use.    You
> can do this fairly easily with JEQL, however.
>
> Sunburned Surveyor wrote:
>>
>> Does anyone know of (or have) code that will take an envelope and
>> break it up into smaller envelopes of equal size? (I didn't see a
>> method in the Envelope class that performed this operation.)
>>
>> Here is my use case:
>>
>> I've got some shapefiles that are too large to work with in OpenJUMP.
>> I want to split one of these large shapefiles into a smaller shapefile
>> that I can work with. To do this I thought I could access the envelope
>> that covers all features in the Shapefile. I'd split this into a
>> number of smaller envelopes of equal size. I'll then use code from
>> deegree/Geotools to iteratively access each feature in the Shapefile
>> on disk. I'll determine which envelope each feature fits in, and I'll
>> stick that feature in a new Shapefile.
>>
>> Thanks for any thoughts. I'll whip up some new code if no one has
>> existing code to do the trick.
>>
>> The Sunburned Surveyor
>> _______________________________________________
>> jts-devel mailing list
>> jts-devel@lists.jump-project.org
>> http://lists.refractions.net/mailman/listinfo/jts-devel
>>
>>
>
> --
> Martin Davis
> Senior Technical Architect
> Refractions Research, Inc.
> (250) 383-3022
>
> _______________________________________________
> jts-devel mailing list
> jts-devel@lists.jump-project.org
> http://lists.refractions.net/mailman/listinfo/jts-devel
>
_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to