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

List:       postgis-users
Subject:    [postgis-users] If there any difference for snap to for lines and surfaces in Postgis Topology ?
From:       Lars Aksel Opsahl <Lars.Opsahl () nibio ! no>
Date:       2016-09-18 19:20:28
Message-ID: dc19f264e59049edaae2e346938d43cc () nibio ! no
[Download RAW message or body]

Hi


First I tested with lines and that worked find, the lines added the second =
time snapped to first lines. The data I tested with are found at.

https://github.com/NibioOpenSource/pgtopo_update_sql/blob/develop/src/test/=
sql/import/data3/edge_1219.<https://github.com/NibioOpenSource/pgtopo_updat=
e_sql/blob/develop/src/test/sql/import/data3/edge_1219.prj>shp .


At https://trac.osgeo.org/postgis/wiki/UsersWikiPostgisTopology I have adde=
d section

called =93Convert shape file and simple feature data to Postgis Topology=94=
 that has some more info the function topo_help_sf_to_topology_case_1.


Here is the sql I tested with for lines that worked ok.


# create test schema if not exist

psql sl -c'CREATE SCHEMA IF NOT EXISTS test2;'


# copy file muni_buffer_out that contains not ok buffered out municipalitie=
 border "where komid not in (125)" into table test2.sf_in (drop and create =
if exits)

shp2pgsql -W ISO-8859-1 -d -D -s 4258 data3/edge_1219 test2.sf_in | psql sl=
; psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','topo_3.=
muni_surface');"

# copy data from test2.sf_in into table topo_3.muni_surface (append data to=
 topo_3.muni_edge)

psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','topo_3.mu=
ni_edge',0.00001);"


# copy file muni_buffer_in that contains not ok buffered in municipalitie b=
order "where komid not in (214)" into table test2.sf_in (drop and create if=
 exits)

shp2pgsql -W ISO-8859-1 -d -D -s 4258 data3/edge_1521 test2.sf_in | psql sl=
; psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','topo_3.=
muni_surface');"

# copy data from test2.sf_in into table topo_3.muni_surface (append data to=
 topo_3.muni_edge)

psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','topo_3.mu=
ni_edge',0.00001);"


Then I tried the same with surface data and they did not snap to as I expec=
ted.


The file https://github.com/NibioOpenSource/pgtopo_update_sql/blob/develop/=
src/test/sql/import/data2/muni_ok.shp contains the ok surfaces, but not the=
 4 surfaces where I have moved the border data around. But all edges needed=
 are present in this file since the surface not added are inclosed by other=
 surfaces.


The I added the files =93muni_buffer_in.shp muni_buffer_in_2.shp muni_buffe=
r_out.shp muni_projected.shp=94, my hope was that the edges for this surfac=
es should snap to the exiting edges, but that did not seem to happen.


Her is the code I tested with


# create test schema if not exist

psql sl -c'CREATE SCHEMA IF NOT EXISTS test2;'


# copy file muni_ok that contains ok municipalities border "where komid not=
 in (125,214,233,301)" into table test2.sf_in (drop and create if exits)

shp2pgsql -W UTF-8 -d -D -s 4258 data2/muni_ok.shp test2.sf_in | psql sl;

# copy data from test2.sf_in into table topo_2.muni_surface (topo table top=
o_2.muni_surface will craeted on the fly if it does not exist)

psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.mu=
ni_surface',0.00001,false,'new_gid_id',true,true);"


# copy file muni_buffer_out that contains not ok buffered out municipalitie=
 border "where komid not in (125)" into table test2.sf_in (drop and create =
if exits)

shp2pgsql -W ISO-8859-1 -d -D -s 4258 data2/muni_buffer_out test2.sf_in | p=
sql sl; psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','t=
opo_2.muni_surface');"

# copy data from test2.sf_in into table topo_2.muni_surface (append data to=
 topo_2.muni_surface)

psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.mu=
ni_surface',0.00001);"


# copy file muni_buffer_in that contains not ok buffered in municipalitie b=
order "where komid not in (214)" into table test2.sf_in (drop and create if=
 exits)

shp2pgsql -W ISO-8859-1 -d -D -s 4258 data2/muni_buffer_in test2.sf_in | ps=
ql sl; psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','to=
po_2.muni_surface');"

# copy data from test2.sf_in into table topo_2.muni_surface (append data to=
 topo_2.muni_surface)

psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.mu=
ni_surface',0.00001);"


# copy file muni_projected that contains not ok projectes municipalitie bor=
der "where komid not in (233)" into table test2.sf_in (drop and create if e=
xits)

shp2pgsql -W ISO-8859-1 -d -D -s 4258 data2/muni_projected test2.sf_in | ps=
ql sl; psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','to=
po_2.muni_surface');"

# copy data from test2.sf_in into table topo_2.muni_surface (append data to=
 topo_2.muni_surface)

psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.mu=
ni_surface',0.00001);"


# copy file muni_buffer_in_2 that contains not ok buffered in municipalitie=
 border "where komid not in (301)" into table test2.sf_in (drop and create =
if exits)

shp2pgsql -W ISO-8859-1 -d -D -s 4258 data2/muni_buffer_in_2 test2.sf_in | =
psql sl; psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','=
topo_2.muni_surface');"

# copy data from test2.sf_in into table topo_2.muni_surface (append data to=
 topo_2.muni_surface)

psql sl -c "SELECT topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.mu=
ni_surface',0.00001);"


Lars




[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} \
--></style> </head>
<body dir="ltr">
<div id="divtagdefaultwrapper" \
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
 <p style="margin-bottom: 0in">Hi</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">First I tested with lines and that worked find, the \
lines added the second time snapped to first lines. The data I tested with are found \
at.</p> <p style="margin-bottom: 0in"><a \
href="https://github.com/NibioOpenSource/pgtopo_update_sql/blob/develop/src/test/sql/import/data3/edge_1219.prj" \
id="LPlnk533506">https://github.com/NibioOpenSource/pgtopo_update_sql/blob/develop/src/test/sql/import/data3/edge_1219.</a>shp
                
 .<br>
