Solved

How do I define a logic to accurately identify a location on a map

Posted on 2011-02-16
11
629 Views
Last Modified: 2012-08-14
Hello,
I want to create a widget that people can embed in their websites which will show users parking meter regulations at their destination.

 I have a database of parking regulations for a city. The data characteristics are as follows:
• The on-street meter parking regulation varies from street to street. Ex: 2300 Market st could have 2hr parking limit on 23rd st and 4hr parking limit on Market st.
• Each regulated street location is listed by an address such as 2300 Market st which represents parking on Market street from 2300 to 2399  
• On google map the above listed street representation appears as a point and not a line
• I have geocodes for all the locations

I want to communicate to the driver that the regulation for the entire street on Market st is represented by this address. I'd like to do it in a graphical manner on a map (google map). How do I do that?

I have attached sample data. Nitin-Data.xls
0
Comment
Question by:Nkhanna
  • 4
  • 4
11 Comments
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 34915829
Interesting... The geocodes in the Excel spreadsheet appear to be in Antarctica.  Probably not much demand for parking there.

What programming language are you using to access the data base?
0
 

Author Comment

by:Nkhanna
ID: 35041040
You need to put it in the Lat, Long format and not the other way round.

I have not decided which language to use and am open to suggestions. This needs to be available as a webservice so other 3rd party programs can integrate with our API to show parking information in their application. I am thinking of using the REST framework may be CAKE.

The biggest challenge I have now is that I only have the starting position of the street and not the end position. I have attached a map where I have plotted a few regulations but it shows up as a point on the map and not the entire street. Manually drawing a line for each street is going to be very labor intensive and will slow us down tremendously.

Please advice.  Snapshot of the parking info on google map
0
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 35046606
A "Geocode" is always in Lat,Lon format as an ordered pair of signed decimal strings.  Six digits of decimal precision is enough to get you within stone's throw of your target.  Lat and Lon are Latitude and Longitude, respectively.  Thus these data define a point, and not a street.

You may be able to get some of this kind of information out of the Google Maps API, but check the terms of use carefully - you cannot resell their data without written permission.  There are things called "polylines" that may be useful to you.

I agree about the concept of a REST framework.  Anything but SOAP!

Not sure if it matters to your work, but just getting the parking information on a specific street seems awfully restrictive.  Maybe a block or two around a point would be better (especially if there is a parking garage in the vicinity).
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

Author Comment

by:Nkhanna
ID: 35046705
I know about the polyline but what I don't know is what trick to use to represent a street from only the point information I have. Each point info I have represents the start of the street it represents. I want to communicate to the user that the regulation of 3hr limit is for the entire street and not just for that point.

I agree with you on the block based info. When someone is lookiing at the map they should see what the parking regulations are for all the 4-5 streets that appear on their map in a single glance so they can make better decisions.

Please advice.
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 35046769
I don't know how to do that.   Suggest you leave this Q open a while and maybe other experts will weigh in on the question.  You might also ask a moderator to add this Q to a language-specific zone here at EE.  For example, if you are working in PHP, this Q could be added to the PHP and PHP+Databases zones.  There would be a lot more eyes on it there.
0
 

Author Comment

by:Nkhanna
ID: 35046935
Where do I make the request to the moderator from.
Thanks
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 35047314
Bottom right of the original post at the top of this page.  Look for "Request Attention."
0
 

Author Comment

by:Nkhanna
ID: 35063490
thanks
0
 
LVL 37

Assisted Solution

by:CyanBlue
CyanBlue earned 250 total points
ID: 35064362
I don't think there is a way to get the whole block out of one data point...  If there is another dataset that are separated by block/street, you could try to join them, but I don't think that is what you have right now...  Otherwise, you would not have posted this question...

The only way I can think of is to have more data points for a block/street you want to represent such as 1001 Main, 1011 Main, 1015 Main, 1021 Main, ... , 1099 Main, geocode them all together to get the lat/long information, and loop through them to composite a polyline that represents the Main street block...

At any rate, this won't be an easy task to implement and not that easy to maintain...  :(

CyanBlue
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question