<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" 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-top: 0px; margin-bottom: 0px;">
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-top: 0px; margin-bottom: 0px;">
<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-top: 0px; margin-bottom: 0px;">
Thanks. (Sorry for the late replay, we where upgrading out main database in DMZ from Postgres 9.6 to Postgres 11.3 so I had to work with that for a couple of days.)</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-top: 0px; margin-bottom: 0px;">
<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-top: 0px; margin-bottom: 0px;">
Now I have done some testing comparing srid 3035 and said 4258. I stared out with a dataset representing  all the municipalities in Norway. This is a dataset with no overlaps. </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-top: 0px; margin-bottom: 0px;">
<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-top: 0px; margin-bottom: 0px;">
So I created a new dataset using srid 3035</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-top: 0px; margin-bottom: 0px;">
<span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">create</span><span style="font-family: Monaco; font-size: 11px;">
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">table</span><span style="font-family: Monaco; font-size: 11px;"> test_srid_3035.data_as_srid_3035
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> (</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">select</span><span style="font-family: Monaco; font-size: 11px;">
 sl_sdeid, ST_transform(geo,3035)::geometry(Polygon,3035) </span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> geom
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">from</span><span style="font-family: Monaco; font-size: 11px;"> sk_grl.n5_forvaltning_flate); </span><br>
</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;">
<span style="font-size: 12pt;">This new data did not have any gaps either, so that was very good. </span><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-top: 0px; margin-bottom: 0px;">
<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-top: 0px; margin-bottom: 0px;">
Then I transformed it back 4258</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-top: 0px; margin-bottom: 0px;">
<span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">create</span><span style="font-family: Monaco; font-size: 11px;">
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">table</span><span style="font-family: Monaco; font-size: 11px;"> test_srid_3035.data_as_srid_3035_to_4258
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> (</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">select</span><span style="font-family: Monaco; font-size: 11px;">
 sl_sdeid, ST_transform(geom,4258)::geometry(Polygon,4258) </span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> geom
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">from</span><span style="font-family: Monaco; font-size: 11px;"> test_srid_3035.data_as_srid_3035); </span><br>
</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;">
<span style="font-size: 12pt;">and it was still perfect.</span><br>
</div>
<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>
<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;">
Then I made two new data with points based on the municipality dataset.</div>
<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;">
<p style="margin-right:0px; margin-left:0px; font-stretch:normal; font-size:11px; line-height:normal; font-family:Monaco">
<span style="color: rgb(127, 0, 85);">create</span> <span style="color: rgb(127, 0, 85);">
table</span> test_srid_3035.test_4258_point <span style="color: rgb(127, 0, 85);">
as</span> (<span style="color: rgb(127, 0, 85);">select</span> sl_sdeid, ST_Centroid(geo)::geometry(Point,4258)
<span style="color: rgb(127, 0, 85);">as</span> geom <span style="color: rgb(127, 0, 85);">
from</span> sk_grl.n5_forvaltning_flate); <br>
</p>
</div>
<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;">
<span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">create</span><span style="font-family: Monaco; font-size: 11px;">
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">table</span><span style="font-family: Monaco; font-size: 11px;"> test_srid_3035.test_3035_point
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> (</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">select</span><span style="font-family: Monaco; font-size: 11px;">
 sl_sdeid, ST_transform(ST_Centroid(geo),3035)::geometry(Point,3035) </span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> geom
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">from</span><span style="font-family: Monaco; font-size: 11px;"> sk_grl.n5_forvaltning_flate); </span><br>
</div>
<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>
<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;">
And I did your distance test like you suggested  on the 4258 table <span style="font-size:12pt">. The total numbers of distanses testet on is </span><span style="font-family: Menlo; font-size: 13px;">182756.</span></div>
<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;">
<span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">select</span><span style="font-family: Monaco; font-size: 11px;">
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(0, 0, 128);">min</span><span style="font-family: Monaco; font-size: 11px;">(distance)
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> min_4258_spheroid_true,
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(0, 0, 128);">max</span><span style="font-family: Monaco; font-size: 11px;"> (distance)
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> max_4258_spheroid_true,
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(0, 0, 128);">avg</span><span style="font-family: Monaco; font-size: 11px;">(distance)
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> avg_4258_spheroid_true,
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(0, 0, 128);">sum</span><span style="font-family: Monaco; font-size: 11px;">(distance)
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> sum_4258_spheroid_true
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">from</span><span style="font-family: Monaco; font-size: 11px;"> </span><br>
</div>
<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;">
<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:11px; line-height:normal; font-family:Monaco">
<span style="color:#7f0055">select</span> ST_Distance(t1.geom::geography,t2.geom::geography) 
<span style="color:#7f0055">as</span> distance</p>
<p style="margin-right:0px; margin-left:0px; font-stretch:normal; font-size:11px; line-height:normal; font-family:Monaco; color:rgb(127,0,85)">
from<span style="color:#000000"> </span></p>
<p style="margin-right:0px; margin-left:0px; font-stretch:normal; font-size:11px; line-height:normal; font-family:Monaco">
test_srid_3035.test_4258_point t1,</p>
<p style="margin-right:0px; margin-left:0px; font-stretch:normal; font-size:11px; line-height:normal; font-family:Monaco">
test_srid_3035.test_4258_point t2</p>
<p style="margin-right:0px; margin-left:0px; font-stretch:normal; font-size:11px; line-height:normal; font-family:Monaco">
<span style="color:#7f0055">where</span> t1.sl_sdeid != t2.sl_sdeid</p>
<p style="margin-right:0px; margin-left:0px; font-stretch:normal; font-size:11px; line-height:normal; font-family:Monaco">
<span style="color:#7f0055">order</span> <span style="color:#7f0055">by</span> t1.sl_sdeid, t2.sl_sdeid</p>
<p style="margin-right:0px; margin-left:0px; font-stretch:normal; font-size:11px; line-height:normal; font-family:Monaco">
) <span style="color:#7f0055">as</span> r;</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"> min_4258_spheroid_true | max_4258_spheroid_true | avg_4258_spheroid_true | sum_4258_spheroid_true </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">           731.66154569 |        1787695.9610192 |       507972.286659922 |       92834983220.8208</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">(1 row)</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo; min-height: 15px;">
<span style="font-variant-ligatures: no-common-ligatures"></span><br>
</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">Time: 362.910 ms</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"><br>
</span></p>
</div>
<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;">
<span style="font-size:12pt">The I tested 3035 table like this.</span></div>
<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;">
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
<span style="color: #7f0055">select</span> <span style="color: #000080">min</span>(distance)
<span style="color: #7f0055">as</span> min_3035, <span style="color: #000080">max</span> (distance)
<span style="color: #7f0055">as</span> max_3035, <span style="color: #000080">avg</span>(distance)
<span style="color: #7f0055">as</span> avg_3035, <span style="color: #000080">sum</span>(distance)
<span style="color: #7f0055">as</span> sum_3035 <span style="color: #7f0055">from</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: 11px; line-height: normal; font-family: Monaco;">
<span style="color: #7f0055">select</span> ST_Distance(t1.geom,t2.geom)  <span style="color: #7f0055">
as</span> distance</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(127, 0, 85);">
from<span style="color: #000000"> </span></p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
test_srid_3035.test_3035_point t1,</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
test_srid_3035.test_3035_point t2</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
<span style="color: #7f0055">where</span> t1.sl_sdeid != t2.sl_sdeid</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
<span style="color: #7f0055">order</span> <span style="color: #7f0055">by</span> t1.sl_sdeid, t2.sl_sdeid</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
) <span style="color: #7f0055">as</span> r;</p>
</div>
<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>
<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;">
<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">    min_3035     |     max_3035     |     avg_3035     |    sum_3035     </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"> 735.136469548696 | 1777644.86377117 | 506075.903269244 | 92488407777.874</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">(1 row)</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo; min-height: 15px;">
<span style="font-variant-ligatures: no-common-ligatures"></span><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">Time: 145.513</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-size: medium; font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">We see differences here as probably </span><span style="font-size: medium; font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">expected
 .</span><br>
</p>
</div>
<div><font size="3"><br>
</font></div>
<div><font size="3">I did one more distance test where transferred the points back to 4258 from 3035.</font></div>
<div><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">select</span><span style="font-family: Monaco; font-size: 11px;">
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(0, 0, 128);">min</span><span style="font-family: Monaco; font-size: 11px;">(distance)
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> min_3035_backto_4258,
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(0, 0, 128);">max</span><span style="font-family: Monaco; font-size: 11px;"> (distance)
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> max_3035_backto_4258,
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(0, 0, 128);">avg</span><span style="font-family: Monaco; font-size: 11px;">(distance)
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> avg_3035_backto_4258,
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(0, 0, 128);">sum</span><span style="font-family: Monaco; font-size: 11px;">(distance)
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">as</span><span style="font-family: Monaco; font-size: 11px;"> sum_3035_backto_4258
</span><span style="font-family: Monaco; font-size: 11px; color: rgb(127, 0, 85);">from</span><span style="font-family: Monaco; font-size: 11px;"> </span><br>
</div>
<div>
<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: 11px; line-height: normal; font-family: Monaco;">
<span style="color: #7f0055">select</span> ST_Distance(ST_transform(t1.geom,4258)::geography,ST_transform(t2.geom,4258)::geography) 
<span style="color: #7f0055">as</span> distance</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(127, 0, 85);">
from<span style="color: #000000"> </span></p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
test_srid_3035.test_3035_point t1,</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
test_srid_3035.test_3035_point t2</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
<span style="color: #7f0055">where</span> t1.sl_sdeid != t2.sl_sdeid</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
<span style="color: #7f0055">order</span> <span style="color: #7f0055">by</span> t1.sl_sdeid, t2.sl_sdeid</p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;">
) <span style="color: #7f0055">as</span> r;</p>
</div>
<div>
<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"> min_3035_backto_4258 | max_3035_backto_4258 | avg_3035_backto_4258 | sum_3035_backto_4258 </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">         731.66154572 |     1787695.96111941 |     507972.286689737 |     92834983226.2696</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">(1 row)</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo; min-height: 15px;">
<span style="font-variant-ligatures: no-common-ligatures"></span><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">Time: 498.691 ms</span></p>
<div><span style="font-variant-ligatures: no-common-ligatures">Then we get some very,verry minor differences.</span></div>
<div><span style="font-variant-ligatures: no-common-ligatures"><br>
</span></div>
<div><br>
</div>
<div>So this 3035 looks quite ok , if your main focus is not to work on distances between objects. If you need exact correct distance you have to transform it to geography  .</div>
</div>
<div><br>
</div>
<div>So is there any good reasons not to use 3035 if your main focus is the keep track of polygon borders and the areas of polygon ?</div>
<div><br>
</div>
<div>Thanks </div>
<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;">
<span style="font-size:12pt"><br>
</span></div>
<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;">
<span style="font-size:12pt">Lars</span></div>
<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>
<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;">
 </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-top: 0px; margin-bottom: 0px;">
