Hello,
karthik shravanam wrote:
> Hi All,
>
> I am developing a plug-in tool to calculate the area between points on
> a map for my school project,i took the reference from the distance tool
> already implemented in uDig and developed a program to calculate the
> area between the points marked on a map.
>
> I have developed the facility to calculate the area inside of a
> polygon,but i am kind of stuck when i select the points to calculate the
> area and has to include the geographic location of water, i need some
> help as to how i can solve this problem
I think this is what you're looking for:
Geometry poly = ... // your digitized poly
Geometry land = ... // find the land geometry; either let user select,
or use intersection as below
Geometry intersection = poly.intersection( land );
double area = intersection.getArea();
Geometry is a JTS Geometry.
Hope that helps (unless I misunderstood you).
Cheers,
Ugo
>
> I have attached a screen shot of shape file for hawai for reference.
>
> Can someone please help me,suggest some ideas.
>
>
>
> It would be really of great help.
>
>
> Thanks
>
>
> Karthik
>
>
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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.nethttp://lists.refractions.net/mailman/listinfo/udig-devel