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

andrea antonello andrea.antonello at gmail.com
Sun Mar 30 06:21:31 PDT 2008


>  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.

Hi Ingmar,
I think it is more a JTS related question.
What I would probably do (I'm writing as I'm thinking) is to create
the grid of lines at the wanted distances one from the other.
The horizontal lines and vertical lines should stay in two different
multilinestring geometries. Then through

resultPointGeom = horizontalLines.intersection(verticalLines)

you gain all the points you wanted to have into the resulting geometry.
After that you will have to get from those only the ones inside the
polygon, which I assume can be done through another intersection
between polygon and resultPointGeom.

Ciao
Andrea



>
>  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