geobtaa / geoportal

Big Ten Academic Alliance Geoportal
Other
10 stars 5 forks source link

Centroid generation #41

Closed ewlarson closed 6 years ago

ewlarson commented 7 years ago

The new map visualization requires a new field in our Solr schema: centroid_s

That string field stores a centroid lat/lng value like: "41.674408,-76.277888", which is calculated from the georss_box_s field (ex. "38.325955 -80.98945 45.022861 -71.566326") when this task is run during the deploy: https://github.com/BTAA-Geospatial-Data-Project/geoportal/blob/develop/lib/tasks/geoportal/generate_centroids_solr.rake

This works for now, but we would be better off containing any index modifications to the metadata workflow instead of the application.

karenmajewicz commented 7 years ago

OK, I have an idea how we would do this, but it might take a bit of time to republish. Is centroid_s better than georss_point_s?

ewlarson commented 7 years ago

My code is looking for a centroid_s field. We can pretty easily rename that, though. Let me know what field name you prefer, and I'll adjust as necessary.