Dan Johnson | 8 Oct 02:12

Approximate union of polygons?

I have an application that keeps a database of video footprints, one 
quadrilateral per frame of video. I consolidate each 5 seconds of video 
footprints into a single multipolygon in order to speed up queries for 
video of a specified area. That's typically a union of 150 (30fps) 
polygons with 4-vertexes. I build this multipolygon with ST_GeomUnion, 
and it's acceptably fast. So far, so good.

I've been quite surprised by the variance in the number of vertices in 
the resulting multipolygon - sometimes it's as high as 1200. Usually 
it's lower than the equvalent set of frame footprints, but not always. 
This hasn't been a problem for database queries, but now it's time to 
build a user interface and of course the UI has problems displaying that 
many vertices. (Actually, the UI is getting the polygons via a SOAP 
message, and our web server's SOAP infrastructure often just dies when 
the result is so long.) Eyeballing these consolidated polygons, it looks 
like keeping only 20-30 vertices would provide an excellent 
approximation. (It's quite common for the camera to stare at a single 
point for a long time, in which case all the frames are in about the 
same location.) This seems like the sort of thing PostGIS would be able 
to do but I haven't been able to figure it out from the docs. Does 
anyone know if this is possible?

(I've been told the footprints have to consider every frame, so building 
the union with one frame per second or similar is out.)

Thanks,
Dan
Stephen Woodbridge | 7 Oct 22:52

ST_UNION(linestring, linestring) returns a multilinestring

Hi all,

This is very annoying. I have two linestrings the join end-to-end and I 
want to build a new single linestring by merging the two. How can I do this?

Thanks,
   -Steve

select astext( 
ST_Union( 
         ST_GeomFromText('LINESTRING(35.5269251710001 
33.891749555,35.527091166 33.8917984710001)'),
ST_GeomFromText('LINESTRING(35.527091166 
33.8917984710001,35.5274352000001 33.8918998510001,35.528236559 
33.8919810230001)')                                    ));

               astext 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  MULTILINESTRING((35.5269251710001 33.891749555,35.527091166 
33.8917984710001),(35.527091166 33.8917984710001,35.5274352000001 
33.8918998510001,35.528236559 33.8919810230001))
(1 row)
Paul Ramsey | 7 Oct 18:59

Re: [postgis-devel] Dropped DM (Time) dimension with intersections

Unfortunately, there's no such thing as a 3D polygon, except for
trivial cases (the triangle, the shape with all Z's the same).
Everything else is unclear on how to interpret the enclosed "plane"
(if that is what it is) formed by an irregularly elevated boundary. So
we can store the things, but there's really no decent way to interpret
them in generality. For that we need the real stuff, Surfaces,
volumes, etc.

I think the "low hanging fruit" is probably more the "infrastructural
requirement". We need a 4D index. That will allow us to handle things
like 4D time tracks and point clouds efficiently, and form the
indexing basis for future volumetric objects.

P.

On Tue, Oct 7, 2008 at 9:44 AM, Obe, Regina <robe.dnd <at> cityofboston.gov> wrote:
> I'm not sure how low hanging the fruit :), but first off would be being able
> to do intersections and indexable ST_DWithin with 3D polygons and
> linestrings and so forth. For example when I place a cable up on a roof I
> need to know if I'm hitting another piece of equipment.
>
> Higher fruit - being able to support volumetric geometries.  Right now we
> support 2d-3D polygons and lines and you can form wireframes with those, but
> no true volumetric stuff.  But then what do I know, I'm just parroting
> things I've heard in whispers and those whispers are getting louder is all
> :)
>
> There is still the issue of being able to display 3-D geometries without
> spending a fortune on proprietary stuff which is not a PostGIS issue, but
> has to gain in momentum to make PostGIS 3D more powerful (e.g. uDig for 3D
(Continue reading)

mark balman | 7 Oct 11:16

dynamic sql

Hi All

I am trying to create a dynamic sql query that a user can enter latitude
and longitude coordinates together with a specified distance. So far I
have created the following query (not sure if correct but it does work
and have also tried st_distance query)

select * from azev2_1 where distance_spheroid(GeomFromText('Point(-70
20)',4326),the_geom,'SPHEROID["WGS 84",6378137,298.257223563]') <
250000;

What I am trying to achieve is to get this to work using the Mapserver
Demo application (basic version) as a starting point (running under
MS4W. So far this
following Layer definition works:

LAYER
 CONNECTIONTYPE postgis
 NAME "test"
 CONNECTION "user=mark password=mark dbname=ibat_proto host=localhost"
 DATA "the_geom FROM (select * from kbapoly where
st_distance(the_geom,GeomFromText('Point(1 0)',4326)) <6) AS myquery
using unique gid"
 STATUS OFF
 TYPE POLYGON
 TEMPLATE "templates/azes.html"
 CLASS
 OUTLINECOLOR 0 0 0
 COLOR  128 128 128
 END
(Continue reading)

John Zhang | 6 Oct 22:33

Snap and Dissolve function in PostGIS?

Hi there,

I am writing to check how to perform SNAP and DISSOLVE function by PostGIS.

I have a point dataset table and a MultipleLineString dataset table. I need to snap all the points in the dataset to the Line Strings when the distance is within 100 meters.

I also need union some polygon features and dissolve the polygons within a polygon.

Any inputs would be appreciated.

--
Sincerely,


John Zhang,   M.Sc., B.Sc., A.Dipl.T.
email:   JohnZhang06 <at> gmail.com
Phone:  604-998-1874

URL:  http://ca.geocities.com/john_z04/JOHN_ZHANG_GIS.html
_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Newbie question - Transfer attributes from one feature to another

I have a polygon (table1) and a point (table2) feature and would want to transfer attributes from the point feature to the polygon feature based on whether the point feature is completely enclosed by the polygon feature.
The polygon feature can have one or more point features.

How do i transfer the attributes.


--
Sindile Bidla
_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
eehab hamzeh | 5 Oct 21:10

Insert data based on XML schema

Hello

I have XML schema for a CityGML model. I have created the required tables in the database. I need to insert this model to the database automatically. Can any body give me hints on tools that can insert the XML file automatically.... Like for example WFS post (transaction).

Thanks

Ihab


Connect to the next generation of MSN Messenger  Get it now!
_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Cascaded Union Aggregate function

For those people who have unions to do that are slow, feel free to try out
this aggregate union function.

I haven't tested it enough for it to make it into 1.3.4, but have included a
link to the source code in the wiki.  It should work just fine on PostGIS
versions 1.2.2 and above.

http://postgis.refractions.net/support/wiki/index.php?PL%2FPGSQL%20Pseudo%20
Cascade%20Union%20Aggregate%20Function

Let me know if you run into any problems with it.  It has worked well for
the samples I have used it on.

Thanks,
Regina
fsalas | 3 Oct 12:59

about st_distance

Hi,

I need to know about obtain distance between polygon( parcels) and point

I Use the next sentences

SELECT p.gid as id_parcela,tipo as tipo_Pozo FROM selepozo(1,1) po,parcelas p WHERE ST_distance(p.the_geom, po.the_geom) < 1

I have some questions

This distance is between centroide of parcels to point or between border of parcels to point ?

 

Best Regards,

Francisco Salas


___________________________________
Dpto de Sistemas Informáticos
Oficina Central Grupo Empresarial GEOCUBA
Este mensaje esta libre de virus.
Revisado por Kaspersky Antivirus
----------------------------------------------------------------------
Engine version: 4.0.1.14 Engine date: 2002/06/25 Definition count: 1148493 Definition date: 2008/10/03 MDAV version: 2.2.8
_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
Brian Hamlin | 3 Oct 18:49

Inscribed Rectangle

Hello All-

   I spoke with a client recently who wants to use some US County and US 
City polys as the basis of some demographics work. He asked for the 
polys, bounding boxes on the polys, and a maximum rectangle that would 
fit inside the poly. I sid that I had not heard of that before, but I 
would look into it.. after (a small amount) of thought, I told him that 
there were a lot of difficult or ambiguous cases that would come up.. 
So he replied.. ok, just any rectangle that fits in the poly, trying to 
be as big as it can be..

   So I dont know how I might go about this..  Any ideas?

   thanks
     -Brian

==
Brian Hamlin
ISDE5 Steering Committee
Planetwork.net
NextNow Collaboratory

lwpostgis.sql and liblwgeom.so

I'm new to building postgresql and postgis, and have run into a problem that, from googles on the subject, may be the same or similar to what other people have run into when installing lwpostgis.sql:

==================================
psql:/usr/local/pgsql/share/lwpostgis2.sql:44: NOTICE:  type "histogram2d" is not yet defined
DETAIL:  Creating a shell type definition.
psql:/usr/local/pgsql/share/lwpostgis2.sql:44:

ERROR:  could not load library
 "/
usr/local/pgsql/lib/liblwgeom.so"

: /usr/local/pgsql/lib/liblwgeom.so: un defined
symbol: GEOSTopologyPreserveSimplify

psql:/usr/local/pgsql/share/lwpostgis2.sql:50: ERROR:  current transaction is ab
orted, commands ignored until end of transaction block
...
==================================
this is being done on a fedora system, I built postgresql and proj and geos and postgis from source. and ran the createlang plpgsql successfully

the other references to this problem suggest running ldconfig to repair the problem.  I added /usr/local/pgsql/lib to the /etc/ld.so.conf  and ran ldconfig; it's output shows
liblwgeom.so.1 -> liblwgeom.so.1.3
(while my error from lwpostgis.sql complains can't open liblwgeom.so.  liblwgeom.so is also a symbolic link to the .1.3)

Is this really a problem linking with geos?&nbsp ; ran ldd on liblwgeom.so:
=================================

 ldconfig -v | grep geos
        libgeos_c.so.1 -> libgeos_c.so.1.1.1
        libgeos.so.2 -> libgeos.so.2.2.3

 ldd /usr/local/pgsql/lib/liblwgeom.so
        libgeos_c.so.1 => /usr/lib/libgeos_c.so.1 (0x00172000)
        libproj.so.0 => /usr/lib/libproj.so.0 (0x0017f000)
        libgeos.so.2 => /usr/lib/libgeos.so.2 (0x0030f000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00414000)
      
=================================
anyway, I'm at a loss and any help would be appreciated.

thanks,
Robert H.
_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Gmane