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
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel


--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to