I am developing an Omeka-Neatline project on historical textile mills in Mumbai. India, in which I wish to use polygons exported from OpenStreetMap (OSM).
For this I am using the WKT (Well-Known Text) format required by Neatline for entering polygon information in plain text in the “Spatial Data” field in the “Map” tab in the Editor for a given record.
Here is my problem: while Neatline saves the record with the WKT text entered in the “Spatial Data” field, I just do not see the polygon rendering on my map (the help pop-up states that the geometry should appear on the map as soon as I paste the WKT in).
If I exit and reload the map and Neatline Editor after having saved the geometry and select the record, the map remains stuck “Loading…”. When I pan over tiles where I have given custom spatial data they don’t load in some views.
I have tried re-importing items and updating records, changing base layers, switching off certain layers and even regenerating my Google Maps API key. Note that I am not using GeoServer with Neatline – is this a requirement? I assumed it was not as I already have access to the available drawing tools in the Neatline Map Editor.
This may have something to do with how Neatline parses and renders WKT, or with how I am trying to generate WKT from OSM. I experimented with various ways which Neatline would not accept and returned an error message when I tried to paste and save data in the “Spatial Data” field.
An earlier OSM2WKT tool from the OpenStreetMap community no longer works. I tried via PostGIS and also this online converter. None of the WKT output I could generate would be saved in Neatline, I would just get a red error.
I found the best and fastest way to convert OSM features to WKT was using OSM Nominatim reverse geo-coding by querying the OSM way ID. Here is an example of a Nominatim query for this textile mill in Mumbai:
https://nominatim.openstreetmap.org/reverse?osm_type=W&osm_id=112794197&polygon_text=1
Where polygon_text=1 indicates output in WKT format as per the Nominatim documentation for polygon output. Nominatim returns the exported WKT as "geotext="POLYGON..."
.
Neatline accepts this WKT, but is still not rendering the actual feature on the map, nor do I see any errors. Can someone please advise?