Speed zone data in easily converted format


I would like to build a project that uses a GPS to get coordinates. I would like to store roads and they speed limits. I have seen as arduino project around a year ago that did something similar, but was too limited. Does anyone have suggestions about where to get coordinate and speed data. Also has anyone done a setup this is complicated enough to handle a large city full or coordinates and smeed limit zones?

Thank you, J.C. Woltz

I would like to build a project that uses a GPS to get coordinates

Ok, doable.

I would like to store roads and they speed limits

Now we’re into SD card territory too.

Does anyone have suggestions about where to get coordinate and speed data

Pay Garmin or TomTom - I really think you’re not in Arduino territory anymore.


Thank you for your reply. To clarify, I am not tied to arduino, but would love to stick with arduino. I want to stay with arduino if possible in order to accomplish something that could be modified by fellow geeks. I have no problem storing the info on an SD Card. I am not trying to setup a nation wide system. The previous system I saw used polygons to define different speed zones. I need a bit more finer grained control. There are two parts I don't know how to do:

  • Get a coordinate range to speed zone mapping
  • the glue logic to make it happen, but I can figure this out if point one is completed

See, I think if I can store a file with numerically sorted data, I can write the arduino program. However I am not afraid to move to an arm if need be. I would like to stick to arduino if possible so that it is more useful to the widest audience possible. All hardware and software will be released open software. I would like to release this with work done, so that others could use it with minor modification. The biggest hurdle is getting a list of coordinates and speed zones.

http://arduino.cc/forum/index.php/topic,7944.0.html That is a previous project, but it used polygons, and that will not work for my city. What I need is: http://maps.google.com/maps?q=I+270+columbus&hl=en&ll=39.943436,-82.640533&spn=0.489582,1.352692&sll=39.986373,-82.830563&sspn=0.007645,0.021136&z=10

I need the 270 outerbelt around columbus, ohio and all the smaller roads inside. Any suggestion of how to get that data?

Thank you, J.C. Woltz

You really need to do something with Garmin. http://developer.garmin.com/web-products/web-services/ for example They have all that data already. My Garmin Nuvi 205 tells me where I am and what the speed limit is there, so Garmin has the data.

You can certainly get a small GPS and have it provide GPS coordinates to the arduimo http://www.mdfly.com/index.php?main_page=index&cPath=8_136 but recreating all the map data, that's a lot of work.

Are you there now? Drive the route(s), capturing the where location & the speed limit as you see changes. I know the Garmin GPSs will let you do a demo mode too, I don't know if speed limits are shown along the route. I tried getting coordinates from maps.google.com, don't see a way to do it. Am thinking they hid that stuff, thought it used to be shown.


I'm not looking to put a Garmin or a TomTom in my vehicle. I already has a lot of custom electronics in my vehicle. Breaking this piece of the project to the simplest block possible:

I already have a GPS module in my vehicle. It is not used for mapping, rather logging coordinates. I am not interested in mapping. The custom electronics control certain and monitor certain aspect of my vehicle. I want to integrate the next part of this project with the rest of the systems in my vehicle.

What I need is a source of data that includes (but not limited to): coordinate and speed limit

Other info: part of the monitoring is fuel consumption and MPG. Uploading routes and driving distance when I pull into the drive way. Engine monitoring and more. This is all completed. Mostly with arduino, some with Arm and linux.

If I have to go arm or linux, that is no big deal. I just need data as mentioned before.

Thank you, J.C. Woltz

would GIS or other databases be available?