</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in"><font size="3"><span style="font-weight: normal">At
<a href="https://trac.osgeo.org/postgis/wiki/UsersWikiPostgisTopology">https://trac.osgeo.org/postgis/wiki/UsersWikiPostgisTopology</a> \
I have added section </span></font></p>
<p style="margin-bottom: 0in"></p>
<p style="margin-bottom: 0in"><font size="3">called “</font><font \
color="#000000"><font face="ArialMT, sans-serif"><font size="3">Convert shape file \
and simple feature data to Postgis Topology” that has some more info the \
function&nbsp;</font></font></font><span style="color: rgb(0, 128, 0); font-family: \
Monaco, monospace; font-size: 15px;">topo_help_sf_to_topology_case_1</span><span \
style="font-size: 12pt;">.</span></p> <p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">Here is the sql I tested with for lines that worked \
ok.&nbsp;<br> </p>
<p style="margin-bottom: 0in"><br>
</p>
<p align="LEFT" style="margin-bottom: 0in"><font color="#000000"><font face="Monaco, \
monospace"><font size="2" style="font-size: 11pt"># </font></font></font><font \
color="#7f0055"><font face="Monaco, monospace"><font size="2" style="font-size: \
11pt"><b>create</b></font></font></font><font color="#000000"><font face="Monaco, \
monospace"><font size="2" style="font-size: 11pt"> test </font></font></font><font \
color="#7f0055"><font face="Monaco, monospace"><font size="2" style="font-size: \
11pt"><b>schema</b></font></font></font><font color="#000000"><font face="Monaco, \
monospace"><font size="2" style="font-size: 11pt"> if </font></font></font><font \
color="#7f0055"><font face="Monaco, monospace"><font size="2" style="font-size: \
11pt"><b>not</b></font></font></font><font color="#000000"><font face="Monaco, \
monospace"><font size="2" style="font-size: 11pt"> exist</font></font></font></p> <p \
align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font size="2" \
style="font-size: 11pt"><font color="#000000">psql sl -c</font><font \
color="#0000ff">'CREATE SCHEMA IF NOT EXISTS test2;'</font></font></font></p> <p \
align="LEFT" style="margin-bottom: 0in"><br> </p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy file muni_buffer_out \
that contains </font><font color="#7f0055"><b>not</b></font><font color="#000000"> ok \
buffered out municipalitie border </font><font color="#008000">&quot;where komid not \
in (125)&quot;</font><font color="#000000"> </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> test2.sf_in (</font><font \
color="#7f0055"><b>drop</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>and</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>create</b></font><font color="#000000"> if exits) \
</font></font></font></p> <p align="LEFT" style="margin-bottom: 0in"><font \
face="Monaco, monospace"><font size="2" style="font-size: 11pt"><font \
color="#000000">shp2pgsql -W ISO-8859-1 -d -D -s 4258 data3/edge_1219 test2.sf_in | \
psql sl; psql sl -c </font><font color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_3.muni_surface');&quot;</font><font \
color="#000000"> </font></font></font></p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy data </font><font \
color="#7f0055"><b>from</b></font><font color="#000000"> test2.sf_in </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> topo_3.muni_surface (append \
data to topo_3.muni_edge)</font></font></font></p> <p align="LEFT" \
style="margin-bottom: 0in"><font face="Monaco, monospace"><font size="2" \
style="font-size: 11pt"><font color="#000000">psql sl -c </font><font \
color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_3.muni_edge',0.00001);&quot;</font><font \
color="#000000"> </font></font></font></p>
<p align="LEFT" style="margin-bottom: 0in"><br>
</p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy file muni_buffer_in \
that contains </font><font color="#7f0055"><b>not</b></font><font color="#000000"> ok \
buffered </font> <font color="#7f0055"><b>in</b></font><font color="#000000"> \
municipalitie border </font><font color="#008000">&quot;where komid not in \
(214)&quot;</font><font color="#000000"> </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> test2.sf_in (</font><font \
color="#7f0055"><b>drop</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>and</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>create</b></font><font color="#000000"> if exits) \
</font></font></font></p> <p align="LEFT" style="margin-bottom: 0in"><font \
face="Monaco, monospace"><font size="2" style="font-size: 11pt"><font \
color="#000000">shp2pgsql -W ISO-8859-1 -d -D -s 4258 data3/edge_1521 test2.sf_in | \
psql sl; psql sl -c </font><font color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_3.muni_surface');&quot;</font><font \
color="#000000"> </font></font></font></p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy data </font><font \
color="#7f0055"><b>from</b></font><font color="#000000"> test2.sf_in </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> topo_3.muni_surface (append \
data to topo_3.muni_edge)</font></font></font></p> <p align="LEFT" \
style="margin-bottom: 0in"><font face="Monaco, monospace"><font size="2" \
style="font-size: 11pt"><font color="#000000">psql sl -c </font><font \
color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_3.muni_edge',0.00001);&quot;</font><font \
color="#000000"> </font></font></font></p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in"></p>
<p style="margin-bottom: 0in">Then I tried the same with surface data and they did \
not snap to as I expected. </p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">The file <a \
href="https://github.com/NibioOpenSource/pgtopo_update_sql/blob/develop/src/test/sql/import/data2/muni_ok.shp" \
title="https://github.com/NibioOpenSource/pgtopo_update_sql/blob/develop/src/test/sql/import/data2/muni_ok.shp
 Cmd&#43; Klikk eller trykk for å følge koblingen">
