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

Ingmar Eveslage eveslage at gmail.com
Mon Apr 7 14:11:42 PDT 2008


Hi Jody,

I did it like andrea told:

1. draw polygons on a layer
2. get the envelope or all the polygons
3. create parallel horizontal lines with the same distance ->  save in  
featurecollection
4. create parallel vertical lines -> save in featurecollection
5. for all crossing point of the featurecollections from above
6. you got a station if the crossing point is within one of the  
polygons from 1.

this took a while... but it works realy nice

but thanks for tip with the GridCoverage. the next time i will try  
this way ;)

Greats Ingmar

Am 30.03.2008 um 18:12 schrieb Jody Garnett:
> 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
>
>
> _______________________________________________
> 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