UI Sandbox - GED4GEM add simple geom views for low res visualization

Bug #933363 reported by Ben Wyss
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
Medium
Ben Wyss

Bug Description

[et=8h]
[at=15.5h]

The admin 0 polygon layer that is used is very detailed, and is slow to render in the UI.
Because of this we should add another admin 0 level polygon that is much more simplified.
This simplified geometry should be added to a view that is conglomerated with the attributes of the country info data and should be visible in the UI at large scale zoom.
The original geometry should then be used at a smaller scale zoom.

Tags: ged4gem ui
Revision history for this message
Ben Wyss (bmwyss) wrote :

attached is a shapefile of admin 0 that was used in GEM1

Ben Wyss (bmwyss)
Changed in openquake:
status: New → In Progress
Revision history for this message
Ben Wyss (bmwyss) wrote :

The shapefile that we used for GEM1 is not compatible with the world admin 0 file that GED4GEM is using.
Because of this we can do a spatial join between the GED file and the GEM1 file to join the needed country code information to the GEM 1 file. Or we could take the GED file and simplify it.

Revision history for this message
Ben Wyss (bmwyss) wrote :

Before anything this table needs to be backed up before simplifying

Revision history for this message
Ben Wyss (bmwyss) wrote :

I used the simplify PostGIS function to create a new 'moresimplegeom' column. This could only be done after I made a backup of the original file, and removed the complex geom column.

Revision history for this message
Ben Wyss (bmwyss) wrote :

Something to consider when dropping a very large column:

Notes (http://original.jamesthornton.com/postgres/7.3/postgres/sql-altertable.html)

The DROP COLUMN command does not physically remove the column, but simply makes it invisible to SQL operations. Subsequent inserts and updates of the table will store a NULL for the column. Thus, dropping a column is quick but it will not immediately reduce the on-disk size of your table, as the space occupied by the dropped column is not reclaimed. The space will be reclaimed over time as existing rows are updated. To reclaim the space at once, do a dummy UPDATE of all rows and then vacuum, as in:

UPDATE table SET col = col;
VACUUM FULL table;

If a table has any descendant tables, it is not permitted to ADD or RENAME a column in the parent table without doing the same to the descendants --- that is, ALTER TABLE ONLY will be rejected. This ensures that the descendants always have columns matching the parent.

A recursive DROP COLUMN operation will remove a descendant table's column only if the descendant does not inherit that column from any other parents and never had an independent definition of the column. A nonrecursive DROP COLUMN (i.e., ALTER TABLE ONLY ... DROP COLUMN) never removes any descendant columns, but instead marks them as independently defined rather than inherited.

Changing any part of the schema of a system catalog is not permitted.

Refer to CREATE TABLE for a further description of valid arguments. The PostgreSQL User's Guide has further information on inheritance.

Revision history for this message
Ben Wyss (bmwyss) wrote :

to simplify the polygon I am using:
UPDATE eqged.gadm_country_facts set moresimplegeom = simplify(simplegeom,0.01);

Revision history for this message
Ben Wyss (bmwyss) wrote :

If there is a further need to generalize geometries this tutorial on Using the GeoTools feature-pregeneralized module might be helpful: http://docs.geoserver.org/stable/en/user/tutorials/feature-pregeneralized/feature-pregeneralized_tutorial.html

Ben Wyss (bmwyss)
description: updated
Ben Wyss (bmwyss)
Changed in openquake:
status: In Progress → Confirmed
John Tarter (toh2)
Changed in openquake:
milestone: 0.6.0 → 0.6.1
Changed in openquake:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.