<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-top: 0px; margin-bottom: 0px;">
<br>
</p>
<br>
<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="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Paul Ramsey <pramsey@cleverelephant.ca><br>
<b>Sent:</b> Tuesday, June 11, 2019 5:36 PM<br>
<b>To:</b> Lars Aksel Opsahl<br>
<b>Cc:</b> PostGIS Users Discussion; Sandro Santilli<br>
<b>Subject:</b> Re: [postgis-users] Tolerance/SnapTo in Postgis Topology for meter and degrees.</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Not ideal, a whole-of-Norway projection would have even more error minimization, but not a bad stopgap, certainly better than using UTM projections way outside their areas of validity.
 Check a few measurements, and do things like comparing an ST_Distance(A, B) with ST_Distance(A::geography, B::geography) to see how much deviation from truth the projection is adding.
<div class=""><br class="">
</div>
<div class="">P.<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Jun 11, 2019, at 4:34 AM, Lars Aksel Opsahl <<a href="mailto:Lars.Opsahl@nibio.no" class="OWAAutoLink" id="LPlnk737197" previewremoved="true">Lars.Opsahl@nibio.no</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div id="x_divtagdefaultwrapper" dir="ltr" class="" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div class="" style="margin-top:0px; margin-bottom:0px">Hi</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">I had a discussion with Knut Bjørkelo a co worker of me today. </div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">He was wondering if we could use<span class="x_Apple-converted-space"> </span><a href="https://epsg.io/3035" class="OWAAutoLink" id="LPlnk844507" previewremoved="true">https://epsg.io/3035</a>, then all
 the area values should be correct for all valid UTM Zones in Noway.</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">When we need to show a map we transform in to<span class="" style="font-size:12pt"> the correct to UTM zone to get a visual correct map also.</span></div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">If I test a single point the transformation seems be accurate up to 4. decimal using 3035 even for a extreme point.</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:13px; line-height:normal; font-family:Menlo">
<span class="" 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></div>
<div class="" style="margin:0px; font-stretch:normal; font-size:13px; line-height:normal; font-family:Menlo">
<span class="" style="font-variant-ligatures:no-common-ligatures">                st_astext                 </span></div>
<div class="" style="margin:0px; font-stretch:normal; font-size:13px; line-height:normal; font-family:Menlo">
<span class="" style="font-variant-ligatures:no-common-ligatures">------------------------------------------</span></div>
<div class="" style="margin:0px; font-stretch:normal; font-size:13px; line-height:normal; font-family:Menlo">
<span class="" style="font-variant-ligatures:no-common-ligatures"> POINT(1108142.00005503 7787999.99979103)</span></div>
<p class="" style="margin:0px; font-stretch:normal; font-size:11px; line-height:normal; font-family:Monaco">
</p>
<div class="" style="margin:0px; font-stretch:normal; font-size:13px; line-height:normal; font-family:Menlo">
<span class="" style="font-variant-ligatures:no-common-ligatures">(1 row)</span></div>
<div class=""><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">Lars</div>
<br class="">
<br class="">
<div class="" style="">
<hr tabindex="-1" class="" style="display:inline-block; width:638.953125px">
<div id="x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">From:</b><span class="x_Apple-converted-space"> </span>postgis-users <<a href="mailto:postgis-users-bounces@lists.osgeo.org" class="OWAAutoLink" id="LPlnk796374" previewremoved="true">postgis-users-bounces@lists.osgeo.org</a>>
 on behalf of Lars Aksel Opsahl <<a href="mailto:Lars.Opsahl@nibio.no" class="OWAAutoLink" id="LPlnk412427" previewremoved="true">Lars.Opsahl@nibio.no</a>><br class="">
