Re: [postgis-users] Any Projected Straights Function?

2008-09-11 Thread Simon Greener
Mark, > I've had a go at this using constraints and plpgsql, which seems more > intuitive to me: > > alter table rbasin_point add constraint contained_within_basin CHECK > (assertContains(the_geom, 'containing_table', 'containing_geom_column')); Not a big expert on PostgreSQL but this (being able

Re: [postgis-users] Any Projected Straights Function?

2008-09-11 Thread Mark Leslie
I've had a go at this using constraints and plpgsql, which seems more intuitive to me: alter table rbasin_point add constraint contained_within_basin CHECK (assertContains(the_geom, 'containing_table', 'containing_geom_column')); Where assertContains is: CREATE OR REPLACE FUNCTION assertContains

Re: [postgis-users] Any Projected Straights Function?

2008-09-11 Thread Simon Greener
Joao, There is no spatial declarative referential integrity in PostgreSQL/PostGIS through which what you want to do can be done. SQL92 Assertions goes closest to what you want to do. For example: CREATE ASSERTION building_is_within_parcel CHECK (EXISTS (SELECT 1 FROM parcel p, building b

Re: [postgis-users] Buffer/Nautical Miles

2008-09-11 Thread pcreso
Hi Blake, I have done this sort of thing pretty often... I find PostGIS makes it pretty easy. My approach is to generate an arbitrary equal area projection which reasonably robustly covers the area of interest. (Let me know if you need a hand with this) The buffering query then transforms the

Re: [postgis-users] Buffer/Nautical Miles

2008-09-11 Thread Blake Crosby
Bruce, Ok thanks.. that explains a lot. So really my only course of action is to transform to UTM, do my buffer, then transform back to WGS84? Blake Bruce Rindahl wrote: A nautical mile is 1 minute measured along a great circle on a sphere (such as the equator or a longitude line). Thus you

Re: [postgis-users] Buffer/Nautical Miles

2008-09-11 Thread Chris Hermansen
>From Wikipedia http://en.wikipedia.org/wiki/Nautical_mile A nautical mile or sea mile is a unit of length. It corresponds approximately to one minute of latitude along any meridian. It is a non-SI unit used especially by navigators in the shipping and aviation industries.[1] It is

Re: [postgis-users] Buffer/Nautical Miles

2008-09-11 Thread Peter Foley
Nautical miles are roughly based on 1 minute of longitude, but that only equals (approximately) one minute of latitude at the equator, so you won't really have a 2NM radius circle if you use WSG84. You should probably use a meter-based projection and create the circle based on a nautical mile being

Re: [postgis-users] Buffer/Nautical Miles

2008-09-11 Thread Bruce Rindahl
A nautical mile is 1 minute measured along a great circle on a sphere (such as the equator or a longitude line). Thus your query will not work- it will be too short in the x direction. If you are using UTM a nautical mile is about 1852 meters. Bruce Blake Crosby wrote: I'm trying to create

Re: [postgis-users] list of the closest borders

2008-09-11 Thread Doug Fischer
Kevin, This query works like a champ. Thank you very much for your help! Doug On Sep 11, 2008, at 2:49 PM, Kevin Neufeld wrote: Ok, yikes. This is suddenly getting much more complicated than I originally thought. Yes, obviously the boundary approach does not take into account if the po

[postgis-users] Buffer/Nautical Miles

2008-09-11 Thread Blake Crosby
I'm trying to create "circles" by using the buffer function around a point. The radius values i'm working with are in nautical miles. The definition of a nautical mile is 1 minute of 1 degree. Since this unit of measurement is based on a degree, and WSG84 is based on degrees of lat/long (and

RE: [postgis-users] Need Help with Transform

2008-09-11 Thread R H
Thanks Regina that is it, I didn't have the right projection to begin with. I needed NAD_1983_StatePlane_Nevada_East_FIPS_2701_Feet and I was using NAD83 / Nevada East The projection I needed wasn't in the default spatial_ref_sys? I assumed all of the srid's would be in there, I guess not? I

RE: [postgis-users] Need Help with Transform

2008-09-11 Thread Obe, Regina
RH, I'm not aware of an easy way to tell if its in range (I think you can from the proj4text lon a b blah blah blah args) defined in spatial_ref_sys, but I'm not that technically savvy. If you get something like all the same long lat when you project back to 4326 (WGS 84), or you get weird numb

Re: [postgis-users] list of the closest borders

2008-09-11 Thread Kevin Neufeld
Ok, yikes. This is suddenly getting much more complicated than I originally thought. Yes, obviously the boundary approach does not take into account if the point is inside a country polygon. Also, the problem with your second attempt was that you were grabbing only the first polygon out of

Re: [postgis-users] Function 60821c60 returned NULL

2008-09-11 Thread David R Robison
My version is 1.1.6. Can I upgrade just the PostGIS version without upgrading PostgreSQL? I am running PostgreSQL 8.2. David Mark Cave-Ayland wrote: I have a PostGIS database that is frequently thowing this error. My guess is that it is related to the GIS index and the number of NULL geometries

Re: [postgis-users] Function 60821c60 returned NULL

2008-09-11 Thread Mark Cave-Ayland
> I have a PostGIS database that is frequently thowing this error. My > guess is that it is related to the GIS index and the number of NULL > geometries in the table. Because of how I am using Hibernate, I insert > the record with a NULL geometry and then update the record with the > geometry. Has

[postgis-users] Function 60821c60 returned NULL

2008-09-11 Thread David R Robison
I have a PostGIS database that is frequently thowing this error. My guess is that it is related to the GIS index and the number of NULL geometries in the table. Because of how I am using Hibernate, I insert the record with a NULL geometry and then update the record with the geometry. Has anyone

[postgis-users] Any Projected Straights Function?

2008-09-11 Thread Fonseca Hespanha de Oliveira, Joao da
Hi! I am currently doing research on UML modeling of cadastre and land administration data. On a Object Diagram, there is a situation where a check should be done on the projected straights of a building outline (original building to be depicted in 3D), in order to see if it is contained within

RE: [postgis-users] Need Help with Transform

2008-09-11 Thread R H
Thanks for the Help Regina, below are some of the points I attempted. setsrid(MakePoint(834934.2263,26712690.6089, 32107) setsrid(MakePoint(834533.210694,26712881.1962, 32107) setsrid(MakePoint(834224.086891,26712318.3331, 32107) Is there a way to check if it is in the range of the projection

Re: [postgis-users] list of the closest borders

2008-09-11 Thread Doug Fischer
Kevin, I have played with these functions and created a query however it does not seem to be producing the correct results. What I have done is the following (just so you understand the data that I am working with). I have downloaded the World shapefile from http://www.cipotato.org/ diva

Re: [postgis-users] ARCINFO-Clean with PostGIS

2008-09-11 Thread pcreso
Hi Mike, Try ST_Simplify() - the postgis implementation of the Douglas-Peuker algorithm for point reduction, it is probably closest to what you mention. HTH, Brent Wood --- On Fri, 9/12/08, Elstermann, Mike <[EMAIL PROTECTED]> wrote: > From: Elstermann, Mike <[EMAIL PROTECTED]> > Subject:

[postgis-users] ARCINFO-Clean with PostGIS

2008-09-11 Thread Elstermann, Mike
Hi, who has a Idea? You know the "CLEAN"-Statemant in ARCINFO to reduce the number of Nodes within a tolrance. I'm looking for the same with PostGIS. I can't find it in the documentation. Thanks mikeE. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag

Re: [postgis-users] PDF version of manual?

2008-09-11 Thread Mark Cave-Ayland
Kevin Neufeld wrote: Yeah, it looks like things got a little jumbled with the new documentation shuffle. I've reinstated the link on the documentation webpage to an older pdf I found (version 1.3.2). (http://postgis.refractions.net/docs/postgis.pdf ). In my spare time, I'll work to update t