[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] extending sides of parcels to cut/intersect roads before merge
From:       "karsten" <karsten () terragis ! net>
Date:       2020-03-31 17:13:50
Message-ID: D7EF327A94074427BFAB3DCC4F938700 () terragispc
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


So far the closest option I found towards generating geometries in order to
cut the unwanted roads ( before merging to the land use it shares the
longest boundary with) is using the function . That will generate lines (see
dotted red line in graph 4
<https://github.com/karstenv/postgis_processing/blob/master/parcel_layer4.pn
g>
https://github.com/karstenv/postgis_processing/blob/master/parcel_layer4.png
)

I used this simple query to get this above example in QGIS:
 
SELECT id, ST_StraightSkeleton(geom), attr1 FROM parcels;
 
Going forward I could create workflow similar to
limit the query to only the respective roads, generate the skeleton lines,
convert the roads to lines then generate a polygon geometry of the skeleton
lines and roads lines, replace the former roads polygon geometries in the
land use layer with the new polygon (skeleton-roads) geometry before merging
parcels by land use type.
 
Karsten 

[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.19597"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#000080 size=2 
face=Arial>So&nbsp;far&nbsp;the&nbsp;cl<SPAN 
class=503170117-31032020>o</SPAN>sest&nbsp;<SPAN class=503170117-31032020>option 
</SPAN>I&nbsp;found&nbsp;to<SPAN class=503170117-31032020>wards 
generating&nbsp;</SPAN>geometries&nbsp;in&nbsp;order&nbsp;to&nbsp;cut&nbsp;the&nbsp;unwanted&nbsp;roads&nbsp;<SPAN \
 class=503170117-31032020>( </SPAN>before&nbsp;merging&nbsp;to&nbsp;the&nbsp;land 
use&nbsp;it&nbsp;shares&nbsp;the&nbsp;longest&nbsp;bound<SPAN 
class=503170117-31032020>a</SPAN>ry&nbsp;with)&nbsp;is&nbsp;using&nbsp;the&nbsp;function&nbsp;.&nbsp;That&nbsp;will&nbsp;generate&nbsp;li<SPAN \
 class=503170117-31032020>n</SPAN>es&nbsp;(see&nbsp;<SPAN 
class=503170117-31032020>dotted red line in </SPAN>graph&nbsp;4 </FONT><A 
href="https://github.com/karstenv/postgis_processing/blob/master/parcel_layer4.png"><FONT \
 size=2 
face=Arial>https://github.com/karstenv/postgis_processing/blob/master/parcel_layer4.png</FONT></A><SPAN \
 class=503170117-31032020></SPAN><FONT color=#000080 size=2 
face=Arial>&nbsp;</FONT><FONT face=Arial><FONT color=#000080><FONT size=2><SPAN 
class=503170117-31032020>)<BR><BR></SPAN><SPAN class=503170117-31032020>I used 
this simple query to get this above&nbsp;example&nbsp;in 
QGIS:</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#000080><FONT size=2><SPAN 
class=503170117-31032020></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT color=#000080><FONT size=2><SPAN 
class=503170117-31032020>SELECT id, ST_StraightSkeleton(geom), attr1 FROM 
parcels;</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#000080><FONT 
size=2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT color=#000080><FONT size=2><SPAN 
class=503170117-31032020>Going forward&nbsp;</SPAN><SPAN 
class=503170117-31032020>I could create&nbsp;workflow similar 
to</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#000080><FONT size=2><SPAN 
class=503170117-31032020>limit the query to only the respective roads, generate 
the skeleton lines, convert the roads to lines then generate a polygon geometry 
of the skeleton lines and roads lines,&nbsp;replace the former roads polygon 
geometries in the land use layer with the new polygon (skeleton-roads) geometry 
before merging parcels by land use type.</SPAN></FONT></FONT></FONT></DIV>
<DIV><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Verdana','sans-serif'"><SPAN 
class=706372501-31032020></SPAN><FONT face=Arial><FONT color=#000080><FONT 
size=2><SPAN 
class=503170117-31032020>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Verdana','sans-serif'"><FONT 
face=Arial><FONT color=#000080><FONT size=2>Karsten</FONT></FONT></FONT> 
</SPAN></DIV></BODY></HTML>


[Attachment #6 (text/plain)]

_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic