<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Strk&#039;s Blog</title>
	<atom:link href="http://strk.keybit.net/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://strk.keybit.net/blog</link>
	<description>Free Thoughts</description>
	<lastBuildDate>Wed, 10 Apr 2013 17:21:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>Comment on Simplifying a map layer using PostGIS topology by Wayne</title>
		<link>http://strk.keybit.net/blog/2012/04/13/simplifying-a-map-layer-using-postgis-topology/comment-page-1/#comment-54051</link>
		<dc:creator>Wayne</dc:creator>
		<pubDate>Wed, 10 Apr 2013 17:21:09 +0000</pubDate>
		<guid isPermaLink="false">http://strk.keybit.net/blog/?p=364#comment-54051</guid>
		<description>I ran into an issue with an exception being thrown using the vanilla code in the blog post.  I found that it was resolved by changing the order of the lines that calculate tol and the if condition that throws an error if tol is 0.  This forces the code to try tolerance 0 first, then thrown an error if that fails.

SQL/MM Spatial exception is the exception that gets thrown.

I changed the code to the following:
IF tol = 0 THEN
  RAISE EXCEPTION &#039;%&#039;, SQLERRM;
END IF;
tol := round( (tol/2.0) * 1e8 ) / 1e8; -- round to get to zero quicker

