[postgis-users] polygon minimum width

Simon Greener simon at spatialdbadvisor.com
Thu Oct 15 02:46:40 PDT 2009


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 at 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 at 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



More information about the postgis-users mailing list