five

Wimmera CMA Search API

收藏
Research Data Australia2025-12-20 收录
下载链接:
https://researchdata.edu.au/wimmera-cma-search-api/3802654
下载链接
链接失效反馈
官方服务:
资源简介:
Search API for looking up addresses and roads within the catchment. The api can search for both address and road, or either. This dataset is updated weekly from VicMap Roads and Addresses, sourced via www.data.vic.gov.au.\r\n\r\n# Use\r\n\r\nThe Search API uses a data.gov.au datastore and allows a user to take full advantage of full test search functionality.\r\n\r\nAn sql attribute is passed to the URL to define the query against the API. Please note that the attribute must be URL encoded. The sql statement takes for form as below:\r\n\r\n```\r\nSELECT distinct display, x, y\r\nFROM "4bf30358-6dc6-412c-91ee-a6f15aaee62a"\r\nWHERE _full_text @@ to_tsquery(replace('[term]', ' ', ' %26 '))\r\nLIMIT 10\r\n```\r\n\r\nThe above will select the top 10 results from the API matching the input 'term', and return the display name as well as an x and y coordinate. \r\n\r\nThe full URL for the above query would be:\r\n\r\n```\r\nhttps://data.gov.au/api/3/action/datastore_search_sql?sql=SELECT display, x, y FROM "4bf30358-6dc6-412c-91ee-a6f15aaee62a" WHERE _full_text @@ to_tsquery(replace('[term]', ' ', ' %26 ')) LIMIT 10)\r\n```\r\n\r\n# Fields\r\nAny field in the source dataset can be returned via the API. Display, x and y are used in the example above, but any other field can be returned by altering the select component of the sql statement. See examples below.\r\n\r\n# Filters\r\nSearch data sources and LGA can also be used to filter results. When not using a filter, the API defaults to using all records. See examples below.\r\n\r\n## Source Dataset\r\nA filter can be applied to select for a particular source dataset using the 'src' field. The currently available datasets are as follows:\r\n\r\n - **1** for Roads\r\n - **2** for Address\r\n - **3** for Localities\r\n - **4** for Parcels (CREF and SPI)\r\n - **5** for Localities (Propnum)\r\n\r\n## Local Government Area\r\nFilters can be applied to select for a specific local government area using the 'lga_code' field. LGA codes are derrived from Vicmap LGA datasets. Wimmeras LGAs include:\r\n\r\n - **332** Horsham Rural City Council\r\n - **330** Hindmarsh Shire Council\r\n - **357** Northern Grampians Shire Council\r\n - **371** West Wimmera Shire Council\r\n - **378** Yarriambiack Shire Council\r\n\r\n# Examples\r\n**Search for the top 10 addresses and roads with the word 'darlot' in their names:**\r\n\r\n```\r\nSELECT distinct display, x, y FROM "4bf30358-6dc6-412c-91ee-a6f15aaee62a" WHERE _full_text @@ to_tsquery(replace('darlot', ' ', ' & ')) LIMIT 10)\r\n```\r\n[example](https://data.gov.au/api/3/action/datastore_search_sql?sql=SELECT%20distinct%20display,%20x,%20y%20FROM%20%224bf30358-6dc6-412c-91ee-a6f15aaee62a%22%20WHERE%20_full_text%20@@%20to_tsquery\\(replace\\(%27darlot%27,%20%27%20%27,%20%27%20%26%20%27\\)\\)%20LIMIT%2010)\r\n\r\n**Search for all roads with the word 'perkins' in their names:**\r\n\r\n```\r\nSELECT distinct display, x, y FROM "4bf30358-6dc6-412c-91ee-a6f15aaee62a" WHERE _full_text @@ to_tsquery(replace('perkins', ' ', ' %26 ')) AND src=1\r\n```\r\n[example](https://data.gov.au/api/3/action/datastore_search_sql?sql=SELECT%20distinct%20display,%20x,%20y%20FROM%20%224bf30358-6dc6-412c-91ee-a6f15aaee62a%22%20WHERE%20_full_text%20@@%20to_tsquery\\(replacE\\(%27perkins%27,%20%27%20%27,%20%27%20%26%20%27\\)\\)%20AND%20src=1)\r\n\r\n**Search for all addresses with the word 'kalimna' in their names, within Horsham Rural City Council:**\r\n\r\n```\r\nSELECT distinct display, x, y FROM "4bf30358-6dc6-412c-91ee-a6f15aaee62a" WHERE _full_text @@ to_tsquery(replace('kalimna', ' ', ' %26 ')) AND src=2 and lga_code=332\r\n```\r\n[example](https://data.gov.au/api/3/action/datastore_search_sql?sql=SELECT%20distinct%20display,%20x,%20y%20FROM%20%224bf30358-6dc6-412c-91ee-a6f15aaee62a%22%20WHERE%20_full_text%20@@%20to_tsquery\\(replace\\(%27kalimna%27,%20%27%20%27,%20%27%20%26%20%27\\)\\)%20AND%20src=2%20and%20lga_code=332)\r\n\r\n**Search for the top 10 addresses and roads with the word 'green' in their names, returning just their display name, locality, x and y:**\r\n\r\n```\r\nSELECT distinct display, locality, x, y FROM "4bf30358-6dc6-412c-91ee-a6f15aaee62a" WHERE _full_text @@ to_tsquery(replace('green', ' ', ' %26 ')) LIMIT 10\r\n```\r\n[example](https://data.gov.au/api/3/action/datastore_search_sql?sql=SELECT%20distinct%20display,%20locality,%20x,%20y%20FROM%20%224bf30358-6dc6-412c-91ee-a6f15aaee62a%22%20WHERE%20_full_text%20@@%20to_tsquery\\(replace\\(%27green%27,%20%27%20%27,%20%27%20%26%20%27\\)\\)%20LIMIT%2010)\r\n\r\n**Search all addresses in Hindmarsh Shire:**\r\n\r\n```\r\nSELECT distinct display, locality, x, y FROM "4bf30358-6dc6-412c-91ee-a6f15aaee62a" WHERE lga_code=330\r\n```\r\n[example](https://data.gov.au/api/3/action/datastore_search_sql?sql=SELECT%20distinct%20display,%20locality,%20x,%20y%20FROM%20%224bf30358-6dc6-412c-91ee-a6f15aaee62a%22%20WHERE%20lga_code=330)
提供机构:
data.gov.au
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作