Needless to say simplifying with tolerance 0 is not supported.</description>
		<content:encoded><![CDATA[<p>I ran into an issue with an exception being thrown using the vanilla code in the blog post.  I found that it was resolved by changing the order of the lines that calculate tol and the if condition that throws an error if tol is 0.  This forces the code to try tolerance 0 first, then thrown an error if that fails.</p>
<p>SQL/MM Spatial exception is the exception that gets thrown.</p>
<p>I changed the code to the following:<br />
IF tol = 0 THEN<br />
  RAISE EXCEPTION &#8216;%&#8217;, SQLERRM;<br />
END IF;<br />
tol := round( (tol/2.0) * 1e8 ) / 1e8; &#8212; round to get to zero quicker</p>
<p>Needless to say simplifying with tolerance 0 is not supported.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on On the fly simplification of topologically defined geometries by kimaidou</title>
		<link>http://strk.keybit.net/blog/2013/03/08/on-the-fly-simplification-of-topologically-defined-geometries/comment-page-1/#comment-52298</link>
		<dc:creator>kimaidou</dc:creator>
		<pubDate>Fri, 22 Mar 2013 08:43:15 +0000</pubDate>
		<guid isPermaLink="false">http://strk.keybit.net/blog/?p=418#comment-52298</guid>
		<description>Ok, thanks for your answer.
Regards</description>
		<content:encoded><![CDATA[<p>Ok, thanks for your answer.<br />
Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on On the fly simplification of topologically defined geometries by strk</title>
		<link>http://strk.keybit.net/blog/2013/03/08/on-the-fly-simplification-of-topologically-defined-geometries/comment-page-1/#comment-52231</link>
		<dc:creator>strk</dc:creator>
		<pubDate>Thu, 21 Mar 2013 15:50:10 +0000</pubDate>
		<guid isPermaLink="false">http://strk.keybit.net/blog/?p=418#comment-52231</guid>
		<description>ST_Simplify(topogeom, 10000) returns a literal (simple) geometry, not a TopoGeometry, so you can&#039; t use it to replace the &quot;topogeom&quot; field value in the &quot;france_dept&quot; table.
But you can use it for visualizzation purposes (thus the &quot;on-the-fly&quot; part of the article&#039;s title).</description>
		<content:encoded><![CDATA[<p>ST_Simplify(topogeom, 10000) returns a literal (simple) geometry, not a TopoGeometry, so you can&#8217; t use it to replace the &#8220;topogeom&#8221; field value in the &#8220;france_dept&#8221; table.<br />
But you can use it for visualizzation purposes (thus the &#8220;on-the-fly&#8221; part of the article&#8217;s title).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on On the fly simplification of topologically defined geometries by kimaidou</title>
		<link>http://strk.keybit.net/blog/2013/03/08/on-the-fly-simplification-of-topologically-defined-geometries/comment-page-1/#comment-52208</link>
		<dc:creator>kimaidou</dc:creator>
		<pubDate>Thu, 21 Mar 2013 10:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://strk.keybit.net/blog/?p=418#comment-52208</guid>
		<description>Thanks for sharing this ! I read your post using topology tools, and I would like to understand well what to change there considering the new possibility of ST_Simplify. 

Are you saying we can now replace :
SELECT SimplifyEdgeGeom(&#039;france_dept_topo&#039;, edge_id, 10000) FROM france_dept_topo.edge; 
and the following commands by

UPDATE france_dept SET topogeom = ST_Simplify(topogeom, 10000);

without the need of your function SimplifyEdgeGeom  ?</description>
		<content:encoded><![CDATA[<p>Thanks for sharing this ! I read your post using topology tools, and I would like to understand well what to change there considering the new possibility of ST_Simplify. </p>
<p>Are you saying we can now replace :<br />
SELECT SimplifyEdgeGeom(&#8216;france_dept_topo&#8217;, edge_id, 10000) FROM france_dept_topo.edge;<br />
and the following commands by</p>
<p>UPDATE france_dept SET topogeom = ST_Simplify(topogeom, 10000);</p>
<p>without the need of your function SimplifyEdgeGeom  ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simplifying a map layer using PostGIS topology by strk</title>
		<link>http://strk.keybit.net/blog/2012/04/13/simplifying-a-map-layer-using-postgis-topology/comment-page-1/#comment-52034</link>
		<dc:creator>strk</dc:creator>
		<pubDate>Tue, 19 Mar 2013 14:16:24 +0000</pubDate>
		<guid isPermaLink="false">http://strk.keybit.net/blog/?p=364#comment-52034</guid>
		<description>Please use the bug tracker for this: http://trac.osgeo.org/postgis</description>
		<content:encoded><![CDATA[<p>Please use the bug tracker for this: <a href="http://trac.osgeo.org/postgis" rel="nofollow">http://trac.osgeo.org/postgis</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simplifying a map layer using PostGIS topology by Fabian Zeindl</title>
		<link>http://strk.keybit.net/blog/2012/04/13/simplifying-a-map-layer-using-postgis-topology/comment-page-1/#comment-52031</link>
		<dc:creator>Fabian Zeindl</dc:creator>
		<pubDate>Tue, 19 Mar 2013 14:05:12 +0000</pubDate>
		<guid isPermaLink="false">http://strk.keybit.net/blog/?p=364#comment-52031</guid>
		<description>when trying to use my own data, I get the following error:

UPDATE rayons SET topogeom = toTopoGeom(geom, &#039;france_dept_topo&#039;, 1);
ERROR:  lwpoly_from_lwlines: shell must be closed
CONTEXT:  SQL statement &quot;WITH ids as ( select row_number() over () as seq, edge from unnest(&#039;{-160,-104,45,-46,41,-44,43,-53,50,-49,47,-67,66,64,-57,55,-61,60,-84,70,-73,72,79,-76,74,-102,101,-87,85,-96,95,-112,98,-100,93,-92,90,-121,120,-125,124,-119,117,-128,113,-109,107,115,-132,-131,-115,116,-108,114,-127,129,-39,-158,159,-153,155,-137,-138,147,-141,144,-145,152,-148,149,-133,134}&#039;::int[] ) u(edge) ), edges AS ( select CASE WHEN i.edge &lt; 0 THEN ST_Reverse(e.geom) ELSE e.geom END as g FROM ids i left join france_dept_topo.edge_data e ON(e.edge_id = abs(i.edge)) ORDER BY seq) SELECT ST_MakePolygon(ST_MakeLine(g.g)) FROM edges g;&quot;
PL/pgSQL function _st_addfacesplit(character varying,integer,integer,boolean) line 34 at EXECUTE statement
SQL statement &quot;SELECT topology._ST_AddFaceSplit(atopology, -newedge.edge_id, newedge.left_face, false)&quot;
PL/pgSQL function st_addedgemodface(character varying,integer,integer,geometry) line 513 at SQL statement
PL/pgSQL function topogeo_addlinestring(character varying,geometry,double precision) line 124 at assignment
SQL statement &quot;SELECT array_cat(edges, array_agg(x)) FROM ( select topology.TopoGeo_addLinestring(atopology, rec.geom, tol) as x ) as foo&quot;
PL/pgSQL function topogeo_addpolygon(character varying,geometry,double precision) line 24 at assignment
PL/pgSQL function totopogeom(geometry,character varying,integer,double precision) line 100 at FOR over SELECT rows

any ideas?</description>
		<content:encoded><![CDATA[<p>when trying to use my own data, I get the following error:</p>
<p>UPDATE rayons SET topogeom = toTopoGeom(geom, &#8216;france_dept_topo&#8217;, 1);<br />
ERROR:  lwpoly_from_lwlines: shell must be closed<br />
CONTEXT:  SQL statement &#8220;WITH ids as ( select row_number() over () as seq, edge from unnest(&#8216;{-160,-104,45,-46,41,-44,43,-53,50,-49,47,-67,66,64,-57,55,-61,60,-84,70,-73,72,79,-76,74,-102,101,-87,85,-96,95,-112,98,-100,93,-92,90,-121,120,-125,124,-119,117,-128,113,-109,107,115,-132,-131,-115,116,-108,114,-127,129,-39,-158,159,-153,155,-137,-138,147,-141,144,-145,152,-148,149,-133,134}&#8217;::int[] ) u(edge) ), edges AS ( select CASE WHEN i.edge &lt; 0 THEN ST_Reverse(e.geom) ELSE e.geom END as g FROM ids i left join france_dept_topo.edge_data e ON(e.edge_id = abs(i.edge)) ORDER BY seq) SELECT ST_MakePolygon(ST_MakeLine(g.g)) FROM edges g;&quot;<br />
PL/pgSQL function _st_addfacesplit(character varying,integer,integer,boolean) line 34 at EXECUTE statement<br />
SQL statement &quot;SELECT topology._ST_AddFaceSplit(atopology, -newedge.edge_id, newedge.left_face, false)&quot;<br />
PL/pgSQL function st_addedgemodface(character varying,integer,integer,geometry) line 513 at SQL statement<br />
PL/pgSQL function topogeo_addlinestring(character varying,geometry,double precision) line 124 at assignment<br />
SQL statement &quot;SELECT array_cat(edges, array_agg(x)) FROM ( select topology.TopoGeo_addLinestring(atopology, rec.geom, tol) as x ) as foo&quot;<br />
PL/pgSQL function topogeo_addpolygon(character varying,geometry,double precision) line 24 at assignment<br />
PL/pgSQL function totopogeom(geometry,character varying,integer,double precision) line 100 at FOR over SELECT rows</p>
<p>any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simplifying a map layer using PostGIS topology by On the fly simplification of topologically defined geometries &#171; Strk&#039;s Blog</title>
		<link>http://strk.keybit.net/blog/2012/04/13/simplifying-a-map-layer-using-postgis-topology/comment-page-1/#comment-51060</link>
		<dc:creator>On the fly simplification of topologically defined geometries &#171; Strk&#039;s Blog</dc:creator>
		<pubDate>Fri, 08 Mar 2013 09:05:48 +0000</pubDate>
		<guid isPermaLink="false">http://strk.keybit.net/blog/?p=364#comment-51060</guid>
		<description>[...] saw how to get a topologically consistent simplified version of a full layer, but that method isn&#8217;t fast enough for on-demand usage. Also, we saw how to perform a fast [...]</description>
		<content:encoded><![CDATA[<p>[...] saw how to get a topologically consistent simplified version of a full layer, but that method isn&#8217;t fast enough for on-demand usage. Also, we saw how to perform a fast [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simplifying a map layer using PostGIS topology by strk</title>
		<link>http://strk.keybit.net/blog/2012/04/13/simplifying-a-map-layer-using-postgis-topology/comment-page-1/#comment-50449</link>
		<dc:creator>strk</dc:creator>
		<pubDate>Wed, 27 Feb 2013 15:59:51 +0000</pubDate>
		<guid isPermaLink="false">http://strk.keybit.net/blog/?p=364#comment-50449</guid>
		<description>I suggest subscribing to the &lt;a href=&quot;http://lists.osgeo.org/mailman/listinfo/postgis-users&quot; rel=&quot;nofollow&quot;&gt;postgis users mailing list&lt;/a&gt; for this kind of help</description>
		<content:encoded><![CDATA[<p>I suggest subscribing to the <a href="http://lists.osgeo.org/mailman/listinfo/postgis-users" rel="nofollow">postgis users mailing list</a> for this kind of help</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simplifying a map layer using PostGIS topology by Francis Seong</title>
		<link>http://strk.keybit.net/blog/2012/04/13/simplifying-a-map-layer-using-postgis-topology/comment-page-1/#comment-50437</link>
		<dc:creator>Francis Seong</dc:creator>
		<pubDate>Wed, 27 Feb 2013 11:48:39 +0000</pubDate>
		<guid isPermaLink="false">http://strk.keybit.net/blog/?p=364#comment-50437</guid>
		<description>I run :
SELECT st_astext(topogeom::geometry) FROM idns_link_0 WHERE id(topogeom) = #table.id

result is :
&quot;MULTILINESTRING((14128213.2930175 4505878.66922969,14128214.0420175 4505877.92022969))&quot;

I don&#039;t understant this result.</description>
		<content:encoded><![CDATA[<p>I run :<br />
SELECT st_astext(topogeom::geometry) FROM idns_link_0 WHERE id(topogeom) = #table.id</p>
<p>result is :<br />
&#8220;MULTILINESTRING((14128213.2930175 4505878.66922969,14128214.0420175 4505877.92022969))&#8221;</p>
<p>I don&#8217;t understant this result.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simplifying a map layer using PostGIS topology by strk</title>
		<link>http://strk.keybit.net/blog/2012/04/13/simplifying-a-map-layer-using-postgis-topology/comment-page-1/#comment-50373</link>
		<dc:creator>strk</dc:creator>
		<pubDate>Tue, 26 Feb 2013 09:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://strk.keybit.net/blog/?p=364#comment-50373</guid>
		<description>The message is telling you that by dropping that edge it will be impossible for one TopoGeometry object to retain the same shape.

You can see the shape of the TopoGeometry using:

&lt;code&gt;SELECT topogeom::geometry FROM #table WHERE id(topogeom) = #number&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>The message is telling you that by dropping that edge it will be impossible for one TopoGeometry object to retain the same shape.</p>
<p>You can see the shape of the TopoGeometry using:</p>
<p><code>SELECT topogeom::geometry FROM #table WHERE id(topogeom) = #number</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
