Speed Zone Data API / passing lay / long

Hi

I have just joined your developer program today

I am trying to find how to send lay / long data with my api request call so the api returns the speed zone of the given location

Thanks in advance

Claude

Hi Claude

We have responded to your email regarding this.

Thanks

Hi

So the speed zone data is static at present not offered as an api.

I have downloaded the data which seem very comprehensive.

Basically all I am wanting to do do query the data by passing lat /long so it returns the speed limit / zone of a given location

I am a software developer and sql bd however have no experience in GIS bd’s

Do you have any resources guiding how to query the datasets

The SpeedZone guide doc offers general info and has no reference to querying the data to extract info.

Regards Claude

Hi Claude

We have some guides available here:

Thanks

Hi

But in an earlier message you advised that speed zone Dara was not an api it was static data ???

So i am at a loss to understand how the api guides will be of assistance given the above ??)

Hi,

This might help with what you’re trying to do: Speed limits  |  Roads API  |  Google Developers

Thanks

Did you receive my eMail where I explained why I was seeking to use the data from nsw directly as the source of truth so the info is as upto date as possibly without time lag of updates being received by third parties systems only periodically

Claude Raiola
0414 228 948

Oops sorry the Email I had sent to data scout

To clarify I am aware of the google / waze / TomTom / ops apis

However my concern is the time lag for any changes in speed zones to be sent to these third parties as as the time lag for them to then update their data for users

My theory is if I can access the data directly from the one source of truth then my data will be as current and accurate as possibly without the risks associated with time lags of third parties receiving and then updating their data sets

I welcome your thoughts

Claude Raiola
0414 228 948

Hi Claude

As advised to you by email, we do not have an API for speed zones. It is a static data set only. We have no current plans to release an API, though we may do so in the future.

Thanks

I am not trying to be difficult

The resource docs your offered yesterday do not provide guidance re how to retrieve / query results from your static data sets even for a basic query passing lat / long to the data

Claude Raiola
0414 228 948

Hi Claude,

This data is provided as a static dataset in a fairly standard data format for exchanging spatial data. So whilst it’s not as simple as plugging in lat/longs to get results, the great thing is you can download the data and do whatever you like with it – including creating your own APIs to suit your own requirements!

Speaking as someone outside of TfNSW, the Open Data team usually doesn’t provide development support to you with building your own APIs. However, the broader community here may be able to help. There are a couple of people with a GIS background here who would be happy to give you some high level guidance.

I’d suggest having a look at various spatial databases for your needs. For example, if you’re familiar with MySQL or Postgres (PostGIS), you can import the data into the database, index it and perform spatial queries through the database. You can use a desktop GIS program like QGIS to open / view the data and import as you need.

That’s just one way to approach the problem :slight_smile:

Cheers,
Ken

1 Like

Thanks for your reply

So given the only location data o have is lat / long where would I find sample queries that show me how to go about locating the road segment relating to the lat : long position so I can then determine the speed zone along that segment which is the only data value I am needing to determine.

Claude Raiola
0414 228 948

As an example, if your data is in a Postgres database with PostGIS enabled, you could use ST_DWithin to query for road segments within a certain radius and sort by distance that way. See ST_DWithin

Keep in mind additional contextual information is required to guess the right road segment. A set of coordinates may give you a value, but not necessarily the right one depending on your use case. Things you need to keep in mind are like direction of travel on a dual-carriage way, road level (i.e. tunnels, surface road and overpass) and the typical accuracy of the location data you get.

1 Like

Hi

Can I asks what the rules are around providing the datasets I download to a developer who is overseas assisting me to create the speedzone api with your gis data ??

Is this allowed or do they need to create their own account and download the data themselves

Most (if not all) the datasets are under the CC-BY license. I believe you would have agreed to this license when you created an API key and enabled the dataset for that key. The rules you seek should be in there.

Also, you assume that the same agency that puts up speed limits also provides the most correct & up-to-date data. Do you also assume that data is the most complete? Since TfNSW is a state agency, I would expect it to only cover state roads and not local roads.

Hi

Thanks for your comments

Regarding accuracy And consistency of speed zone data my thought is that then will need to be a accurate consistent reliable solution in place across all roads in readiness for driverless cars which are going to be here within the next 5 to 10 years so it has to happen eventually anyway but thanks for your comments and time

why do you expect driverless cars can’t read speed limit signs on the road, and require a dataset? and why do you expect driverless cars will be [legal] here (in NSW) in 5 to 10 years? i’m still waiting for electric scooters and smaller autonomous vehicles (like the auspost and domino’s robots which had to their trials in qld as they aren’t legal here).

I’ll try and answer the speed topics the road sign reading technology which currently is mobile I technology works however if you’re in the middle lane and there is a bus truck vehicle larger than yourself in the left the right lane the mobile a camera isn’t gonna see the speed sign because the buses on the way What happens when you enter a road where the road be entered has a different speed sign then the one you’re exiting e.g. from the side street yet the speed sign on that road you’re driving on is another 600 or more metres down the street how does the vehicle know what the speed limit will be on that stretch of the road until it passes the new update it’s bedtime I have use mobile I so I have some experience in some of the limitations it has module it hasMany benefits heavy rainfall weather can also inhibit the accurate detection of speed signs anyway just my view not need to start a huge debate on the topic but thanks for your time to send a message

If a human can figure out what speed to drive at, then a computer should be able to, too. Either by each driverless manufacturer collecting the data from a vehicle that previously passed the sign, or by matching the speed of the traffic ahead of the vehicle. The vehicle can also see the road ahead and keep a stopping distance of 3 seconds (or whatever is deemed safe for driverless vehicles given the conditions at that moment). Personally I don’t like speed limits as I’m constantly looking at the speedometer instead of the road, and I consider that to be less safe than just traveling at what feels like a safe speed.

Surely it would be great if there was an accurate, complete, up-to-date dataset (like a digital twin) - I’m not disputing that. Just don’t want to get your hopes up.

Hi @SpeedLessAustralia - yes as @jayen has mentioned our data is usually provided under a CC-BY 4.0 licence - which means you pretty much can do what you want/need with the data.

Our preference is the the developer from overseas gets their own account but it doesn’t matter.