<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I had a discussion with Knut Bjørkelo a co worker of me today. </p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">He was wondering if we could use https://epsg.io/3035, then all the area values should be correct for all valid UTM Zones in Noway.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">When we need to show a map we transform in to<span style="font-size: 12pt;"> the correct to UTM zone to get a visual correct map also.</span></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">If I test a single point the transformation seems be accurate up to 4. decimal using 3035 even for a extreme point.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;">
<span style="font-variant-ligatures: no-common-ligatures">select ST_AStexT(ST_Transform(ST_Transform(ST_Transform(ST_Transform(ST_setSrid(ST_MakePoint(1108142.0,7788000.0),25835),3035),25832),3035),25835));</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;">
<span style="font-variant-ligatures: no-common-ligatures"> st_astext </span></p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;">
<span style="font-variant-ligatures: no-common-ligatures">------------------------------------------</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;">
<span style="font-variant-ligatures: no-common-ligatures"> POINT(1108142.00005503 7787999.99979103)</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;">
<span style="font-variant-ligatures: no-common-ligatures">(1 row)</span></p>
<div><br>
</div>
<p style="margin-top:0;margin-bottom:0">Lars</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> postgis-users <postgis-users-bounces@lists.osgeo.org> on behalf of Lars Aksel Opsahl <Lars.Opsahl@nibio.no><br>
<b>Sent:</b> Monday, June 10, 2019 10:50 PM<br>
<b>To:</b> PostGIS Users Discussion<br>
<b>Cc:</b> Sandro Santilli<br>
<b>Subject:</b> Re: [postgis-users] Tolerance/SnapTo in Postgis Topology for meter and degrees.</font>
<div> </div>
</div>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr">
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
Hi</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
You have this C-code</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4870 _lwt_minTolerance( LWGEOM *g )</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4871 {</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4872 const GBOX* gbox;</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4873 double max;</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4874 double ret;</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4875</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4876 gbox = lwgeom_get_bbox(g);</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4877 if ( ! gbox ) return 0; /* empty */</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4878 max = FP_ABS(gbox->xmin);</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4879 if ( max < FP_ABS(gbox->xmax) ) max = FP_ABS(gbox->xmax);</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4880 if ( max < FP_ABS(gbox->ymin) ) max = FP_ABS(gbox->ymin);</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4881 if ( max < FP_ABS(gbox->ymax) ) max = FP_ABS(gbox->ymax);</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4882</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4883 ret = 3.6 * pow(10, - ( 15 - log10(max?max:1.0) ) );</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4884</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4885 return ret;</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
4886 }</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
In postgis branch svn-2.5 we have this SQL code.</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
CREATE OR REPLACE FUNCTION topology._st_mintolerance(ageom Geometry)</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
RETURNS float8</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
AS $$</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
SELECT 3.6 * power(10, - ( 15 - log(coalesce(</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
nullif(</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
greatest(abs(ST_xmin($1)), abs(ST_ymin($1)),</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
abs(ST_xmax($1)), abs(ST_ymax($1))),</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
0),</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
1)) ));</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
$$ LANGUAGE 'sql' IMMUTABLE STRICT;</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
I am not that into C-code but the SQL code looks like the C-code above as you suggested in your mail.</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<p style="margin-bottom:0in"><font size="3">So I did a small test </font><a href="https://github.com/NibioOpenSource/pgtopo_update_sql/blob/develop/src/test/sql/snapto/snapto_code_example_degrees_st_min_tolerance.sql" id="LPlnk905939" class="x_OWAAutoLink" style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt" previewremoved="true">https://github.com/NibioOpenSource/pgtopo_update_sql/blob/develop/src/test/sql/snapto/snapto_code_example_degrees_st_min_tolerance.sql</a><font size="3"> using
topology._st_mintolerance and yes I was able to get snap to every second line both vertically and horizontally to work and both and north and south in Norway. I just got this to work by playing around with t</font><span style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">opology._st_mintolerance </span>together
different factor values.</p>
<p style="color:rgb(0,0,0); font-family:Monaco; font-size:11px; margin-right:0px; margin-left:0px; font-stretch:normal; line-height:normal">
</p>
<div style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
<br>
</div>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
But I have no idea about how I can use this min tolerance code to make a generic code that behaves like 10 meter tolerance in a planar projection. </p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
And I am also little unsure about what projection that is correct to use for datasets that covers all of Norway now.</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
Before we did not really have any choice because the projection was quite bad if moved outside the bonds of the projection limits. We pretty much had to use degrees to get the a OK quality if we needed to store the data in one single dataset.</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
So whats the "correct projection" now to use for original dataset that covers all of Norway and which are updated regularly ?</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
Thanks a lot.</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
Lars</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-bottom:0in">
<br>
</p>
<br>
<div style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> strk@kbt.io <strk@kbt.io> on behalf of Sandro Santilli <strk@kbt.io><br>
<b>Sent:</b> Saturday, June 8, 2019 2:06 PM<br>
<b>To:</b> PostGIS Users Discussion<br>
<b>Cc:</b> Lars Aksel Opsahl<br>
<b>Subject:</b> Re: [postgis-users] Tolerance/SnapTo in Postgis Topology for meter and degrees.</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText">On Fri, Jun 07, 2019 at 10:02:23AM +0000, Lars Aksel Opsahl wrote:<br>
<br>
> So the problem is how to use tolerances so we get a behavior equal to<br>
> the test using meter.<br>
> <br>
> <br>
> We can we define the layer in Postgis Topology with quite big value<br>
> because this is just max value as it seems. So we can adjust the tolerance<br>
> parameter as we add lines but the problem is that we need to adjust this<br>
> parameter depending on where we are and what orientation the line has. For<br>
> vertical lines we need a bigger tolerance than for horizontal lines in<br>
> Norway. This makes it quite complicated to handle adding new lines.<br>
<br>
I'm not sure if it'd help but PostGIS Topology has an internal<br>
function (not to be relied upon, but could be copied to your own<br>
function) to determine "min tolerance" based on absolute coordinate<br>
values. That function is meant to deal with non-uniform floating-point<br>
resolution. What you're after is a function to deal with non-uniform<br>
tolerances. See<br>
<a href="https://trac.osgeo.org/postgis/browser/trunk/liblwgeom/lwgeom_topo.c?rev=14251#L4866" id="LPlnk56601" class="x_OWAAutoLink" previewremoved="true">https://trac.osgeo.org/postgis/browser/trunk/liblwgeom/lwgeom_topo.c?rev=14251#L4866</a><br>
It used to be done in SQL with previous versions.<br>
<br>
Could that help ?<br>
<br>
--strk; <br>
</div>
</span></font></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>