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

List:       postgis-users
Subject:    Re: [postgis-users] polygon minimum width
From:       Surya Tarigan <surya.tarigan () yahoo ! com>
Date:       2009-10-19 2:39:54
Message-ID: 208963.29492.qm () web111908 ! mail ! gq1 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Simon,

Yes, I have solved the problem by merging left linestrings and also the right \
linestring aswell.

kind regards,

surya




________________________________
From: Simon Greener <simon@spatialdbadvisor.com>
To: PostGIS Users Discussion <postgis-users@postgis.refractions.net>
Sent: Thu, October 15, 2009 4:46:40 PM
Subject: Re: [postgis-users] polygon minimum width

Sury,

Sorry for the delay: you must have solved this by now.

My "test case" only had two linestrings as you didn't give us any real data to play \
with. Looking at your 5 row data result below seems to indicate that your river \
covers more than two rows. So, question to you, what is stored in each row? Which \
rows have the left data and which the right?

And if there are null geometries then you should do this:

select row_number() over (order by the_geom) as rin, the_geom
  from River r
  where r.Name = 'Barito'
    and r.the_geom is not null;

regards
Simon
On Wed, 14 Oct 2009 20:43:45 +1100, Surya Tarigan <surya.tarigan@yahoo.com> wrote:

> Dear Simon,
> 
> the previous SQL ((select row_number() over (order by the_geom) as rin) gave good \
> result, meanwhile the second SQL ( (select ctid as rin, the_geom) still return '0' \
> min_width.  But I still need to check my river polyline, because both min and max \
> give exactly  the  same result, which it should not.. 
> After I run :
> 
> select row_number() over (order by the_geom) as rin, the_geom
> from River r
> where r.Name = 'Barito';
> it gave result something like :
> rin, the_geom
> 1; -----(empty)---
> 2;-----(empty)---
> 3;010500000000........
> 4;010500000000..............
> 5;010500000.........
> could it be caused by empty the_geom in rin 1 and 2?
> kind regards,
> sury
> 
> 
> 
> 


-- 
SpatialDB Advice and Design, Solutions Architecture and Programming,
Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL \
Certified Professional Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold \
GIS, FME, Radius Topology and Studio Specialist. 39 Cliff View Drive, Allens Rivulet, \
                7150, Tasmania, Australia.
Website: www.spatialdbadvisor.com
  Email: simon@spatialdbadvisor.com
  Voice: +61 362 396397
Mobile: +61 418 396391
Skype: sggreener
Longitude: 147.20515 (147° 12' 18" E)
Latitude: -43.01530 (43° 00' 55" S)
GeoHash: r22em9r98wg
NAC:W80CK 7SWP3
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



      


[Attachment #5 (text/html)]

<html><head><style type="text/css"><!-- DIV {margin:0px;} \
--></style></head><body><div style="font-family:times new roman, new york, times, \
serif;font-size:12pt"><DIV>Simon,</DIV> <DIV>&nbsp;</DIV>
<DIV>Yes, I have solved the problem by merging left linestrings and also the right \
linestring aswell.</DIV> <DIV>&nbsp;</DIV>
<DIV>kind regards,</DIV>
<DIV>&nbsp;</DIV>
<DIV>surya<BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, \
serif"><BR> <DIV style="FONT-SIZE: 13px; FONT-FAMILY: arial, helvetica, \
sans-serif"><FONT face=Tahoma size=2> <HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Simon Greener \
&lt;simon@spatialdbadvisor.com&gt;<BR><B><SPAN style="FONT-WEIGHT: \
bold">To:</SPAN></B> PostGIS Users Discussion \
&lt;postgis-users@postgis.refractions.net&gt;<BR><B><SPAN style="FONT-WEIGHT: \
bold">Sent:</SPAN></B> Thu, October 15, 2009 4:46:40 PM<BR><B><SPAN \
style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [postgis-users] polygon minimum \
width<BR></FONT><BR>Sury,<BR><BR>Sorry for the delay: you must have solved this by \
now.<BR><BR>My "test case" only had two linestrings as you didn't give us any real \
data to play with. Looking at your 5 row data result below seems to indicate that \
your river covers more than two rows. So, question to you, what is stored in each \
row? Which rows have the left data and which the right?<BR><BR>And if there are null \
geometries then you should do this:<BR><BR>select row_number() over (order by \
the_geom) as rin, the_geom<BR>&nbsp; from River r<BR>&nbsp; where  r.Name = \
'Barito'<BR>&nbsp; &nbsp; and r.the_geom is not null;<BR><BR>regards<BR>Simon<BR>On \
Wed, 14 Oct 2009 20:43:45 +1100, Surya Tarigan &lt;<A \
href="mailto:surya.tarigan@yahoo.com" \
ymailto="mailto:surya.tarigan@yahoo.com">surya.tarigan@yahoo.com</A>&gt; \
wrote:<BR><BR>&gt; Dear Simon,<BR>&gt;<BR>&gt; the previous SQL ((select row_number() \
over (order by the_geom) as rin) gave good result, meanwhile the second SQL ( (select \
ctid as rin, the_geom) still return '0' min_width.&nbsp; But I still need to check my \
river polyline, because both min and max give exactly&nbsp; the&nbsp; same result, \
which it should not..<BR>&gt;<BR>&gt; After I run :<BR>&gt;<BR>&gt; select \
row_number() over (order by the_geom) as rin, the_geom<BR>&gt;&nbsp; from River \
r<BR>&gt;&nbsp; where r.Name = 'Barito';<BR>&gt;&nbsp; it gave result something like \
:<BR>&gt; rin, the_geom<BR>&gt; 1; -----(empty)---<BR>&gt; 2;-----(empty)---<BR>&gt; \
3;010500000000........<BR>&gt;  4;010500000000.............<BR>&gt; \
5;010500000.........<BR>&gt;&nbsp; could it be caused by empty the_geom in rin 1 and \
2?<BR>&gt;&nbsp; kind regards,<BR>&gt;&nbsp; \
sury<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR><BR><BR>-- <BR>SpatialDB Advice and Design, \
Solutions Architecture and Programming,<BR>Oracle Database 10g Administrator \
Certified Associate; Oracle Database 10g SQL Certified Professional<BR>Oracle \
Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and \
Studio Specialist.<BR>39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, \
Australia.<BR>Website: <A href="http://www.spatialdbadvisor.com/" \
target=_blank>www.spatialdbadvisor.com</A><BR>&nbsp; Email: <A \
href="mailto:simon@spatialdbadvisor.com" \
ymailto="mailto:simon@spatialdbadvisor.com">simon@spatialdbadvisor.com</A><BR>&nbsp; \
Voice: +61 362 396397<BR>Mobile: +61 418 396391<BR>Skype: sggreener<BR>Longitude: \
147.20515 (147° 12' 18" E)<BR>Latitude: -43.01530 (43° 00' 55"  S)<BR>GeoHash: \
r22em9r98wg<BR>NAC:W80CK \
7SWP3<BR>_______________________________________________<BR>postgis-users mailing \
list<BR><A href="mailto:postgis-users@postgis.refractions.net" \
ymailto="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractio \
ns.net</A><BR>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR></DIV></DIV></div><br>


      </body></html>



_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/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