TerriaJS / terriajs

A library for building rich, web-based geospatial data platforms.
https://terria.io
Apache License 2.0
1.16k stars 359 forks source link

Batch geocoder/boundary lookup service #3161

Open AnaBelgun opened 5 years ago

AnaBelgun commented 5 years ago

GA supports the implementation of a batch geocoder functionality that could work with existing boundary definitions used to map csv-geo-au data format tables to. In effect, user supplying their file with geographic coordinates and receiving a result as a table/shape file with additional data dictionary information.

Use case below: I have got my layers added to the page https://nationalmap.gov.au/renewables/#share=s-6jYSh9PPtAYPNkrV. On this page, I do need to pass the latitude and longitude of multiple locations, and I would need to obtain the corresponding layer information from both the added layers.

For example, on this page, when I supply the search string as “-37.64916, 144.43606”, I get a location corresponding to it. When I click on this location, the map zooms to the location. On clicking the location icon on the map, I see the Feature information from both the layers. In this case, I get “Local Government Areas – Moorabool (S)” and “Available Distribution Capacity – Bacchus Marsh ZS” and on viewing the corresponding raw data, I get the LGA_CODE11 and asset_code respectively.

I am in need to find this information for about 20,000 geo-locations (latitude and longitude combinations) across Victoria and may need to do it for more entries in the future. I would appreciate your guidance on how I could automate this solution by supplying the geo-location as input and receive LGA_CODE11 and asset_code as output.

stevage commented 5 years ago

We've talked about this one on and off for years, right? Basically, uploading a CSV like this:

Longitude,Latitude,Name

And then downloading one like this:

Longitude,Latitude,Name,LGA_Code_2018,LGA_Name_2018,ELB_2017,...

I believe there is quite a lot of demand for such a thing, and it's a little bit surprising that there isn't already one in the market.

There is MapIt, which provides a single point lookup (API docs). At one point, @OpenAustralia did some work on an Australian instance. In any case, given we already have infrastructure to store all the geometry files, it's probably just as easy to build something from the ground up. I'd be pretty excited to work on this.

marcancajas commented 5 years ago

Have you guys ever look at the direction of a backend content management system? I think its important to deliver a substantial software product that non-advanced users can install and managed at a user level. Essentially, users should be able to manage catalog groups, items and functions through a GUI level CMS. Then we can just add new functionalities such as boundary lookup service and geocoding as a type of add-on/plugin that the users can install into the base application.

Going in this direction would require any instance/installation of the application to have a database for user accounts, access level and static data (not sure about this but the regions are static).

We should still have the Library APIs for advanced users but that needs more discussion.

marcancajas commented 5 years ago

May I add, doing the CMS backend will essentially make Terria a geospatial visualisation framework instead of just being a JS Library.

We can add something like a console interpreter functionality to talk to Terria for advanced users. Something like In console:

Terria -enablePlugin GeocodingService or Terria -disablePlugin GeocodingService Terria -displayAddDataOnStart enable (This is really just a checkbox in the backend page aswell somewhere in the main dashboard)

I'll get a terriajs dev copy and terriamap dev copy with a database config in the config.json file in Terria Map and a separate backend login page url (it shouldnt affect anything else) and a blank slate backend page sometime soon.

marcancajas commented 5 years ago

Hi Ana, I started work on a framework for TerriaJS. It’s in my GitHub account. I started updating dependencies to latest versions and configuring typescript loader for it as well. https://github.com/marcancajas/TerriaFramework/projects/1