Need advice with regards to a new plug-in

View: New views
2 Messages — Rating Filter:   Alert me  

Need advice with regards to a new plug-in

by karthik shravanam :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

hawai_shp_file.bmp (4M) Download Attachment

Re: Need advice with regards to a new plug-in

by Ugo Taddei-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.net
http://lists.refractions.net/mailman/listinfo/udig-devel