Re: [postgis-users] Check identical point

2010-05-21 Thread Francis Markham
Try:
   ST_DWithin(point1, point2, 0.1)

-F

2010/5/22 eehab hamzeh 

>  Hello
>
> I want to check if two points are identical, the points has x,y,z
> coordinates and they are not exactly the same, i need to check the
> intersection between them with tolerance value. any direction of how to do
> that.
>
> Thank
>
> kind regards
>
>
>
>
>
> --
> Hotmail: Powerful Free email with security by Microsoft. Get it 
> now.
>
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Check identical point

2010-05-21 Thread eehab hamzeh

Hello 

I want to check if two points are identical, the points has x,y,z coordinates 
and they are not exactly the same, i need to check the intersection between 
them with tolerance value. any direction of how to do that.

Thank 

kind regards




  
_
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] RE help

2010-05-21 Thread Steve . Toutant
Do you mean that you want to read postgis data with mapserver?
Perhaps this will help
http://mapserver.org/input/vector/postgis.html

steve





Linnet Kwamboka @postgis.refractions.net 
Envoyé par : postgis-users-boun...@postgis.refractions.net
03/05/2010 03:37 AM
Veuillez répondre à
PostGIS Users Discussion 


A
PostGIS Users Discussion 
cc

Objet
[postgis-users] help








Hey guys
i am having trouble connecting postgis to mapser, could anyone please give 
me directions on the same. what version of mapsever do i need? i am 
working with postgresql 8.4 thanks

-- 
With regards,
Linnet Kwamboka

+254733229041
site: geekmates.ning.com
blog: one-kenya.blogspot.com
facebook: mckenzie quamboka
skype: geekmate___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] help

2010-05-21 Thread Linnet Kwamboka
Hey guys
i am having trouble connecting postgis to mapser, could anyone please give
me directions on the same. what version of mapsever do i need? i am working
with postgresql 8.4 thanks

-- 
With regards,
Linnet Kwamboka

+254733229041
site: geekmates.ning.com
blog: one-kenya.blogspot.com
facebook: mckenzie quamboka
skype: geekmate
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] HELP WITH A POSTGIS FUNCTION

2010-05-21 Thread David William Bitner
http://postgis.org/documentation/manual-1.5/ST_NumPoints.html

On Fri, May 21, 2010 at 10:15 AM, Bolivar  wrote:

>
> Which postgis function is used to return the amount of vertexes (in an
> array)
> I got in my geometry?
>
>
> Thanks.
> --
> View this message in context:
> http://old.nabble.com/HELP-WITH-A-POSTGIS-FUNCTION-tp28635185p28635185.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
>
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



-- 

David William Bitner
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] HELP WITH A POSTGIS FUNCTION

2010-05-21 Thread Bolivar

Which postgis function is used to return the amount of vertexes (in an array)
I got in my geometry?


Thanks.
-- 
View this message in context: 
http://old.nabble.com/HELP-WITH-A-POSTGIS-FUNCTION-tp28635185p28635185.html
Sent from the PostGIS - User mailing list archive at Nabble.com.

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Retrieving and storing Geography column data through JDBC (Java/Hibernate)

2010-05-21 Thread Paul Ramsey
You should file a ticket on it... I think if you create a function
geography(bytea) that just call the ST_GeogFromWKB() function that
should get around your casting problem.

CREATE OR REPLACE FUNCTION geography(bytea)
RETURNS geography
AS 'SELECT ST_GeogFromWKB($1)'
LANGUAGE 'SQL' IMMUTABLE STRICT;

P

On Fri, May 21, 2010 at 7:00 AM, Kristof Adriaenssens
 wrote:
> Hi all,
>
> We used the GeometryType Hibernate UserType that gets delivered with Postgis
> 1.5 (java/ejb3) to store and retrieve Geometry column data.
> This works fine but unfortunately it does not seem to support the new
> Geography data type.
>
> We tried storing Point and LineString Geometry objects (SRID set to 4326)
> but we get an exception that a bytea can't be converted to Geography.
> We use the org.postgis.DriverWrapper Driver class name which is supposed to
> automatically load support for the spatial types.
>
> Is there a known work-around that would work for us, preferably through
> JDBC?  If not now then are there plans to support this?
>
> Thank you!
> Kristof
>
>
>
>
>
>
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] How To build postGIS on debian with pbuilder?

2010-05-21 Thread Martin Spott
Stephen Woodbridge wrote:

> Does anyone know how to build postGIS using pbuilder on Debian lenny.
> I have been about to build geos-3.2.0 and proj-4.6.1

Get the "usual suspects" like GEOS and PROJ.4 from the fine
  http://debian.gfoss.it/

and feel free to check if the packages at this location are suited to
fill the gap:

  ftp://ftp.ihg.uni-duisburg.de/GIS/PostGIS/Debian/

Everything except the 'postgresql-8.4-postgis' is copied unmodified
from official Debian repositories, the PostGIS package is my own
backport using the respective Debian Sid source packages.

Cheers,
Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Retrieving and storing Geography column data through JDBC (Java/Hibernate)

2010-05-21 Thread Kristof Adriaenssens
Hi all,

We used the GeometryType Hibernate UserType that gets delivered with Postgis
1.5 (java/ejb3) to store and retrieve Geometry column data.
This works fine but unfortunately it does not seem to support the new
Geography data type.

We tried storing Point and LineString Geometry objects (SRID set to 4326)
but we get an exception that a bytea can't be converted to Geography.
We use the org.postgis.DriverWrapper Driver class name which is supposed to
automatically load support for the spatial types.

Is there a known work-around that would work for us, preferably through
JDBC?  If not now then are there plans to support this?

Thank you!
Kristof
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] ST_Intersection

2010-05-21 Thread Mehmet Sirin
hi,
why don't you merge both operations into one sql-command?
In this case it's less difficult without using views.



2010/5/21 

> Hi,
>
> I have a polygon table (alk_flurstuecke) and create a view with a 40-meter
> buffer on an object:
>
> CREATE VIEW buffer_flur_40 AS
> SELECT gid, ST_SetSRID(st_buffer(the_geom,40), 31466 )
> AS the_geom FROM alk_flurstuecke WHERE fkz = '072690033000230';
>
> No problem, Ican see it in QGIS.
> Now I try to make an intersection on this buffer-view with my table:
>
> CREATE VIEW intersect_flur_40 (gid, flur, zaehler, nenner, the_geom) AS
> SELECT p.gid, p.flur, p.zaehler, p.nenner,
> ST_SetSRID(ST_Intersection(p.the_geom, b.the_geom) ,31466)
> AS the_geom FROM alk_flurstuecke AS p, buffer_flur_40 AS b
> WHERE p.fkz <> '072690033000230' AND IsEmpty
> (ST_Intersection(p.the_geom, b.the_geom) ) = FALSE;
>
> This view is created without errors too but there is no result. If I try to
> load the view in QGIS it diapears.
> Any idea?
>
> Jo
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] ST_Intersection

2010-05-21 Thread jj.wag

Nicolas,


Is the select used to create the view returning rows ?
yes, I want to get the intersected parts of the polygonlayer and the area (I 
need the returned rows in a php application)



Is this IsEmpty test necessary to validate there is an intersection ?

yes, because I want only the intersected rows

Jo


- Original Message - 
From: "Nicolas Ribot" 

To: "PostGIS Users Discussion" 
Sent: Friday, May 21, 2010 2:34 PM
Subject: Re: [postgis-users] ST_Intersection



Hi,

I have a polygon table (alk_flurstuecke) and create a view with a 
40-meter

buffer on an object:

CREATE VIEW buffer_flur_40 AS
SELECT gid, ST_SetSRID(st_buffer(the_geom,40), 31466 )
AS the_geom FROM alk_flurstuecke WHERE fkz = '072690033000230';

No problem, Ican see it in QGIS.
Now I try to make an intersection on this buffer-view with my table:

CREATE VIEW intersect_flur_40 (gid, flur, zaehler, nenner, the_geom) AS
SELECT p.gid, p.flur, p.zaehler, p.nenner,
ST_SetSRID(ST_Intersection(p.the_geom, b.the_geom) ,31466)
AS the_geom FROM alk_flurstuecke AS p, buffer_flur_40 AS b
WHERE p.fkz <> '072690033000230' AND IsEmpty
(ST_Intersection(p.the_geom, b.the_geom) ) = FALSE;

This view is created without errors too but there is no result. If I try 
to

load the view in QGIS it diapears.
Any idea?



Hi,
Is the select used to create the view returning rows ?
Is this IsEmpty test necessary to validate there is an intersection ?

Nicolas
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] ST_Intersection

2010-05-21 Thread Nicolas Ribot
> Hi,
>
> I have a polygon table (alk_flurstuecke) and create a view with a 40-meter
> buffer on an object:
>
> CREATE VIEW buffer_flur_40 AS
> SELECT gid, ST_SetSRID(st_buffer(the_geom,40), 31466 )
> AS the_geom FROM alk_flurstuecke WHERE fkz = '072690033000230';
>
> No problem, Ican see it in QGIS.
> Now I try to make an intersection on this buffer-view with my table:
>
> CREATE VIEW intersect_flur_40 (gid, flur, zaehler, nenner, the_geom) AS
> SELECT p.gid, p.flur, p.zaehler, p.nenner,
> ST_SetSRID(ST_Intersection(p.the_geom, b.the_geom) ,31466)
> AS the_geom FROM alk_flurstuecke AS p, buffer_flur_40 AS b
> WHERE p.fkz <> '072690033000230' AND IsEmpty
> (ST_Intersection(p.the_geom, b.the_geom) ) = FALSE;
>
> This view is created without errors too but there is no result. If I try to
> load the view in QGIS it diapears.
> Any idea?
>

Hi,
Is the select used to create the view returning rows ?
Is this IsEmpty test necessary to validate there is an intersection ?

Nicolas
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] rakesh modi wants to chat

2010-05-21 Thread rakesh modi
I've been using Google Talk and thought you might like to try it out.
We can use it to call each other for free over the internet. Here's an
invitation to download Google Talk. Give it a try!

---

rakesh modi wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-851a525d37-8a76ff84e3-ZVXRplWTRaOrYD9XahotLm3Aui0
You'll need to click this link to be able to chat with rakesh modi.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with rakesh modi, visit:
http://mail.google.com/mail/a-851a525d37-8a76ff84e3-ZVXRplWTRaOrYD9XahotLm3Aui0

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Create View From Spatial Table with libpq

2010-05-21 Thread 郭家成
Hi !
I try to create a view from a spatial table, but it can't be done
successfully, please give me some hints.

Here is how I create my spatial table:

*CREATE TABLE "table_name" ("ID" SERIAL PRIMARY KEY);
SELECT ADDGEOMETRYCOLUMN('', 'table_name', 'geocol', -1, 'MULTIPOLYGON', 2);
*

After I inserted 1000 records into this table, I try to create a view with
libpq:

*int wkblen=0;*
*char *pwkb = MakeWKB(&wkblen);* // I wrote a function to make wkb
format, the function works fine.
*Oid paramtypes[1]={0};*
*char* paramvalues[1]={pwkb};*
*int paramlens[1]={wkblen};
int paramformats[1]={1};*
*int resultformat=1;*

*PGresult *r = PQexecParams(conn,*
*  "CREATE VIEW \"view_name\" AS SELECT * FROM \"table_name\"
WHERE ST_Intersects(\"geocol\", $1)",*
*  1,*
*  paramtypes,*
*  paramvalues,*
*  paramlens,*
*  paramformats,*
*  resultformat);*
*ExecStatusType est = PQresultstatus(r);*

The ExecStatusType is always be *PGRES_FATAL_ERROR*, and Error Message
is *"could
not determine data type of parameter $1"*.
I have no idea what's going on, because when I change the SQL syntax to:

*"SELECT * FROM \"table_name\" WHERE ST_Intersects(\"geocol\", $1)"*

The ExecStatusType will be PGRES_TUPLES_OK.

Please give me some hints, Thanks !
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] ST_Intersection

2010-05-21 Thread jj.wag

Hi,

I have a polygon table (alk_flurstuecke) and create a view with a 40-meter 
buffer on an object:


CREATE VIEW buffer_flur_40 AS
SELECT gid, ST_SetSRID(st_buffer(the_geom,40), 31466 )
AS the_geom FROM alk_flurstuecke WHERE fkz = '072690033000230';

No problem, Ican see it in QGIS.
Now I try to make an intersection on this buffer-view with my table:

CREATE VIEW intersect_flur_40 (gid, flur, zaehler, nenner, the_geom) AS
SELECT p.gid, p.flur, p.zaehler, p.nenner, 
ST_SetSRID(ST_Intersection(p.the_geom, b.the_geom) ,31466)

AS the_geom FROM alk_flurstuecke AS p, buffer_flur_40 AS b
WHERE p.fkz <> '072690033000230' AND IsEmpty 
(ST_Intersection(p.the_geom, b.the_geom) ) = FALSE;


This view is created without errors too but there is no result. If I try to 
load the view in QGIS it diapears.

Any idea?

Jo 


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users