Garmin sells databases with the information you are looking for. I just paid $99 I think for lifetime updates for my Garmin Nuvi 205. You can buy the same database and pick out the info you need including speed limit by road section (I've the displayed speed limit change as the sign on the side of the road goes by. Its like a 16MB compressed file you download, then it uncompresses for loading into the Nuvi. I don't know if anyone maintains that as publicly available data.

Not checked if it contains speed limit info but wortha look or two - http://www.openstreetmap.org/ - They use color info to differentiate between road-types - that's a first order speed indication imho, so it should get you started. As it is an open project I think you can use their database, check the license to be sure.

Then you could overlay the roadmaps with squares (triangles, circles?) with the same speedlimit. So you need a table to map squareID to longitude/latitude points and speedlimit:

{SquareID, x1,y1,x2,y2, speed}*

You need to sort this table on both {x1, y1} and use binary search ;

Succes, Rob


can you read the data when it is uncompressed? I expect the data is encrypted /cloaked somehow so finding the speedlimits needs additional work but I expect that reverse engineering is probably not allowed.

I never tried looking at it. It appears to be a file called npGarmin.dll. Opening with Notepadd++ doesn't do much for me: That's why I suggest you talk to Garmin see if they will sell you a database of what you want.

Oh, and its 12Mbyte of this stuff.

50,000 lines deep it has this kind of stuff

<xs:element name="MapProduct" type="Family_t"/>

<xs:complexType name="Family_t">
        <xs:element name="Name" type="xs:string"/>
        <xs:element name="InstallationID" type="xs:positiveInteger" minOccurs="0">
            <xs:annotation><xs:documentation>This element is a globally unique identifier to be used for equality comparison
            to determine if an installed map product is an older/equal/newer version of a to-be-installed map product.</xs:documentation></xs:annotation>
        <xs:element name="DataVersion" type="xs:positiveInteger" minOccurs="0">
            <xs:annotation><xs:documentation>If two instances have an equal InstallationID element then this element can be compared to determine
            if this instance is older/equal/newer. Larger values are newer.</xs:documentation></xs:annotation>
        <xs:element name="DataFormat" type="DataFormat_t"/>
        <xs:element name="ID" type="xs:positiveInteger" minOccurs="0">
            <xs:annotation><xs:documentation>This element is not present for legacy products.</xs:documentation></xs:annotation>
        <xs:element name="IDX" type="xs:string" minOccurs="0">
            <xs:annotation><xs:documentation>The path to the IDX file for this product.
            This path is relative to the location of an instance document of this schema.</xs:documentation></xs:annotation>
        <xs:element name="MDR" type="xs:string" minOccurs="0">
            <xs:annotation><xs:documentation>The path to the MDR directory for this product.
            This path is relative to the location of an instance document of this schema..
            Processors should be tolerant of the presence or lack of a trailing directory separator in this path.</xs:documentation></xs:annotation>
        <xs:element name="TRF" type="xs:string" minOccurs="0">
            <xs:annotation><xs:documentation>The path to the TRF file for this product.
            This path is relative to the location of an instance document of this schema.</xs:documentation></xs:annotation>
        <xs:element name="TYP" type="xs:string" minOccurs="0">
            <xs:annotation><xs:documentation>The path to the TYP file for this product.
            This path is relative to the location of an instance document of this schema.</xs:documentation></xs:annotation>
        <xs:element name="UnlockURL" type="xs:anyURI" minOccurs="0"/>
        <xs:element name="SubProduct" type="Product_t" maxOccurs="unbounded"/>


<xsd:complexType name="TrackSeg_t">
    <xsd:sequence>	<!-- elements must appear in this order -->
      <xsd:element name="trkpt"	type="gpx:TrackPoint_t" minOccurs="0" maxOccurs="unbounded"/>

  <xsd:complexType name="TrackPoint_t">
    <xsd:sequence>	<!-- elements must appear in this order -->

	  <!-- Position info -->
	  <xsd:element name="ele"			type="xsd:decimal"		minOccurs="0"/>
	  <xsd:element name="time"			type="xsd:dateTime"		minOccurs="0"/>
	  <xsd:element name="course"		type="gpx:degreesType"	minOccurs="0"/>
	  <xsd:element name="speed"			type="xsd:decimal"		minOccurs="0"/>
	  <xsd:element name="magvar"		type="gpx:degreesType"	minOccurs="0"/>
	  <xsd:element name="geoidheight"	type="xsd:decimal"		minOccurs="0"/>

	  <!-- Description info -->
	  <xsd:element name="name"			type="xsd:string"		minOccurs="0"/>
	  <xsd:element name="cmt"			type="xsd:string"		minOccurs="0"/>
	  <xsd:element name="desc"			type="xsd:string"		minOccurs="0"/>
	  <xsd:element name="src"			type="xsd:string"		minOccurs="0"/>
	  <xsd:element name="url"			type="xsd:anyURI"		minOccurs="0"/>
 	  <xsd:element name="urlname"		type="xsd:string"		minOccurs="0"/>
	  <xsd:element name="sym"			type="xsd:string"		minOccurs="0"/>
	  <xsd:element name="type"			type="xsd:string"		minOccurs="0"/>

	  <!-- Accuracy info -->
	  <xsd:element name="fix"			type="gpx:fixType"		minOccurs="0"/>
	  <xsd:element name="sat"			type="xsd:nonNegativeInteger"	minOccurs="0"/>
	  <xsd:element name="hdop"			type="xsd:decimal"		minOccurs="0"/>
	  <xsd:element name="vdop"			type="xsd:decimal"		minOccurs="0"/>
	  <xsd:element name="pdop"			type="xsd:decimal"		minOccurs="0"/>
	  <xsd:element name="ageofdgpsdata"	type="xsd:decimal"		minOccurs="0"/>
	  <xsd:element name="dgpsid"		type="gpx:dgpsStationType"		minOccurs="0"/>

	  <!-- you can add your own privately defined trkpt elements at the end of the trkpt -->
	  <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
	<xsd:attribute name="lat"			type="gpx:latitudeType"		use="required"/>
	<xsd:attribute name="lon"			type="gpx:longitudeType"	use="required"/>

for about 6,000 lines.
Then another couple thousand lines of stuff.

I think this XML stuff is an Xml Schema Definition, it is a description of how XML data should look like, which fields and constraints etc. However the data seems binary, not XML so ... ? Could the XSD be used to describe the binary structure ? ...

Thank you everyone!

If I get to a usable point, I will let you know.