[udig-devel] How to create a grid of features in a polygone
Ingmar Eveslage
eveslage at gmail.com
Sun Mar 30 07:37:50 PDT 2008
Good idea with to intersection of the horizontal and vertical lines.
But how do i create the lines with the constant spacing?
i manged to get the envelope from a polygone with 5 coordinates likes
this:
(13.68264407681451, 53.818121066825206, NaN)
(14.101893321395334, 53.818121066825206, NaN)
(14.101893321395334, 54.112935604110326, NaN)
(13.68264407681451, 54.112935604110326, NaN)
(13.68264407681451, 53.818121066825206, NaN)
a nice bounding box. and now?
the first horizontal line is
(13.68264407681451, 54.112935604110326, NaN) (14.101893321395334,
54.112935604110326, NaN)
the upper left corner to the upper right corner. how do i get the next
point for the Y coordinate with a distance of, lets say, 200m?
(13.68264407681451, ??, NaN) (14.101893321395334, ??, NaN)
Thanks again. Ingmar
Am 30.03.2008 um 15:21 schrieb andrea antonello:
>> 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
>>
> _______________________________________________
> 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