Hi!

My name is João, I'm from Portugal, and I'm a Software and Computer Engineering 
student at FEUP. I'm contacting you about GeoTools. 

I'm contacting users through the email list as a suggestion given by Andrea, 
one of the geotools developers.

I'm currently developing a project for college where I have to interpret a map 
of the rivers in my country. I have access to a file with info of all the 
rivers. It's a file with the extension .shp, and I was already able to open it 
using the geotools tools. I was able to open the map in the swing interface of 
geotools, and see all the rivers, and also see information of each river by 
clicking it.
After this, I was able, with a few lines of code, to search info about a river 
by its name: I opened the file, and made a query with a filter applied to one 
of the fields (designation of the river), and it will find all the rivers which 
contain a given string in its designation.

When I wrote this code, I noticed that for each river, there is some 
geometric(?) information about them, a list of coordinates. As I have no 
knowledge about this type of files and its structure, I really don't know how 
to interpret those coordinates, and I really needed some way to do that.

The functionality that I need to implement is, given a pair of coordinates 
(latitude and longitude), check if it belongs to any river in the file, and 
return info about it. I know that it should be possible because using the swing 
interface, and clicking the river, it returns info about it, so I think that 
somehow the program receives coordinates about the place I clicked, and 
searches the file for a river containing those coordinates. Am I right?

If so, and if possible, what I needed to know is how to do that... My plan was 
to reverse engineer the code with eclema for eclipse, but I couldn't import all 
the source code to my project, so I didn't succeed, that's why I'm contacting 
you. Probably what I want to do is simple, and a few guidelines from someone 
who is familiarized with the project will suffice. My main problem is how to 
convert latitude and longitude to the coordinate system used in the file I 
have, and also match a pair of coordinates to the info in the file (to check if 
they belong to any river).

If it helps, here is the file I'm working with: http://1drv.ms/1SaccYG

Sorry for bothering you with this, but you're probably my last resource, as 
I've been struggling with this for the last week, with no luck...

Thanks and best regards,

João Norim
                                                                                
  
------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to