<b class="">Sent:</b><span class="x_Apple-converted-space"> </span>Monday, June 10, 2019 10:50 PM<br class="">
<b class="">To:</b><span class="x_Apple-converted-space"> </span>PostGIS Users Discussion<br class="">
<b class="">Cc:</b><span class="x_Apple-converted-space"> </span>Sandro Santilli<br class="">
<b class="">Subject:</b><span class="x_Apple-converted-space"> </span>Re: [postgis-users] Tolerance/SnapTo in Postgis Topology for meter and degrees.</font>
<div class=""> </div>
</div>
<div dir="ltr" class="">
<div id="x_x_divtagdefaultwrapper" dir="ltr" class="">
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
Hi</div>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
You have this C-code</div>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4870 _lwt_minTolerance( LWGEOM *g )</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4871 {</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4872 const GBOX* gbox;</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4873 double max;</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4874 double ret;</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4875</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4876 gbox = lwgeom_get_bbox(g);</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4877 if ( ! gbox ) return 0; /* empty */</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4878 max = FP_ABS(gbox->xmin);</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4879 if ( max < FP_ABS(gbox->xmax) ) max = FP_ABS(gbox->xmax);</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4880 if ( max < FP_ABS(gbox->ymin) ) max = FP_ABS(gbox->ymin);</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4881 if ( max < FP_ABS(gbox->ymax) ) max = FP_ABS(gbox->ymax);</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4882</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4883 ret = 3.6 * pow(10, - ( 15 - log10(max?max:1.0) ) );</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4884</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4885 return ret;</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
4886 }</div>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
In postgis branch svn-2.5 we have this SQL code.</div>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
CREATE OR REPLACE FUNCTION topology._st_mintolerance(ageom Geometry)</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
RETURNS float8</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
AS $$</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
SELECT 3.6 * power(10, - ( 15 - log(coalesce(</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
nullif(</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
greatest(abs(ST_xmin($1)), abs(ST_ymin($1)),</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
abs(ST_xmax($1)), abs(ST_ymax($1))),</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
0),</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
1)) ));</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
$$ LANGUAGE 'sql' IMMUTABLE STRICT;</div>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
I am not that into C-code but the SQL code looks like the C-code above as you suggested in your mail.</div>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in"><font size="3" class="">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_x_OWAAutoLink" style="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" class=""> 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 class="" style="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.</div>
<p class="" style="margin:0px; font-family:Monaco; font-size:11px; font-stretch:normal; line-height:normal">
</p>
<div class="" style="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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
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. </div>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
And I am also little unsure about what projection that is correct to use for datasets that covers all of Norway now.</div>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
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.</div>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
So whats the "correct projection" now to use for original dataset that covers all of Norway and which are updated regularly ?</div>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
Thanks a lot.</div>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0in; font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
Lars</div>
<p class="" style="margin-top:0px; margin-bottom:0px; 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>
<div class="" style="margin-top:0px; margin-bottom:0in; 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 class="">
</div>
<br class="">
<div class="" style="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" class="" style="display:inline-block; width:638.953125px">
<div id="x_x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">From:</b><span class="x_Apple-converted-space"> </span><a href="mailto:strk@kbt.io" class="OWAAutoLink" id="LPlnk850327" previewremoved="true">strk@kbt.io</a>
 <<a href="mailto:strk@kbt.io" class="OWAAutoLink" id="LPlnk100434" previewremoved="true">strk@kbt.io</a>> on behalf of Sandro Santilli <<a href="mailto:strk@kbt.io" class="OWAAutoLink" id="LPlnk512571" previewremoved="true">strk@kbt.io</a>><br class="">
