For the error with Union, I had this happen yesterday.  To solve, I used Simplify(geom,<very small number>) before passing to GeomUnion.  that might work for you.<br><br><div><span class="gmail_quote">On 2/2/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. 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 (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;       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} -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>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>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>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 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 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 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 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 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 can take a bounding box (polyline) supplied by a user (they're drawing a box on the map, from which I get the xmin/ymin/etc from), which I'd like to use to get an area from (utlimately acres). My first step will be to get that polyline into PostGIS (struggling, but should be able to figure it out) and then apply a trigger which populates an area field from that. Thanks in advance.
<br><br>SB<br><br><br>---------------------------------<br>Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster.<br>-------------- next part --------------<br>An HTML attachment was scrubbed...
<br>URL: <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></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