[talk-au] Qld police stations - potential OSM bulk import

Chris Barham cbarham at pobox.com
Fri Dec 11 13:33:07 GMT 2009


Hi,
I think I have found a good datasource for OSM, but I've run out of
steam trying to manipulate it.  If there is agreement the data is
useful and legitimate; similar to the BP import, I wondered if I could
ask for help, perhaps reapplying Johns' BP import code/procedure to
this dataset?

Queensland Police Stations XML File at :
http://drop.io/8j7bxdi/asset/extractedpoliceqld-xml

The data is all Queensland police stations, as listed on
http://www.police.qld.gov.au/station-locator/stationIndex.asp
There are also index pages to police shops and neighbourhood beats,
but I have ignored these.

The Copyright statement at http://www.police.qld.gov.au/copyright.htm
says that QPS are keen on reuse, and just want attribution, which I
thought might be easily achieved via a source tag(?)

Each station has a code, which links to a dynamic page with more detail.
Once you have a station code from the index page you can retrieve and
parse the source from a URL like this:
http://www.police.qld.gov.au/station-locator/station_locator.asp?code=${code}

For OSM purposes, as well as the station pages visible data (name,
phone number, address, suburb), within the source for each station
HTML page, the Qld police are supplying a lat and lon to whereis for
them to use for icon placement in an embedded map on the page, I've
checked a few of these and they appear quite accurate, (i.e. not
geocoded from an address).

I made an attempt at extracting the police station data from HTML into
the pseudo-XML file at
http://drop.io/8j7bxdi/asset/extractedpoliceqld-xml
(some manual and some automated work), but got stuck:

1) What format to transform it to - OSM? with what tags? how?
2) Would be great to generate a fixme tag generated HTML page,
(similar to the the BP one) for people to easily jump to PotLatch and
check/review
3) de-duplication if station already there (merging etc?)

A possible output tag template(?):

<node id='-1' action='create' visible='true' lat='${lat}' lon='${lon}'>
    <tag k='amenity' v='police' />
    <tag k='phone' v='${phone}' />
    <tag k='name' v='${name}' />
    <tag k='QueenslandPolice:stationId' v='${code}' />
    <tag k='QueenslandPolice:address' v='${address}' />
    <tag k='QueenslandPolice:suburb' v='${suburb}' />
    <tag k='fixme' v='not_reviewed' />
    <tag k='source' v='Queensland Police Service' />
    <tag k='website'
v='http://www.police.qld.gov.au/station-locator/station_locator.asp?code=${code}'
/>
</node>

So, in short, I can't finish what I have started; If there is
agreement the data is useful and legitimate, could I hand it over to
someone else to import? :-)

Cheers,
Chris




More information about the Talk-au mailing list