-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need SQL command to add centroids layer to the spatial service #255
Comments
Loading a points only spatial layer into spatial-service has only taken place 2 or 3 times. Due to this frequency, the admin UI was not intended to assist. In practice, more technical steps are required to load points only spatial layers. Testing is also different. Moving a tested layer into production may also require the same technical steps. The points layers currently in the spatial-service is the Gazetteer of Australia.
Testing is performed using 3 services. For example, the gazetteer layer cl2123 can be tested with:
Additional steps are required to load a points layer. Using the incomplete load of "Suburbs and Localities Centroids 2021" points layer in the test environment as a starting point, the tests show that the objects are not loaded. These additional steps are required:
The insert statement construction
Example
Where
After constructing the list of INSERT statements, run this in the test environment postgresql layersdb and confirm. |
This may be a dumb question, but am I to understand that I need to add each centroid individually via an INSERT command like the one shown above? And each one has to have a unique name? |
That is correct. One centroid, one insert statement. When there are non-unique names, they are made unique by adding a meaningful context such as type and state. |
@adam-collins to confirm, is this an example of a correct statement? I ask because the example above does not have a bounding box:
|
A comparison:
|
Thanks Adam! I have now produced the script, which is in
Hoave you gotten this? |
all right, I've fixed it and I have inserted all the objects into the database |
I ran through the testing steps listed above
I inspected the sql file.
|
Hi Adam, I'm not sure exactly what you would like changed in the descriptions, could you please provide specific details or a description template for both the overall layer and the description in the SQL file? I would rather not make guesses in order to rectify any issues efficiently. |
Use description template: For an example see the above comment |
Hi Adam, this has now been done. |
The test URL Update to match the requirement stated |
The description does contain the state though - do you mean only have the state abbreviation, rather than the full name of the state? |
|
I've changed the positioning of lat/long and redid the objects |
The test URL https://spatial-test.ala.org.au/ws/search?q=Aarons%20Pass&include=cl11221 has the name
|
I've removed the extraneous text |
The test URL https://spatial-test.ala.org.au/ws/field/cl11221?pageSize=10 returns a list of objects with the incorrect centroid value. e.g. |
I've swapped the lat/longs again and uploaded them to test and production |
Hi @adam-collins @kylie-m @TaniaGLaity I had a meeting with Kylie today to discuss this ticket. I have a few clarification questions:
Am I missing something?
|
Thanks @acbuyan we'll chat in standup and I can let you know! |
Hi @acbuyan, I just checked with Adam and what you had above is very close, just needs to have the lat and lon swapped for
We also discussed having the state/territory written out in full vs acronym and Adam confirmed there is no back-end reason for that |
Morning @acbuyan, I ran through the testing steps based on everything above and as far as I'm aware, it looks good to me. Testing notes:
****** All as above appears correct on production too, the prod pids for the above are:
I then started on next steps for testing the batch output check:
this output matches the output of another prod layer used as an example above, cl1213 - Summary
|
Hi again @acbuyan, I ran the above past Adam, answers to questions in the summary:
I also needed to check using spatial.test not spatial-test, so I did the same tests above but using the equivalent links. Everything looked good as above, with one exception being that the |
Thanks all for persisting with this, much appreciated! |
I also should have said, once we fix the order of lat and long in |
A lot of the discussion around this is in this slack thread here: https://atlaslivingaustralia.slack.com/archives/CCSPJEU00/p1729809653636619
TL;DR: I created a centroids layer and am trying to add it to layersdb using these commands:
However, I'm not able to see the layer after running the following command:
the layer is not in the table. Can someone help me find the correct SQL command so I can add this layer and document it in Confluence?
The text was updated successfully, but these errors were encountered: