Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading X,Y coords from table and determining what region on a map.

Status
Not open for further replies.

jlbsloan

Programmer
Mar 1, 2001
45
US
Can anyone point me in the right direction? I am trying to read X and Y coordinates stored in a SQL table and determine what region that they would be in on a MapInfo map. I need to filter so that only points from the table that are in a specified region on the map are included in the results. I have the table and map syncronized so that the coordinates match up. Example: I need to show all of the records in the ?? region. Is this even possible to do off of a map or will i have to figure out the ranges of the X and Y in each region and do it with code in Crystal Reports.
 
jlbsloan: I may be missing the point here but the Mapinfo map process in CR will automatically choose the appropriate map layer (assuming you have one installed) which matches your choice of region. If you specify the Mapinfo co-ordinates in your database and have selected specific co-ordinates the map should reflect that choice David C. Monks
david.monks@chase-international.com
Accredited Crystal Decisions Enterprise Partner
 
I have a map layer with user defined township areas.I have added the layer to a map in crystal reports and it lines up correctly. I have a database with x coordinates in one field and y coordinates in another field for call locations. I need to be able to tell what township the call location is in by the x and y coordinates. Do I need to actually plot these points and then read a certain property from them or is there a way to return that result through some kind of code or function?

Thanks.
 
Mapping in CR isn't all that well documented, but if I understand the process correctly you have to pass a value to MapInfo that matches the map layer you are using. so if you are using a Township layer, you would probably have to pass it the township.

Converting XY coordinates would have to be done somehow in CR, but I can't think of a function or method to do it. Or the layer would need to be based on the XY Coordinates, and I am not sure they have a layer like that.

There aren't many mapping Qx in here, so please post if you get it to work. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
jlbsloan: The Mapinfo MapX layers are controlled by the contents of the relevant *.dat files (typically placed in Program Files\Mapinfo MapX\Maps and these have a structure as follows:

Place_Name char(40)
Country char(40)
Latitiude char(20)
Longitude char(20)

these last 2 take the form NNº NN' NN" X

e.g. 57º 28' 25" N (the º character is Alt186)

If your X and Y co-ordinates are entered as Lat/Long then the layer should convert them for you into the township name.

If not and you must have this for your project then I suggest the purchase of Mapinfo Professional which will enable you to construct the table(s) you need and then use the resultant map(s) in CR

Hope this helps David C. Monks
david.monks@chase-international.com
Accredited Crystal Decisions Enterprise Partner
 
So I guess you can create your own maps with MapInfo? Can you use NAD83 instead of Lat Long?

I would love to have a report that shows the top 20 crimes on a bar chart, and then when they double click on one of the bars (crimes) then those crimes would show on the map!

Can anyone tell me if any of the above is possible?

Thanks.
 
What is NAD83? A postal code or zip code as we yanks call it? If so I have been wanting to do this for years and would love to know how to get a dot-density map based on zip codes.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
It is a projection, or coordinate system. Like lat long, only a north american designation, so that the map doesn't look skewed when projected to your flat screen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top