Dana, <br>As the robot veg said, the only free polygon shapefiles that I know about
that are close to what you want is the ZCTA polygon shapefiles from
the US Census bureaus. These are what I'm actually using, ZCTAs, since
my app is based on demographic data from the census bureau and other
sources. You are accurate that the USPS does not provide these either.
If you have a license for ArcIMS or ArcGIS you might be able to use
the zip code polygons in the ESRI data & maps CD/DVD set, but that
of course depends on what you'll use them for since ESRI's licensing is
so strict. I wish I could tell you how to make one, but I've never
tried. If you find a good source let us all know! The good new is
that once you have decent data the PL/PGSQL is simple. If you run into
trouble just shoot me an email or post on the list.<br><br>Best of luck,<br><br>Mark<br><br><div><span class="gmail_quote">On 7/14/06, <b class="gmail_sendername"><a href="mailto:postgis-users-request@postgis.refractions.net">
postgis-users-request@postgis.refractions.net</a></b> <<a href="mailto:postgis-users-request@postgis.refractions.net">postgis-users-request@postgis.refractions.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Send postgis-users mailing list submissions to<br> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:postgis-users-request@postgis.refractions.net">postgis-users-request@postgis.refractions.net</a><br><br>You can reach the person managing the list at<br> <a href="mailto:postgis-users-owner@postgis.refractions.net">
postgis-users-owner@postgis.refractions.net</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of postgis-users digest..."<br><br><br>Today's Topics:<br><br> 1. Zip code polygons (dnrg)
<br> 2. Re: Who is Using PostGIS? For What? (Hern?n De Angelis)<br> 3. Re: Who is Using PostGIS? For What? (Paul Ramsey)<br> 4. Re: Zip code polygons (the Robot Vegetable)<br> 5. Re: Who is Using PostGIS? For What? (Hern?n De Angelis)
<br> 6. Re: Who is Using PostGIS? For What? (Jessica M Salmon)<br> 7. Re: Who is Using PostGIS? For What? (Stephen Davies)<br> 8. optimize: count up points near a point (Josh Livni)<br> 9. Re: optimize: count up points near a point (Michael Fuhr)
<br> 10. Re: optimize: count up points near a point (Josh Livni)<br> 11. Re: optimize: count up points near a point (Stephen Woodbridge)<br> 12. Re: postgis-users Digest, Vol 45, Issue 13<br> (Bernhard Reimar Hoefle)
<br> 13. ERROR: Operation on two GEOMETRIES with different SRIDs (Johan V)<br> 14. RE: ERROR: Operation on two GEOMETRIES with differentSRIDs<br> (Mark Cave-Ayland)<br> 15. Re: ERROR: Operation on two GEOMETRIES with differentSRIDs
<br> (Johan V)<br> 16. RE: ERROR: Operation on two GEOMETRIES withdifferentSRIDs<br> (Mark Cave-Ayland)<br> 17. Re: ERROR: Operation on two GEOMETRIES withdifferentSRIDs<br> (Johan V)<br> 18. RE: ERROR: Operation on two GEOMETRIESwithdifferentSRIDs
<br> (Mark Cave-Ayland)<br> 19. Re: ERROR: Operation on two GEOMETRIESwithdifferentSRIDs (Johan V)<br> 20. Re: ERROR: Operation on two GEOMETRIES withdifferentSRIDs<br> (Ezequias Rodrigues da Rocha)
<br> 21. RE: Who is Using PostGIS? For What? (Robert Burgholzer)<br> 22. Re: Who is Using PostGIS? For What? (Markus Schaber)<br> 23. RE: ERROR: Operation on twoGEOMETRIESwithdifferentSRIDs<br> (Mark Cave-Ayland)
<br> 24. RE: ERROR: Operation on twoGEOMETRIES withdifferentSRIDs<br> (Mark Cave-Ayland)<br> 25. Re: Who is Using PostGIS? For What? (Eduardo Lu?s Garcia Escovar)<br><br><br>----------------------------------------------------------------------
<br><br>Message: 1<br>Date: Thu, 13 Jul 2006 14:24:27 -0700 (PDT)<br>From: dnrg <<a href="mailto:dananrg@yahoo.com">dananrg@yahoo.com</a>><br>Subject: [postgis-users] Zip code polygons<br>To: <a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a><br>Message-ID: <<a href="mailto:20060713212427.26035.qmail@web33103.mail.mud.yahoo.com">20060713212427.26035.qmail@web33103.mail.mud.yahoo.com</a>><br>Content-Type: text/plain; charset=iso-8859-1
<br><br>> Mark Thomas - independent GIS developer/contractor<br>> 1) geocoding, zip code lookups, radius lookups (i.e.<br>> is gimme everything within XXX miles of 123 main st,<br>> somewhere, AL 12345), and<br>
<br>Hi Mark and list. I need to do the same with zip codes<br>and radius lookups.<br><br>Where can I get a shapefile of zip code polygons to<br>load into PostGIS? Is anything like this available for<br>free, or must I purchase it from someone? Free is
<br>better. I don't believe the USPS maintains a zip code<br>polygon shapefile. How does one go about getting or<br>creating one?<br><br>Thanks.<br><br>Dana<br><br><br>__________________________________________________<br>
Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around<br><a href="http://mail.yahoo.com">http://mail.yahoo.com</a><br><br><br>------------------------------<br><br>Message: 2<br>Date: Thu, 13 Jul 2006 23:41:33 +0200
<br>From: Hern?n De Angelis <<a href="mailto:hernan.deangelis@glocalnet.net">hernan.deangelis@glocalnet.net</a>><br>Subject: Re: [postgis-users] Who is Using PostGIS? For What?<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a>><br>Message-ID: <<a href="mailto:200607132341.34584.hernan.deangelis@glocalnet.net">200607132341.34584.hernan.deangelis@glocalnet.net</a>><br>Content-Type: text/plain; charset="iso-8859-1"
<br><br>> Who are you?<br>Hernán De Angelis, Department of Physical Geography and Quaternary Geology,<br>Stockholm University, Sweden<br><br>> What are you using PostGIS for?<br>Storage and analysis of glaciological and palaeoglaciological features.
<br><br>> Why did you choose PostGIS?<br>Because it is powerful, reliable, flexible, stable and free.<br><br>> What makes you happy about your PostGIS installation?<br>I can access databases from several free GIS applications, perl scripts and
<br>the command line.<br><br>> What makes you unhappy about your PostGIS installation?<br>Nothing about PostGIS in itself, but has to do with it anyway: there are still<br>few free GIS applications providing a fully implemented on-screen digitizing
<br>environment for PostGIS.<br><br>In my particular case, for example, I usually digitize features that I<br>interpret on satellite imagery. Therefore, I need a GIS application that is<br>able to display images, with the posibility of applying enhancements, and at
<br>the same time allows to directly digitize in PostGIS. As far as I know the<br>only free application that is able to do that is gvSIG, although it is still<br>in an early stage of development. uDig is good for digitizing but it doesn't
<br>display big satellite images. Another good alternative, QGIS, has very basic<br>digitizing tools and displays images, but it is unable of applying<br>enhancements (on grey scales). So, until now I am forced to digitize in
<br>shapefile format or GRASS and then exporting to PostGIS. I will be glad when<br>an application like gvSIG or similar reaches a more advanced stage where it<br>is possible to do production work.<br><br>><br>> Those who want to remain in confidence, but still want to make their
<br>> feelings known, please respond to me directly.<br>><br>> I am going to be writing up a handful of PostGIS users into full<br>> white-papers for the web site and my own conference talks, so please, if<br>
> you think you have a compelling PostGIS story, start by giving us a<br>> summary here on the list!<br>><br>> I love hearing these stories!<br>><br>> Paul<br>> _______________________________________________
<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br><br>------------------------------<br><br>Message: 3<br>Date: Thu, 13 Jul 2006 14:45:10 -0700<br>From: Paul Ramsey <<a href="mailto:pramsey@refractions.net">
pramsey@refractions.net</a>><br>Subject: Re: [postgis-users] Who is Using PostGIS? For What?<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a>><br>Message-ID: <<a href="mailto:44B6BEE6.7030305@refractions.net">44B6BEE6.7030305@refractions.net</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Two uDig comments:<br><br>1 - In the interim, if you publish your satimage using a WMS service
<br>like Mapserver you can bring WMS impages into uDig without any problems<br>and digitize off of them. (Also, try the v. v. latest uDig 1.1RC<br>candidates, as the PostGIS support has been worked on a lot recently).<br>
2 - There is a big upgrade in the raster/image handling in geotools<br>going through right now, flowing out of work done in NATO over the past<br>year. When that work is in, uDig gets a free and good upgrade in imagery<br>
support, which will take very little effort to bring forward to the<br>user. Hopefully before the 1.1 release, but perhaps for 1.1.1.<br><br>Paul<br><br>Hernán De Angelis wrote:<br><br>> In my particular case, for example, I usually digitize features that I
<br>> interpret on satellite imagery.<br>...<br>> uDig is good for digitizing but it doesn't<br>> display big satellite images.<br><br><br>------------------------------<br><br>Message: 4<br>Date: Thu, 13 Jul 2006 14:45:00 -0700 (PDT)
<br>From: the Robot Vegetable <<a href="mailto:veg@dvandva.org">veg@dvandva.org</a>><br>Subject: Re: [postgis-users] Zip code polygons<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a>><br>Message-ID:<br> <<a href="mailto:Pine.LNX.4.58.0607131440280.15556@hosting.midvalleyhosting.com">Pine.LNX.4.58.0607131440280.15556@hosting.midvalleyhosting.com</a>
><br>Content-Type: TEXT/PLAIN; charset=US-ASCII<br><br><br> Be careful with ZIP codes, they really aren't "areas" per se.<br><br> That said, this discusses abit:<br><br> <a href="http://www.census.gov/geo/ZCTA/zcta.html">
http://www.census.gov/geo/ZCTA/zcta.html</a><br><br> and files are accessible through this page:<br><br> <a href="http://www.census.gov/geo/www/bob/bdy_files.html">http://www.census.gov/geo/www/bob/bdy_files.html</a><br>
<br><br> veg<br><br><br><br>On Thu, 13 Jul 2006, dnrg wrote:<br><br>> > Mark Thomas - independent GIS developer/contractor<br>> > 1) geocoding, zip code lookups, radius lookups (i.e.<br>> > is gimme everything within XXX miles of 123 main st,
<br>> > somewhere, AL 12345), and<br>><br>> Hi Mark and list. I need to do the same with zip codes<br>> and radius lookups.<br>><br>> Where can I get a shapefile of zip code polygons to<br>> load into PostGIS? Is anything like this available for
<br>> free, or must I purchase it from someone? Free is<br>> better. I don't believe the USPS maintains a zip code<br>> polygon shapefile. How does one go about getting or<br>> creating one?<br>><br>> Thanks.
<br>><br>> Dana<br>><br>><br>> __________________________________________________<br>> Do You Yahoo!?<br>> Tired of spam? Yahoo! Mail has the best spam protection around<br>> <a href="http://mail.yahoo.com">
http://mail.yahoo.com</a><br>> _______________________________________________<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>><br><br><br>------------------------------<br><br>Message: 5<br>Date: Thu, 13 Jul 2006 23:59:02 +0200
<br>From: Hern?n De Angelis <<a href="mailto:hernan.deangelis@glocalnet.net">hernan.deangelis@glocalnet.net</a>><br>Subject: Re: [postgis-users] Who is Using PostGIS? For What?<br>To: <a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a><br>Message-ID: <<a href="mailto:200607132359.04162.hernan.deangelis@glocalnet.net">200607132359.04162.hernan.deangelis@glocalnet.net</a>><br>Content-Type: text/plain; charset="iso-8859-1"
<br><br>Paul,<br><br>Thanks for the comments. I will try your trick and will be looking at the<br>latest uDig.<br><br>BTW, I forgot to mention, as another advantage, the active and friendly<br>PostGIS community ;-)<br><br>
Hernán<br><br><br>El Jueves 13 Julio 2006 23.45, Paul Ramsey escribió:<br>> Two uDig comments:<br>><br>> 1 - In the interim, if you publish your satimage using a WMS service<br>> like Mapserver you can bring WMS impages into uDig without any problems
<br>> and digitize off of them. (Also, try the v. v. latest uDig 1.1RC<br>> candidates, as the PostGIS support has been worked on a lot recently).<br>> 2 - There is a big upgrade in the raster/image handling in geotools
<br>> going through right now, flowing out of work done in NATO over the past<br>> year. When that work is in, uDig gets a free and good upgrade in imagery<br>> support, which will take very little effort to bring forward to the
<br>> user. Hopefully before the 1.1 release, but perhaps for 1.1.1.<br>><br>> Paul<br>><br>> Hernán De Angelis wrote:<br>> > In my particular case, for example, I usually digitize features that I<br>
> > interpret on satellite imagery.<br>><br>> ...<br>><br>> > uDig is good for digitizing but it doesn't<br>> > display big satellite images.<br>><br>> _______________________________________________
<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br><br>------------------------------<br><br>Message: 6<br>Date: Thu, 13 Jul 2006 16:17:53 -0600<br>From: Jessica M Salmon <<a href="mailto:jmsalmon@fs.fed.us">
jmsalmon@fs.fed.us</a>><br>Subject: Re: [postgis-users] Who is Using PostGIS? For What?<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
><br>Message-ID:<br> <<a href="mailto:OF0949CCEB.2ADAD320-ON872571AA.007741A4-872571AA.007A7CDE@fs.fed.us">OF0949CCEB.2ADAD320-ON872571AA.007741A4-872571AA.007A7CDE@fs.fed.us</a>><br>Content-Type: text/plain; charset=US-ASCII
<br><br>> Who are you?<br>>From the top, down: We are the United States Department of Agriculture,<br>Rocky Mountain Research Station, Missoula Fire Sciences Laboratory, Fire<br>Chemistry Project, Remote Sensing Lab.
<br><br><br>> What are you using PostGIS for?<br>We have a MODIS (satellite) Direct Broadcast receiving station here. It<br>monitors active fires in near-real time across the Western U.S., Canada,<br>and Mexico. We use a postgis database to store active fire (thermal
<br>anomaly) detections and burnscar (charred veg) detections, and filter and<br>combine them into progressing fire perimeters.<br><br>Additionally, we have another postgis database as a geospatial datastore<br>and backend for portraying atmospheric chemistry data.
<br><a href="http://smoke-fire.us:8080/geoserver/data/quickWMS/alex_devel.jsp">http://smoke-fire.us:8080/geoserver/data/quickWMS/alex_devel.jsp</a><br><br><br>> Why did you choose PostGIS?<br>It's fun and affordable! Linux-friendly, highly configurable and flexible,
<br>many programming options available.<br><br><br>> What makes you happy about your PostGIS installation?<br>It works every day as expected.<br><br><br>> What makes you unhappy about your PostGIS installation?
<br>Hm. Not a whole lot, to be honest.<br><br><br><br> Paul Ramsey<br> <pramsey@refracti<br> <a href="http://ons.net">ons.net</a>> To
<br> Sent by: PostGIS Users Discussion<br> postgis-users-bou <<a href="mailto:postgis-users@postgis.refractions">postgis-users@postgis.refractions</a>.<br> <a href="mailto:nces@postgis.refr">
nces@postgis.refr</a> net><br> <a href="http://actions.net">actions.net</a> cc<br><br> Subject
<br> 07/12/2006 11:35 [postgis-users] Who is Using<br> AM PostGIS? For What?<br><br><br> Please respond to<br> PostGIS Users<br> Discussion
<br> <postgis-users@po<br> stgis.refractions<br> .net><br><br><br><br><br><br><br><br>It is that time of year again (conference time) so I am going to ask my<br>annual question(s):
<br><br> Who are you?<br> What are you using PostGIS for?<br> Why did you choose PostGIS?<br> What makes you happy about your PostGIS installation?<br> What makes you unhappy about your PostGIS installation?
<br><br>Those who want to remain in confidence, but still want to make their<br>feelings known, please respond to me directly.<br><br>I am going to be writing up a handful of PostGIS users into full<br>white-papers for the web site and my own conference talks, so please, if
<br>you think you have a compelling PostGIS story, start by giving us a<br>summary here on the list!<br><br>I love hearing these stories!<br><br>Paul<br>_______________________________________________<br>postgis-users mailing list
<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users
</a><br><br><br><br><br>------------------------------<br><br>Message: 7<br>Date: Fri, 14 Jul 2006 10:36:58 +0930<br>From: Stephen Davies <<a href="mailto:sdc@sdc.com.au">sdc@sdc.com.au</a>><br>Subject: Re: [postgis-users] Who is Using PostGIS? For What?
<br>To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>Message-ID: <<a href="mailto:200607141036.59080.sdc@sdc.com.au">200607141036.59080.sdc@sdc.com.au</a>><br>Content-Type: text/plain; charset="us-ascii"
<br><br>Who are you?<br><br>Stephen Davies Consulting - information management consulting.<br><br>What are you using PostGIS for?<br><br>Primary PostGIS application is the management of soil quality (moisture,<br>salinity etc) and weather data collection and analysis.
<br>Cadastral, irrigation unit and logger/probe data is stored in a PostGIS<br>database and associated metric data automatically uploaded for storage<br>and analysis.<br>Analysis results are fed back to farmers etc via Grace plots and/or
<br>colour-coded Mapserver web pages and pages specially formatted for<br>reception by 3G mobile phones (so that farmers out in the paddocks can<br>review status in (almost) real time.)<br>The "standard" Mapserver pages are also queryable to display
<br>metrics/analyses for selected locations.<br><br>The application also uses SMS messaging to turn water pumps on/off based<br>on the metric analyses.<br><br>Why did you choose PostGIS?<br><br>I am a long-term PostgreSQL user so PostGIS was an obvious first choice.
<br>Nothing I have seen since has cast any shadow on that decision.<br><br>What makes you happy about your PostGIS installation?<br><br>All of the GIS functions and capabilities that I need are there and<br>perform well.<br>
<br>What makes you unhappy about your PostGIS installation?<br><br>I am still not confident that I know how to best handle data from<br>multiple zones/SRIDs given the single-SRID/table constraint of PostGIS.<br>--<br>========================================================================
<br>This email is for the person(s) identified above, and is confidential to<br>the sender and the person(s). No one else is authorised to use or<br>disseminate this email or its contents.<br><br>Stephen Davies Consulting Voice: 08-8177 1595
<br>Adelaide, South Australia. Fax: 08-8177 0133<br>Computing & Network solutions. Mobile:0403 0405 83<br><br><br>------------------------------<br><br>Message: 8<br>Date: Thu, 13 Jul 2006 18:07:36 -0700
<br>From: Josh Livni <<a href="mailto:josh@livniconsulting.com">josh@livniconsulting.com</a>><br>Subject: [postgis-users] optimize: count up points near a point<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a>><br>Message-ID: <<a href="mailto:44B6EE58.8040501@livniconsulting.com">44B6EE58.8040501@livniconsulting.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
<br><br>I checked a few threads on this topic, but didn't come across anything<br>that helped me make my query a lot quicker. So, I post here asking for<br>your advice:<br><br>I have about a million parcels, some of which are missing an attribute.
<br> I'd like to query parcels nearby (say within 1km) to get some stats on<br>their value for the attribute.<br><br>Right now it takes about 40-60 seconds to report on the nearby parcels -<br>since over 100k parcels are missing the attribute, this is a problem...
<br><br>---BEGIN QUERY---<br>SELECT count(*) as count,<br> avg(asr_impr) as avg,<br> sum(asr_impr) as sum,<br> max(asr_impr) as max,<br> min(asr_impr) as min<br>FROM parcels as p<br>WHERE attribute > 0 and other_attribute = 11
<br> AND (expand(p.the_geom,3280.8) && setsrid('POINT(6296272.3<br>1955364.5)'::geometry,102646))<br> AND distance(centroid(p.the_geom), setsrid('POINT(6296272.3<br>1955364.5)'::geometry,102646)) < 3280.8<br>
---END QUERY---<br><br>I have a btree index on the attribute and other_attribute columns, and a<br>gist index on the parcels centroid(the_geom) column.<br><br><br><br>Any help is greatly appreciated,<br><br>Thanks,<br><br>
-Josh<br><br><br><br><br><br><br><br>------------------------------<br><br>Message: 9<br>Date: Thu, 13 Jul 2006 19:27:17 -0600<br>From: Michael Fuhr <<a href="mailto:mike@fuhr.org">mike@fuhr.org</a>><br>Subject: Re: [postgis-users] optimize: count up points near a point
<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>Message-ID: <<a href="mailto:20060714012717.GA90482@winnie.fuhr.org">20060714012717.GA90482@winnie.fuhr.org
</a>><br>Content-Type: text/plain; charset=us-ascii<br><br>On Thu, Jul 13, 2006 at 06:07:36PM -0700, Josh Livni wrote:<br>> I have about a million parcels, some of which are missing an attribute.<br>> I'd like to query parcels nearby (say within 1km) to get some stats on
<br>> their value for the attribute.<br>><br>> Right now it takes about 40-60 seconds to report on the nearby parcels -<br>> since over 100k parcels are missing the attribute, this is a problem...<br>><br>> ---BEGIN QUERY---
<br>> SELECT count(*) as count,<br>> avg(asr_impr) as avg,<br>> sum(asr_impr) as sum,<br>> max(asr_impr) as max,<br>> min(asr_impr) as min<br>> FROM parcels as p<br>> WHERE attribute > 0 and other_attribute = 11
<br>> AND (expand(p.the_geom,3280.8) && setsrid('POINT(6296272.3<br>> 1955364.5)'::geometry,102646))<br>> AND distance(centroid(p.the_geom), setsrid('POINT(6296272.3<br>> 1955364.5)'::geometry,102646)) <
3280.8<br>> ---END QUERY---<br>><br>> I have a btree index on the attribute and other_attribute columns, and a<br>> gist index on the parcels centroid(the_geom) column.<br><br>What does EXPLAIN ANALYZE show for this query? I don't think an
<br>index on centroid(the_geom) is going to be used, but an index on<br>expand(the_geom, 3280.8) should be if you have one. You might also<br>be able to speed up queries by creating another geometry column to<br>hold the centroid, which you could populate automatically via a
<br>trigger (at the cost of slowing down inserts and updates).<br><br>--<br>Michael Fuhr<br><br><br>------------------------------<br><br>Message: 10<br>Date: Thu, 13 Jul 2006 18:57:06 -0700<br>From: Josh Livni <<a href="mailto:josh@livniconsulting.com">
josh@livniconsulting.com</a>><br>Subject: Re: [postgis-users] optimize: count up points near a point<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a>><br>Message-ID: <<a href="mailto:44B6F9F2.8020307@livniconsulting.com">44B6F9F2.8020307@livniconsulting.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Thanks for the good points Michael -- I'll definitely make a centroid
<br>geometry column (I only query this; never update).<br><br>I'll also create index on the 'expand(centroid_geom),3280', since that<br>seems to have sped it up a lot. Unfortunately my distance sometimes<br>varies, and is not always a kilometer, but I still think it will be
<br>faster to just make a bunch of indices.<br><br>Anyway, more to the point, as I was changing my query to take advantage<br>of my new centroid geometry column, I realized my massive typo: I was<br>using "(expand(p.the_geom
,3280.8) && ..." instead of<br>"(expand(centroid(p.the_geom),3280.8) && ..."<br><br>At first glance, fixing this up, combined with your suggestion of<br>indexing the expanded centroid, seems to speed it up an order of
<br>magnitude or so.<br><br><br><br> -Josh<br><br>PS I think I'll also make it "(expand(p.the_geom,3280.8 + some extra<br>distance) && ... " and index that too, to be sure I'm picking up the<br>points I want, but this should still be much much faster than expanding
<br>the polygon w/no index<br><br><br>Michael Fuhr wrote:<br>> On Thu, Jul 13, 2006 at 06:07:36PM -0700, Josh Livni wrote:<br>>> I have about a million parcels, some of which are missing an attribute.<br>>> I'd like to query parcels nearby (say within 1km) to get some stats on
<br>>> their value for the attribute.<br>>><br>>> Right now it takes about 40-60 seconds to report on the nearby parcels -<br>>> since over 100k parcels are missing the attribute, this is a problem...
<br>>><br>>> ---BEGIN QUERY---<br>>> SELECT count(*) as count,<br>>> avg(asr_impr) as avg,<br>>> sum(asr_impr) as sum,<br>>> max(asr_impr) as max,<br>>> min(asr_impr) as min
<br>>> FROM parcels as p<br>>> WHERE attribute > 0 and other_attribute = 11<br>>> AND (expand(p.the_geom,3280.8) && setsrid('POINT(6296272.3<br>>> 1955364.5)'::geometry,102646))<br>>> AND distance(centroid(
p.the_geom), setsrid('POINT(6296272.3<br>>> 1955364.5)'::geometry,102646)) < 3280.8<br>>> ---END QUERY---<br>>><br>>> I have a btree index on the attribute and other_attribute columns, and a<br>
>> gist index on the parcels centroid(the_geom) column.<br>><br>> What does EXPLAIN ANALYZE show for this query? I don't think an<br>> index on centroid(the_geom) is going to be used, but an index on<br>> expand(the_geom,
3280.8) should be if you have one. You might also<br>> be able to speed up queries by creating another geometry column to<br>> hold the centroid, which you could populate automatically via a<br>> trigger (at the cost of slowing down inserts and updates).
<br>><br><br><br><br><br>------------------------------<br><br>Message: 11<br>Date: Thu, 13 Jul 2006 22:22:11 -0400<br>From: Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>>
<br>Subject: Re: [postgis-users] optimize: count up points near a point<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>Message-ID: <
<a href="mailto:44B6FFD3.6050205@swoodbridge.com">44B6FFD3.6050205@swoodbridge.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Josh,<br><br>The expand of point forms a square and the distance forms a circle
<br>within the square. If your use case allows it and you don't care about<br>trimming the corners off the square, skip the distance calc all<br>together. Which will really speed things up.<br><br>-Steve W<br><br>Josh Livni wrote:
<br>> Thanks for the good points Michael -- I'll definitely make a centroid<br>> geometry column (I only query this; never update).<br>><br>> I'll also create index on the 'expand(centroid_geom),3280', since that
<br>> seems to have sped it up a lot. Unfortunately my distance sometimes<br>> varies, and is not always a kilometer, but I still think it will be<br>> faster to just make a bunch of indices.<br>><br>> Anyway, more to the point, as I was changing my query to take advantage
<br>> of my new centroid geometry column, I realized my massive typo: I was<br>> using "(expand(p.the_geom,3280.8) && ..." instead of<br>> "(expand(centroid(p.the_geom),3280.8) && ..."
<br>><br>> At first glance, fixing this up, combined with your suggestion of<br>> indexing the expanded centroid, seems to speed it up an order of<br>> magnitude or so.<br>><br>><br>><br>> -Josh<br>
><br>> PS I think I'll also make it "(expand(p.the_geom,3280.8 + some extra<br>> distance) && ... " and index that too, to be sure I'm picking up the<br>> points I want, but this should still be much much faster than expanding
<br>> the polygon w/no index<br>><br>><br>> Michael Fuhr wrote:<br>>> On Thu, Jul 13, 2006 at 06:07:36PM -0700, Josh Livni wrote:<br>>>> I have about a million parcels, some of which are missing an
<br>>>> attribute. I'd like to query parcels nearby (say within 1km) to get<br>>>> some stats on their value for the attribute.<br>>>><br>>>> Right now it takes about 40-60 seconds to report on the nearby
<br>>>> parcels - since over 100k parcels are missing the attribute, this is<br>>>> a problem...<br>>>><br>>>> ---BEGIN QUERY---<br>>>> SELECT count(*) as count,<br>>>> avg(asr_impr) as avg,
<br>>>> sum(asr_impr) as sum,<br>>>> max(asr_impr) as max,<br>>>> min(asr_impr) as min<br>>>> FROM parcels as p<br>>>> WHERE attribute > 0 and other_attribute = 11<br>
>>> AND (expand(p.the_geom,3280.8) && setsrid('POINT(6296272.3<br>>>> 1955364.5)'::geometry,102646))<br>>>> AND distance(centroid(p.the_geom), setsrid('POINT(6296272.3<br>>>>
1955364.5)'::geometry,102646)) < 3280.8<br>>>> ---END QUERY---<br>>>><br>>>> I have a btree index on the attribute and other_attribute columns,<br>>>> and a gist index on the parcels centroid(the_geom) column.
<br>>><br>>> What does EXPLAIN ANALYZE show for this query? I don't think an<br>>> index on centroid(the_geom) is going to be used, but an index on<br>>> expand(the_geom, 3280.8) should be if you have one. You might also
<br>>> be able to speed up queries by creating another geometry column to<br>>> hold the centroid, which you could populate automatically via a<br>>> trigger (at the cost of slowing down inserts and updates).
<br>>><br>><br>><br>> _______________________________________________<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>><br><br><br><br>------------------------------<br><br>Message: 12<br>
Date: Fri, 14 Jul 2006 09:19:32 +0200<br>From: Bernhard Reimar Hoefle <<a href="mailto:Bernhard.Hoefle@uibk.ac.at">Bernhard.Hoefle@uibk.ac.at</a>><br>Subject: [postgis-users] Re: postgis-users Digest, Vol 45, Issue 13
<br>To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>Message-ID: <<a href="mailto:1152861572.44b7458439082@web-mail2.uibk.ac.at">1152861572.44b7458439082@web-mail2.uibk.ac.at
</a>><br>Content-Type: text/plain; charset=ISO-8859-1<br><br>> Who are you?<br>Bernhard Hoefle, PhD student at Institute of Geography<br>(<a href="http://www.uibk.ac.at/geographie">www.uibk.ac.at/geographie</a>
) and at alpS - Centre for Natural Hazard Management<br>(<a href="http://www.alps-gmbh.com">www.alps-gmbh.com</a>). I'm working in a research project dealing with Airborne<br>Laser Scanning (ALS) Data for Natural Hazard purposes.
<br><br>> What are you using PostGIS for?<br><br>Storing ALS point clouds (up to 1 Billion points/database).<br><br>> Why did you choose PostGIS?<br><br>Because I worked with PostgreSQL before and was (I'm still) very happy with it.
<br>It has a quite large collection of GIS functionality that I could use. The<br>community is active and competent in nearly every field of interest.<br><br>> What makes you happy about your PostGIS installation?
<br><br>Stable! Easy-to-use with GRASS and QGIS.<br><br>> What makes you unhappy about your PostGIS installation?<br><br>Poor documentation about programming/extending C functions of PostGIS.<br><br>I'll add some wishes to the list ;-)
<br><br><br>------------------------------<br><br>Message: 13<br>Date: Fri, 14 Jul 2006 11:46:02 +0200<br>From: "Johan V" <<a href="mailto:aragorn_jv@yahoo.com">aragorn_jv@yahoo.com</a>><br>Subject: [postgis-users] ERROR: Operation on two GEOMETRIES with
<br> different SRIDs<br>To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>Message-ID:<br> <<a href="mailto:6069fb410607140246kb67f60bxcf184b6dcf0e4606@mail.gmail.com">
6069fb410607140246kb67f60bxcf184b6dcf0e4606@mail.gmail.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Hello,<br><br>I'm having some problems with a table 'reflijst' I created recently in
<br>a Postgresql 7.3.4 - Postgis 0.8.2 - geos 1.0 database. If is a table<br>with SRID equals 103300 and geometrytype MULTIPOLYGON. I added the<br>the_geom field with the sql:<br><br>select AddGeometryColumn('public','reflijst','the_geom','103300','MULTIPOLYGON',2);
<br><br>==> Which created the neccessary column and corresponding rule in the<br>geometry_columns table:<br><br>(COLUMN HEADERS) oid f_table_catalog f_table_schema f_table_name<br>f_geometry_column coord_dimension srid "type" attrelid varattnum stats
<br><br>(ADDED CONTENT)<br>"13636488";"''";"public";"reflijst";"the_geom";"2";"103300";"MULTIPOLYGON";"13577009";"17";""
<br><br>==> And the correct CHECK CONTRAINTS ARE CREATED FOR THAT TABLE<br>CONSTRAINT "$1" CHECK ((srid(the_geom) = 103300))<br>CONSTRAINT "$2" CHECK (((geometrytype(the_geom) = 'POINT'::text) OR<br>
(the_geom IS NULL)))<br><br>Now am i trying to do the next sql statement on this table:<br><br>SELECT the_geom FROM reflijst WHERE ((the_geom && 'POLYGON<br>((33595.443392445566 15067.465440617714,281187.7093687274
<br>15067.465440617714,281187.7093687274<br>254932.5345593823,33595.443392445566<br>254932.5345593823,33595.443392445566 15067.465440617714))'))<br><br>Than I get the response: ERROR: Operation on two GEOMETRIES with<br>
different SRIDs.<br><br>If I change 'POLYGON((...))' into 'SRID=103300;POLYGON((..))' in the<br>sql statement than I get a correct response, it is the expected<br>columns.<br>Or if I do not change the sql statement, but change the srid in the
<br>table to -1 (i.e. UNKNOWN) and I change of course also the CHECK<br>CONSTRAINTS and the corresponding srid column in the geometry_columns<br>table, I also get a correct response.<br><br>What am I doing wrong? What do I have to change in the table or the
<br>database that this still works! Because everthing in the table looks<br>correct. I can even view the data in the table with the products JUMP<br>and Quantum GIS. And I can execute the same sql statement on another<br>
table without any problems (it is a table with point geometry).<br><br>Greetz,<br>Johan.<br><br><br>------------------------------<br><br>Message: 14<br>Date: Fri, 14 Jul 2006 10:57:50 +0100<br>From: "Mark Cave-Ayland" <
<a href="mailto:m.cave-ayland@webbased.co.uk">m.cave-ayland@webbased.co.uk</a>><br>Subject: RE: [postgis-users] ERROR: Operation on two GEOMETRIES with<br> differentSRIDs<br>To: "'PostGIS Users Discussion'"
<br> <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>Message-ID: <<a href="mailto:200607140957.k6E9vrQ24541@webbased16.localdomain">200607140957.k6E9vrQ24541@webbased16.localdomain
</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br><br>> -----Original Message-----<br>> From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net
</a> [mailto:<a href="mailto:postgis-users-">postgis-users-</a><br>> <a href="mailto:bounces@postgis.refractions.net">bounces@postgis.refractions.net</a>] On Behalf Of Johan V<br>> Sent: 14 July 2006 10:46<br>> To:
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>> Subject: [postgis-users] ERROR: Operation on two GEOMETRIES with<br>> differentSRIDs<br><br>(cut)<br><br>> Now am i trying to do the next sql statement on this table:
<br>><br>><br>><br>> Than I get the response: ERROR: Operation on two GEOMETRIES with<br>> different SRIDs.<br><br><br>Hi Johan,<br><br>The issue here is that it is the geometry you are creating on the fly is
<br>constructed with a SRID of -1 because it has not yet been tied to a<br>coordinate system - your table definition and the constraints that go with<br>it are fine. The way to handle this is to use setSRID()/GeometryFromText()
<br>to assign the same coordinate system to your polygon when you construct it,<br>e.g.<br><br>SELECT the_geom FROM reflijst WHERE ((the_geom && GeomFromText(<br>'POLYGON((33595.443392445566 15067.465440617714, 281187.7093687274
<br>15067.465440617714, 281187.7093687274 254932.5345593823,33595.443392445566<br>254932.5345593823,33595.443392445566 15067.465440617714))', 103300)))<br><br><br>Kind regards,<br><br>Mark.<br><br>------------------------
<br>WebBased Ltd<br>17 Research Way<br>Plymouth<br>PL6 8BT<br><br>T: +44 (0)1752 797131<br>F: +44 (0)1752 791023<br><br><a href="http://www.webbased.co.uk">http://www.webbased.co.uk</a><br><a href="http://www.infomapper.com">
http://www.infomapper.com</a><br><a href="http://www.swtc.co.uk">http://www.swtc.co.uk</a><br><br>This email and any attachments are confidential to the intended recipient<br>and may also be privileged. If you are not the intended recipient please
<br>delete it from your system and notify the sender. You should not copy it or<br>use it for any purpose nor disclose or distribute its contents to any other<br>person.<br><br><br><br><br>------------------------------<br>
<br>Message: 15<br>Date: Fri, 14 Jul 2006 13:46:02 +0200<br>From: "Johan V" <<a href="mailto:jvhoppli@gmail.com">jvhoppli@gmail.com</a>><br>Subject: Re: [postgis-users] ERROR: Operation on two GEOMETRIES with
<br> differentSRIDs<br>To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>Message-ID:<br> <<a href="mailto:6069fb410607140446g7021b80dn51f4aaed215d1b25@mail.gmail.com">
6069fb410607140446g7021b80dn51f4aaed215d1b25@mail.gmail.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Hi Mark and others,<br><br>Yes the geometry created on the fly is -1, but this same sql statement
<br>(with the on the fly created geometry) does work on another table with<br>SRID=103300, but not on this one.<br><br>I need this specific sql statement because it is a statement that is<br>issued by a software product that makes a WFS/WMS service (GIS Service
<br>over the internet) of this table.<br><br>So do I have to change or check some thing in the table to be able to<br>use this kind of sql statement:<br><br>SELECT the_geom FROM table_x WHERE ((the_geom && 'POLYGON((...))')).
<br><br>Greetz,<br>Johan.<br><br><br>------------------------------<br><br>Message: 16<br>Date: Fri, 14 Jul 2006 14:18:58 +0100<br>From: "Mark Cave-Ayland" <<a href="mailto:m.cave-ayland@webbased.co.uk">m.cave-ayland@webbased.co.uk
</a>><br>Subject: RE: [postgis-users] ERROR: Operation on two GEOMETRIES<br> withdifferentSRIDs<br>To: "'PostGIS Users Discussion'"<br> <<a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a>><br>Message-ID: <<a href="mailto:200607141319.k6EDJ2Q01070@webbased16.localdomain">200607141319.k6EDJ2Q01070@webbased16.localdomain</a>><br>Content-Type: text/plain; charset="us-ascii"
<br><br><br>> -----Original Message-----<br>> From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a> [mailto:<a href="mailto:postgis-users-">postgis-users-
</a><br>> <a href="mailto:bounces@postgis.refractions.net">bounces@postgis.refractions.net</a>] On Behalf Of Johan V<br>> Sent: 14 July 2006 12:46<br>> To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a><br>> Subject: Re: [postgis-users] ERROR: Operation on two GEOMETRIES<br>> withdifferentSRIDs<br>><br>> Hi Mark and others,<br>><br>> Yes the geometry created on the fly is -1, but this same sql statement
<br>> (with the on the fly created geometry) does work on another table with<br>> SRID=103300, but not on this one.<br>><br>> I need this specific sql statement because it is a statement that is<br>> issued by a software product that makes a WFS/WMS service (GIS Service
<br>> over the internet) of this table.<br>><br>> So do I have to change or check some thing in the table to be able to<br>> use this kind of sql statement:<br>><br>> SELECT the_geom FROM table_x WHERE ((the_geom && 'POLYGON((...))')).
<br>><br>> Greetz,<br>> Johan.<br><br><br>Hi Johan,<br><br>Hmmm that makes it a bit more tricky. Unfortunately the SQL being issued is<br>relying on the implicit cast in PostgreSQL rather than using<br>GeomFromText()/setSRID() as documented and so its behaviour may change
<br>across PostgreSQL/PostGIS versions - if you do get a chance to update the<br>SQL in your client software, I would highly recommend it.<br><br>As for the symptoms you are seeing, I am slightly baffled - can you post the
<br>output of \d <table> for one of your tables that works and your new one that<br>doesn't, the exact SELECT queries being executed on each table, and can you<br>confirm that both tables are in the same database running the same version
<br>of PostGIS?<br><br><br>Kind regards,<br><br>Mark.<br><br>------------------------<br>WebBased Ltd<br>17 Research Way<br>Plymouth<br>PL6 8BT<br><br>T: +44 (0)1752 797131<br>F: +44 (0)1752 791023<br><br><a href="http://www.webbased.co.uk">
http://www.webbased.co.uk</a><br><a href="http://www.infomapper.com">http://www.infomapper.com</a><br><a href="http://www.swtc.co.uk">http://www.swtc.co.uk</a><br><br>This email and any attachments are confidential to the intended recipient
<br>and may also be privileged. If you are not the intended recipient please<br>delete it from your system and notify the sender. You should not copy it or<br>use it for any purpose nor disclose or distribute its contents to any other
<br>person.<br><br><br><br><br>------------------------------<br><br>Message: 17<br>Date: Fri, 14 Jul 2006 15:30:58 +0200<br>From: "Johan V" <<a href="mailto:aragorn_jv@yahoo.com">aragorn_jv@yahoo.com</a>>
<br>Subject: Re: [postgis-users] ERROR: Operation on two GEOMETRIES<br> withdifferentSRIDs<br>To: "PostGIS Users Discussion" <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a>><br>Message-ID:<br> <<a href="mailto:6069fb410607140630k6d474008gb610c10fe77e84dc@mail.gmail.com">6069fb410607140630k6d474008gb610c10fe77e84dc@mail.gmail.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
<br><br>Hi Mark,<br><br>Here are the descriptions of the tables (in the same database running<br>POSTGIS 0.8.2):<br><br>[database_x]=# \d reflijst<br> Table "public.reflijst"<br> Column | Type | Modifiers
<br>-----------+-------------------+-----------<br> artid | integer |<br> titre | text |<br> annee | integer |<br> volume | character varying |<br> firstpage | character varying |
<br> auteurs | text |<br> publica | text |<br> strat | character varying |<br> domg_ol | character varying |<br> xlambert | bigint |<br> ylambert | bigint |<br> numcarte | integer |
<br> the_geom | geometry |<br>Check constraints: "$1" (srid(the_geom) = 103300)<br> "$2" ((geometrytype(the_geom) =<br>'MULTIPOLYGON'::text) OR (the_geom IS NULL))<br><br><br>
[database_x]=# \d gnosbgm<br> Table "public.gnosbgm"<br> Column | Type | Modifiers<br>------------+------------------------+-----------<br> id | numeric(28,6) |
<br> gemeente | character varying(254) |<br> x | numeric(28,6) |<br> y | numeric(28,6) |<br> z | numeric(28,6) |<br> kaart | character varying(254) |<br> logdiepte | numeric(28,6) |
<br> diepte | numeric(28,6) |<br> bgdnr | character varying(254) |<br> bgdcode | character varying(254) |<br> refer | character varying(254) |<br> hotlink | character varying(254) |<br> imagepath1 | character varying(254) |
<br> logcomp | character varying(254) |<br> date | character varying(10) |<br> tert_plio | character varying(1) |<br> tert_mio | character varying(1) |<br> tert_paleo | character varying(1) |<br> tert_eoc | character varying(1) |
<br> tert_oligo | character varying(1) |<br> primair | character varying(1) |<br> secundair | character varying(1) |<br> tertiair | character varying(1) |<br> quartair | character varying(1) |<br> the_geom | geometry |
<br>Indexes: sidx_gnosbgm gist (the_geom)<br>Check constraints: "$1" (srid(the_geom) = 103300)<br> "$2" ((geometrytype(the_geom) = 'POINT'::text) OR<br>(the_geom IS NULL))<br><br>And the two sql statements:
<br><br>SELECT the_geom FROM gnosbgm WHERE ((the_geom && 'POLYGON<br>((33595.443392445566 15067.465440617714,281187.7093687274<br>15067.465440617714,281187.7093687274<br>254932.5345593823,33595.443392445566<br>254932.5345593823
,33595.443392445566 15067.465440617714))'))<br><br>SELECT the_geom FROM reflijst WHERE ((the_geom && 'POLYGON<br>((33595.443392445566 15067.465440617714,281187.7093687274<br>15067.465440617714,281187.7093687274<br>
254932.5345593823,33595.443392445566<br>254932.5345593823,33595.443392445566 15067.465440617714))'))<br><br>They are just the same, only the first give me the required answer!<br><br>Grz,<br>Johan<br><br>2006/7/14, Mark Cave-Ayland <
<a href="mailto:m.cave-ayland@webbased.co.uk">m.cave-ayland@webbased.co.uk</a>>:<br>><br>> > -----Original Message-----<br>> > From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net
</a> [mailto:<a href="mailto:postgis-users-">postgis-users-</a><br>> > <a href="mailto:bounces@postgis.refractions.net">bounces@postgis.refractions.net</a>] On Behalf Of Johan V<br>> > Sent: 14 July 2006 12:46
<br>> > To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>> > Subject: Re: [postgis-users] ERROR: Operation on two GEOMETRIES<br>> > withdifferentSRIDs
<br>> ><br>> > Hi Mark and others,<br>> ><br>> > Yes the geometry created on the fly is -1, but this same sql statement<br>> > (with the on the fly created geometry) does work on another table with
<br>> > SRID=103300, but not on this one.<br>> ><br>> > I need this specific sql statement because it is a statement that is<br>> > issued by a software product that makes a WFS/WMS service (GIS Service
<br>> > over the internet) of this table.<br>> ><br>> > So do I have to change or check some thing in the table to be able to<br>> > use this kind of sql statement:<br>> ><br>> > SELECT the_geom FROM table_x WHERE ((the_geom && 'POLYGON((...))')).
<br>> ><br>> > Greetz,<br>> > Johan.<br>><br>><br>> Hi Johan,<br>><br>> Hmmm that makes it a bit more tricky. Unfortunately the SQL being issued is<br>> relying on the implicit cast in PostgreSQL rather than using
<br>> GeomFromText()/setSRID() as documented and so its behaviour may change<br>> across PostgreSQL/PostGIS versions - if you do get a chance to update the<br>> SQL in your client software, I would highly recommend it.
<br>><br>> As for the symptoms you are seeing, I am slightly baffled - can you post the<br>> output of \d <table> for one of your tables that works and your new one that<br>> doesn't, the exact SELECT queries being executed on each table, and can you
<br>> confirm that both tables are in the same database running the same version<br>> of PostGIS?<br>><br>><br>> Kind regards,<br>><br>> Mark.<br>><br>> ------------------------<br>> WebBased Ltd
<br>> 17 Research Way<br>> Plymouth<br>> PL6 8BT<br>><br>> T: +44 (0)1752 797131<br>> F: +44 (0)1752 791023<br>><br>> <a href="http://www.webbased.co.uk">http://www.webbased.co.uk</a><br>> <a href="http://www.infomapper.com">
http://www.infomapper.com</a><br>> <a href="http://www.swtc.co.uk">http://www.swtc.co.uk</a><br>><br>> This email and any attachments are confidential to the intended recipient<br>> and may also be privileged. If you are not the intended recipient please
<br>> delete it from your system and notify the sender. You should not copy it or<br>> use it for any purpose nor disclose or distribute its contents to any other<br>> person.<br>><br>><br>> _______________________________________________
<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>><br><br><br>------------------------------<br><br>Message: 18<br>Date: Fri, 14 Jul 2006 14:42:17 +0100<br>From: "Mark Cave-Ayland" <<a href="mailto:m.cave-ayland@webbased.co.uk">
m.cave-ayland@webbased.co.uk</a>><br>Subject: RE: [postgis-users] ERROR: Operation on two<br> GEOMETRIESwithdifferentSRIDs<br>To: "'PostGIS Users Discussion'"<br> <<a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a>><br>Message-ID: <<a href="mailto:200607141342.k6EDgKQ01681@webbased16.localdomain">200607141342.k6EDgKQ01681@webbased16.localdomain</a>><br>Content-Type: text/plain; charset="us-ascii"
<br><br><br>> -----Original Message-----<br>> From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a> [mailto:<a href="mailto:postgis-users-">postgis-users-
</a><br>> <a href="mailto:bounces@postgis.refractions.net">bounces@postgis.refractions.net</a>] On Behalf Of Johan V<br>> Sent: 14 July 2006 14:31<br>> To: PostGIS Users Discussion<br>> Subject: Re: [postgis-users] ERROR: Operation on two
<br>> GEOMETRIESwithdifferentSRIDs<br>><br>> Hi Mark,<br>><br>> Here are the descriptions of the tables (in the same database running<br>> POSTGIS 0.8.2):<br>><br>> [database_x]=# \d reflijst<br>> Table "
public.reflijst"<br>> Column | Type | Modifiers<br>> -----------+-------------------+-----------<br>> artid | integer |<br>> titre | text |<br>> annee | integer |
<br>> volume | character varying |<br>> firstpage | character varying |<br>> auteurs | text |<br>> publica | text |<br>> strat | character varying |<br>> domg_ol | character varying |
<br>> xlambert | bigint |<br>> ylambert | bigint |<br>> numcarte | integer |<br>> the_geom | geometry |<br>> Check constraints: "$1" (srid(the_geom) = 103300)
<br>> "$2" ((geometrytype(the_geom) =<br>> 'MULTIPOLYGON'::text) OR (the_geom IS NULL))<br>><br>><br>> [database_x]=# \d gnosbgm<br>> Table "public.gnosbgm"
<br>> Column | Type | Modifiers<br>> ------------+------------------------+-----------<br>> id | numeric(28,6) |<br>> gemeente | character varying(254) |<br>> x | numeric(28,6) |
<br>> y | numeric(28,6) |<br>> z | numeric(28,6) |<br>> kaart | character varying(254) |<br>> logdiepte | numeric(28,6) |<br>> diepte | numeric(28,6) |
<br>> bgdnr | character varying(254) |<br>> bgdcode | character varying(254) |<br>> refer | character varying(254) |<br>> hotlink | character varying(254) |<br>> imagepath1 | character varying(254) |
<br>> logcomp | character varying(254) |<br>> date | character varying(10) |<br>> tert_plio | character varying(1) |<br>> tert_mio | character varying(1) |<br>> tert_paleo | character varying(1) |
<br>> tert_eoc | character varying(1) |<br>> tert_oligo | character varying(1) |<br>> primair | character varying(1) |<br>> secundair | character varying(1) |<br>> tertiair | character varying(1) |
<br>> quartair | character varying(1) |<br>> the_geom | geometry |<br>> Indexes: sidx_gnosbgm gist (the_geom)<br>> Check constraints: "$1" (srid(the_geom) = 103300)<br>> "$2" ((geometrytype(the_geom) = 'POINT'::text) OR
<br>> (the_geom IS NULL))<br>><br>> And the two sql statements:<br>><br>> SELECT the_geom FROM gnosbgm WHERE ((the_geom && 'POLYGON<br>> ((33595.443392445566 15067.465440617714,281187.7093687274<br>
> 15067.465440617714,281187.7093687274<br>> 254932.5345593823,33595.443392445566<br>> 254932.5345593823,33595.443392445566 15067.465440617714))'))<br>><br>> SELECT the_geom FROM reflijst WHERE ((the_geom && 'POLYGON
<br>> ((33595.443392445566 15067.465440617714,281187.7093687274<br>> 15067.465440617714,281187.7093687274<br>> 254932.5345593823,33595.443392445566<br>> 254932.5345593823,33595.443392445566 15067.465440617714))'))
<br>><br>> They are just the same, only the first give me the required answer!<br>><br>> Grz,<br>> Johan<br><br><br>Hi Johan,<br><br>I think that the problem is being caused by the fact that in older versions
<br>of PostGIS, index scans ignored the SRID of the geometry during comparisons<br>(they don't have a RECHECK clause) where as sequential scans did take them<br>into account. My guess is that if you force an index scan on your reflijst
<br>table, your query will start to work. Can you try the following in a psql<br>session:<br><br><br>CREATE INDEX sidx_reflijst ON reflijst USING gist (the_geom<br>gist_geometry_ops);<br><br>VACUUM ANALYZE reflijst;<br><br>
SET enable_seqscan = 'f';<br><br>SELECT the_geom FROM reflijst WHERE ((the_geom &&<br>'POLYGON((33595.443392445566 15067.465440617714,281187.7093687274<br>15067.465440617714,281187.7093687274 254932.5345593823,33595.443392445566
<br>254932.5345593823,33595.443392445566 15067.465440617714))'));<br><br><br>Kind regards,<br><br>Mark.<br><br>------------------------<br>WebBased Ltd<br>17 Research Way<br>Plymouth<br>PL6 8BT<br><br>T: +44 (0)1752 797131
<br>F: +44 (0)1752 791023<br><br><a href="http://www.webbased.co.uk">http://www.webbased.co.uk</a><br><a href="http://www.infomapper.com">http://www.infomapper.com</a><br><a href="http://www.swtc.co.uk">http://www.swtc.co.uk
</a><br><br>This email and any attachments are confidential to the intended recipient<br>and may also be privileged. If you are not the intended recipient please<br>delete it from your system and notify the sender. You should not copy it or
<br>use it for any purpose nor disclose or distribute its contents to any other<br>person.<br><br><br><br><br>------------------------------<br><br>Message: 19<br>Date: Fri, 14 Jul 2006 15:49:58 +0200<br>From: "Johan V" <
<a href="mailto:aragorn_jv@yahoo.com">aragorn_jv@yahoo.com</a>><br>Subject: Re: [postgis-users] ERROR: Operation on two<br> GEOMETRIESwithdifferentSRIDs<br>To: "PostGIS Users Discussion" <<a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a>><br>Message-ID:<br> <<a href="mailto:6069fb410607140649q63723449x2a87e6032a44f27b@mail.gmail.com">6069fb410607140649q63723449x2a87e6032a44f27b@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Thanks that seems to work,<br><br>greetz,<br>Johan.<br><br>2006/7/14, Mark Cave-Ayland <<a href="mailto:m.cave-ayland@webbased.co.uk">m.cave-ayland@webbased.co.uk
</a>>:<br>><br>> > -----Original Message-----<br>> > From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a> [mailto:<a href="mailto:postgis-users-">
postgis-users-</a><br>> > <a href="mailto:bounces@postgis.refractions.net">bounces@postgis.refractions.net</a>] On Behalf Of Johan V<br>> > Sent: 14 July 2006 14:31<br>> > To: PostGIS Users Discussion<br>
> > Subject: Re: [postgis-users] ERROR: Operation on two<br>> > GEOMETRIESwithdifferentSRIDs<br>> ><br>> > Hi Mark,<br>> ><br>> > Here are the descriptions of the tables (in the same database running
<br>> > POSTGIS 0.8.2):<br>> ><br>> > [database_x]=# \d reflijst<br>> > Table "public.reflijst"<br>> > Column | Type | Modifiers<br>> > -----------+-------------------+-----------
<br>> > artid | integer |<br>> > titre | text |<br>> > annee | integer |<br>> > volume | character varying |<br>> > firstpage | character varying |
<br>> > auteurs | text |<br>> > publica | text |<br>> > strat | character varying |<br>> > domg_ol | character varying |<br>> > xlambert | bigint |
<br>> > ylambert | bigint |<br>> > numcarte | integer |<br>> > the_geom | geometry |<br>> > Check constraints: "$1" (srid(the_geom) = 103300)<br>> > "$2" ((geometrytype(the_geom) =
<br>> > 'MULTIPOLYGON'::text) OR (the_geom IS NULL))<br>> ><br>> ><br>> > [database_x]=# \d gnosbgm<br>> > Table "public.gnosbgm"<br>> > Column | Type | Modifiers
<br>> > ------------+------------------------+-----------<br>> > id | numeric(28,6) |<br>> > gemeente | character varying(254) |<br>> > x | numeric(28,6) |<br>
> > y | numeric(28,6) |<br>> > z | numeric(28,6) |<br>> > kaart | character varying(254) |<br>> > logdiepte | numeric(28,6) |<br>> > diepte | numeric(28,6) |
<br>> > bgdnr | character varying(254) |<br>> > bgdcode | character varying(254) |<br>> > refer | character varying(254) |<br>> > hotlink | character varying(254) |<br>> > imagepath1 | character varying(254) |
<br>> > logcomp | character varying(254) |<br>> > date | character varying(10) |<br>> > tert_plio | character varying(1) |<br>> > tert_mio | character varying(1) |<br>> > tert_paleo | character varying(1) |
<br>> > tert_eoc | character varying(1) |<br>> > tert_oligo | character varying(1) |<br>> > primair | character varying(1) |<br>> > secundair | character varying(1) |<br>> > tertiair | character varying(1) |
<br>> > quartair | character varying(1) |<br>> > the_geom | geometry |<br>> > Indexes: sidx_gnosbgm gist (the_geom)<br>> > Check constraints: "$1" (srid(the_geom) = 103300)
<br>> > "$2" ((geometrytype(the_geom) = 'POINT'::text) OR<br>> > (the_geom IS NULL))<br>> ><br>> > And the two sql statements:<br>> ><br>> > SELECT the_geom FROM gnosbgm WHERE ((the_geom && 'POLYGON
<br>> > ((33595.443392445566 15067.465440617714,281187.7093687274<br>> > 15067.465440617714,281187.7093687274<br>> > 254932.5345593823,33595.443392445566<br>> > 254932.5345593823,33595.443392445566
15067.465440617714))'))<br>> ><br>> > SELECT the_geom FROM reflijst WHERE ((the_geom && 'POLYGON<br>> > ((33595.443392445566 15067.465440617714,281187.7093687274<br>> > 15067.465440617714,
281187.7093687274<br>> > 254932.5345593823,33595.443392445566<br>> > 254932.5345593823,33595.443392445566 15067.465440617714))'))<br>> ><br>> > They are just the same, only the first give me the required answer!
<br>> ><br>> > Grz,<br>> > Johan<br>><br>><br>> Hi Johan,<br>><br>> I think that the problem is being caused by the fact that in older versions<br>> of PostGIS, index scans ignored the SRID of the geometry during comparisons
<br>> (they don't have a RECHECK clause) where as sequential scans did take them<br>> into account. My guess is that if you force an index scan on your reflijst<br>> table, your query will start to work. Can you try the following in a psql
<br>> session:<br>><br>><br>> CREATE INDEX sidx_reflijst ON reflijst USING gist (the_geom<br>> gist_geometry_ops);<br>><br>> VACUUM ANALYZE reflijst;<br>><br>> SET enable_seqscan = 'f';<br>><br>
> SELECT the_geom FROM reflijst WHERE ((the_geom &&<br>> 'POLYGON((33595.443392445566 15067.465440617714,281187.7093687274<br>> 15067.465440617714,281187.7093687274 254932.5345593823,33595.443392445566<br>
> 254932.5345593823,33595.443392445566 15067.465440617714))'));<br>><br>><br>> Kind regards,<br>><br>> Mark.<br>><br>> ------------------------<br>> WebBased Ltd<br>> 17 Research Way<br>> Plymouth
<br>> PL6 8BT<br>><br>> T: +44 (0)1752 797131<br>> F: +44 (0)1752 791023<br>><br>> <a href="http://www.webbased.co.uk">http://www.webbased.co.uk</a><br>> <a href="http://www.infomapper.com">http://www.infomapper.com
</a><br>> <a href="http://www.swtc.co.uk">http://www.swtc.co.uk</a><br>><br>> This email and any attachments are confidential to the intended recipient<br>> and may also be privileged. If you are not the intended recipient please
<br>> delete it from your system and notify the sender. You should not copy it or<br>> use it for any purpose nor disclose or distribute its contents to any other<br>> person.<br>><br>><br>> _______________________________________________
<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>><br><br><br>------------------------------<br><br>Message: 20<br>Date: Fri, 14 Jul 2006 10:51:00 -0300<br>From: Ezequias Rodrigues da Rocha <<a href="mailto:ezequias@recife.pe.gov.br">
ezequias@recife.pe.gov.br</a>><br>Subject: Re: [postgis-users] ERROR: Operation on two GEOMETRIES<br> withdifferentSRIDs<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a>><br>Message-ID: <<a href="mailto:44B7A144.5040300@recife.pe.gov.br">44B7A144.5040300@recife.pe.gov.br</a>><br>Content-Type: text/plain; charset="iso-8859-1"<br>
<br>Something like this ?<br><br>*update mul.lotes set geometry = setsrid(geometry, 29185); *<br><br>where geometry is the geometry field of my geographic table. ;-)<br><br>It works for me but I do not know how to recreate the constraint I must
<br>delete.<br><br>Can anyone help me :<br><br>CONSTRAINT enforce_srid_geometry CHECK (srid(geometry) = 29185)<br><br>Regards.<br>Ezequias<br><br>Mark Cave-Ayland escreveu:<br>>> -----Original Message-----<br>>> From:
<a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a> [mailto:<a href="mailto:postgis-users-">postgis-users-</a><br>>> <a href="mailto:bounces@postgis.refractions.net">
bounces@postgis.refractions.net</a>] On Behalf Of Johan V<br>>> Sent: 14 July 2006 12:46<br>>> To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>>> Subject: Re: [postgis-users] ERROR: Operation on two GEOMETRIES
<br>>> withdifferentSRIDs<br>>><br>>> Hi Mark and others,<br>>><br>>> Yes the geometry created on the fly is -1, but this same sql statement<br>>> (with the on the fly created geometry) does work on another table with
<br>>> SRID=103300, but not on this one.<br>>><br>>> I need this specific sql statement because it is a statement that is<br>>> issued by a software product that makes a WFS/WMS service (GIS Service
<br>>> over the internet) of this table.<br>>><br>>> So do I have to change or check some thing in the table to be able to<br>>> use this kind of sql statement:<br>>><br>>> SELECT the_geom FROM table_x WHERE ((the_geom && 'POLYGON((...))')).
<br>>><br>>> Greetz,<br>>> Johan.<br>>><br>><br>><br>> Hi Johan,<br>><br>> Hmmm that makes it a bit more tricky. Unfortunately the SQL being issued is<br>> relying on the implicit cast in PostgreSQL rather than using
<br>> GeomFromText()/setSRID() as documented and so its behaviour may change<br>> across PostgreSQL/PostGIS versions - if you do get a chance to update the<br>> SQL in your client software, I would highly recommend it.
<br>><br>> As for the symptoms you are seeing, I am slightly baffled - can you post the<br>> output of \d <table> for one of your tables that works and your new one that<br>> doesn't, the exact SELECT queries being executed on each table, and can you
<br>> confirm that both tables are in the same database running the same version<br>> of PostGIS?<br>><br>><br>> Kind regards,<br>><br>> Mark.<br>><br>> ------------------------<br>> WebBased Ltd
<br>> 17 Research Way<br>> Plymouth<br>> PL6 8BT<br>><br>> T: +44 (0)1752 797131<br>> F: +44 (0)1752 791023<br>><br>> <a href="http://www.webbased.co.uk">http://www.webbased.co.uk</a><br>> <a href="http://www.infomapper.com">
http://www.infomapper.com</a><br>> <a href="http://www.swtc.co.uk">http://www.swtc.co.uk</a><br>><br>> This email and any attachments are confidential to the intended recipient<br>> and may also be privileged. If you are not the intended recipient please
<br>> delete it from your system and notify the sender. You should not copy it or<br>> use it for any purpose nor disclose or distribute its contents to any other<br>> person.<br>><br>><br>> _______________________________________________
<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>><br>><br><br>--<br>Ezequias Rodrigues da Rocha<br><a href="http://ezequiasrocha.blogspot.com">http://ezequiasrocha.blogspot.com</a><br><a href="mailto:msn:ezequias@hotmail.com">
msn:ezequias@hotmail.com</a><br>"the worst of democracies is still better than the best of dictatorship"<br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://lists.refractions.net/pipermail/postgis-users/attachments/20060714/f12da7b6/attachment-0001.html">
http://lists.refractions.net/pipermail/postgis-users/attachments/20060714/f12da7b6/attachment-0001.html</a><br><br>------------------------------<br><br>Message: 21<br>Date: Fri, 14 Jul 2006 10:04:05 -0400<br>From: "Robert Burgholzer" <
<a href="mailto:rburghol@chesapeakebay.net">rburghol@chesapeakebay.net</a>><br>Subject: RE: [postgis-users] Who is Using PostGIS? For What?<br>To: "PostGIS Users Discussion" <<a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a>><br>Message-ID:<br> <<a href="mailto:C9D51E2209AFD04F93E4E2E4CD6E497901A1278F@mail1.chesapeakebay.net">C9D51E2209AFD04F93E4E2E4CD6E497901A1278F@mail1.chesapeakebay.net
</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br> Who are you?<br>Robert Burgholzer, Non-point Source Data Analyst, Chesapeake Bay Program<br> What are you using PostGIS for?<br>As a spatial analysis tool, and GIS engine for a web-based non-point
<br>source pollution model of the Chesapeake Bay watershed (64,000 square<br>miles)<br> Why did you choose PostGIS?<br>Open Source, full geo-processing capability<br> What makes you happy about your PostGIS installation?
<br>Flexibility, utility, and general all-around awesome-ness of the<br>product.<br> What makes you unhappy about your PostGIS installation?<br>Wish there was more support for read-write in AcrGIS >= 8<br><br>-----Original Message-----
<br>From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a><br>[mailto:<a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net
</a>] On Behalf Of Paul<br>Ramsey<br>Sent: Wednesday, July 12, 2006 1:36 PM<br>To: PostGIS Users Discussion<br>Subject: [postgis-users] Who is Using PostGIS? For What?<br><br><br>It is that time of year again (conference time) so I am going to ask my
<br>annual question(s):<br><br> Who are you?<br> What are you using PostGIS for?<br> Why did you choose PostGIS?<br> What makes you happy about your PostGIS installation?<br> What makes you unhappy about your PostGIS installation?
<br><br>Those who want to remain in confidence, but still want to make their<br>feelings known, please respond to me directly.<br><br>I am going to be writing up a handful of PostGIS users into full<br>white-papers for the web site and my own conference talks, so please, if
<br><br>you think you have a compelling PostGIS story, start by giving us a<br>summary here on the list!<br><br>I love hearing these stories!<br><br>Paul<br>_______________________________________________<br>postgis-users mailing list
<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users
</a><br><br><br>------------------------------<br><br>Message: 22<br>Date: Fri, 14 Jul 2006 15:58:24 +0200<br>From: Markus Schaber <<a href="mailto:schabi@logix-tt.com">schabi@logix-tt.com</a>><br>Subject: Re: [postgis-users] Who is Using PostGIS? For What?
<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>Message-ID: <<a href="mailto:44B7A300.6070507@logix-tt.com">44B7A300.6070507@logix-tt.com
</a>><br>Content-Type: text/plain; charset=ISO-8859-15<br><br>Hi, Paul,<br><br>Paul Ramsey wrote:<br><br>> Who are you?<br><br>Markus Schaber, GIS Software developer for Logical Tracking & Tracing<br>International AG, Switzerland
<br><br>> What are you using PostGIS for?<br><br>Storage and processing of tracking data.<br><br>Storage and processing of geodata (Street network etc.) for map display.<br><br>Storage and preprocessing of geodata for other applications (routing,
<br>geocoding etc.)<br><br>> Why did you choose PostGIS?<br><br>The per-CPU license for oracle spatial is more expensive than paying a<br>developer to tweak PostGIS to our needs.<br><br>> What makes you happy about your PostGIS installation?
<br><br>It works (most of the time :-)<br><br>> What makes you unhappy about your PostGIS installation?<br><br>Debian packages situation is somehow unstable.<br><br>HTH,<br>Markus<br><br>--<br>Markus Schaber | Logical Tracking&Tracing International AG
<br>Dipl. Inf. | Software Development GIS<br><br>Fight against software patents in EU! <a href="http://www.ffii.org">www.ffii.org</a> <a href="http://www.nosoftwarepatents.org">www.nosoftwarepatents.org</a><br><br><br>
------------------------------<br><br>Message: 23<br>Date: Fri, 14 Jul 2006 16:42:02 +0100<br>From: "Mark Cave-Ayland" <<a href="mailto:m.cave-ayland@webbased.co.uk">m.cave-ayland@webbased.co.uk</a>><br>Subject: RE: [postgis-users] ERROR: Operation on
<br> twoGEOMETRIESwithdifferentSRIDs<br>To: "'PostGIS Users Discussion'"<br> <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>Message-ID: <
<a href="mailto:200607141542.k6EFg7Q06367@webbased16.localdomain">200607141542.k6EFg7Q06367@webbased16.localdomain</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br>> -----Original Message-----
<br>> From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a> [mailto:<a href="mailto:postgis-users-">postgis-users-</a><br>> <a href="mailto:bounces@postgis.refractions.net">
bounces@postgis.refractions.net</a>] On Behalf Of Johan V<br>> Sent: 14 July 2006 14:50<br>> To: PostGIS Users Discussion<br>> Subject: Re: [postgis-users] ERROR: Operation on<br>> twoGEOMETRIESwithdifferentSRIDs
<br>><br>> Thanks that seems to work,<br>><br>> greetz,<br>> Johan.<br><br><br>Hi Johan,<br><br>That's great news - but don't forget to correct the error in your client<br>software as soon as you can - definitely PostGIS >=
1.0.0 won't like this,<br>and in fact I don't even think you can upgrade to PostGIS 0.9 without these<br>client queries failing :(<br><br><br>Kind regards,<br><br>Mark.<br><br>------------------------<br>WebBased Ltd<br>17 Research Way
<br>Plymouth<br>PL6 8BT<br><br>T: +44 (0)1752 797131<br>F: +44 (0)1752 791023<br><br><a href="http://www.webbased.co.uk">http://www.webbased.co.uk</a><br><a href="http://www.infomapper.com">http://www.infomapper.com</a><br>
<a href="http://www.swtc.co.uk">http://www.swtc.co.uk</a><br><br>This email and any attachments are confidential to the intended recipient<br>and may also be privileged. If you are not the intended recipient please<br>delete it from your system and notify the sender. You should not copy it or
<br>use it for any purpose nor disclose or distribute its contents to any other<br>person.<br><br><br><br><br>------------------------------<br><br>Message: 24<br>Date: Fri, 14 Jul 2006 16:47:08 +0100<br>From: "Mark Cave-Ayland" <
<a href="mailto:m.cave-ayland@webbased.co.uk">m.cave-ayland@webbased.co.uk</a>><br>Subject: RE: [postgis-users] ERROR: Operation on twoGEOMETRIES<br> withdifferentSRIDs<br>To: "'PostGIS Users Discussion'"
<br> <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>Message-ID: <<a href="mailto:200607141547.k6EFlDQ06582@webbased16.localdomain">200607141547.k6EFlDQ06582@webbased16.localdomain
</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br>Hi Ezequias,<br><br><br><br>You should be able to find this information in the PostgreSQL documentation<br>for ALTER TABLE at<br><a href="http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html">
http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html</a>.<br><br><br><br><br><br>Kind regards,<br><br><br><br>Mark.<br><br>------------------------<br>WebBased Ltd<br>17 Research Way<br>Plymouth<br>PL6 8BT<br>
<br>T: +44 (0)1752 797131<br>F: +44 (0)1752 791023<br><br><a href="http://www.webbased.co.uk">http://www.webbased.co.uk</a><br><a href="http://www.infomapper.com">http://www.infomapper.com</a><br><a href="http://www.swtc.co.uk">
http://www.swtc.co.uk</a><br><br>This email and any attachments are confidential to the intended recipient<br>and may also be privileged. If you are not the intended recipient please<br>delete it from your system and notify the sender. You should not copy it or
<br>use it for any purpose nor disclose or distribute its contents to any other<br>person.<br><br> _____<br><br>From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net
</a><br>[mailto:<a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a>] On Behalf Of Ezequias<br>Rodrigues da Rocha<br>Sent: 14 July 2006 14:51<br>To: PostGIS Users Discussion
<br>Subject: Re: [postgis-users] ERROR: Operation on twoGEOMETRIES<br>withdifferentSRIDs<br><br><br><br>Something like this ?<br><br>update mul.lotes set geometry = setsrid(geometry, 29185);<br><br>where geometry is the geometry field of my geographic table. ;-)
<br><br>It works for me but I do not know how to recreate the constraint I must<br>delete.<br><br>Can anyone help me :<br><br>CONSTRAINT enforce_srid_geometry CHECK (srid(geometry) = 29185)<br><br>Regards.<br>Ezequias<br>
<br>Mark Cave-Ayland escreveu:<br><br>-----Original Message-----<br>From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a> [mailto:<a href="mailto:postgis-users-">
postgis-users-</a><br><a href="mailto:bounces@postgis.refractions.net">bounces@postgis.refractions.net</a>] On Behalf Of Johan V<br>Sent: 14 July 2006 12:46<br>To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a><br>Subject: Re: [postgis-users] ERROR: Operation on two GEOMETRIES<br>withdifferentSRIDs<br><br>Hi Mark and others,<br><br>Yes the geometry created on the fly is -1, but this same sql statement<br>(with the on the fly created geometry) does work on another table with
<br>SRID=103300, but not on this one.<br><br>I need this specific sql statement because it is a statement that is<br>issued by a software product that makes a WFS/WMS service (GIS Service<br>over the internet) of this table.
<br><br>So do I have to change or check some thing in the table to be able to<br>use this kind of sql statement:<br><br>SELECT the_geom FROM table_x WHERE ((the_geom && 'POLYGON((...))')).<br><br>Greetz,<br>Johan.
<br><br><br><br><br>Hi Johan,<br><br>Hmmm that makes it a bit more tricky. Unfortunately the SQL being issued is<br>relying on the implicit cast in PostgreSQL rather than using<br>GeomFromText()/setSRID() as documented and so its behaviour may change
<br>across PostgreSQL/PostGIS versions - if you do get a chance to update the<br>SQL in your client software, I would highly recommend it.<br><br>As for the symptoms you are seeing, I am slightly baffled - can you post the
<br>output of \d <table> for one of your tables that works and your new one that<br>doesn't, the exact SELECT queries being executed on each table, and can you<br>confirm that both tables are in the same database running the same version
<br>of PostGIS?<br><br><br>Kind regards,<br><br>Mark.<br><br>------------------------<br>WebBased Ltd<br>17 Research Way<br>Plymouth<br>PL6 8BT<br><br>T: +44 (0)1752 797131<br>F: +44 (0)1752 791023<br><br><a href="http://www.webbased.co.uk">
http://www.webbased.co.uk</a><br><a href="http://www.infomapper.com">http://www.infomapper.com</a><br><a href="http://www.swtc.co.uk">http://www.swtc.co.uk</a><br><br>This email and any attachments are confidential to the intended recipient
<br>and may also be privileged. If you are not the intended recipient please<br>delete it from your system and notify the sender. You should not copy it or<br>use it for any purpose nor disclose or distribute its contents to any other
<br>person.<br><br><br>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br><br><br><br><br><br><br>--<br>Ezequias Rodrigues da Rocha<br><a href="http://ezequiasrocha.blogspot.com">http://ezequiasrocha.blogspot.com</a><br><a href="mailto:msn:ezequias@hotmail.com">
msn:ezequias@hotmail.com</a><br>"the worst of democracies is still better than the best of dictatorship"<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://lists.refractions.net/pipermail/postgis-users/attachments/20060714/a0e361da/attachment-0001.html">
http://lists.refractions.net/pipermail/postgis-users/attachments/20060714/a0e361da/attachment-0001.html</a><br><br>------------------------------<br><br>Message: 25<br>Date: Fri, 14 Jul 2006 15:54:44 -0300<br>From: Eduardo Lu?s Garcia Escovar <
<a href="mailto:eduardo.escovar@3wt.com.br">eduardo.escovar@3wt.com.br</a>><br>Subject: Re: [postgis-users] Who is Using PostGIS? For What?<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a>><br>Message-ID: <<a href="mailto:44B7E874.3060109@3wt.com.br">44B7E874.3060109@3wt.com.br</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Hi Paul,
<br><br>Paul Ramsey escreveu:<br>><br>> It is that time of year again (conference time) so I am going to ask my<br>> annual question(s):<br>><br>> Who are you?<br>Eduardo Escovar, Computer Engineer working on a GIS Project for 3WT, Brazil.
<br>> What are you using PostGIS for?<br>We are developing a GIS application in conjunction with the 38th<br>Battalion of Military Police in São Carlos city. Basically, this GIS<br>application shows a city map where it is possible to monitor police
<br>vehicles (equipped with GPS) and occurrences, as well as recommending<br>directions to attend these occurrences.<br>> Why did you choose PostGIS?<br>Because it is free, works with Linux, and is well documented.
<br>> What makes you happy about your PostGIS installation?<br>It is easy to use, and it works. :-)<br>> What makes you unhappy about your PostGIS installation?<br>It is hard to learn how to make a hard upgrade. Specially if you don't
<br>install things on default directories, or if you run PostgreSQL on a<br>different port.<br>But I've learned how to deal with it. ;-)<br><br>Regards,<br>Eduardo<br><br><br>------------------------------<br><br>_______________________________________________
<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users
</a><br><br><br>End of postgis-users Digest, Vol 45, Issue 14<br>*********************************************<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br><br>Mark Thomas<br><a href="mailto:spatialguru.net@gmail.com">
spatialguru.net@gmail.com</a><br>205.529.9013