https://github.com/NibioOpenSource/pgtopo_update_sql/blob/develop/src/test/sql/import/data2/muni_ok.shp</a> \
contains the ok surfaces, but not the 4 surfaces where I have moved the border data \
around. But all edges needed are present in this file since the surface  not added \
are inclosed by other surfaces.</p> <p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in"><font size="3">The I added the files “<font \
color="#000000"><font face="Menlo-Regular">muni_buffer_in.shp muni_buffer_in_2.shp \
muni_buffer_out.shp muni_projected.shp”, my hope was that the edges for this surfaces \
should snap to  the exiting edges, but that did not seem to \
happen.</font></font></font></p> <p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in"><font size="3"><font color="#000000"><font \
face="Menlo-Regular">Her is the code I tested with&nbsp;</font></font></font></p> <p \
style="margin-bottom: 0in"><font size="3"><font color="#000000"><font face="Monaco, \
monospace"><font size="2" style="font-size: 11pt"><br> \
</font></font></font></font></p> <p style="margin-bottom: 0in"><font size="3"><font \
color="#000000"><font face="Menlo-Regular"></font></font><font color="#000000"><font \
face="Monaco, monospace"><font size="2" style="font-size: 11pt"># \
</font></font></font><font color="#7f0055"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><b>create</b></font></font></font><font \
color="#000000"><font face="Monaco, monospace"><font size="2" style="font-size: \
11pt"> test </font></font></font><font color="#7f0055"><font face="Monaco, \
monospace"><font size="2" style="font-size: \
11pt"><b>schema</b></font></font></font><font color="#000000"><font face="Monaco, \
monospace"><font size="2" style="font-size: 11pt"> if </font></font></font><font \
color="#7f0055"><font face="Monaco, monospace"><font size="2" style="font-size: \
11pt"><b>not</b></font></font></font><font color="#000000"><font face="Monaco, \
monospace"><font size="2" style="font-size: 11pt"> \
exist</font></font></font></font></p> <p align="LEFT" style="margin-bottom: \
0in"><font face="Monaco, monospace"><font size="2" style="font-size: 11pt"><font \
color="#000000">psql sl -c</font><font color="#0000ff">'CREATE SCHEMA IF NOT EXISTS \
test2;'</font></font></font></p> <p align="LEFT" style="margin-bottom: 0in"><br>
</p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy file muni_ok that \
contains ok municipalities border </font><font color="#008000">&quot;where komid not \
in (125,214,233,301)&quot;</font><font color="#000000"> </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> test2.sf_in (</font><font \
color="#7f0055"><b>drop</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>and</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>create</b></font><font color="#000000"> if exits) \
</font></font></font></p> <p align="LEFT" style="margin-bottom: 0in"><font \
color="#000000"><font face="Monaco, monospace"><font size="2" style="font-size: \
11pt">shp2pgsql -W UTF-8 -d -D -s 4258 data2/muni_ok.shp test2.sf_in | psql sl; \
</font></font></font></p> <p align="LEFT" style="margin-bottom: 0in"><font \
face="Monaco, monospace"><font size="2" style="font-size: 11pt"><font \
color="#000000"># copy data </font><font color="#7f0055"><b>from</b></font><font \
color="#000000"> test2.sf_in </font><font color="#7f0055"><b>into</b></font><font \
color="#000000"> </font><font color="#7f0055"><b>table</b></font><font \
color="#000000"> topo_2.muni_surface (topo </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> topo_2.muni_surface will \
craeted </font><font color="#7f0055"><b>on</b></font><font color="#000000"> the fly \
if it does </font><font color="#7f0055"><b>not</b></font><font color="#000000"> \
exist)</font></font></font></p> <p align="LEFT" style="margin-bottom: 0in"><font \
face="Monaco, monospace"><font size="2" style="font-size: 11pt"><font \
color="#000000">psql sl -c </font><font color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.muni_surface',0.00001,false,'new_gid_id',true,true);&quot;</font><font \
color="#000000"> </font></font></font></p>
<p align="LEFT" style="margin-bottom: 0in"><br>
</p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy file muni_buffer_out \
that contains </font><font color="#7f0055"><b>not</b></font><font color="#000000"> ok \
buffered out municipalitie border </font><font color="#008000">&quot;where komid not \
in (125)&quot;</font><font color="#000000"> </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> test2.sf_in (</font><font \
color="#7f0055"><b>drop</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>and</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>create</b></font><font color="#000000"> if exits) \
</font></font></font></p> <p align="LEFT" style="margin-bottom: 0in"><font \
face="Monaco, monospace"><font size="2" style="font-size: 11pt"><font \
color="#000000">shp2pgsql -W ISO-8859-1 -d -D -s 4258 data2/muni_buffer_out \
test2.sf_in | psql sl; psql sl -c </font><font color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.muni_surface');&quot;</font><font \
color="#000000"> </font></font></font></p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy data </font><font \
color="#7f0055"><b>from</b></font><font color="#000000"> test2.sf_in </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> topo_2.muni_surface (append \
data to topo_2.muni_surface)</font></font></font></p> <p align="LEFT" \
style="margin-bottom: 0in"><font face="Monaco, monospace"><font size="2" \
style="font-size: 11pt"><font color="#000000">psql sl -c </font><font \
color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.muni_surface',0.00001);&quot;</font><font \
color="#000000"> </font></font></font></p>
<p align="LEFT" style="margin-bottom: 0in"><br>
</p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy file muni_buffer_in \
that contains </font><font color="#7f0055"><b>not</b></font><font color="#000000"> ok \
buffered </font> <font color="#7f0055"><b>in</b></font><font color="#000000"> \
municipalitie border </font><font color="#008000">&quot;where komid not in \
(214)&quot;</font><font color="#000000"> </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> test2.sf_in (</font><font \
color="#7f0055"><b>drop</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>and</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>create</b></font><font color="#000000"> if exits) \
</font></font></font></p> <p align="LEFT" style="margin-bottom: 0in"><font \
face="Monaco, monospace"><font size="2" style="font-size: 11pt"><font \
color="#000000">shp2pgsql -W ISO-8859-1 -d -D -s 4258 data2/muni_buffer_in \
test2.sf_in | psql sl; psql sl -c </font><font color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.muni_surface');&quot;</font><font \
color="#000000"> </font></font></font></p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy data </font><font \
color="#7f0055"><b>from</b></font><font color="#000000"> test2.sf_in </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> topo_2.muni_surface (append \
data to topo_2.muni_surface)</font></font></font></p> <p align="LEFT" \
style="margin-bottom: 0in"><font face="Monaco, monospace"><font size="2" \
style="font-size: 11pt"><font color="#000000">psql sl -c </font><font \
color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.muni_surface',0.00001);&quot;</font><font \
color="#000000"> </font></font></font></p>
<p align="LEFT" style="margin-bottom: 0in"><br>
</p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy file muni_projected \
that contains </font><font color="#7f0055"><b>not</b></font><font color="#000000"> ok \
projectes municipalitie border </font><font color="#008000">&quot;where komid not in \
(233)&quot;</font><font color="#000000"> </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> test2.sf_in (</font><font \
color="#7f0055"><b>drop</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>and</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>create</b></font><font color="#000000"> if exits) \
</font></font></font></p> <p align="LEFT" style="margin-bottom: 0in"><font \
face="Monaco, monospace"><font size="2" style="font-size: 11pt"><font \
color="#000000">shp2pgsql -W ISO-8859-1 -d -D -s 4258 data2/muni_projected \
test2.sf_in | psql sl; psql sl -c </font><font color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.muni_surface');&quot;</font><font \
color="#000000"> </font></font></font></p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy data </font><font \
color="#7f0055"><b>from</b></font><font color="#000000"> test2.sf_in </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> topo_2.muni_surface (append \
data to topo_2.muni_surface)</font></font></font></p> <p align="LEFT" \
style="margin-bottom: 0in"><font face="Monaco, monospace"><font size="2" \
style="font-size: 11pt"><font color="#000000">psql sl -c </font><font \
color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.muni_surface',0.00001);&quot;</font><font \
color="#000000"> </font></font></font></p>
<p align="LEFT" style="margin-bottom: 0in"><br>
</p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy file muni_buffer_in_2 \
that contains </font><font color="#7f0055"><b>not</b></font><font color="#000000"> ok \
buffered </font> <font color="#7f0055"><b>in</b></font><font color="#000000"> \
municipalitie border </font><font color="#008000">&quot;where komid not in \
(301)&quot;</font><font color="#000000"> </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> test2.sf_in (</font><font \
color="#7f0055"><b>drop</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>and</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>create</b></font><font color="#000000"> if exits) \
</font></font></font></p> <p align="LEFT" style="margin-bottom: 0in"><font \
face="Monaco, monospace"><font size="2" style="font-size: 11pt"><font \
color="#000000">shp2pgsql -W ISO-8859-1 -d -D -s 4258 data2/muni_buffer_in_2 \
test2.sf_in | psql sl; psql sl -c </font><font color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.muni_surface');&quot;</font><font \
color="#000000"> </font></font></font></p>
<p align="LEFT" style="margin-bottom: 0in"><font face="Monaco, monospace"><font \
size="2" style="font-size: 11pt"><font color="#000000"># copy data </font><font \
color="#7f0055"><b>from</b></font><font color="#000000"> test2.sf_in </font><font \
color="#7f0055"><b>into</b></font><font color="#000000"> </font><font \
color="#7f0055"><b>table</b></font><font color="#000000"> topo_2.muni_surface (append \
data to topo_2.muni_surface)</font></font></font></p> <p align="LEFT" \
style="margin-bottom: 0in"><font face="Monaco, monospace"><font size="2" \
style="font-size: 11pt"><font color="#000000">psql sl -c </font><font \
color="#008000">&quot;SELECT \
topo_help_sf_to_topology_case_1('test2.sf_in','topo_2.muni_surface',0.00001);&quot;</font><font \
color="#000000"> </font></font></font></p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in"><font size="3"><font color="#000000"><font \
face="Menlo-Regular">Lars</font></font></font></p> <p></p>
<p style="margin-bottom: 0in"><br>
</p>
<p><br>
</p>
<p><br>
</p>
</div>
</body>
</html>


[Attachment #4 (unknown)]

_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://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