OTM1.3 - updating neighborhoods

11 visualizações
Pular para a primeira mensagem não lida

Keith Bornhorst

não lida,
5 de mai. de 2015, 17:11:1005/05/2015
para opentree...@googlegroups.com
We have the need to update our neighborhood geographies...

Plots (treemap_plot) are mapped to neighborhoods (treemap_neighborhood) via a many-to-many relationship (treemap_plot_neighborhood). I'm guessing we'll run shp2pgsql on the updated shapefile and get the new geometries into a temp table. I'm not entirely sure if we've lost neighborhoods, gained neighborhoods, or just changed their geometries, but we'll then have to run some psql to update treemap_neighborhood.

Does anyone which if any of the existing management commands (e.g. resave_trees or update_aggregates or ?) will make the necessary treemap_plot_neighborhood updates?

Thanks!
- Keith

Justin Walgran

não lida,
20 de mai. de 2015, 16:04:3320/05/2015
para opentree...@googlegroups.com
Sorry for the delayed response, Keith.

I have not dealt with changing neighborhood geometries before, so I can't speak from direct experience, but I did look over the Plot.save function. https://github.com/OpenTreeMap/OpenTreeMap/blob/899eb5a8fe9201f9008b9d9db76fc916a04b3fd3/treemap/models.py#L571-L634

The save function is almost exclusively concerned with updating the neighborhood associated with a geometry and updating the aggregates. I looks like the resave_trees management command will take care of everything. You definitely want to give this a try on a test database to verify that it works and to get an idea of how long it will take.

-Justin

--
You received this message because you are subscribed to the Google Groups "opentreemap-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentreemap-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem