smnorris / roadintegrator

Quickly merge multiple BC road datasets into a single layer for Cumulative Effects analysis
Apache License 2.0
10 stars 1 forks source link

approximate_medial_axis errors #13

Closed smnorris closed 3 years ago

smnorris commented 3 years ago
psql:sql/results.sql:100: NOTICE:  During approximate_medial_axis(A) :
psql:sql/results.sql:100: NOTICE:    with A: POLYGON((2626245922805389/2147483648 5305296725359537/8589934592,5252519889395785/4294967296 2652648366056767/4294967296,5252557185292269/4294967296 5305300318438657/8589934592,5252730161126695/4294967296 1326314751359741/2147483648,5252926091213871/4294967296 5305244908632737/8589934592,2626511615831285/2147483648 2652607957427765/4294967296,5253082046025573/4294967296 5305172130651633/8589934592,2626542738213743/2147483648 1326292075399561/2147483648,2626575590822501/2147483648 5305065555059899/8589934592,5130085438689/4194304 5304920474643449/8589934592,656659474152365/536870912 5304895634130285/8589934592,5253337677145425/4294967296 5304889583410107/8589934592,5253416194415249/4294967296 5304889340154559/8589934592,5253468515729501/4294967296 5304871078446605/8589934592,5253512621565399/4294967296 2652426722147923/4294967296,2626769868376459/2147483648 5304845915577003/8589934592,5253564905059889/4294967296 5304831686458947/8589934592,1313408163965115/1073741824 82887490938647/134217728,2626837513370669/2147483648 2652413091294989/4294967296,5253689426832157/4294967296 5304835274841623/8589934592,2626875265450493/2147483648 5304956999425225/8589934592,656725314201271/536870912 5305023982124219/8589934592,5253806534378357/4294967296 5305027163628535/8589934592,1313452566567117/1073741824 663128550662765/1073741824,5253871547285693/4294967296 2652514248020533/4294967296,5253875290920177/4294967296 2652513716149037/4294967296,5253879260091377/4294967296 5305024723387763/8589934592,5253933627345705/4294967296 5304966593758957/8589934592,5253937379886135/4294967296 663120042953799/1073741824,1313485078250141/1073741824 5304952173386839/8589934592,2626970964190405/2147483648 2652472105562941/4294967296,2626979876001879/2147483648 2652390301620715/4294967296,5253973465145175/4294967296 1326152341287827/2147483648,1313498528188867/1073741824 331531955576081/536870912,656758307576153/536870912 5304476209882879/8589934592,5254079547328607/4294967296 5304469863275667/8589934592,5254220982283705/4294967296 165
psql:sql/results.sql:100: ERROR:  straight skeleton of Polygon with point touching rings is not implemented.

Might just need a ST_MakeValid() call before passing to the medial axis function, or the input polys may require a little more cleaning.

smnorris commented 3 years ago

Yes, run a small in-out buffer to prep the polys https://gis.stackexchange.com/questions/375297/postgis-functions-for-generating-centerline-from-polygon

A buffer might clean the data but:

I think it is best to just ignore the features that cause the error.

smnorris commented 3 years ago

fixed with 30e7115