[udig-devel] How to create a grid of features in a polygone

Jody Garnett jgarnett at refractions.net
Sun Mar 30 09:12:23 PDT 2008


Morning,

If I understand you correctly... I would create points using a couple of 
nested for loops covering the entire screen (or area of interest) and 
for each point check if it is inside one of your polygons.

GridCoverage is kind of like a raster; conceptually you can think of it 
as a layer of very small rectangles that are all touching. If you really 
wanted to use grid coverages you could "draw" the polygons onto a raster 
(using StreamingRenderer the same was BasicFeatureRenderer does it) and 
then look at the raster; for each pixel that has been drawn on you could 
record a "point" (perhaps at the center of the pixel?).

Cheers,
Jody
> Hello,
>
> i have a little "geospatial" question. I want to draw polygones on a 
> polygone layer and then start a wizard which fills the polygone with 
> features (with a point geometry). All features have the same distance 
> (lets say 100m to each other) and all are in the area of the polygone.
>
> Sounds like a not so difficult problem, but i hope that there is a 
> nice way to program this. perhaps i should use the gridcoverage class? 
> i realy dont know where to start.
>
> Thanks for any advice.
>
> Greats Ingmar
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel




More information about the udig-devel mailing list