As an aside, at the end of this year the census bureau will be relaesing the TIGER/line files in shapefile format, which should help out working with it.  Just an FYI.<br><br><div><span class="gmail_quote">On 2/3/07, <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. Re: Lat/lon bounding box to area? (Paul Ramsey)<br>   2. Re: How best to do this? (Mark Thomas)<br>   3. Re: Lat/lon bounding box to area? (Mark Thomas)<br>   4. Geocoding (Stone, Matthew (DHS-HISP))
<br>   5. RE: Geocoding (Rob Tester)<br>   6. Re: Geocoding (Brad Ediger)<br>   7. Re: Geocoding (Brent Pedersen)<br>   8. RE: Geocoding (<a href="mailto:Doug_Newcomb@fws.gov">Doug_Newcomb@fws.gov</a>)<br>   9. Re: Geocoding (Dan Putler)
<br>  10. Re: How best to do this? (Mark Cave-Ayland)<br>  11. Re: Errors in jdbc rpm build on Fedora Core 6 (Mark Cave-Ayland)<br>  12. GEOS 3.0.0rc4 (Paul Ramsey)<br>  13. Re: GEOS 3.0.0rc4 (TECHER David)<br>  14. Re: Errors in jdbc rpm build on Fedora Core 6 (Devrim GUNDUZ)
<br>  15. Re: How best to do this? (Stephen Woodbridge)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Fri, 02 Feb 2007 11:11:20 -0800<br>From: Paul Ramsey <
<a href="mailto:pramsey@refractions.net">pramsey@refractions.net</a>><br>Subject: Re: [postgis-users] Lat/lon bounding box to area?<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:45C38CD8.5080605@refractions.net">45C38CD8.5080605@refractions.net</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>How accurate do you need your area to be? Best bet would be to treat the<br>lat/lon "box" as a trapezoid (which more closely approximates its<br>"ground shape"). Use distance_sphere or distance_spheroid to calculate
<br>the metric length of the top and bottom and the height, then basic math<br>to calculate the area.<br><br>P<br><br>Steve Benzo wrote:<br>> Hi,<br>><br>> This might be a stupid question, but is there a way using PostGIS that I
<br>> can take a bounding box (polyline) supplied by a user (they're drawing a<br>> box on the map, from which I get the xmin/ymin/etc from), which I'd like<br>> to use to get an area from (utlimately acres). My first step will be to
<br>> get that polyline into PostGIS (struggling, but should be able to figure<br>> it out) and then apply a trigger which populates an area field from<br>> that. Thanks in advance.<br>><br>> SB<br>><br>
> ------------------------------------------------------------------------<br>> Check out the all-new Yahoo! Mail beta<br>> <<a href="http://us.rd.yahoo.com/evt=43257/*http://advision.webevents.yahoo.com/mailbeta">
http://us.rd.yahoo.com/evt=43257/*http://advision.webevents.yahoo.com/mailbeta</a>><br>> - Fire up a more powerful email and get things done faster.<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>--<br><br>   Paul Ramsey<br>   Refractions Research<br>   <a href="http://www.refractions.net">http://www.refractions.net</a><br>   <a href="mailto:pramsey@refractions.net">
pramsey@refractions.net</a><br>   Phone: 250-383-3022<br>   Cell: 250-885-0632<br><br><br>------------------------------<br><br>Message: 2<br>Date: Fri, 2 Feb 2007 13:23:35 -0600<br>From: "Mark Thomas" <<a href="mailto:spatialguru.net@gmail.com">
spatialguru.net@gmail.com</a>><br>Subject: Re: [postgis-users] How best to do this?<br>To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>Message-ID:<br>        <
<a href="mailto:2b5aa3d50702021123x16a45ae7w299bd99146dfd428@mail.gmail.com">2b5aa3d50702021123x16a45ae7w299bd99146dfd428@mail.gmail.com</a>><br>Content-Type: text/plain; charset="utf-8"<br><br>For the error with Union, I had this happen yesterday.  To solve, I used
<br>Simplify(geom,<very small number>) before passing to GeomUnion.  that might<br>work for you.<br><br>On 2/2/07, <a href="mailto:postgis-users-request@postgis.refractions.net">postgis-users-request@postgis.refractions.net
</a> <<br><a href="mailto:postgis-users-request@postgis.refractions.net">postgis-users-request@postgis.refractions.net</a>> wrote:<br>><br>> 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. How best to do this? (Stephen Woodbridge)<br>>    2. Re: How best to do this? (Stephen Woodbridge)
<br>>    3. Re: How best to do this? (Paul Ramsey)<br>>    4. Re: pg_restore problem - linked to different versions?<br>>       (Mark Cave-Ayland)<br>>    5. Errors in jdbc rpm build on Fedora Core 6 (Dido)<br>
>    6. Re: pg_restore problem - linked to different versions?<br>>       (Stefan Schwarzer)<br>>    7. Re: How best to do this? (Stephen Woodbridge)<br>>    8. Re: How best to do this? (Paul Ramsey)<br>>    9. Lat/lon bounding box to area? (Steve Benzo)
<br>><br>><br>> ----------------------------------------------------------------------<br>><br>> Message: 1<br>> Date: Thu, 01 Feb 2007 22:34:38 -0500<br>> From: Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com">
woodbri@swoodbridge.com</a>><br>> Subject: [postgis-users] How best to do this?<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:45C2B14E.2070904@swoodbridge.com">45C2B14E.2070904@swoodbridge.com</a>><br>> Content-Type: text/plain; charset=UTF-8; format=flowed<br>><br>> Hi all,<br>><br>> Sorry the subject line is not more useful, but let me explain.
<br>><br>> 1) I have a set of polgons A and another set of polygon B<br>> 2) I need to a new set of polygons C that are the union of<br>>     A intersect B and A difference B<br>><br>> So basically B partially covers A and I want to split polygons in a into
<br>> the covered piece(s) and that that is not covered.<br>><br>> On the surface this is very straight forward, but it isn't ...<br>><br>> insert into newtable (....)<br>>     select ..., intersection(
A.the_geom, B.the_geom) as the_geom<br>>       from A, B<br>>       where A.the_geom && B.the_geom and<br>>         intersects(A.the_geom, B.the_geom);<br>><br>> This works, but I get a bunch of GEOMETRYCOLLECTION objects in the
<br>> results and out of 1022 collection I have 2780 additional POLYGONs.<br>><br>> So I could do something like:<br>><br>> insert into newtable (....)<br>>      select * from<br>>        (select ..., (dump(the_geom)).geom as the_geom from newtable
<br>>           where geometrytype(the_geom)='GEOMETRYCOLLECTION' ) as foo<br>>      where geometrytype(the_geom)='POLYGON';<br>><br>> delete from newtable where geometrytype(the_geom)='GEOMETRYCOLLECTION';
<br>><br>> So now comes the tricky part how do you do the difference? I was<br>> thinking I could take A difference newtable but because I have multiple<br>> little pieces instead of a single piece, I think I am getting:
<br>>    (A - Part1), (A - Part2), (A - Part3) instead of<br>>    (A - Part1 - Part2 - Part3)<br>><br>> So I think I need to union the polygon pieces from each row that is<br>> dumped above. Is that as simple as tossing part of the dump into a
<br>> geomunion()? How would that look?<br>><br>> -Steve W<br>><br>><br>> ------------------------------<br>><br>> Message: 2<br>> Date: Fri, 02 Feb 2007 00:01:39 -0500<br>> From: Stephen Woodbridge <
<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>><br>> Subject: Re: [postgis-users] How best to do this?<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:45C2C5B3.2020709@swoodbridge.com">45C2C5B3.2020709@swoodbridge.com</a>><br>> Content-Type: text/plain; charset=UTF-8; format=flowed
<br>><br>> OK, one step forward and two steps backward ...<br>><br>> I was about to get rid of my gemetrycollections with:<br>><br>> update newtable set the_geom =<br>>   (select geomunion(geom1) from
<br>>     (select (dump(the_geom)).geom as geom1) as foo<br>>      where geometrytype(geom1)='POLYGON'<br>>   )<br>>   where geometrytype(the_geom)='GEOMETRYCOLLECTION';<br>><br>> This worked very nicely once I figured out that this was the way to
<br>> solve the problem. So now each geometry collection is converted into a<br>> polygon or multipolygon and all the linestring and point artifacts of<br>> the intersection are removed.<br>><br>> select distinct geometrytype(the_geom) from soils2;
<br>> POLYGON<br>> MULTIPOLYGON<br>><br>> select * from soils where not isvalid(the_geom);<br>> reports 0 rows<br>><br>> insert into newtable (..., the_geom)<br>>    select A....,<br>>           difference(
A.the_geom, B.the_geom) as the_geom<br>>    from A, B<br>>    where A.the_geom && B.the_geom and overlaps(A.the_geom, B.the_geom);<br>><br>> NOTICE:  TopologyException: no outgoing dirEdge found<br>> (287030,892621,892621)
<br>><br>> ERROR:  GEOS difference() threw an error!<br>><br>> Now what do I do??? If I have to upgrade it might be easiest to upgrade<br>> my WinXP laptop if there is an easy way to do that, then dump and load
<br>> the data to that.<br>><br>> select postgis_full_version();<br>> "POSTGIS="1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004"<br>> USE_STATS (procs from 1.1.1
 need upgrade)"<br>><br>> select version();<br>> "PostgreSQL 8.0.8 on i386-portbld-freebsd5.3, compiled by GCC cc (GCC)<br>> 3.4.2 [FreeBSD] 20040728"<br>><br>> -Steve<br>><br>> Stephen Woodbridge wrote:
<br>> > Hi all,<br>> ><br>> > Sorry the subject line is not more useful, but let me explain.<br>> ><br>> > 1) I have a set of polgons A and another set of polygon B<br>> > 2) I need to a new set of polygons C that are the union of
<br>> >    A intersect B and A difference B<br>> ><br>> > So basically B partially covers A and I want to split polygons in a into<br>> > the covered piece(s) and that that is not covered.<br>> >
<br>> > On the surface this is very straight forward, but it isn't ...<br>> ><br>> > insert into newtable (....)<br>> >    select ..., intersection(A.the_geom, B.the_geom) as the_geom<br>> >      from A, B
<br>> >      where A.the_geom && B.the_geom and<br>> >        intersects(A.the_geom, B.the_geom);<br>> ><br>> > This works, but I get a bunch of GEOMETRYCOLLECTION objects in the<br>> > results and out of 1022 collection I have 2780 additional POLYGONs.
<br>> ><br>> > So I could do something like:<br>> ><br>> > insert into newtable (....)<br>> >     select * from<br>> >       (select ..., (dump(the_geom)).geom as the_geom from newtable
<br>> >          where geometrytype(the_geom)='GEOMETRYCOLLECTION' ) as foo<br>> >     where geometrytype(the_geom)='POLYGON';<br>> ><br>> > delete from newtable where geometrytype(the_geom)='GEOMETRYCOLLECTION';
<br>> ><br>> > So now comes the tricky part how do you do the difference? I was<br>> > thinking I could take A difference newtable but because I have multiple<br>> > little pieces instead of a single piece, I think I am getting:
<br>> >   (A - Part1), (A - Part2), (A - Part3) instead of<br>> >   (A - Part1 - Part2 - Part3)<br>> ><br>> > So I think I need to union the polygon pieces from each row that is<br>> > dumped above. Is that as simple as tossing part of the dump into a
<br>> > geomunion()? How would that look?<br>> ><br>> > -Steve W<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: 3<br>> Date: Thu, 1 Feb 2007 21:14:22 -0800<br>> From: Paul Ramsey <<a href="mailto:pramsey@refractions.net">pramsey@refractions.net</a>><br>> Subject: Re: [postgis-users] How best to do this?
<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:D2E872F9-F43D-41DE-868C-F936776CECAD@refractions.net">
D2E872F9-F43D-41DE-868C-F936776CECAD@refractions.net</a>><br>> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed<br>><br>> GEOS 3 does include a number of fixes that will help difference and
<br>> union.<br>><br>> P<br>><br>> On 1-Feb-07, at 9:01 PM, Stephen Woodbridge wrote:<br>><br>> > OK, one step forward and two steps backward ...<br>> ><br>> > I was about to get rid of my gemetrycollections with:
<br>> ><br>> > update newtable set the_geom =<br>> >  (select geomunion(geom1) from<br>> >    (select (dump(the_geom)).geom as geom1) as foo<br>> >     where geometrytype(geom1)='POLYGON'
<br>> >  )<br>> >  where geometrytype(the_geom)='GEOMETRYCOLLECTION';<br>> ><br>> > This worked very nicely once I figured out that this was the way to<br>> > solve the problem. So now each geometry collection is converted
<br>> > into a polygon or multipolygon and all the linestring and point<br>> > artifacts of the intersection are removed.<br>> ><br>> > select distinct geometrytype(the_geom) from soils2;<br>> > POLYGON
<br>> > MULTIPOLYGON<br>> ><br>> > select * from soils where not isvalid(the_geom);<br>> > reports 0 rows<br>> ><br>> > insert into newtable (..., the_geom)<br>> >   select A....,
<br>> >          difference(A.the_geom, B.the_geom) as the_geom<br>> >   from A, B<br>> >   where A.the_geom && B.the_geom and overlaps(A.the_geom, B.the_geom);<br>> ><br>> > NOTICE:  TopologyException: no outgoing dirEdge found
<br>> > (287030,892621,892621)<br>> ><br>> > ERROR:  GEOS difference() threw an error!<br>> ><br>> > Now what do I do??? If I have to upgrade it might be easiest to<br>> > upgrade my WinXP laptop if there is an easy way to do that, then
<br>> > dump and load the data to that.<br>> ><br>> > select postgis_full_version();<br>> > "POSTGIS="1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct<br>> > 2004" USE_STATS (procs from 
1.1.1 need upgrade)"<br>> ><br>> > select version();<br>> > "PostgreSQL 8.0.8 on i386-portbld-freebsd5.3, compiled by GCC cc<br>> > (GCC) 3.4.2 [FreeBSD] 20040728"<br>> ><br>> > -Steve
<br>> ><br>> > Stephen Woodbridge wrote:<br>> >> Hi all,<br>> >> Sorry the subject line is not more useful, but let me explain.<br>> >> 1) I have a set of polgons A and another set of polygon B
<br>> >> 2) I need to a new set of polygons C that are the union of<br>> >>    A intersect B and A difference B<br>> >> So basically B partially covers A and I want to split polygons in<br>> >> a into the covered piece(s) and that that is not covered.
<br>> >> On the surface this is very straight forward, but it isn't ...<br>> >> insert into newtable (....)<br>> >>    select ..., intersection(A.the_geom, B.the_geom) as the_geom<br>> >>      from A, B
<br>> >>      where A.the_geom && B.the_geom and<br>> >>        intersects(A.the_geom, B.the_geom);<br>> >> This works, but I get a bunch of GEOMETRYCOLLECTION objects in the<br>> >> results and out of 1022 collection I have 2780 additional POLYGONs.
<br>> >> So I could do something like:<br>> >> insert into newtable (....)<br>> >>     select * from<br>> >>       (select ..., (dump(the_geom)).geom as the_geom from newtable<br>> >>          where geometrytype(the_geom)='GEOMETRYCOLLECTION' ) as foo
<br>> >>     where geometrytype(the_geom)='POLYGON';<br>> >> delete from newtable where geometrytype(the_geom)<br>> >> ='GEOMETRYCOLLECTION';<br>> >> So now comes the tricky part how do you do the difference? I was
<br>> >> thinking I could take A difference newtable but because I have<br>> >> multiple little pieces instead of a single piece, I think I am<br>> >> getting:<br>> >>   (A - Part1), (A - Part2), (A - Part3) instead of
<br>> >>   (A - Part1 - Part2 - Part3)<br>> >> So I think I need to union the polygon pieces from each row that<br>> >> is dumped above. Is that as simple as tossing part of the dump<br>> >> into a geomunion()? How would that look?
<br>> >> -Steve W<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>> > 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: 4<br>> Date: Fri, 02 Feb 2007 12:25:19 +0000<br>> From: Mark Cave-Ayland <
<a href="mailto:mark.cave-ayland@ilande.co.uk">mark.cave-ayland@ilande.co.uk</a>><br>> Subject: Re: [postgis-users] pg_restore problem - linked to different<br>>         versions?<br>> To: PostGIS Users Discussion <
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>> Message-ID: <1170419119.6358.10.camel@mca-desktop><br>> Content-Type: text/plain<br>><br>> On Thu, 2007-02-01 at 14:40 +0100, Stefan Schwarzer wrote:
<br>> > Hi,<br>> ><br>> > I dumped my locally newly created database and wanted to restore on<br>> > the server. But I got this message.<br>> ><br>> > pg_restore: [archiver] unsupported version (
1.10) in file header<br>> > pg_restore: [archiver] unsupported version (1.10) in file header<br>> > pg_restore call failed<br>> ><br>> > I guess the problem comes from the fact that:<br>> ><br>
> >    the server runs with     PostGres 8.1.0 and PostGIS 1.1.2<br>> >    my local machine with PostGres 8.1.2 and PostGIS 1.1.1<br>> ><br>> > Could that be? And what can I do to solve the problem? In the moment
<br>> > we won't touch our server, as it runs smoothly. And on my local<br>> > machine, a Mac, the different packages have been installed via the<br>> > prebuild packages from KyngChaos. I am no compiler.... So, not too
<br>> > keen to re-compile Postgres and Postgis.... But I guess it's what I<br>> > have to do, right?<br>> ><br>> > Thanks for any hints...<br>><br>><br>> Hi Stefan,<br>><br>> Could it be that you have multiple versions of pg_restore on your
<br>> server? Looking at the PostgreSQL source code, version 1.10 headers were<br>> introduced with the advent of tablespaces (PostgreSQL 8.0) and so you<br>> are attempting to restore your pg_dump with a pg_restore for PostgreSQL
<br>> < 8.0.<br>><br>> So you need to check your paths and make sure you are using the<br>> pg_restore from your PostgreSQL 8.1 installation. Perhaps if you<br>> installed PostgreSQL 8.1 yourself, you need to be using the version
<br>> in /usr/local/bin rather than the version in /usr/bin which originally<br>> came with your distro?<br>><br>><br>> Kind regards,<br>><br>> Mark.<br>><br>><br>><br>><br>> ------------------------------
<br>><br>> Message: 5<br>> Date: Fri, 02 Feb 2007 16:04:01 +0200<br>> From: Dido <<a href="mailto:dido+postgis@sarge.mine.nu">dido+postgis@sarge.mine.nu</a>><br>> Subject: [postgis-users] Errors in jdbc rpm build on Fedora Core 6
<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:20070202160401.03ovwnsug400s8og@mx2.sofita.com">
20070202160401.03ovwnsug400s8og@mx2.sofita.com</a>><br>> Content-Type: text/plain;<br>> charset=UTF-8;  DelSp="Yes";    format="flowed"<br>><br>> Hi @,<br>> I'm trying to make postgis 
1.2.1 Fedora Core 6 rpm package, but I have<br>> some errors.<br>> Also I would like to make postgis rpm against postgresql 8.2.1 , did<br>> someone have feedback ?<br>><br>> Here is list of postgres and java packages:
<br>> [root@fc-test ~]# rpm -qa | grep postgres<br>> postgresql-server-8.1.6-1.fc6<br>> postgresql-docs-8.1.6-1.fc6<br>> postgresql-8.1.6-1.fc6<br>> postgresql-devel-8.1.6-1.fc6<br>> postgresql-libs-8.1.6-1.fc6
<br>> postgresql-contrib-8.1.6-1.fc6<br>> postgresql-jdbc-8.1.407-1jpp.4<br>> [root@fc-test ~]# rpm -qa | grep java<br>> java-1.4.2-gcj-compat-1.4.2.0-40jpp.110<br>> gcc-java-4.1.1-51.fc6<br>> java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.110
<br>><br>> I'm using following SPEC file from 1.2.0, with version change<br>><br>> [root@fc-test ~]# cat /usr/src/redhat/SPECS/postgis.spec<br>> %{!?javabuild:%define   javabuild 1}<br>> %{!?utils:%define       utils 1}
<br>> %{!?gcj_support:%define gcj_support 1}<br>><br>> Summary:        Geographic Information Systems Extensions to PostgreSQL<br>> Name:           postgis<br>> Version:        1.2.1<br>> Release:        2%{?dist}
<br>> License:        GPL<br>> Group:          Applications/Databases<br>> Source0:<br>> <a href="http://postgis.refractions.net/download/%{name}-%{version}.tar.gz">http://postgis.refractions.net/download/%{name}-%{version}.tar.gz
</a><br>> Source4:        filter-requires-perl-Pg.sh<br>> #Patch1:                postgis-configure.patch<br>> Patch2:         postgis-javamakefile.patch<br>> URL:            <a href="http://postgis.refractions.net/">
http://postgis.refractions.net/</a><br>> BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u}<br>> -n)<br>><br>> BuildRequires:  postgresql-devel, proj-devel, geos-devel, byacc,<br>> proj-devel, flex, postgresql-jdbc
<br>> Requires:       postgresql, geos, proj<br>><br>> %description<br>> PostGIS adds support for geographic objects to the PostgreSQL<br>> object-relational<br>> database. In effect, PostGIS "spatially enables" the PostgreSQL server,
<br>> allowing it to be used as a backend spatial database for geographic<br>> information<br>> systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS<br>> follows the OpenGIS "Simple Features Specification for SQL" and has been
<br>> certified as compliant with the "Types and Functions" profile.<br>><br>> %if %javabuild<br>> %package jdbc<br>> Summary:        The JDBC driver for PostGIS<br>> Group:          Applications/Databases
<br>> License:        LGPL<br>> Requires:       postgis<br>> BuildRequires:  ant >= 0:1.6.2, junit >= 0:3.7<br>><br>> %if %{gcj_support}<br>> BuildRequires:          gcc-java<br>> Requires(post):         
java-1.4.2-gcj-compat<br>> Requires(postun):       java-1.4.2-gcj-compat<br>> %endif<br>><br>> %description jdbc<br>> The postgis-jdbc package provides the essential jdbc driver for PostGIS.<br>> %endif<br>
><br>> %if %utils<br>> %package utils<br>> Summary:        The utils for PostGIS<br>> Group:          Applications/Databases<br>> Requires:       postgis, perl-DBD-Pg<br>><br>> %description utils<br>
> The postgis-utils package provides the utilities for PostGIS.<br>> %endif<br>><br>> %define __perl_requires %{SOURCE4}<br>><br>> %prep<br>> %setup -q<br>> #%patch1 -p0<br>> %patch2 -p0<br>>
<br>> %build<br>> %configure<br>> make %{?_smp_mflags} LPATH=`pg_config --pkglibdir` shlib="%{name}.so"<br>><br>> %if %javabuild<br>> export MAKEFILE_DIR=%{_builddir}/%{name}-%{version}/java/jdbc
<br>> JDBC_VERSION_RPM=`rpm -ql postgresql-jdbc| grep 'jdbc.jar$'|awk -F '/'<br>> '{print $5}'`<br>> sed 's/postgresql.jar/'${JDBC_VERSION_RPM}'/g' $MAKEFILE_DIR/Makefile<br>
> > $MAKEFILE_DIR/Makefile.new<br>> mv -f $MAKEFILE_DIR/Makefile.new $MAKEFILE_DIR/Makefile<br>> make -C java/jdbc<br>> %endif<br>><br>> %if %utils<br>>   make -C utils<br>> %endif<br>><br>> %install
<br>> rm -rf %{buildroot}<br>> make install DESTDIR=%{buildroot}<br>> install -d %{buildroot}%{_libdir}/pgsql/<br>> install lwgeom/liblwgeom.so* %{buildroot}%{_libdir}/pgsql/<br>> install -d  %{buildroot}%{_datadir}/pgsql/contrib/
<br>> install -m 644 *.sql %{buildroot}%{_datadir}/pgsql/contrib/<br>> rm -f  %{buildroot}%{_libdir}/liblwgeom.so*<br>> rm -f  %{buildroot}%{_datadir}/*.sql<br>><br>> %if %javabuild<br>> install -d %{buildroot}%{_javadir}
<br>> install -m 755 java/jdbc/%{name}_%{version}.jar %{buildroot}%{_javadir}<br>> %if %{gcj_support}<br>> aot-compile-rpm<br>> %endif<br>> %endif<br>><br>> strip %{buildroot}/%{_libdir}/gcj/%{name}/*.jar.so
<br>><br>> %if %utils<br>> install -d %{buildroot}%{_datadir}/%{name}<br>> install -m 644 utils/*.pl %{buildroot}%{_datadir}/%{name}<br>> %endif<br>><br>> %clean<br>> rm -rf %{buildroot}<br>><br>
> %post -p %{_bindir}/rebuild-gcj-db<br>><br>> %postun -p %{_bindir}/rebuild-gcj-db<br>><br>> %files<br>> %defattr(-,root,root)<br>> %doc COPYING CREDITS NEWS TODO README.%{name} TODO doc/html<br>> loader/README.* doc/%{name}.xml  doc/ZMSgeoms.txt
<br>> %attr(755,root,root) %{_bindir}/*<br>> %attr(755,root,root) %{_libdir}/pgsql/liblwgeom.so*<br>> %{_datadir}/pgsql/contrib/*.sql<br>><br>> %if %javabuild<br>> %files jdbc<br>> %defattr(-,root,root)
<br>> %doc java/jdbc/COPYING_LGPL java/jdbc/README<br>> %attr(755,root,root) %{_javadir}/%{name}_%{version}.jar<br>> %if %{gcj_support}<br>> %dir %{_libdir}/gcj/%{name}<br>> %{_libdir}/gcj/%{name}/*.jar.so<br>
> %{_libdir}/gcj/%{name}/*.jar.db<br>> %endif<br>> %endif<br>><br>> %if %utils<br>> %files utils<br>> %defattr(-,root,root)<br>> %doc utils/README<br>> %attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl
<br>> %attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl<br>> %attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl<br>> %attr(644,root,root) %{_datadir}/%{name}/create_undef.pl<br>> %attr(644,root,root) %{_datadir}/%{name}/%{name}_proc_upgrade.pl
<br>> %attr(644,root,root) %{_datadir}/%{name}/%{name}_restore.pl<br>> %endif<br>><br>> %changelog<br>> * Mon Dec 26 2006 - Devrim GUNDUZ <<a href="mailto:devrim@commandprompt.com">devrim@commandprompt.com
</a>> 1.2.0-2<br>> - More spec file fixes per bugzilla review #220743<br>><br>> ----------------------------------------------------- errors log here:<br>> -----------<br>><br>> + make -C java/jdbc<br>
> ----------<br>> 1. ERROR in ./src/org/postgis/ComposedGeom.java (at line 29)<br>>          import org.postgresql.util.PGtokenizer;<br>>                 ^^^^^^^^^^^^^^^^^^^<br>> The import org.postgresql.util
 cannot be resolved<br>> ----------<br>> 2. ERROR in ./src/org/postgis/ComposedGeom.java (at line 104)<br>>          PGtokenizer t = new PGtokenizer(PGtokenizer.removePara(value),<br>> ',');<br>>          ^^^^^^^^^^^
<br>> PGtokenizer cannot be resolved to a type<br>> ----------<br>> 3. ERROR in ./src/org/postgis/ComposedGeom.java (at line 104)<br>>          PGtokenizer t = new PGtokenizer(PGtokenizer.removePara(value),<br>
> ',');<br>>                              ^^^^^^^^^^^<br>> PGtokenizer cannot be resolved to a type<br>> ----------<br>> 4. ERROR in ./src/org/postgis/ComposedGeom.java (at line 104)<br>>          PGtokenizer t = new PGtokenizer(
PGtokenizer.removePara(value),<br>> ',');<br>>                                          ^^^^^^^^^^^<br>> PGtokenizer cannot be resolved<br>> ----------<br>> ----------<br>> 5. ERROR in ./src/org/postgis/DriverWrapper.java (at line 72)
<br>>          public class DriverWrapper extends Driver {<br>>                                             ^^^^^^<br>> Driver cannot be resolved to a type<br>> ----------<br>> ----------<br>> 6. ERROR in ./src/org/postgis/DriverWrapperAutoprobe.java (at line 54)
<br>>          public class DriverWrapperAutoprobe extends DriverWrapper {<br>>                       ^^^^^^^^^^^^^^^^^^^^^^<br>> The hierarchy of the type DriverWrapperAutoprobe is inconsistent<br>> ----------
<br>> ----------<br>> 7. ERROR in ./src/org/postgis/DriverWrapperLW.java (at line 49)<br>>          public class DriverWrapperLW extends DriverWrapper {<br>>                       ^^^^^^^^^^^^^^^<br>> The hierarchy of the type DriverWrapperLW is inconsistent
<br>> ----------<br>> ----------<br>> 8. ERROR in ./src/org/postgis/PGbox2d.java (at line 31)<br>>          public class PGbox2d extends PGboxbase {<br>>                       ^^^^^^^<br>> The hierarchy of the type PGbox2d is inconsistent
<br>> ----------<br>> ----------<br>> 9. ERROR in ./src/org/postgis/PGbox3d.java (at line 32)<br>>          public class PGbox3d extends PGboxbase {<br>>                       ^^^^^^^<br>> The hierarchy of the type PGbox3d is inconsistent
<br>> ----------<br>> ----------<br>> 10. ERROR in ./src/org/postgis/PGboxbase.java (at line 40)<br>>          public abstract class PGboxbase extends PGobject {<br>>                                                  ^^^^^^^^
<br>> PGobject cannot be resolved to a type<br>> ----------<br>> ----------<br>> 11. ERROR in ./src/org/postgis/PGgeometry.java (at line 34)<br>>          public class PGgeometry extends PGobject {<br>>                                          ^^^^^^^^
<br>> PGobject cannot be resolved to a type<br>> ----------<br>> ----------<br>> 12. ERROR in ./src/org/postgis/PGgeometryLW.java (at line 37)<br>>          public class PGgeometryLW extends PGgeometry {<br>
>                       ^^^^^^^^^^^^<br>> The hierarchy of the type PGgeometryLW is inconsistent<br>> ----------<br>> ----------<br>> 13. ERROR in ./src/org/postgis/java2d/Java2DWrapper.java (at line 50)<br>
>          public class Java2DWrapper extends Driver {<br>>                                             ^^^^^^<br>> Driver cannot be resolved to a type<br>> ----------<br>> ----------<br>> 14. ERROR in ./src/org/postgis/java2d/PGShapeGeometry.java (at line 63)
<br>>          public class PGShapeGeometry extends PGobject implements Shape {<br>>                                               ^^^^^^^^<br>> PGobject cannot be resolved to a type<br>> ----------<br>> 14 problems (14 errors)make: *** [compile] Error 255
<br>> error: Bad exit status from /var/tmp/rpm-tmp.18862 (%build)<br>><br>> How I can tackle with this situation ?<br>><br>> Best regards,<br>> Dido<br>><br>><br>><br>> ------------------------------
<br>><br>> Message: 6<br>> Date: Fri, 2 Feb 2007 15:27:33 +0100<br>> From: Stefan Schwarzer <<a href="mailto:stefan.schwarzer@grid.unep.ch">stefan.schwarzer@grid.unep.ch</a>><br>> Subject: Re: [postgis-users] pg_restore problem - linked to different
<br>>         versions?<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:85D74A20-1E59-4D92-A4D4-57DD74CAF1B1@grid.unep.ch">
85D74A20-1E59-4D92-A4D4-57DD74CAF1B1@grid.unep.ch</a>><br>> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed<br>><br>> >> I dumped my locally newly created database and wanted to restore on
<br>> >> the server. But I got this message.<br>> >><br>> >> pg_restore: [archiver] unsupported version (1.10) in file header<br>> >> pg_restore: [archiver] unsupported version (1.10) in file header
<br>> >> pg_restore call failed<br>> >><br>> >> I guess the problem comes from the fact that:<br>> >><br>> >>    the server runs with     PostGres 8.1.0 and PostGIS 1.1.2<br>> >>    my local machine with PostGres 
8.1.2 and PostGIS 1.1.1<br>> >><br>> >> Could that be? And what can I do to solve the problem? In the moment<br>> >> we won't touch our server, as it runs smoothly. And on my local<br>> >> machine, a Mac, the different packages have been installed via the
<br>> >> prebuild packages from KyngChaos. I am no compiler.... So, not too<br>> >> keen to re-compile Postgres and Postgis.... But I guess it's what I<br>> >> have to do, right?<br>> >>
<br>> >> Thanks for any hints...<br>> ><br>> ><br>> > Hi Stefan,<br>> ><br>> > Could it be that you have multiple versions of pg_restore on your<br>> > server? Looking at the PostgreSQL source code, version 
1.10 headers<br>> > were<br>> > introduced with the advent of tablespaces (PostgreSQL 8.0) and so you<br>> > are attempting to restore your pg_dump with a pg_restore for<br>> > PostgreSQL<br>> > < 
8.0.<br>> ><br>> > So you need to check your paths and make sure you are using the<br>> > pg_restore from your PostgreSQL 8.1 installation. Perhaps if you<br>> > installed PostgreSQL 8.1 yourself, you need to be using the version
<br>> > in /usr/local/bin rather than the version in /usr/bin which originally<br>> > came with your distro?<br>><br>> Great Mark,<br>><br>> you were absolutely right! There were two or three references to
<br>> pg_restore; only one of them version 8, and not the default one.<br>><br>> Thanks a lot!!!<br>><br>><br>><br>> ------------------------------<br>><br>> Message: 7<br>> Date: Fri, 02 Feb 2007 12:03:37 -0500
<br>> From: Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>><br>> Subject: Re: [postgis-users] How best to do this?<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:45C36EE9.6050403@swoodbridge.com">45C36EE9.6050403@swoodbridge.com</a>><br>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
<br>><br>> Paul, et al,<br>><br>> Any chance that someone would have GEOS 3  built for WinXP that I could<br>> drop into a system currently running:<br>><br>> "POSTGIS="1.1.3" GEOS="
2.2.2-CAPI-1.1.0" PROJ="Rel. 4.4.9, 29 Oct 2004"<br>> USE_STATS"<br>><br>> "PostgreSQL 8.1.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)<br>> 3.4.2 (mingw-special)"<br>><br>
> So I could give this a try.<br>><br>> In the past, I seem to remember people dealing with these problems using<br>> snaptogrid() - would this potentially help here and how would I change<br>> my query to use that?
<br>><br>> -Steve<br>><br>> Paul Ramsey wrote:<br>> > GEOS 3 does include a number of fixes that will help difference and<br>> union.<br>> ><br>> > P<br>> ><br>> > On 1-Feb-07, at 9:01 PM, Stephen Woodbridge wrote:
<br>> ><br>> >> OK, one step forward and two steps backward ...<br>> >><br>> >> I was about to get rid of my gemetrycollections with:<br>> >><br>> >> update newtable set the_geom =
<br>> >>  (select geomunion(geom1) from<br>> >>    (select (dump(the_geom)).geom as geom1) as foo<br>> >>     where geometrytype(geom1)='POLYGON'<br>> >>  )<br>> >>  where geometrytype(the_geom)='GEOMETRYCOLLECTION';
<br>> >><br>> >> This worked very nicely once I figured out that this was the way to<br>> >> solve the problem. So now each geometry collection is converted into a<br>> >> polygon or multipolygon and all the linestring and point artifacts of
<br>> >> the intersection are removed.<br>> >><br>> >> select distinct geometrytype(the_geom) from soils2;<br>> >> POLYGON<br>> >> MULTIPOLYGON<br>> >><br>> >> select * from soils where not isvalid(the_geom);
<br>> >> reports 0 rows<br>> >><br>> >> insert into newtable (..., the_geom)<br>> >>   select A....,<br>> >>          difference(A.the_geom, B.the_geom) as the_geom<br>> >>   from A, B
<br>> >>   where A.the_geom && B.the_geom and overlaps(A.the_geom, B.the_geom);<br>> >><br>> >> NOTICE:  TopologyException: no outgoing dirEdge found<br>> >> (287030,892621,892621)
<br>> >><br>> >> ERROR:  GEOS difference() threw an error!<br>> >><br>> >> Now what do I do??? If I have to upgrade it might be easiest to<br>> >> upgrade my WinXP laptop if there is an easy way to do that, then dump
<br>> >> and load the data to that.<br>> >><br>> >> select postgis_full_version();<br>> >> "POSTGIS="1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct
<br>> >> 2004" USE_STATS (procs from 1.1.1 need upgrade)"<br>> >><br>> >> select version();<br>> >> "PostgreSQL 8.0.8 on i386-portbld-freebsd5.3, compiled by GCC cc (GCC)
<br>> >> 3.4.2 [FreeBSD] 20040728"<br>> >><br>> >> -Steve<br>> >><br>> >> Stephen Woodbridge wrote:<br>> >>> Hi all,<br>> >>> Sorry the subject line is not more useful, but let me explain.
<br>> >>> 1) I have a set of polgons A and another set of polygon B<br>> >>> 2) I need to a new set of polygons C that are the union of<br>> >>>    A intersect B and A difference B<br>> >>> So basically B partially covers A and I want to split polygons in a
<br>> >>> into the covered piece(s) and that that is not covered.<br>> >>> On the surface this is very straight forward, but it isn't ...<br>> >>> insert into newtable (....)<br>> >>>    select ..., intersection(
A.the_geom, B.the_geom) as the_geom<br>> >>>      from A, B<br>> >>>      where A.the_geom && B.the_geom and<br>> >>>        intersects(A.the_geom, B.the_geom);<br>> >>> This works, but I get a bunch of GEOMETRYCOLLECTION objects in the
<br>> >>> results and out of 1022 collection I have 2780 additional POLYGONs.<br>> >>> So I could do something like:<br>> >>> insert into newtable (....)<br>> >>>     select * from
<br>> >>>       (select ..., (dump(the_geom)).geom as the_geom from newtable<br>> >>>          where geometrytype(the_geom)='GEOMETRYCOLLECTION' ) as foo<br>> >>>     where geometrytype(the_geom)='POLYGON';
<br>> >>> delete from newtable where<br>> geometrytype(the_geom)='GEOMETRYCOLLECTION';<br>> >>> So now comes the tricky part how do you do the difference? I was<br>> >>> thinking I could take A difference newtable but because I have
<br>> >>> multiple little pieces instead of a single piece, I think I am<br>> getting:<br>> >>>   (A - Part1), (A - Part2), (A - Part3) instead of<br>> >>>   (A - Part1 - Part2 - Part3)
<br>> >>> So I think I need to union the polygon pieces from each row that is<br>> >>> dumped above. Is that as simple as tossing part of the dump into a<br>> >>> geomunion()? How would that look?
<br>> >>> -Steve W<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>> >> 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>> > 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: 8<br>> Date: Fri, 02 Feb 2007 09:25:43 -0800<br>> From: Paul Ramsey <
<a href="mailto:pramsey@refractions.net">pramsey@refractions.net</a>><br>> Subject: Re: [postgis-users] How best to do this?<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:45C37417.4070607@refractions.net">45C37417.4070607@refractions.net</a>><br>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
<br>><br>> snaptogrid might help, it is a crude hammer similar in many ways to the<br>> more subtle approaches in GEOS3.<br>><br>> Because the C API didn't change between versions, you may be able to<br>
> simply copy a suitably compiled geos DLL into place, perhaps by<br>> stripping one out of the windows downloads. I don't actually know if our<br>> windows downloads are using GEOS3 though... hrm. Mark CA?<br>
><br>> P<br>><br>> Stephen Woodbridge wrote:<br>> > Paul, et al,<br>> ><br>> > Any chance that someone would have GEOS 3  built for WinXP that I could<br>> > drop into a system currently running:
<br>> ><br>> > "POSTGIS="1.1.3" GEOS="2.2.2-CAPI-1.1.0" PROJ="Rel. 4.4.9, 29 Oct 2004"<br>> > USE_STATS"<br>> ><br>> > "PostgreSQL 8.1.4 on i686-pc-mingw32, compiled by GCC 
gcc.exe (GCC)<br>> > 3.4.2 (mingw-special)"<br>> ><br>> > So I could give this a try.<br>> ><br>> > In the past, I seem to remember people dealing with these problems using<br>> > snaptogrid() - would this potentially help here and how would I change
<br>> > my query to use that?<br>> ><br>> > -Steve<br>> ><br>> > Paul Ramsey wrote:<br>> >> GEOS 3 does include a number of fixes that will help difference and<br>> >> union.
<br>> >><br>> >> P<br>> >><br>> >> On 1-Feb-07, at 9:01 PM, Stephen Woodbridge wrote:<br>> >><br>> >>> OK, one step forward and two steps backward ...<br>> >>>
<br>> >>> I was about to get rid of my gemetrycollections with:<br>> >>><br>> >>> update newtable set the_geom =<br>> >>>  (select geomunion(geom1) from<br>> >>>    (select (dump(the_geom)).geom as geom1) as foo
<br>> >>>     where geometrytype(geom1)='POLYGON'<br>> >>>  )<br>> >>>  where geometrytype(the_geom)='GEOMETRYCOLLECTION';<br>> >>><br>> >>> This worked very nicely once I figured out that this was the way to
<br>> >>> solve the problem. So now each geometry collection is converted into<br>> >>> a polygon or multipolygon and all the linestring and point artifacts<br>> >>> of the intersection are removed.
<br>> >>><br>> >>> select distinct geometrytype(the_geom) from soils2;<br>> >>> POLYGON<br>> >>> MULTIPOLYGON<br>> >>><br>> >>> select * from soils where not isvalid(the_geom);
<br>> >>> reports 0 rows<br>> >>><br>> >>> insert into newtable (..., the_geom)<br>> >>>   select A....,<br>> >>>          difference(A.the_geom, B.the_geom) as the_geom
<br>> >>>   from A, B<br>> >>>   where A.the_geom && B.the_geom and overlaps(A.the_geom, B.the_geom);<br>> >>><br>> >>> NOTICE:  TopologyException: no outgoing dirEdge found
<br>> >>> (287030,892621,892621)<br>> >>><br>> >>> ERROR:  GEOS difference() threw an error!<br>> >>><br>> >>> Now what do I do??? If I have to upgrade it might be easiest to
<br>> >>> upgrade my WinXP laptop if there is an easy way to do that, then dump<br>> >>> and load the data to that.<br>> >>><br>> >>> select postgis_full_version();<br>> >>> "POSTGIS="
1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct<br>> >>> 2004" USE_STATS (procs from 1.1.1 need upgrade)"<br>> >>><br>> >>> select version();<br>> >>> "PostgreSQL 
8.0.8 on i386-portbld-freebsd5.3, compiled by GCC cc<br>> >>> (GCC) 3.4.2 [FreeBSD] 20040728"<br>> >>><br>> >>> -Steve<br>> >>><br>> >>> Stephen Woodbridge wrote:
<br>> >>>> Hi all,<br>> >>>> Sorry the subject line is not more useful, but let me explain.<br>> >>>> 1) I have a set of polgons A and another set of polygon B<br>> >>>> 2) I need to a new set of polygons C that are the union of
<br>> >>>>    A intersect B and A difference B<br>> >>>> So basically B partially covers A and I want to split polygons in a<br>> >>>> into the covered piece(s) and that that is not covered.
<br>> >>>> On the surface this is very straight forward, but it isn't ...<br>> >>>> insert into newtable (....)<br>> >>>>    select ..., intersection(A.the_geom, B.the_geom
) as the_geom<br>> >>>>      from A, B<br>> >>>>      where A.the_geom && B.the_geom and<br>> >>>>        intersects(A.the_geom, B.the_geom);<br>> >>>> This works, but I get a bunch of GEOMETRYCOLLECTION objects in the
<br>> >>>> results and out of 1022 collection I have 2780 additional POLYGONs.<br>> >>>> So I could do something like:<br>> >>>> insert into newtable (....)<br>> >>>>     select * from
<br>> >>>>       (select ..., (dump(the_geom)).geom as the_geom from newtable<br>> >>>>          where geometrytype(the_geom)='GEOMETRYCOLLECTION' ) as foo<br>> >>>>     where geometrytype(the_geom)='POLYGON';
<br>> >>>> delete from newtable where<br>> geometrytype(the_geom)='GEOMETRYCOLLECTION';<br>> >>>> So now comes the tricky part how do you do the difference? I was<br>> >>>> thinking I could take A difference newtable but because I have
<br>> >>>> multiple little pieces instead of a single piece, I think I am<br>> getting:<br>> >>>>   (A - Part1), (A - Part2), (A - Part3) instead of<br>> >>>>   (A - Part1 - Part2 - Part3)
<br>> >>>> So I think I need to union the polygon pieces from each row that is<br>> >>>> dumped above. Is that as simple as tossing part of the dump into a<br>> >>>> geomunion()? How would that look?
<br>> >>>> -Steve W<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>> >>> 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>> >> 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>> > 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>>    Paul Ramsey<br>>    Refractions Research<br>>    <a href="http://www.refractions.net">http://www.refractions.net</a><br>>    <a href="mailto:pramsey@refractions.net">pramsey@refractions.net</a><br>
>    Phone: 250-383-3022<br>>    Cell: 250-885-0632<br>><br>><br>> ------------------------------<br>><br>> Message: 9<br>> Date: Fri, 2 Feb 2007 10:40:36 -0800 (PST)<br>> From: Steve Benzo <
<a href="mailto:steve_benzo@yahoo.com">steve_benzo@yahoo.com</a>><br>> Subject: [postgis-users] Lat/lon bounding box to area?<br>> To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a><br>> Message-ID: <<a href="mailto:404830.54155.qm@web56205.mail.re3.yahoo.com">404830.54155.qm@web56205.mail.re3.yahoo.com</a>><br>> Content-Type: text/plain; charset="iso-8859-1"<br>><br>> Hi,
<br>><br>> This might be a stupid question, but is there a way using PostGIS that I<br>> can take a bounding box (polyline) supplied by a user (they're drawing a box<br>> on the map, from which I get the xmin/ymin/etc from), which I'd like to use
<br>> to get an area from (utlimately acres). My first step will be to get that<br>> polyline into PostGIS (struggling, but should be able to figure it out) and<br>> then apply a trigger which populates an area field from that. Thanks in
<br>> advance.<br>><br>> SB<br>><br>><br>> ---------------------------------<br>> Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and<br>> get things done faster.<br>> -------------- next part --------------
<br>> An HTML attachment was scrubbed...<br>> URL:<br>> <a href="http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/13939878/attachment-0001.html">http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/13939878/attachment-0001.html
</a><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 52, Issue 2<br>
> ********************************************<br>><br><br><br><br>--<br>Regards,<br><br>Mark Thomas<br><a href="mailto:spatialguru.net@gmail.com">spatialguru.net@gmail.com</a><br>205.529.9013<br><br>"Commit to the Lord whatever you do,
<br>    and your plans will succeed." - Proverbs 16:3<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/cad711fa/attachment-0001.html">
http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/cad711fa/attachment-0001.html</a><br><br>------------------------------<br><br>Message: 3<br>Date: Fri, 2 Feb 2007 13:24:56 -0600<br>From: "Mark Thomas" <
<a href="mailto:spatialguru.net@gmail.com">spatialguru.net@gmail.com</a>><br>Subject: [postgis-users] Re: Lat/lon bounding box to area?<br>To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a><br>Message-ID:<br>        <<a href="mailto:2b5aa3d50702021124n3e99215fxfeb2080e2d7a0f82@mail.gmail.com">2b5aa3d50702021124n3e99215fxfeb2080e2d7a0f82@mail.gmail.com</a>><br>Content-Type: text/plain; charset="utf-8"
<br><br>Sure, use GeomFromText or GeomFromEWKT and pass in WKT for a polygon defined<br>by the bbox<br><br>On 2/2/07, <a href="mailto:postgis-users-request@postgis.refractions.net">postgis-users-request@postgis.refractions.net
</a> <<br><a href="mailto:postgis-users-request@postgis.refractions.net">postgis-users-request@postgis.refractions.net</a>> wrote:<br>><br>> 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. How best to do this? (Stephen Woodbridge)<br>>    2. Re: How best to do this? (Stephen Woodbridge)
<br>>    3. Re: How best to do this? (Paul Ramsey)<br>>    4. Re: pg_restore problem - linked to different versions?<br>>       (Mark Cave-Ayland)<br>>    5. Errors in jdbc rpm build on Fedora Core 6 (Dido)<br>
>    6. Re: pg_restore problem - linked to different versions?<br>>       (Stefan Schwarzer)<br>>    7. Re: How best to do this? (Stephen Woodbridge)<br>>    8. Re: How best to do this? (Paul Ramsey)<br>>    9. Lat/lon bounding box to area? (Steve Benzo)
<br>><br>><br>> ----------------------------------------------------------------------<br>><br>> Message: 1<br>> Date: Thu, 01 Feb 2007 22:34:38 -0500<br>> From: Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com">
woodbri@swoodbridge.com</a>><br>> Subject: [postgis-users] How best to do this?<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:45C2B14E.2070904@swoodbridge.com">45C2B14E.2070904@swoodbridge.com</a>><br>> Content-Type: text/plain; charset=UTF-8; format=flowed<br>><br>> Hi all,<br>><br>> Sorry the subject line is not more useful, but let me explain.
<br>><br>> 1) I have a set of polgons A and another set of polygon B<br>> 2) I need to a new set of polygons C that are the union of<br>>     A intersect B and A difference B<br>><br>> So basically B partially covers A and I want to split polygons in a into
<br>> the covered piece(s) and that that is not covered.<br>><br>> On the surface this is very straight forward, but it isn't ...<br>><br>> insert into newtable (....)<br>>     select ..., intersection(
A.the_geom, B.the_geom) as the_geom<br>>       from A, B<br>>       where A.the_geom && B.the_geom and<br>>         intersects(A.the_geom, B.the_geom);<br>><br>> This works, but I get a bunch of GEOMETRYCOLLECTION objects in the
<br>> results and out of 1022 collection I have 2780 additional POLYGONs.<br>><br>> So I could do something like:<br>><br>> insert into newtable (....)<br>>      select * from<br>>        (select ..., (dump(the_geom)).geom as the_geom from newtable
<br>>           where geometrytype(the_geom)='GEOMETRYCOLLECTION' ) as foo<br>>      where geometrytype(the_geom)='POLYGON';<br>><br>> delete from newtable where geometrytype(the_geom)='GEOMETRYCOLLECTION';
<br>><br>> So now comes the tricky part how do you do the difference? I was<br>> thinking I could take A difference newtable but because I have multiple<br>> little pieces instead of a single piece, I think I am getting:
<br>>    (A - Part1), (A - Part2), (A - Part3) instead of<br>>    (A - Part1 - Part2 - Part3)<br>><br>> So I think I need to union the polygon pieces from each row that is<br>> dumped above. Is that as simple as tossing part of the dump into a
<br>> geomunion()? How would that look?<br>><br>> -Steve W<br>><br>><br>> ------------------------------<br>><br>> Message: 2<br>> Date: Fri, 02 Feb 2007 00:01:39 -0500<br>> From: Stephen Woodbridge <
<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>><br>> Subject: Re: [postgis-users] How best to do this?<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:45C2C5B3.2020709@swoodbridge.com">45C2C5B3.2020709@swoodbridge.com</a>><br>> Content-Type: text/plain; charset=UTF-8; format=flowed
<br>><br>> OK, one step forward and two steps backward ...<br>><br>> I was about to get rid of my gemetrycollections with:<br>><br>> update newtable set the_geom =<br>>   (select geomunion(geom1) from
<br>>     (select (dump(the_geom)).geom as geom1) as foo<br>>      where geometrytype(geom1)='POLYGON'<br>>   )<br>>   where geometrytype(the_geom)='GEOMETRYCOLLECTION';<br>><br>> This worked very nicely once I figured out that this was the way to
<br>> solve the problem. So now each geometry collection is converted into a<br>> polygon or multipolygon and all the linestring and point artifacts of<br>> the intersection are removed.<br>><br>> select distinct geometrytype(the_geom) from soils2;
<br>> POLYGON<br>> MULTIPOLYGON<br>><br>> select * from soils where not isvalid(the_geom);<br>> reports 0 rows<br>><br>> insert into newtable (..., the_geom)<br>>    select A....,<br>>           difference(
A.the_geom, B.the_geom) as the_geom<br>>    from A, B<br>>    where A.the_geom && B.the_geom and overlaps(A.the_geom, B.the_geom);<br>><br>> NOTICE:  TopologyException: no outgoing dirEdge found<br>> (287030,892621,892621)
<br>><br>> ERROR:  GEOS difference() threw an error!<br>><br>> Now what do I do??? If I have to upgrade it might be easiest to upgrade<br>> my WinXP laptop if there is an easy way to do that, then dump and load
<br>> the data to that.<br>><br>> select postgis_full_version();<br>> "POSTGIS="1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004"<br>> USE_STATS (procs from 1.1.1
 need upgrade)"<br>><br>> select version();<br>> "PostgreSQL 8.0.8 on i386-portbld-freebsd5.3, compiled by GCC cc (GCC)<br>> 3.4.2 [FreeBSD] 20040728"<br>><br>> -Steve<br>><br>> Stephen Woodbridge wrote:
<br>> > Hi all,<br>> ><br>> > Sorry the subject line is not more useful, but let me explain.<br>> ><br>> > 1) I have a set of polgons A and another set of polygon B<br>> > 2) I need to a new set of polygons C that are the union of
<br>> >    A intersect B and A difference B<br>> ><br>> > So basically B partially covers A and I want to split polygons in a into<br>> > the covered piece(s) and that that is not covered.<br>> >
<br>> > On the surface this is very straight forward, but it isn't ...<br>> ><br>> > insert into newtable (....)<br>> >    select ..., intersection(A.the_geom, B.the_geom) as the_geom<br>> >      from A, B
<br>> >      where A.the_geom && B.the_geom and<br>> >        intersects(A.the_geom, B.the_geom);<br>> ><br>> > This works, but I get a bunch of GEOMETRYCOLLECTION objects in the<br>> > results and out of 1022 collection I have 2780 additional POLYGONs.
<br>> ><br>> > So I could do something like:<br>> ><br>> > insert into newtable (....)<br>> >     select * from<br>> >       (select ..., (dump(the_geom)).geom as the_geom from newtable
<br>> >          where geometrytype(the_geom)='GEOMETRYCOLLECTION' ) as foo<br>> >     where geometrytype(the_geom)='POLYGON';<br>> ><br>> > delete from newtable where geometrytype(the_geom)='GEOMETRYCOLLECTION';
<br>> ><br>> > So now comes the tricky part how do you do the difference? I was<br>> > thinking I could take A difference newtable but because I have multiple<br>> > little pieces instead of a single piece, I think I am getting:
<br>> >   (A - Part1), (A - Part2), (A - Part3) instead of<br>> >   (A - Part1 - Part2 - Part3)<br>> ><br>> > So I think I need to union the polygon pieces from each row that is<br>> > dumped above. Is that as simple as tossing part of the dump into a
<br>> > geomunion()? How would that look?<br>> ><br>> > -Steve W<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: 3<br>> Date: Thu, 1 Feb 2007 21:14:22 -0800<br>> From: Paul Ramsey <<a href="mailto:pramsey@refractions.net">pramsey@refractions.net</a>><br>> Subject: Re: [postgis-users] How best to do this?
<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:D2E872F9-F43D-41DE-868C-F936776CECAD@refractions.net">
D2E872F9-F43D-41DE-868C-F936776CECAD@refractions.net</a>><br>> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed<br>><br>> GEOS 3 does include a number of fixes that will help difference and
<br>> union.<br>><br>> P<br>><br>> On 1-Feb-07, at 9:01 PM, Stephen Woodbridge wrote:<br>><br>> > OK, one step forward and two steps backward ...<br>> ><br>> > I was about to get rid of my gemetrycollections with:
<br>> ><br>> > update newtable set the_geom =<br>> >  (select geomunion(geom1) from<br>> >    (select (dump(the_geom)).geom as geom1) as foo<br>> >     where geometrytype(geom1)='POLYGON'
<br>> >  )<br>> >  where geometrytype(the_geom)='GEOMETRYCOLLECTION';<br>> ><br>> > This worked very nicely once I figured out that this was the way to<br>> > solve the problem. So now each geometry collection is converted
<br>> > into a polygon or multipolygon and all the linestring and point<br>> > artifacts of the intersection are removed.<br>> ><br>> > select distinct geometrytype(the_geom) from soils2;<br>> > POLYGON
<br>> > MULTIPOLYGON<br>> ><br>> > select * from soils where not isvalid(the_geom);<br>> > reports 0 rows<br>> ><br>> > insert into newtable (..., the_geom)<br>> >   select A....,
<br>> >          difference(A.the_geom, B.the_geom) as the_geom<br>> >   from A, B<br>> >   where A.the_geom && B.the_geom and overlaps(A.the_geom, B.the_geom);<br>> ><br>> > NOTICE:  TopologyException: no outgoing dirEdge found
<br>> > (287030,892621,892621)<br>> ><br>> > ERROR:  GEOS difference() threw an error!<br>> ><br>> > Now what do I do??? If I have to upgrade it might be easiest to<br>> > upgrade my WinXP laptop if there is an easy way to do that, then
<br>> > dump and load the data to that.<br>> ><br>> > select postgis_full_version();<br>> > "POSTGIS="1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct<br>> > 2004" USE_STATS (procs from 
1.1.1 need upgrade)"<br>> ><br>> > select version();<br>> > "PostgreSQL 8.0.8 on i386-portbld-freebsd5.3, compiled by GCC cc<br>> > (GCC) 3.4.2 [FreeBSD] 20040728"<br>> ><br>> > -Steve
<br>> ><br>> > Stephen Woodbridge wrote:<br>> >> Hi all,<br>> >> Sorry the subject line is not more useful, but let me explain.<br>> >> 1) I have a set of polgons A and another set of polygon B
<br>> >> 2) I need to a new set of polygons C that are the union of<br>> >>    A intersect B and A difference B<br>> >> So basically B partially covers A and I want to split polygons in<br>> >> a into the covered piece(s) and that that is not covered.
<br>> >> On the surface this is very straight forward, but it isn't ...<br>> >> insert into newtable (....)<br>> >>    select ..., intersection(A.the_geom, B.the_geom) as the_geom<br>> >>      from A, B
<br>> >>      where A.the_geom && B.the_geom and<br>> >>        intersects(A.the_geom, B.the_geom);<br>> >> This works, but I get a bunch of GEOMETRYCOLLECTION objects in the<br>> >> results and out of 1022 collection I have 2780 additional POLYGONs.
<br>> >> So I could do something like:<br>> >> insert into newtable (....)<br>> >>     select * from<br>> >>       (select ..., (dump(the_geom)).geom as the_geom from newtable<br>> >>          where geometrytype(the_geom)='GEOMETRYCOLLECTION' ) as foo
<br>> >>     where geometrytype(the_geom)='POLYGON';<br>> >> delete from newtable where geometrytype(the_geom)<br>> >> ='GEOMETRYCOLLECTION';<br>> >> So now comes the tricky part how do you do the difference? I was
<br>> >> thinking I could take A difference newtable but because I have<br>> >> multiple little pieces instead of a single piece, I think I am<br>> >> getting:<br>> >>   (A - Part1), (A - Part2), (A - Part3) instead of
<br>> >>   (A - Part1 - Part2 - Part3)<br>> >> So I think I need to union the polygon pieces from each row that<br>> >> is dumped above. Is that as simple as tossing part of the dump<br>> >> into a geomunion()? How would that look?
<br>> >> -Steve W<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>> > 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: 4<br>> Date: Fri, 02 Feb 2007 12:25:19 +0000<br>> From: Mark Cave-Ayland <
<a href="mailto:mark.cave-ayland@ilande.co.uk">mark.cave-ayland@ilande.co.uk</a>><br>> Subject: Re: [postgis-users] pg_restore problem - linked to different<br>>         versions?<br>> To: PostGIS Users Discussion <
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>> Message-ID: <1170419119.6358.10.camel@mca-desktop><br>> Content-Type: text/plain<br>><br>> On Thu, 2007-02-01 at 14:40 +0100, Stefan Schwarzer wrote:
<br>> > Hi,<br>> ><br>> > I dumped my locally newly created database and wanted to restore on<br>> > the server. But I got this message.<br>> ><br>> > pg_restore: [archiver] unsupported version (
1.10) in file header<br>> > pg_restore: [archiver] unsupported version (1.10) in file header<br>> > pg_restore call failed<br>> ><br>> > I guess the problem comes from the fact that:<br>> ><br>
> >    the server runs with     PostGres 8.1.0 and PostGIS 1.1.2<br>> >    my local machine with PostGres 8.1.2 and PostGIS 1.1.1<br>> ><br>> > Could that be? And what can I do to solve the problem? In the moment
<br>> > we won't touch our server, as it runs smoothly. And on my local<br>> > machine, a Mac, the different packages have been installed via the<br>> > prebuild packages from KyngChaos. I am no compiler.... So, not too
<br>> > keen to re-compile Postgres and Postgis.... But I guess it's what I<br>> > have to do, right?<br>> ><br>> > Thanks for any hints...<br>><br>><br>> Hi Stefan,<br>><br>> Could it be that you have multiple versions of pg_restore on your
<br>> server? Looking at the PostgreSQL source code, version 1.10 headers were<br>> introduced with the advent of tablespaces (PostgreSQL 8.0) and so you<br>> are attempting to restore your pg_dump with a pg_restore for PostgreSQL
<br>> < 8.0.<br>><br>> So you need to check your paths and make sure you are using the<br>> pg_restore from your PostgreSQL 8.1 installation. Perhaps if you<br>> installed PostgreSQL 8.1 yourself, you need to be using the version
<br>> in /usr/local/bin rather than the version in /usr/bin which originally<br>> came with your distro?<br>><br>><br>> Kind regards,<br>><br>> Mark.<br>><br>><br>><br>><br>> ------------------------------
<br>><br>> Message: 5<br>> Date: Fri, 02 Feb 2007 16:04:01 +0200<br>> From: Dido <<a href="mailto:dido+postgis@sarge.mine.nu">dido+postgis@sarge.mine.nu</a>><br>> Subject: [postgis-users] Errors in jdbc rpm build on Fedora Core 6
<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:20070202160401.03ovwnsug400s8og@mx2.sofita.com">
20070202160401.03ovwnsug400s8og@mx2.sofita.com</a>><br>> Content-Type: text/plain;<br>> charset=UTF-8;  DelSp="Yes";    format="flowed"<br>><br>> Hi @,<br>> I'm trying to make postgis 
1.2.1 Fedora Core 6 rpm package, but I have<br>> some errors.<br>> Also I would like to make postgis rpm against postgresql 8.2.1 , did<br>> someone have feedback ?<br>><br>> Here is list of postgres and java packages:
<br>> [root@fc-test ~]# rpm -qa | grep postgres<br>> postgresql-server-8.1.6-1.fc6<br>> postgresql-docs-8.1.6-1.fc6<br>> postgresql-8.1.6-1.fc6<br>> postgresql-devel-8.1.6-1.fc6<br>> postgresql-libs-8.1.6-1.fc6
<br>> postgresql-contrib-8.1.6-1.fc6<br>> postgresql-jdbc-8.1.407-1jpp.4<br>> [root@fc-test ~]# rpm -qa | grep java<br>> java-1.4.2-gcj-compat-1.4.2.0-40jpp.110<br>> gcc-java-4.1.1-51.fc6<br>> java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.110
<br>><br>> I'm using following SPEC file from 1.2.0, with version change<br>><br>> [root@fc-test ~]# cat /usr/src/redhat/SPECS/postgis.spec<br>> %{!?javabuild:%define   javabuild 1}<br>> %{!?utils:%define       utils 1}
<br>> %{!?gcj_support:%define gcj_support 1}<br>><br>> Summary:        Geographic Information Systems Extensions to PostgreSQL<br>> Name:           postgis<br>> Version:        1.2.1<br>> Release:        2%{?dist}
<br>> License:        GPL<br>> Group:          Applications/Databases<br>> Source0:<br>> <a href="http://postgis.refractions.net/download/%{name}-%{version}.tar.gz">http://postgis.refractions.net/download/%{name}-%{version}.tar.gz
</a><br>> Source4:        filter-requires-perl-Pg.sh<br>> #Patch1:                postgis-configure.patch<br>> Patch2:         postgis-javamakefile.patch<br>> URL:            <a href="http://postgis.refractions.net/">
http://postgis.refractions.net/</a><br>> BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u}<br>> -n)<br>><br>> BuildRequires:  postgresql-devel, proj-devel, geos-devel, byacc,<br>> proj-devel, flex, postgresql-jdbc
<br>> Requires:       postgresql, geos, proj<br>><br>> %description<br>> PostGIS adds support for geographic objects to the PostgreSQL<br>> object-relational<br>> database. In effect, PostGIS "spatially enables" the PostgreSQL server,
<br>> allowing it to be used as a backend spatial database for geographic<br>> information<br>> systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS<br>> follows the OpenGIS "Simple Features Specification for SQL" and has been
<br>> certified as compliant with the "Types and Functions" profile.<br>><br>> %if %javabuild<br>> %package jdbc<br>> Summary:        The JDBC driver for PostGIS<br>> Group:          Applications/Databases
<br>> License:        LGPL<br>> Requires:       postgis<br>> BuildRequires:  ant >= 0:1.6.2, junit >= 0:3.7<br>><br>> %if %{gcj_support}<br>> BuildRequires:          gcc-java<br>> Requires(post):         
java-1.4.2-gcj-compat<br>> Requires(postun):       java-1.4.2-gcj-compat<br>> %endif<br>><br>> %description jdbc<br>> The postgis-jdbc package provides the essential jdbc driver for PostGIS.<br>> %endif<br>
><br>> %if %utils<br>> %package utils<br>> Summary:        The utils for PostGIS<br>> Group:          Applications/Databases<br>> Requires:       postgis, perl-DBD-Pg<br>><br>> %description utils<br>
> The postgis-utils package provides the utilities for PostGIS.<br>> %endif<br>><br>> %define __perl_requires %{SOURCE4}<br>><br>> %prep<br>> %setup -q<br>> #%patch1 -p0<br>> %patch2 -p0<br>>
<br>> %build<br>> %configure<br>> make %{?_smp_mflags} LPATH=`pg_config --pkglibdir` shlib="%{name}.so"<br>><br>> %if %javabuild<br>> export MAKEFILE_DIR=%{_builddir}/%{name}-%{version}/java/jdbc
<br>> JDBC_VERSION_RPM=`rpm -ql postgresql-jdbc| grep 'jdbc.jar$'|awk -F '/'<br>> '{print $5}'`<br>> sed 's/postgresql.jar/'${JDBC_VERSION_RPM}'/g' $MAKEFILE_DIR/Makefile<br>
> > $MAKEFILE_DIR/Makefile.new<br>> mv -f $MAKEFILE_DIR/Makefile.new $MAKEFILE_DIR/Makefile<br>> make -C java/jdbc<br>> %endif<br>><br>> %if %utils<br>>   make -C utils<br>> %endif<br>><br>> %install
<br>> rm -rf %{buildroot}<br>> make install DESTDIR=%{buildroot}<br>> install -d %{buildroot}%{_libdir}/pgsql/<br>> install lwgeom/liblwgeom.so* %{buildroot}%{_libdir}/pgsql/<br>> install -d  %{buildroot}%{_datadir}/pgsql/contrib/
<br>> install -m 644 *.sql %{buildroot}%{_datadir}/pgsql/contrib/<br>> rm -f  %{buildroot}%{_libdir}/liblwgeom.so*<br>> rm -f  %{buildroot}%{_datadir}/*.sql<br>><br>> %if %javabuild<br>> install -d %{buildroot}%{_javadir}
<br>> install -m 755 java/jdbc/%{name}_%{version}.jar %{buildroot}%{_javadir}<br>> %if %{gcj_support}<br>> aot-compile-rpm<br>> %endif<br>> %endif<br>><br>> strip %{buildroot}/%{_libdir}/gcj/%{name}/*.jar.so
<br>><br>> %if %utils<br>> install -d %{buildroot}%{_datadir}/%{name}<br>> install -m 644 utils/*.pl %{buildroot}%{_datadir}/%{name}<br>> %endif<br>><br>> %clean<br>> rm -rf %{buildroot}<br>><br>
> %post -p %{_bindir}/rebuild-gcj-db<br>><br>> %postun -p %{_bindir}/rebuild-gcj-db<br>><br>> %files<br>> %defattr(-,root,root)<br>> %doc COPYING CREDITS NEWS TODO README.%{name} TODO doc/html<br>> loader/README.* doc/%{name}.xml  doc/ZMSgeoms.txt
<br>> %attr(755,root,root) %{_bindir}/*<br>> %attr(755,root,root) %{_libdir}/pgsql/liblwgeom.so*<br>> %{_datadir}/pgsql/contrib/*.sql<br>><br>> %if %javabuild<br>> %files jdbc<br>> %defattr(-,root,root)
<br>> %doc java/jdbc/COPYING_LGPL java/jdbc/README<br>> %attr(755,root,root) %{_javadir}/%{name}_%{version}.jar<br>> %if %{gcj_support}<br>> %dir %{_libdir}/gcj/%{name}<br>> %{_libdir}/gcj/%{name}/*.jar.so<br>
> %{_libdir}/gcj/%{name}/*.jar.db<br>> %endif<br>> %endif<br>><br>> %if %utils<br>> %files utils<br>> %defattr(-,root,root)<br>> %doc utils/README<br>> %attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl
<br>> %attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl<br>> %attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl<br>> %attr(644,root,root) %{_datadir}/%{name}/create_undef.pl<br>> %attr(644,root,root) %{_datadir}/%{name}/%{name}_proc_upgrade.pl
<br>> %attr(644,root,root) %{_datadir}/%{name}/%{name}_restore.pl<br>> %endif<br>><br>> %changelog<br>> * Mon Dec 26 2006 - Devrim GUNDUZ <<a href="mailto:devrim@commandprompt.com">devrim@commandprompt.com
</a>> 1.2.0-2<br>> - More spec file fixes per bugzilla review #220743<br>><br>> ----------------------------------------------------- errors log here:<br>> -----------<br>><br>> + make -C java/jdbc<br>
> ----------<br>> 1. ERROR in ./src/org/postgis/ComposedGeom.java (at line 29)<br>>          import org.postgresql.util.PGtokenizer;<br>>                 ^^^^^^^^^^^^^^^^^^^<br>> The import org.postgresql.util
 cannot be resolved<br>> ----------<br>> 2. ERROR in ./src/org/postgis/ComposedGeom.java (at line 104)<br>>          PGtokenizer t = new PGtokenizer(PGtokenizer.removePara(value),<br>> ',');<br>>          ^^^^^^^^^^^
<br>> PGtokenizer cannot be resolved to a type<br>> ----------<br>> 3. ERROR in ./src/org/postgis/ComposedGeom.java (at line 104)<br>>          PGtokenizer t = new PGtokenizer(PGtokenizer.removePara(value),<br>
> ',');<br>>                              ^^^^^^^^^^^<br>> PGtokenizer cannot be resolved to a type<br>> ----------<br>> 4. ERROR in ./src/org/postgis/ComposedGeom.java (at line 104)<br>>          PGtokenizer t = new PGtokenizer(
PGtokenizer.removePara(value),<br>> ',');<br>>                                          ^^^^^^^^^^^<br>> PGtokenizer cannot be resolved<br>> ----------<br>> ----------<br>> 5. ERROR in ./src/org/postgis/DriverWrapper.java (at line 72)
<br>>          public class DriverWrapper extends Driver {<br>>                                             ^^^^^^<br>> Driver cannot be resolved to a type<br>> ----------<br>> ----------<br>> 6. ERROR in ./src/org/postgis/DriverWrapperAutoprobe.java (at line 54)
<br>>          public class DriverWrapperAutoprobe extends DriverWrapper {<br>>                       ^^^^^^^^^^^^^^^^^^^^^^<br>> The hierarchy of the type DriverWrapperAutoprobe is inconsistent<br>> ----------
<br>> ----------<br>> 7. ERROR in ./src/org/postgis/DriverWrapperLW.java (at line 49)<br>>          public class DriverWrapperLW extends DriverWrapper {<br>>                       ^^^^^^^^^^^^^^^<br>> The hierarchy of the type DriverWrapperLW is inconsistent
<br>> ----------<br>> ----------<br>> 8. ERROR in ./src/org/postgis/PGbox2d.java (at line 31)<br>>          public class PGbox2d extends PGboxbase {<br>>                       ^^^^^^^<br>> The hierarchy of the type PGbox2d is inconsistent
<br>> ----------<br>> ----------<br>> 9. ERROR in ./src/org/postgis/PGbox3d.java (at line 32)<br>>          public class PGbox3d extends PGboxbase {<br>>                       ^^^^^^^<br>> The hierarchy of the type PGbox3d is inconsistent
<br>> ----------<br>> ----------<br>> 10. ERROR in ./src/org/postgis/PGboxbase.java (at line 40)<br>>          public abstract class PGboxbase extends PGobject {<br>>                                                  ^^^^^^^^
<br>> PGobject cannot be resolved to a type<br>> ----------<br>> ----------<br>> 11. ERROR in ./src/org/postgis/PGgeometry.java (at line 34)<br>>          public class PGgeometry extends PGobject {<br>>                                          ^^^^^^^^
<br>> PGobject cannot be resolved to a type<br>> ----------<br>> ----------<br>> 12. ERROR in ./src/org/postgis/PGgeometryLW.java (at line 37)<br>>          public class PGgeometryLW extends PGgeometry {<br>
>                       ^^^^^^^^^^^^<br>> The hierarchy of the type PGgeometryLW is inconsistent<br>> ----------<br>> ----------<br>> 13. ERROR in ./src/org/postgis/java2d/Java2DWrapper.java (at line 50)<br>
>          public class Java2DWrapper extends Driver {<br>>                                             ^^^^^^<br>> Driver cannot be resolved to a type<br>> ----------<br>> ----------<br>> 14. ERROR in ./src/org/postgis/java2d/PGShapeGeometry.java (at line 63)
<br>>          public class PGShapeGeometry extends PGobject implements Shape {<br>>                                               ^^^^^^^^<br>> PGobject cannot be resolved to a type<br>> ----------<br>> 14 problems (14 errors)make: *** [compile] Error 255
<br>> error: Bad exit status from /var/tmp/rpm-tmp.18862 (%build)<br>><br>> How I can tackle with this situation ?<br>><br>> Best regards,<br>> Dido<br>><br>><br>><br>> ------------------------------
<br>><br>> Message: 6<br>> Date: Fri, 2 Feb 2007 15:27:33 +0100<br>> From: Stefan Schwarzer <<a href="mailto:stefan.schwarzer@grid.unep.ch">stefan.schwarzer@grid.unep.ch</a>><br>> Subject: Re: [postgis-users] pg_restore problem - linked to different
<br>>         versions?<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:85D74A20-1E59-4D92-A4D4-57DD74CAF1B1@grid.unep.ch">
85D74A20-1E59-4D92-A4D4-57DD74CAF1B1@grid.unep.ch</a>><br>> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed<br>><br>> >> I dumped my locally newly created database and wanted to restore on
<br>> >> the server. But I got this message.<br>> >><br>> >> pg_restore: [archiver] unsupported version (1.10) in file header<br>> >> pg_restore: [archiver] unsupported version (1.10) in file header
<br>> >> pg_restore call failed<br>> >><br>> >> I guess the problem comes from the fact that:<br>> >><br>> >>    the server runs with     PostGres 8.1.0 and PostGIS 1.1.2<br>> >>    my local machine with PostGres 
8.1.2 and PostGIS 1.1.1<br>> >><br>> >> Could that be? And what can I do to solve the problem? In the moment<br>> >> we won't touch our server, as it runs smoothly. And on my local<br>> >> machine, a Mac, the different packages have been installed via the
<br>> >> prebuild packages from KyngChaos. I am no compiler.... So, not too<br>> >> keen to re-compile Postgres and Postgis.... But I guess it's what I<br>> >> have to do, right?<br>> >>
<br>> >> Thanks for any hints...<br>> ><br>> ><br>> > Hi Stefan,<br>> ><br>> > Could it be that you have multiple versions of pg_restore on your<br>> > server? Looking at the PostgreSQL source code, version 
1.10 headers<br>> > were<br>> > introduced with the advent of tablespaces (PostgreSQL 8.0) and so you<br>> > are attempting to restore your pg_dump with a pg_restore for<br>> > PostgreSQL<br>> > < 
8.0.<br>> ><br>> > So you need to check your paths and make sure you are using the<br>> > pg_restore from your PostgreSQL 8.1 installation. Perhaps if you<br>> > installed PostgreSQL 8.1 yourself, you need to be using the version
<br>> > in /usr/local/bin rather than the version in /usr/bin which originally<br>> > came with your distro?<br>><br>> Great Mark,<br>><br>> you were absolutely right! There were two or three references to
<br>> pg_restore; only one of them version 8, and not the default one.<br>><br>> Thanks a lot!!!<br>><br>><br>><br>> ------------------------------<br>><br>> Message: 7<br>> Date: Fri, 02 Feb 2007 12:03:37 -0500
<br>> From: Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>><br>> Subject: Re: [postgis-users] How best to do this?<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:45C36EE9.6050403@swoodbridge.com">45C36EE9.6050403@swoodbridge.com</a>><br>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
<br>><br>> Paul, et al,<br>><br>> Any chance that someone would have GEOS 3  built for WinXP that I could<br>> drop into a system currently running:<br>><br>> "POSTGIS="1.1.3" GEOS="
2.2.2-CAPI-1.1.0" PROJ="Rel. 4.4.9, 29 Oct 2004"<br>> USE_STATS"<br>><br>> "PostgreSQL 8.1.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)<br>> 3.4.2 (mingw-special)"<br>><br>
> So I could give this a try.<br>><br>> In the past, I seem to remember people dealing with these problems using<br>> snaptogrid() - would this potentially help here and how would I change<br>> my query to use that?
<br>><br>> -Steve<br>><br>> Paul Ramsey wrote:<br>> > GEOS 3 does include a number of fixes that will help difference and<br>> union.<br>> ><br>> > P<br>> ><br>> > On 1-Feb-07, at 9:01 PM, Stephen Woodbridge wrote:
<br>> ><br>> >> OK, one step forward and two steps backward ...<br>> >><br>> >> I was about to get rid of my gemetrycollections with:<br>> >><br>> >> update newtable set the_geom =
<br>> >>  (select geomunion(geom1) from<br>> >>    (select (dump(the_geom)).geom as geom1) as foo<br>> >>     where geometrytype(geom1)='POLYGON'<br>> >>  )<br>> >>  where geometrytype(the_geom)='GEOMETRYCOLLECTION';
<br>> >><br>> >> This worked very nicely once I figured out that this was the way to<br>> >> solve the problem. So now each geometry collection is converted into a<br>> >> polygon or multipolygon and all the linestring and point artifacts of
<br>> >> the intersection are removed.<br>> >><br>> >> select distinct geometrytype(the_geom) from soils2;<br>> >> POLYGON<br>> >> MULTIPOLYGON<br>> >><br>> >> select * from soils where not isvalid(the_geom);
<br>> >> reports 0 rows<br>> >><br>> >> insert into newtable (..., the_geom)<br>> >>   select A....,<br>> >>          difference(A.the_geom, B.the_geom) as the_geom<br>> >>   from A, B
<br>> >>   where A.the_geom && B.the_geom and overlaps(A.the_geom, B.the_geom);<br>> >><br>> >> NOTICE:  TopologyException: no outgoing dirEdge found<br>> >> (287030,892621,892621)
<br>> >><br>> >> ERROR:  GEOS difference() threw an error!<br>> >><br>> >> Now what do I do??? If I have to upgrade it might be easiest to<br>> >> upgrade my WinXP laptop if there is an easy way to do that, then dump
<br>> >> and load the data to that.<br>> >><br>> >> select postgis_full_version();<br>> >> "POSTGIS="1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct
<br>> >> 2004" USE_STATS (procs from 1.1.1 need upgrade)"<br>> >><br>> >> select version();<br>> >> "PostgreSQL 8.0.8 on i386-portbld-freebsd5.3, compiled by GCC cc (GCC)
<br>> >> 3.4.2 [FreeBSD] 20040728"<br>> >><br>> >> -Steve<br>> >><br>> >> Stephen Woodbridge wrote:<br>> >>> Hi all,<br>> >>> Sorry the subject line is not more useful, but let me explain.
<br>> >>> 1) I have a set of polgons A and another set of polygon B<br>> >>> 2) I need to a new set of polygons C that are the union of<br>> >>>    A intersect B and A difference B<br>> >>> So basically B partially covers A and I want to split polygons in a
<br>> >>> into the covered piece(s) and that that is not covered.<br>> >>> On the surface this is very straight forward, but it isn't ...<br>> >>> insert into newtable (....)<br>> >>>    select ..., intersection(
A.the_geom, B.the_geom) as the_geom<br>> >>>      from A, B<br>> >>>      where A.the_geom && B.the_geom and<br>> >>>        intersects(A.the_geom, B.the_geom);<br>> >>> This works, but I get a bunch of GEOMETRYCOLLECTION objects in the
<br>> >>> results and out of 1022 collection I have 2780 additional POLYGONs.<br>> >>> So I could do something like:<br>> >>> insert into newtable (....)<br>> >>>     select * from
<br>> >>>       (select ..., (dump(the_geom)).geom as the_geom from newtable<br>> >>>          where geometrytype(the_geom)='GEOMETRYCOLLECTION' ) as foo<br>> >>>     where geometrytype(the_geom)='POLYGON';
<br>> >>> delete from newtable where<br>> geometrytype(the_geom)='GEOMETRYCOLLECTION';<br>> >>> So now comes the tricky part how do you do the difference? I was<br>> >>> thinking I could take A difference newtable but because I have
<br>> >>> multiple little pieces instead of a single piece, I think I am<br>> getting:<br>> >>>   (A - Part1), (A - Part2), (A - Part3) instead of<br>> >>>   (A - Part1 - Part2 - Part3)
<br>> >>> So I think I need to union the polygon pieces from each row that is<br>> >>> dumped above. Is that as simple as tossing part of the dump into a<br>> >>> geomunion()? How would that look?
<br>> >>> -Steve W<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>> >> 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>> > 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: 8<br>> Date: Fri, 02 Feb 2007 09:25:43 -0800<br>> From: Paul Ramsey <
<a href="mailto:pramsey@refractions.net">pramsey@refractions.net</a>><br>> Subject: Re: [postgis-users] How best to do this?<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:45C37417.4070607@refractions.net">45C37417.4070607@refractions.net</a>><br>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
<br>><br>> snaptogrid might help, it is a crude hammer similar in many ways to the<br>> more subtle approaches in GEOS3.<br>><br>> Because the C API didn't change between versions, you may be able to<br>
> simply copy a suitably compiled geos DLL into place, perhaps by<br>> stripping one out of the windows downloads. I don't actually know if our<br>> windows downloads are using GEOS3 though... hrm. Mark CA?<br>
><br>> P<br>><br>> Stephen Woodbridge wrote:<br>> > Paul, et al,<br>> ><br>> > Any chance that someone would have GEOS 3  built for WinXP that I could<br>> > drop into a system currently running:
<br>> ><br>> > "POSTGIS="1.1.3" GEOS="2.2.2-CAPI-1.1.0" PROJ="Rel. 4.4.9, 29 Oct 2004"<br>> > USE_STATS"<br>> ><br>> > "PostgreSQL 8.1.4 on i686-pc-mingw32, compiled by GCC 
gcc.exe (GCC)<br>> > 3.4.2 (mingw-special)"<br>> ><br>> > So I could give this a try.<br>> ><br>> > In the past, I seem to remember people dealing with these problems using<br>> > snaptogrid() - would this potentially help here and how would I change
<br>> > my query to use that?<br>> ><br>> > -Steve<br>> ><br>> > Paul Ramsey wrote:<br>> >> GEOS 3 does include a number of fixes that will help difference and<br>> >> union.
<br>> >><br>> >> P<br>> >><br>> >> On 1-Feb-07, at 9:01 PM, Stephen Woodbridge wrote:<br>> >><br>> >>> OK, one step forward and two steps backward ...<br>> >>>
<br>> >>> I was about to get rid of my gemetrycollections with:<br>> >>><br>> >>> update newtable set the_geom =<br>> >>>  (select geomunion(geom1) from<br>> >>>    (select (dump(the_geom)).geom as geom1) as foo
<br>> >>>     where geometrytype(geom1)='POLYGON'<br>> >>>  )<br>> >>>  where geometrytype(the_geom)='GEOMETRYCOLLECTION';<br>> >>><br>> >>> This worked very nicely once I figured out that this was the way to
<br>> >>> solve the problem. So now each geometry collection is converted into<br>> >>> a polygon or multipolygon and all the linestring and point artifacts<br>> >>> of the intersection are removed.
<br>> >>><br>> >>> select distinct geometrytype(the_geom) from soils2;<br>> >>> POLYGON<br>> >>> MULTIPOLYGON<br>> >>><br>> >>> select * from soils where not isvalid(the_geom);
<br>> >>> reports 0 rows<br>> >>><br>> >>> insert into newtable (..., the_geom)<br>> >>>   select A....,<br>> >>>          difference(A.the_geom, B.the_geom) as the_geom
<br>> >>>   from A, B<br>> >>>   where A.the_geom && B.the_geom and overlaps(A.the_geom, B.the_geom);<br>> >>><br>> >>> NOTICE:  TopologyException: no outgoing dirEdge found
<br>> >>> (287030,892621,892621)<br>> >>><br>> >>> ERROR:  GEOS difference() threw an error!<br>> >>><br>> >>> Now what do I do??? If I have to upgrade it might be easiest to
<br>> >>> upgrade my WinXP laptop if there is an easy way to do that, then dump<br>> >>> and load the data to that.<br>> >>><br>> >>> select postgis_full_version();<br>> >>> "POSTGIS="
1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct<br>> >>> 2004" USE_STATS (procs from 1.1.1 need upgrade)"<br>> >>><br>> >>> select version();<br>> >>> "PostgreSQL 
8.0.8 on i386-portbld-freebsd5.3, compiled by GCC cc<br>> >>> (GCC) 3.4.2 [FreeBSD] 20040728"<br>> >>><br>> >>> -Steve<br>> >>><br>> >>> Stephen Woodbridge wrote:
<br>> >>>> Hi all,<br>> >>>> Sorry the subject line is not more useful, but let me explain.<br>> >>>> 1) I have a set of polgons A and another set of polygon B<br>> >>>> 2) I need to a new set of polygons C that are the union of
<br>> >>>>    A intersect B and A difference B<br>> >>>> So basically B partially covers A and I want to split polygons in a<br>> >>>> into the covered piece(s) and that that is not covered.
<br>> >>>> On the surface this is very straight forward, but it isn't ...<br>> >>>> insert into newtable (....)<br>> >>>>    select ..., intersection(A.the_geom, B.the_geom
) as the_geom<br>> >>>>      from A, B<br>> >>>>      where A.the_geom && B.the_geom and<br>> >>>>        intersects(A.the_geom, B.the_geom);<br>> >>>> This works, but I get a bunch of GEOMETRYCOLLECTION objects in the
<br>> >>>> results and out of 1022 collection I have 2780 additional POLYGONs.<br>> >>>> So I could do something like:<br>> >>>> insert into newtable (....)<br>> >>>>     select * from
<br>> >>>>       (select ..., (dump(the_geom)).geom as the_geom from newtable<br>> >>>>          where geometrytype(the_geom)='GEOMETRYCOLLECTION' ) as foo<br>> >>>>     where geometrytype(the_geom)='POLYGON';
<br>> >>>> delete from newtable where<br>> geometrytype(the_geom)='GEOMETRYCOLLECTION';<br>> >>>> So now comes the tricky part how do you do the difference? I was<br>> >>>> thinking I could take A difference newtable but because I have
<br>> >>>> multiple little pieces instead of a single piece, I think I am<br>> getting:<br>> >>>>   (A - Part1), (A - Part2), (A - Part3) instead of<br>> >>>>   (A - Part1 - Part2 - Part3)
<br>> >>>> So I think I need to union the polygon pieces from each row that is<br>> >>>> dumped above. Is that as simple as tossing part of the dump into a<br>> >>>> geomunion()? How would that look?
<br>> >>>> -Steve W<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>> >>> 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>> >> 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>> > 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>>    Paul Ramsey<br>>    Refractions Research<br>>    <a href="http://www.refractions.net">http://www.refractions.net</a><br>>    <a href="mailto:pramsey@refractions.net">pramsey@refractions.net</a><br>
>    Phone: 250-383-3022<br>>    Cell: 250-885-0632<br>><br>><br>> ------------------------------<br>><br>> Message: 9<br>> Date: Fri, 2 Feb 2007 10:40:36 -0800 (PST)<br>> From: Steve Benzo <
<a href="mailto:steve_benzo@yahoo.com">steve_benzo@yahoo.com</a>><br>> Subject: [postgis-users] Lat/lon bounding box to area?<br>> To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a><br>> Message-ID: <<a href="mailto:404830.54155.qm@web56205.mail.re3.yahoo.com">404830.54155.qm@web56205.mail.re3.yahoo.com</a>><br>> Content-Type: text/plain; charset="iso-8859-1"<br>><br>> Hi,
<br>><br>> This might be a stupid question, but is there a way using PostGIS that I<br>> can take a bounding box (polyline) supplied by a user (they're drawing a box<br>> on the map, from which I get the xmin/ymin/etc from), which I'd like to use
<br>> to get an area from (utlimately acres). My first step will be to get that<br>> polyline into PostGIS (struggling, but should be able to figure it out) and<br>> then apply a trigger which populates an area field from that. Thanks in
<br>> advance.<br>><br>> SB<br>><br>><br>> ---------------------------------<br>> Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and<br>> get things done faster.<br>> -------------- next part --------------
<br>> An HTML attachment was scrubbed...<br>> URL:<br>> <a href="http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/13939878/attachment-0001.html">http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/13939878/attachment-0001.html
</a><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 52, Issue 2<br>
> ********************************************<br>><br><br><br><br>--<br>Regards,<br><br>Mark Thomas<br><a href="mailto:spatialguru.net@gmail.com">spatialguru.net@gmail.com</a><br>205.529.9013<br><br>"Commit to the Lord whatever you do,
<br>    and your plans will succeed." - Proverbs 16:3<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/426bc9a4/attachment-0001.html">
http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/426bc9a4/attachment-0001.html</a><br><br>------------------------------<br><br>Message: 4<br>Date: Fri, 2 Feb 2007 12:15:05 -0800<br>From: "Stone, Matthew (DHS-HISP)" <
<a href="mailto:MStone@dhs.ca.gov">MStone@dhs.ca.gov</a>><br>Subject: [postgis-users] Geocoding<br>To: <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>Message-ID:
<br>        <<a href="mailto:0C2255FE8998DB47858A79FC0F966B8D0196F1A2@dhsexcmsg13.intra.dhs.ca.gov">0C2255FE8998DB47858A79FC0F966B8D0196F1A2@dhsexcmsg13.intra.dhs.ca.gov</a>><br><br>Content-Type: text/plain; charset="us-ascii"
<br><br>Does/Will PostGis have a Geocoding routine built in such as ArcSDE has<br>locators and geocoding processing?  I am curious, as geocoding is the<br>building block of any GIS work I do and I have need of decent<br>open-source solutions that can process millions of records in a batch
<br>mode, or can be implemented on the WEB as a "geocoding service" either<br>again in batch mode, or real time via other web-based applications.  I<br>understand the limitations of this functionality in an open-source
<br>environment, namely the ability of getting decent reference data, but am<br>curious all the same.<br><br><br><br>Maybe a module could be built that accesses the geocoding services<br>provided by Google or Yahoo, of MS Virtual Earth??????
<br><br><br><br>Just thought I would throw this out there.<br><br><br><br>Matthew<br><br><br><br>Matthew Stone, MPH<br>UCSF/CA Dept. of Health Services<br>Health Information & Strategic Planning (HISP)<br><br>Office of County Health Services (OCHS)
<br><br>1501 Capitol Ave MS 5204<br><br>Mailing Address:<br>PO BOX 997413, MS 5204<br>Sacramento CA 95899-7413<br><br>Physical Address:<br><br>1501 Capitol Avenue, Suite 71.5195, MS 5204<br><br>Sacramento, CA 95814<br><br>
_____________________________<br><br>PH: 916-552-9918<br>FAX: 916-552-8260<br><br><a href="mailto:mstone@dhs.ca.gov">mstone@dhs.ca.gov</a><br><br><br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...
<br>URL: <a href="http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/eba2bba7/attachment-0001.html">http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/eba2bba7/attachment-0001.html
</a><br><br>------------------------------<br><br>Message: 5<br>Date: Fri, 2 Feb 2007 13:29:48 -0700<br>From: "Rob Tester" <<a href="mailto:robtester@gmail.com">robtester@gmail.com</a>><br>Subject: RE: [postgis-users] Geocoding
<br>To: "'PostGIS Users Discussion'"<br>        <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>Message-ID: <00b801c74708$e3a9e060$aafda120$@com
><br>Content-Type: text/plain; charset="us-ascii"<br><br>I think that the task of geocoding is fairly easy and I have written a<br>geocode function that uses PostGIS. However, the problem is where to get the<br>
data. In the U.S. you can use Tiger line data from the census, but it is<br>horrible inaccurate.  If you have resources you can purchase more accurate<br>data from other companies like Navteq, or manually correct the census data.
<br><br><br><br>Rob.<br><br><br><br><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 Stone,<br>Matthew (DHS-HISP)<br>Sent: Friday, February 02, 2007 1:15 PM<br>To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a><br>Subject: [postgis-users] Geocoding<br><br><br><br>Does/Will PostGis have a Geocoding routine built in such as ArcSDE has<br>locators and geocoding processing?  I am curious, as geocoding is the<br>building block of any GIS work I do and I have need of decent open-source
<br>solutions that can process millions of records in a batch mode, or can be<br>implemented on the WEB as a "geocoding service" either again in batch mode,<br>or real time via other web-based applications.  I understand the limitations
<br>of this functionality in an open-source environment, namely the ability of<br>getting decent reference data, but am curious all the same.<br><br><br><br>Maybe a module could be built that accesses the geocoding services provided
<br>by Google or Yahoo, of MS Virtual Earth??????<br><br><br><br>Just thought I would throw this out there.<br><br><br><br>Matthew<br><br><br><br>Matthew Stone, MPH<br>UCSF/CA Dept. of Health Services<br>Health Information & Strategic Planning (HISP)
<br><br>Office of County Health Services (OCHS)<br><br>1501 Capitol Ave MS 5204<br><br>Mailing Address:<br>PO BOX 997413, MS 5204<br>Sacramento CA 95899-7413<br><br>Physical Address:<br><br>1501 Capitol Avenue, Suite 71.5195
, MS 5204<br><br>Sacramento, CA 95814<br><br>_____________________________<br><br>PH: 916-552-9918<br>FAX: 916-552-8260<br><br><a href="mailto:mstone@dhs.ca.gov">mstone@dhs.ca.gov</a><br><br><br><br>-------------- next part --------------
<br>An HTML attachment was scrubbed...<br>URL: <a href="http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/5dad45ee/attachment-0001.html">http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/5dad45ee/attachment-0001.html
</a><br><br>------------------------------<br><br>Message: 6<br>Date: Fri, 2 Feb 2007 14:39:10 -0600<br>From: Brad Ediger <<a href="mailto:brad@bradediger.com">brad@bradediger.com</a>><br>Subject: Re: [postgis-users] Geocoding
<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:AA104CF0-B584-4BC9-8619-75D9CDA0D763@bradediger.com">
AA104CF0-B584-4BC9-8619-75D9CDA0D763@bradediger.com</a>><br>Content-Type: text/plain; charset="windows-1252"<br><br>Skipped content of type multipart/alternative-------------- next part --------------<br>A non-text attachment was scrubbed...
<br>Name: smime.p7s<br>Type: application/pkcs7-signature<br>Size: 2421 bytes<br>Desc: not available<br>Url : <a href="http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/025cf519/smime-0001.bin">http://lists.refractions.net/pipermail/postgis-users/attachments/20070202/025cf519/smime-0001.bin
</a><br><br>------------------------------<br><br>Message: 7<br>Date: Fri, 2 Feb 2007 12:44:36 -0800 (PST)<br>From: Brent Pedersen <<a href="mailto:bpederse@nature.Berkeley.EDU">bpederse@nature.Berkeley.EDU</a>><br>
Subject: Re: [postgis-users] Geocoding<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:Pine.SOC.4.64.0702021241330.5318@nature.Berkeley.EDU">
Pine.SOC.4.64.0702021241330.5318@nature.Berkeley.EDU</a>><br>Content-Type: text/plain; charset="x-unknown"<br><br>this is perhaps not useful if you've already written your own geocoder,<br>but there's a python module geopy which lets you use any of the web
<br>geocoding services (yahoo,google,<a href="http://geocoder.us">geocoder.us</a>,etc.) to do geocoding.<br>one could probably call that from postgres via PL/Python.<br>-brent<br><br><br>On Fri, 2 Feb 2007, Brad Ediger wrote:
<br><br>> Yes, the TIGER/Line data can be horribly inaccurate, and the Navteq/Tele<br>> Atlas data is horribly expensive.<br>><br>> Google Maps provides a geocoder web service<br>> (<a href="http://www.google.com/apis/maps/documentation/#Geocoding_Examples">
http://www.google.com/apis/maps/documentation/#Geocoding_Examples</a>) via HTTP<br>> but it is rate-limited to 50,000 requests per day. They have some<br>> commercial-use restrictions, IIRC, and you can't use any of the GMaps
<br>> services for real-time tracking. But it might fit the bill.<br>><br>> Their commercial-use service is pretty darn expensive, too. Starts at $10,000<br>> per year and goes up from there.<br>><br>> hth,
<br>> Brad<br>><br>> On Feb 2, 2007, at 2:29 PM, Rob Tester wrote:<br>><br>>> I think that the task of geocoding is fairly easy and I have written a<br>>> geocode function that uses PostGIS. However, the problem is where to get
<br>>> the data. In the U.S. you can use Tiger line data from the census, but it<br>>> is horrible inaccurate.  If you have resources you can purchase more<br>>> accurate data from other companies like Navteq, or manually correct the
<br>>> census data.<br>>><br>>><br>>><br>>> Rob.<br>>><br>>><br>>><br>>><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 Stone,<br>>> Matthew (DHS-HISP)
<br>>> Sent: Friday, February 02, 2007 1:15 PM<br>>> To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>>> Subject: [postgis-users] Geocoding<br>>>
<br>>><br>>><br>>> Does/Will PostGis have a Geocoding routine built in such as ArcSDE has<br>>> locators and geocoding processing?  I am curious, as geocoding is the<br>>> building block of any GIS work I do and I have need of decent open-source
<br>>> solutions that can process millions of records in a batch mode, or can be<br>>> implemented on the WEB as a �geocoding service� either again in batch mode,<br>>> or real time via other web-based applications.  I understand the
<br>>> limitations of this functionality in an open-source environment, namely the<br>>> ability of getting decent reference data, but am curious all the same.<br>>><br>>><br>>><br>>> Maybe a module could be built that accesses the geocoding services provided
<br>>> by Google or Yahoo, of MS Virtual Earth??????<br>>><br>>><br>>><br>>> Just thought I would throw this out there.<br>>><br>>><br>>><br>>> Matthew<br>>><br>
>><br>>><br>>> Matthew Stone, MPH<br>>> UCSF/CA Dept. of Health Services<br>>> Health Information & Strategic Planning (HISP)<br>>><br>>> Office of County Health Services (OCHS)
<br>>><br>>> 1501 Capitol Ave MS 5204<br>>><br>>> Mailing Address:<br>>> PO BOX 997413, MS 5204<br>>> Sacramento CA 95899-7413<br>>><br>>> Physical Address:<br>>><br>>> 1501 Capitol Avenue, Suite 
71.5195, MS 5204<br>>><br>>> Sacramento, CA 95814<br>>><br>>> _____________________________<br>>><br>>> PH: 916-552-9918<br>>> FAX: 916-552-8260<br>>><br>>> <a href="mailto:mstone@dhs.ca.gov">
mstone@dhs.ca.gov</a><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>Message: 8<br>Date: Fri, 2 Feb 2007 16:05:54 -0500<br>From: <a href="mailto:Doug_Newcomb@fws.gov">Doug_Newcomb@fws.gov</a><br>Subject: RE: [postgis-users] Geocoding<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:OFD7B82F01.2C98618F-ON85257276.0071C793-85257276.0073E591@fws.gov">OFD7B82F01.2C98618F-ON85257276.0071C793-85257276.0073E591@fws.gov
</a>><br>Content-Type: text/plain; charset=UTF-8<br><br><br>The Tiger data is getting better.  At least here in North Carolina, the<br>Census Bureau is working with the local county governments to produce an<br>enhanced TIGER dataset .   
7.6 meter accuracy for roads.  They want to be<br>done by 2008.<br><br>Related links below.<br><br><br><a href="http://www.census.gov/geo/www/tiger/future/future_tl.html">http://www.census.gov/geo/www/tiger/future/future_tl.html
</a><br><a href="http://www.census.gov/geo/mtep_obj2/mtr.html">http://www.census.gov/geo/mtep_obj2/mtr.html</a><br><br><br><a href="http://72.14.209.104">http://72.14.209.104</a><br>/search?q=cache:RsQ3w_Wgn9EJ:<a href="http://wagic.wa.gov/Presentations03/Aug18/MB082103%2520WAGIC%2520MTEP%2520Update.ppt+census+TIGER+enhanced&hl=en&ct=clnk&cd=36&gl=us&client=firefox-a">
wagic.wa.gov/Presentations03/Aug18/MB082103%2520WAGIC%2520MTEP%2520Update.ppt+census+TIGER+enhanced&hl=en&ct=clnk&cd=36&gl=us&client=firefox-a</a><br><br><br>Doug<br>Doug Newcomb<br>USFWS<br>Raleigh, NC
<br>919-856-4520 ext. 14 <a href="mailto:doug_newcomb@fws.gov">doug_newcomb@fws.gov</a><br>---------------------------------------------------------------------------------------------------------<br><br>The opinions I express are my own and are not representative of the
<br>official policy of the U.S.Fish and Wildlife Service or Dept. of Interior.<br>I left my signature file in /dev/null<br><br><br><br>             "Rob Tester"<br>             <robtester@gmail.<br>             com>                                                       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>             02/02/2007 03:29          RE: [postgis-users] Geocoding<br>             PM<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>I think that the task of geocoding is fairly easy and I have written a<br>geocode function that uses PostGIS. However, the problem is where to get
<br>the data. In the U.S. you can use Tiger line data from the census, but it<br>is horrible inaccurate.  If you have resources you can purchase more<br>accurate data from other companies like Navteq, or manually correct the
<br>census data.<br><br>Rob.<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 Stone,<br>Matthew (DHS-HISP)<br>Sent: Friday, February 02, 2007 1:15 PM<br>To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a><br>Subject: [postgis-users] Geocoding<br><br>Does/Will PostGis have a Geocoding routine built in such as ArcSDE has<br>locators and geocoding processing?  I am curious, as geocoding is the<br>building block of any GIS work I do and I have need of decent open-source
<br>solutions that can process millions of records in a batch mode, or can be<br>implemented on the WEB as a "geocoding service" either again in batch mode,<br>or real time via other web-based applications.  I understand the
<br>limitations of this functionality in an open-source environment, namely the<br>ability of getting decent reference data, but am curious all the same.<br><br>Maybe a module could be built that accesses the geocoding services provided
<br>by Google or Yahoo, of MS Virtual Earth??????<br><br>Just thought I would throw this out there.<br><br>Matthew<br><br>Matthew Stone, MPH<br>UCSF/CA Dept. of Health Services<br>Health Information & Strategic Planning (HISP)
<br>Office of County Health Services (OCHS)<br>1501 Capitol Ave MS 5204<br>Mailing Address:<br>PO BOX 997413, MS 5204<br>Sacramento CA 95899-7413<br>Physical Address:<br>1501 Capitol Avenue, Suite 71.5195, MS 5204<br>Sacramento, CA 95814
<br>_____________________________<br>PH: 916-552-9918<br>FAX: 916-552-8260<br><a href="mailto:mstone@dhs.ca.gov">mstone@dhs.ca.gov</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>Message: 9<br>Date: Fri, 2 Feb 2007 13:23:43 -0800<br>From: "Dan Putler" <<a href="mailto:putler@sauder.ubc.ca">putler@sauder.ubc.ca</a>><br>Subject: Re: [postgis-users] Geocoding<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:E7DA921F-3E7B-4733-83AF-3D7150B84CFC@sauder.ubc.ca">E7DA921F-3E7B-4733-83AF-3D7150B84CFC@sauder.ubc.ca
</a>><br>Content-Type: text/plain;       format=flowed;  delsp=yes;<br>        charset="WINDOWS-1252"<br><br>While not PostGIS based, there is C-based PAGC (<a href="http://www.pagcgeo.org">www.pagcgeo.org</a>
) that<br>does do batch geocoding, and could be configured to run under CGI as<br>a web based application. PAGC is designed to work with shapefile<br>sets, and can be easily customized to work with any address ranged<br>road network file (albeit, less customization will be needed for US
<br>and Canadian layers).<br><br>There are problems with TIGER/Line, but its performance is actually<br>not that much worse than commercial products. The following link may<br>be of some interest on this:<br><br><a href="http://lagic.lsu.edu/LGISC/Presentations/2005/LGISC-PRES-20050420-">
http://lagic.lsu.edu/LGISC/Presentations/2005/LGISC-PRES-20050420-</a><br>Geocoding_Evaluation.pdf<br><br>In terms of commercial products, a road network layer for a single<br>state runs around $1000 to $1500.<br><br>Dan<br>
<br>On 2-Feb-07, at 12:39 PM, Brad Ediger wrote:<br><br>> Yes, the TIGER/Line data can be horribly inaccurate, and the Navteq/<br>> Tele Atlas data is horribly expensive.<br>><br>> Google Maps provides a geocoder web service (
<a href="http://www.google.com/">http://www.google.com/</a><br>> apis/maps/documentation/#Geocoding_Examples) via HTTP but it is<br>> rate-limited to 50,000 requests per day. They have some commercial-<br>> use restrictions, IIRC, and you can't use any of the GMaps services
<br>> for real-time tracking. But it might fit the bill.<br>><br>> Their commercial-use service is pretty darn expensive, too. Starts<br>> at $10,000 per year and goes up from there.<br>><br>> hth,<br>> Brad
<br>><br>> On Feb 2, 2007, at 2:29 PM, Rob Tester wrote:<br>><br>>> I think that the task of geocoding is fairly easy and I have<br>>> written a geocode function that uses PostGIS. However, the problem
<br>>> is where to get the data. In the U.S. you can use Tiger line data<br>>> from the census, but it is horrible inaccurate.  If you have<br>>> resources you can purchase more accurate data from other companies
<br>>> like Navteq, or manually correct the census data.<br>>><br>>><br>>> Rob.<br>>><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<br>>> Of Stone, Matthew (DHS-HISP)
<br>>> Sent: Friday, February 02, 2007 1:15 PM<br>>> To: <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>>> Subject: [postgis-users] Geocoding<br>>>
<br>>><br>>> Does/Will PostGis have a Geocoding routine built in such as ArcSDE<br>>> has locators and geocoding processing?  I am curious, as geocoding<br>>> is the building block of any GIS work I do and I have need of
<br>>> decent open-source solutions that can process millions of records<br>>> in a batch mode, or can be implemented on the WEB as a �geocoding<br>>> service� either again in batch mode, or real time via other web-
<br>>> based applications.  I understand the limitations of this<br>>> functionality in an open-source environment, namely the ability of<br>>> getting decent reference data, but am curious all the same.
<br>>><br>>><br>>> Maybe a module could be built that accesses the geocoding services<br>>> provided by Google or Yahoo, of MS Virtual Earth??????<br>>><br>>><br>>> Just thought I would throw this out there.
<br>>><br>>><br>>> Matthew<br>>><br>>><br>>> Matthew Stone, MPH<br>>> UCSF/CA Dept. of Health Services<br>>> Health Information & Strategic Planning (HISP)<br>>><br>
>> Office of County Health Services (OCHS)<br>>><br>>> 1501 Capitol Ave MS 5204<br>>><br>>> Mailing Address:<br>>> PO BOX 997413, MS 5204<br>>> Sacramento CA 95899-7413<br>>>
<br>>> Physical Address:<br>>><br>>> 1501 Capitol Avenue, Suite 71.5195, MS 5204<br>>><br>>> Sacramento, CA 95814<br>>><br>>> _____________________________<br>>><br>>> PH: 916-552-9918
<br>>> FAX: 916-552-8260<br>>><br>>> <a href="mailto:mstone@dhs.ca.gov">mstone@dhs.ca.gov</a><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>> 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: 10<br>Date: Fri, 02 Feb 2007 22:09:13 +0000<br>From: Mark Cave-Ayland <<a href="mailto:mark.cave-ayland@ilande.co.uk">
mark.cave-ayland@ilande.co.uk</a>><br>Subject: Re: [postgis-users] How best to do this?<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
><br>Message-ID: <1170454153.19577.4.camel@mca-desktop><br>Content-Type: text/plain<br><br>On Fri, 2007-02-02 at 09:25 -0800, Paul Ramsey wrote:<br>> snaptogrid might help, it is a crude hammer similar in many ways to the
<br>> more subtle approaches in GEOS3.<br>><br>> Because the C API didn't change between versions, you may be able to<br>> simply copy a suitably compiled geos DLL into place, perhaps by<br>> stripping one out of the windows downloads. I don't actually know if our
<br>> windows downloads are using GEOS3 though... hrm. Mark CA?<br>><br>> P<br><br>All the Windows downloads are currently using GEOS 2.2.3, although more<br>people are beginning to ask about GEOS3. If a GEOS3 RC4 comes out that
<br>would compile cleanly on Win32, I'd consider coming up with some form of<br>test installer - the extra usage may help find those tricky last minute<br>bugs before release.<br><br><br>Kind regards,<br><br>Mark.<br>
<br><br><br><br>------------------------------<br><br>Message: 11<br>Date: Fri, 02 Feb 2007 22:11:52 +0000<br>From: Mark Cave-Ayland <<a href="mailto:mark.cave-ayland@ilande.co.uk">mark.cave-ayland@ilande.co.uk</a>>
<br>Subject: Re: [postgis-users] Errors in jdbc rpm build on Fedora Core 6<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>Message-ID: <
1170454312.19577.8.camel@mca-desktop><br>Content-Type: text/plain<br><br>On Fri, 2007-02-02 at 16:04 +0200, Dido wrote:<br><br>> How I can tackle with this situation ?<br>><br>> Best regards,<br>> Dido<br><br>
<br>Hi Dido,<br><br>This is a known issue which is fixed in current SVN. I can't remember<br>off the top of my head the exact patch, but you should be able to find<br>it in the postgis-commit list archives.<br><br><br>
HTH,<br><br>Mark.<br><br><br><br><br>------------------------------<br><br>Message: 12<br>Date: Fri, 02 Feb 2007 17:24:43 -0800<br>From: Paul Ramsey <<a href="mailto:pramsey@refractions.net">pramsey@refractions.net</a>
><br>Subject: [postgis-users] GEOS 3.0.0rc4<br>To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>>,<br>        GEOS Development List <
<a href="mailto:geos-devel@geos.refractions.net">geos-devel@geos.refractions.net</a>><br>Message-ID: <<a href="mailto:45C3E45B.1050906@refractions.net">45C3E45B.1050906@refractions.net</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
<br><br>I have wrapped up an rc4 with January's bug fixes.<br><br><a href="http://geos.refractions.net/geos-3.0.0rc4.tar.bz2">http://geos.refractions.net/geos-3.0.0rc4.tar.bz2</a><br><br>Mark Cave-Ayland wrote:<br>> On Fri, 2007-02-02 at 09:25 -0800, Paul Ramsey wrote:
<br>>> snaptogrid might help, it is a crude hammer similar in many ways to the<br>>> more subtle approaches in GEOS3.<br>>><br>>> Because the C API didn't change between versions, you may be able to
<br>>> simply copy a suitably compiled geos DLL into place, perhaps by<br>>> stripping one out of the windows downloads. I don't actually know if our<br>>> windows downloads are using GEOS3 though... hrm. Mark CA?
<br>>><br>>> P<br>><br>> All the Windows downloads are currently using GEOS 2.2.3, although more<br>> people are beginning to ask about GEOS3. If a GEOS3 RC4 comes out that<br>> would compile cleanly on Win32, I'd consider coming up with some form of
<br>> test installer - the extra usage may help find those tricky last minute<br>> bugs before release.<br><br><br>--<br><br>   Paul Ramsey<br>   Refractions Research<br>   <a href="http://www.refractions.net">http://www.refractions.net
</a><br>   <a href="mailto:pramsey@refractions.net">pramsey@refractions.net</a><br>   Phone: 250-383-3022<br>   Cell: 250-885-0632<br><br><br>------------------------------<br><br>Message: 13<br>Date: Sat, 03 Feb 2007 08:45:29 +0100
<br>From: TECHER David <<a href="mailto:davidtecher@yahoo.fr">davidtecher@yahoo.fr</a>><br>Subject: Re: [postgis-users] GEOS 3.0.0rc4<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:45C43D99.6000001@yahoo.fr">45C43D99.6000001@yahoo.fr</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Hi Paul, Marc and PostGIS users
<br><br>I've tried to compil it for MinGW/Msys<br><br>I don't succeed (problem from ld.exe )<br><br>But I succeed if I used the idea from MCA done in this e-mail<br><br><a href="http://geos.refractions.net/pipermail/geos-devel/2007-January/002767.html">
http://geos.refractions.net/pipermail/geos-devel/2007-January/002767.html</a><br><br>Sorry I don't try the ideas form the following e-mails<br><br><a href="http://geos.refractions.net/pipermail/geos-devel/2007-January/002769.html">
http://geos.refractions.net/pipermail/geos-devel/2007-January/002769.html</a><br>and so on...<br><br>I think Marc that your idea from<br><a href="http://geos.refractions.net/pipermail/geos-devel/2007-January/002781.html">
http://geos.refractions.net/pipermail/geos-devel/2007-January/002781.html</a><br>is good.<br><br><br><br><br>Paul Ramsey a �crit :<br>> I have wrapped up an rc4 with January's bug fixes.<br>><br>> <a href="http://geos.refractions.net/geos-3.0.0rc4.tar.bz2">
http://geos.refractions.net/geos-3.0.0rc4.tar.bz2</a><br>><br>> Mark Cave-Ayland wrote:<br>>> On Fri, 2007-02-02 at 09:25 -0800, Paul Ramsey wrote:<br>>>> snaptogrid might help, it is a crude hammer similar in many ways to
<br>>>> the more subtle approaches in GEOS3.<br>>>><br>>>> Because the C API didn't change between versions, you may be able to<br>>>> simply copy a suitably compiled geos DLL into place, perhaps by
<br>>>> stripping one out of the windows downloads. I don't actually know if<br>>>> our windows downloads are using GEOS3 though... hrm. Mark CA?<br>>>><br>>>> P<br>>><br>>> All the Windows downloads are currently u...
<br><br>[Message clipped]  </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<br><br>"Commit to the Lord whatever you do,
<br>    and your plans will succeed." - Proverbs 16:3