<b class="">Sent:</b><span class="x_Apple-converted-space"> </span>Saturday, June 8, 2019 2:06 PM<br class="">
<b class="">To:</b><span class="x_Apple-converted-space"> </span>PostGIS Users Discussion<br class="">
<b class="">Cc:</b><span class="x_Apple-converted-space"> </span>Lars Aksel Opsahl<br class="">
<b class="">Subject:</b><span class="x_Apple-converted-space"> </span>Re: [postgis-users] Tolerance/SnapTo in Postgis Topology for meter and degrees.</font>
<div class=""> </div>
</div>
<div class="x_x_BodyFragment"><font size="2" class=""><span class="" style="font-size:11pt">
<div class="x_x_PlainText">On Fri, Jun 07, 2019 at 10:02:23AM +0000, Lars Aksel Opsahl wrote:<br class="">
<br class="">
> So the problem is how to use tolerances so we get a behavior equal to<br class="">
> the test using meter.<br class="">
><span class="x_Apple-converted-space"> </span><br class="">
><span class="x_Apple-converted-space"> </span><br class="">
> We can we define the layer in Postgis Topology with quite big value<br class="">
> because this is just max value as it seems. So we can adjust the tolerance<br class="">
> parameter as we add lines but the problem is that we need to adjust this<br class="">
> parameter depending on where we are and what orientation the line has. For<br class="">
> vertical lines we need a bigger tolerance than for horizontal lines in<br class="">
> Norway. This makes it quite complicated to handle adding new lines.<br class="">
<br class="">
I'm not sure if it'd help but PostGIS Topology has an internal<br class="">
function (not to be relied upon, but could be copied to your own<br class="">
function) to determine "min tolerance" based on absolute coordinate<br class="">
values. That function is meant to deal with non-uniform floating-point<br class="">
resolution. What you're after is a function to deal with non-uniform<br class="">
tolerances. See<br class="">
<a href="https://trac.osgeo.org/postgis/browser/trunk/liblwgeom/lwgeom_topo.c?rev=14251#L4866" id="LPlnk56601" class="x_x_OWAAutoLink" previewremoved="true">https://trac.osgeo.org/postgis/browser/trunk/liblwgeom/lwgeom_topo.c?rev=14251#L4866</a><br class="">
It used to be done in SQL with previous versions.<br class="">
<br class="">
Could that help ?<br class="">
<br class="">
--strk;<span class="x_Apple-converted-space"> </span></div>
</span></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</body>
</html>