Re: [postgis-users] Publishing WMS from PostTGIS table with ARRAY type field

2011-03-18 Thread Stefan Keller
Hi Oscar

I don't understand what you really did.

1. GeoServer can only serve tables with id and geometry.

2. Can you specify the view you defined and the join?

To me that would work too (except that the geometry attribute is lacking):

CREATE VIEW resource_file_v(id, files) AS (
  SELECT id, unnest(files) AS files FROM resource_file
);

Yours, S.

2011/3/15 Òscar Vidal Calbet :
> Hey everyone,
>
> I published some WMS services in Geoserver from PostGIS database and I
> need to make a GetFeaureInfo that gives me data from different tables,
> which can be solved by creating a VIEW. The problem is that I need
> that one of the fields in the VIEW be allowed to give me N entities
> referring to N files (strings with the path) related with the feature.
> To solve that in Postgres I created an ARRAY of  Composite Types in
> the table:
>
> CREATE TYPE file AS (
>
>    file_name        varchar(64),
>
>    file_url         varchar(256),
>
>    ...
> );
>
>
>
> CREATE TABLE resource_file
>
> (
>
>  id serial NOT NULL,
>
>  from_table varchar(32) NOT NULL,
>
>  with_id integer NOT NULL,
>
>  files ARRAY file,
>
>  CONSTRAINT resource_file_pkey PRIMARY KEY (id)
>
> )
>
> So I'm creating a VIEW with the feature JOIN resource_file to get the
> info of the feature with all the (N) files associated. But when I'm
> publishing the VIEW, apparently there is no error but the ARRAY field
> is missing. I check in the OpenGIS® Web Map Server Implementation
> Specification
> , but I didn't find anything about if it can be done or not.
>
> Is it possible?
> I would like to solve the problem by having only one request to the
> server to get the N files. Any suggestions?
> Maybe I can create a function in Postgres that builds already the
> content (a string with html tags) to show the N files and pass this to
> the view?
>
> Thanks in advance!
> oscar
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] First SouthAmerican FOSS4G Conference

2011-03-18 Thread César Medina

Hi all,
I am presenting the First SouthAmerican FOSS4G Conference, will be held at the 
Mayor University in 8th April 2011
we will have presentations about OSGeo Foundation and OSM, gvSIG, among others.
Help us to promote it, see the twitter and facebook 
page.http://twitter.com/Foss4g_chile and 
http://www.facebook.com/?ref=logo#!/profile.php?id=12192893828
More information about the conference 
http://www.foss4gchile.org/blog/primer-foss4g-sudamericano/
kinds RegardsOrganizer Committee1st SouthAmerican FOSS4G Conference
  ___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
Look in config.log for the details about the libxml2 problem.

When configuring with gettext, is the compile error still the same?  Also, look 
farther up the compile output in the Terminal, there should be a more 
meaningful error, like some header not found, and what file is involved.  ie 
for me without gettext, it's:

gcc -Os -arch i386 -arch x86_64  -fno-common -DPIC   -DUSE_NLS 
-DLOCALEDIR=\"/usr/local/pgsql-9.0/share/locale\"   -c shp2pgsql-core.c
In file included from shp2pgsql-core.c:15:
shp2pgsql-core.h:17:21: error: libintl.h: No such file or directory

followed by a bunch of warnings, then the lipo error.

On Mar 18, 2011, at 10:54 AM, Ackbar Joolia wrote:

> Hi William,
> As you have said, its failing when I set the CFLAGS. 
> 
> Sorry I meant to say configure works without the CFLAGS="-Os -arch i386 -arch 
> x86_64", but the make fails.
> 
> using the gettext didn't make any difference, I still get the error:
> checking for xmlInitParser in -lxml2... no
> configure: error: could not find libxml2 
> 
> (btw, I want to get postgis2.0 installed on the snow leopard 10.6 to use the 
> postgis raster)
> 
> 
> 
> On 18 March 2011 15:10, William Kyngesburye  wrote:
> 
> > This is strange, when I use the following command
> > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> > --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> > --with-raster --with-topology --disable-nls \
> > --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> >
> > without setting the environment variables (the exports),
> 
> Without the *FLAGS, you just get a single-arch build, most likely x86_64 on 
> OSX 10.6.  And most builds default to using the debug flag, so I always set 
> CFLAGS to -Os.
> 
> The deployment target is just something I do and is not critical.
> 
> > the compile works (although the make is still failing),
> 
> Well, make IS the compile.  Or do you mean the configure works?
> 
> Maybe --disable-nls isn't all that's needed - what I actually did was 
> configure for my custom gettext, and assumed that disabling it would work.  I 
> suppose since you have Macports you could try using that - instead of 
> --disable-nls, try:
> 
> --with-gettext=/opt/local
> 
> > but when I use the environment variables, the ./configure fails with this 
> > error:
> > configure: error: could not find libxml2
> >
> > I don't know why it can't find it, when its /opt/local/bin/xml2-config here.
> >
> It should find it from the system, no need for macports.  Though it's 
> possible Macports is confusing the configuration.  Generally, I don't think 
> Macports is automatically checked, it depends on the software.  Straight Gnu 
> configure won't, but some software checks for it.
> 
> > On 18 March 2011 14:26, William Kyngesburye  wrote:
> > On Mar 18, 2011, at 9:13 AM, William Kyngesburye wrote:
> >
> > > On Mar 18, 2011, at 8:34 AM, William Kyngesburye wrote:
> > >
> > >> How are you configuring PostGIS?  I have build instructions on my site 
> > >> (use the framework alternate at the bottom of the postgis page).  It's 
> > >> more than a simple configure, you need to set some environment variables.
> > >
> > > Of course, those instructions are for 1.5.  For 2.0:
> > >
> > > export MACOSX_DEPLOYMENT_TARGET=10.6
> > > export CFLAGS="-Os -arch i386 -arch x86_64"
> > > export PG_CPPFLAGS="-arch i386 -arch x86_64"
> > > export SHLIB_LINK="-arch i386 -arch x86_64"
> > > export LDFLAGS="-arch i386 -arch x86_64"
> > > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > > --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config 
> > > \
> > > --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> > > --with-raster --with-topology \
> > > --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> > >
> > >
> > > So, lwgeom builds, but I get the error in shp2pgsql-core.c.  The other 
> > > shp2pgsql sources compile.  It looks like shp2pgsql-core.c compile 
> > > doesn't get any -I flags so it can't find my libintl header.
> > >
> >
> > Got - try configuring without NLS:
> >
> > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> > --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> > --with-raster --with-topology --disable-nls \
> > --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> >
> > -
> > William Kyngesburye 
> > http://www.kyngchaos.com/
> >
> > "Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, 
> > and all for things that the beasts of the jungle would not deign to possess 
> > - money to purchase the effeminate pleasures of weaklings.  And yet withal 
> > bound down by silly customs that make them slaves to their unhappy lot 
> > while firm in the belief that they be the lords of creation enjoying the 
>

Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread Ackbar Joolia
Hi William,
As you have said, its failing when I set the CFLAGS.

Sorry I meant to say configure works without the CFLAGS="-Os -arch i386
-arch x86_64", but the make fails.

using the gettext didn't make any difference, I still get the error:
checking for xmlInitParser in -lxml2... no
configure: error: could not find libxml2

(btw, I want to get postgis2.0 installed on the snow leopard 10.6 to use the
postgis raster)



On 18 March 2011 15:10, William Kyngesburye  wrote:
>
>
> > This is strange, when I use the following command
> > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config
> \
> > --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> > --with-raster --with-topology --disable-nls \
> > --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> >
> > without setting the environment variables (the exports),
>
> Without the *FLAGS, you just get a single-arch build, most likely x86_64 on
> OSX 10.6.  And most builds default to using the debug flag, so I always set
> CFLAGS to -Os.
>
> The deployment target is just something I do and is not critical.
>
> > the compile works (although the make is still failing),
>
> Well, make IS the compile.  Or do you mean the configure works?
>
> Maybe --disable-nls isn't all that's needed - what I actually did was
> configure for my custom gettext, and assumed that disabling it would work.
>  I suppose since you have Macports you could try using that - instead of
> --disable-nls, try:
>
> --with-gettext=/opt/local
>
> > but when I use the environment variables, the ./configure fails with this
> error:
> > configure: error: could not find libxml2
> >
> > I don't know why it can't find it, when its /opt/local/bin/xml2-config
> here.
> >
> It should find it from the system, no need for macports.  Though it's
> possible Macports is confusing the configuration.  Generally, I don't think
> Macports is automatically checked, it depends on the software.  Straight Gnu
> configure won't, but some software checks for it.
>
> > On 18 March 2011 14:26, William Kyngesburye 
> wrote:
> > On Mar 18, 2011, at 9:13 AM, William Kyngesburye wrote:
> >
> > > On Mar 18, 2011, at 8:34 AM, William Kyngesburye wrote:
> > >
> > >> How are you configuring PostGIS?  I have build instructions on my site
> (use the framework alternate at the bottom of the postgis page).  It's more
> than a simple configure, you need to set some environment variables.
> > >
> > > Of course, those instructions are for 1.5.  For 2.0:
> > >
> > > export MACOSX_DEPLOYMENT_TARGET=10.6
> > > export CFLAGS="-Os -arch i386 -arch x86_64"
> > > export PG_CPPFLAGS="-arch i386 -arch x86_64"
> > > export SHLIB_LINK="-arch i386 -arch x86_64"
> > > export LDFLAGS="-arch i386 -arch x86_64"
> > > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > >
> --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> > > --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> > > --with-raster --with-topology \
> > >
> --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> > >
> > >
> > > So, lwgeom builds, but I get the error in shp2pgsql-core.c.  The other
> shp2pgsql sources compile.  It looks like shp2pgsql-core.c compile doesn't
> get any -I flags so it can't find my libintl header.
> > >
> >
> > Got - try configuring without NLS:
> >
> > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config
> \
> > --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> > --with-raster --with-topology --disable-nls \
> > --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> >
> > -
> > William Kyngesburye 
> > http://www.kyngchaos.com/
> >
> > "Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting,
> and all for things that the beasts of the jungle would not deign to possess
> - money to purchase the effeminate pleasures of weaklings.  And yet withal
> bound down by silly customs that make them slaves to their unhappy lot while
> firm in the belief that they be the lords of creation enjoying the only real
> pleasures of existence
> >
> > - the wisdom of Tarzan
> >
> >
> >
>
> -
> William Kyngesburye 
> http://www.kyngchaos.com/
>
> "The beast is actively interested only in now, and, as it is always now and
> always shall be, there is an eternity of time for the accomplishment of
> objects."
>
> - the wisdom of Tarzan
>
>
>
>
>
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
On Mar 18, 2011, at 9:31 AM, Ackbar Joolia wrote:

> the compile works (although the make is still failing), 

... it looks like the --disable-nls option is broken, it's not disabling it, 
thus the same compile error.

-
William Kyngesburye 
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and 
all for things that the beasts of the jungle would not deign to possess - money 
to purchase the effeminate pleasures of weaklings.  And yet withal bound down 
by silly customs that make them slaves to their unhappy lot while firm in the 
belief that they be the lords of creation enjoying the only real pleasures of 
existence

- the wisdom of Tarzan


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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
On Mar 18, 2011, at 9:31 AM, Ackbar Joolia wrote:

> This is strange, when I use the following command
> ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> --with-raster --with-topology --disable-nls \
> --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> 
> without setting the environment variables (the exports),

Without the *FLAGS, you just get a single-arch build, most likely x86_64 on OSX 
10.6.  And most builds default to using the debug flag, so I always set CFLAGS 
to -Os.

The deployment target is just something I do and is not critical.

> the compile works (although the make is still failing),

Well, make IS the compile.  Or do you mean the configure works?

Maybe --disable-nls isn't all that's needed - what I actually did was configure 
for my custom gettext, and assumed that disabling it would work.  I suppose 
since you have Macports you could try using that - instead of --disable-nls, 
try:

--with-gettext=/opt/local

> but when I use the environment variables, the ./configure fails with this 
> error:
> configure: error: could not find libxml2
> 
> I don't know why it can't find it, when its /opt/local/bin/xml2-config here.
> 
It should find it from the system, no need for macports.  Though it's possible 
Macports is confusing the configuration.  Generally, I don't think Macports is 
automatically checked, it depends on the software.  Straight Gnu configure 
won't, but some software checks for it.

> On 18 March 2011 14:26, William Kyngesburye  wrote:
> On Mar 18, 2011, at 9:13 AM, William Kyngesburye wrote:
> 
> > On Mar 18, 2011, at 8:34 AM, William Kyngesburye wrote:
> >
> >> How are you configuring PostGIS?  I have build instructions on my site 
> >> (use the framework alternate at the bottom of the postgis page).  It's 
> >> more than a simple configure, you need to set some environment variables.
> >
> > Of course, those instructions are for 1.5.  For 2.0:
> >
> > export MACOSX_DEPLOYMENT_TARGET=10.6
> > export CFLAGS="-Os -arch i386 -arch x86_64"
> > export PG_CPPFLAGS="-arch i386 -arch x86_64"
> > export SHLIB_LINK="-arch i386 -arch x86_64"
> > export LDFLAGS="-arch i386 -arch x86_64"
> > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> > --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> > --with-raster --with-topology \
> > --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> >
> >
> > So, lwgeom builds, but I get the error in shp2pgsql-core.c.  The other 
> > shp2pgsql sources compile.  It looks like shp2pgsql-core.c compile doesn't 
> > get any -I flags so it can't find my libintl header.
> >
> 
> Got - try configuring without NLS:
> 
> ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> --with-raster --with-topology --disable-nls \
> --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> 
> -
> William Kyngesburye 
> http://www.kyngchaos.com/
> 
> "Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and 
> all for things that the beasts of the jungle would not deign to possess - 
> money to purchase the effeminate pleasures of weaklings.  And yet withal 
> bound down by silly customs that make them slaves to their unhappy lot while 
> firm in the belief that they be the lords of creation enjoying the only real 
> pleasures of existence
> 
> - the wisdom of Tarzan
> 
> 
> 

-
William Kyngesburye 
http://www.kyngchaos.com/

"The beast is actively interested only in now, and, as it is always now and 
always shall be, there is an eternity of time for the accomplishment of 
objects."

- the wisdom of Tarzan





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


[postgis-users] Problems with ST_Within in an island of a multipolygon

2011-03-18 Thread Larry Reeder
I have a layer called "foo" of about 5000 polygons.   One of the
polygons is a multipolygon with island shells.  ST_Within isn't
working as expected for points within that island shell.


Here's my table:

foo_spatial=# \d foo
  Table "public.foo"
  Column  |   Type   |Modifiers
--+--+-
 gid  | integer  | not null default nextval('foo_gid_seq'::regclass)
 the_geom | geometry |
Indexes:
"foo_pkey" PRIMARY KEY, btree (gid)
"foo_the_geom_key" gist (the_geom)
Check constraints:
"enforce_dims_the_geom" CHECK (st_ndims(the_geom) = 2)
"enforce_geotype_the_geom" CHECK (geometrytype(the_geom) =
'MULTIPOLYGON'::text OR the_geom IS NULL)
"enforce_srid_the_geom" CHECK (st_srid(the_geom) = (-1))


ST_Within returns true when asked if a point inside the island belongs
to the polygon that contains the island:

foo_spatial=# select ST_Within(ST_GeomFromText('POINT (-115.04252
36.05137)', -1), the_geom) from foo where gid = 4933;
 st_within
---
 t
(1 row)

However, when I ask if any polygons contain this point, I don't get any back:

foo_spatial=#  SELECT gid from foo where
ST_Within(ST_GeomFromText('POINT (-115.04252 36.05137)', -1),
the_geom);
 gid
-
(0 rows)


Does this make sense?I know PostGIS can handle the general problem
of ST_Within for island sub-polygons because when I extract this
multipolygon into a separate table by itself, the queries work as
expected.  There seems to be something happening with other polygons
in the layer that is breaking this.   Initially I did have some bad
polygons in the layer, but I used the cool script here:
http://linfiniti.com/2010/07/cleaning-geometries-inside-postgis/.
That fixed my bad polygons, and now all polygons are valid:

foo_spatial=# select count(*) from foo where ST_IsValid(the_geom) = 'f';
 count
---
 0
(1 row)


But still ST_Within isn't working as expected.   Here's my version info:

foo_spatial=# select version();
   version
-
 PostgreSQL 8.4.7 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real
(Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5, 64-bit
(1 row)

foo_spatial=# SELECT postgis_full_version();
 postgis_full_version
---
 POSTGIS="1.5.1" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23
September 2009" LIBXML="2.7.6" USE_STATS
(1 row)

dash_spatial=# select count(*) from foo where ST_IsValid(the_geom) = 'f';
 count
---
 0
(1 row)


Anyone have any ideas?



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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread Ackbar Joolia
This is strange, when I use the following command
./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
--with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
--with-projdir=/Library/Frameworks/PROJ.framework/unix \
--with-raster --with-topology --disable-nls \
--with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config

without setting the environment variables (the exports), the compile works
(although the make is still failing), but when I use the environment
variables, the ./configure fails with this error:
configure: error: could not find libxml2

I don't know why it can't find it, when its /opt/local/bin/xml2-config here.

On 18 March 2011 14:26, William Kyngesburye  wrote:

> On Mar 18, 2011, at 9:13 AM, William Kyngesburye wrote:
>
> > On Mar 18, 2011, at 8:34 AM, William Kyngesburye wrote:
> >
> >> How are you configuring PostGIS?  I have build instructions on my site
> (use the framework alternate at the bottom of the postgis page).  It's more
> than a simple configure, you need to set some environment variables.
> >
> > Of course, those instructions are for 1.5.  For 2.0:
> >
> > export MACOSX_DEPLOYMENT_TARGET=10.6
> > export CFLAGS="-Os -arch i386 -arch x86_64"
> > export PG_CPPFLAGS="-arch i386 -arch x86_64"
> > export SHLIB_LINK="-arch i386 -arch x86_64"
> > export LDFLAGS="-arch i386 -arch x86_64"
> > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config
> \
> > --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> > --with-raster --with-topology \
> > --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> >
> >
> > So, lwgeom builds, but I get the error in shp2pgsql-core.c.  The other
> shp2pgsql sources compile.  It looks like shp2pgsql-core.c compile doesn't
> get any -I flags so it can't find my libintl header.
> >
>
> Got - try configuring without NLS:
>
> ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> --with-raster --with-topology --disable-nls \
> --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
>
> -
> William Kyngesburye 
> http://www.kyngchaos.com/
>
> "Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting,
> and all for things that the beasts of the jungle would not deign to possess
> - money to purchase the effeminate pleasures of weaklings.  And yet withal
> bound down by silly customs that make them slaves to their unhappy lot while
> firm in the belief that they be the lords of creation enjoying the only real
> pleasures of existence
>
> - the wisdom of Tarzan
>
>
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
On Mar 18, 2011, at 9:13 AM, William Kyngesburye wrote:

> On Mar 18, 2011, at 8:34 AM, William Kyngesburye wrote:
> 
>> How are you configuring PostGIS?  I have build instructions on my site (use 
>> the framework alternate at the bottom of the postgis page).  It's more than 
>> a simple configure, you need to set some environment variables.
> 
> Of course, those instructions are for 1.5.  For 2.0:
> 
> export MACOSX_DEPLOYMENT_TARGET=10.6
> export CFLAGS="-Os -arch i386 -arch x86_64"
> export PG_CPPFLAGS="-arch i386 -arch x86_64"
> export SHLIB_LINK="-arch i386 -arch x86_64"
> export LDFLAGS="-arch i386 -arch x86_64"
> ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> --with-raster --with-topology \
> --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> 
> 
> So, lwgeom builds, but I get the error in shp2pgsql-core.c.  The other 
> shp2pgsql sources compile.  It looks like shp2pgsql-core.c compile doesn't 
> get any -I flags so it can't find my libintl header.
> 

Got - try configuring without NLS:

./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
--with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
--with-projdir=/Library/Frameworks/PROJ.framework/unix \
--with-raster --with-topology --disable-nls \
--with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config

-
William Kyngesburye 
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and 
all for things that the beasts of the jungle would not deign to possess - money 
to purchase the effeminate pleasures of weaklings.  And yet withal bound down 
by silly customs that make them slaves to their unhappy lot while firm in the 
belief that they be the lords of creation enjoying the only real pleasures of 
existence

- the wisdom of Tarzan


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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread Nicklas Avén
Yes you are right
My fault. The problem is if you use GEOS trunk, then you have to update
it since the configure script makes no difference between latest geos
trunk and an older trunk since they both is 3.3

/Nicklas





/Nicklas



On Fri, 2011-03-18 at 09:10 -0500, William Kyngesburye wrote:
> On Mar 18, 2011, at 8:40 AM, Nicklas Avén wrote:
> 
> > 
> >> Does postgis2.0 have dependencies on particular library versions? like 
> >> geos?
> > 
> > Yes. You must use latest GEOS trunk with PostGIS trunk.
> > 
> > I think the latest changes in GEOS needed for PostGIS trunk is less than
> > a month old.
> 
> Don't know about that - I just compiled with released GEOS 3.2.2 with no 
> errors in lwgeom.  It looks like the error is in shp2pgsql, which doesn't 
> need GEOS.
> 
> -
> William Kyngesburye 
> http://www.kyngchaos.com/
> 
> "I ache, therefore I am.  Or in my case - I am, therefore I ache."
> 
> - Marvin
> 
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 


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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
On Mar 18, 2011, at 8:34 AM, William Kyngesburye wrote:

> How are you configuring PostGIS?  I have build instructions on my site (use 
> the framework alternate at the bottom of the postgis page).  It's more than a 
> simple configure, you need to set some environment variables.

Of course, those instructions are for 1.5.  For 2.0:

export MACOSX_DEPLOYMENT_TARGET=10.6
export CFLAGS="-Os -arch i386 -arch x86_64"
export PG_CPPFLAGS="-arch i386 -arch x86_64"
export SHLIB_LINK="-arch i386 -arch x86_64"
export LDFLAGS="-arch i386 -arch x86_64"
./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
--with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
--with-projdir=/Library/Frameworks/PROJ.framework/unix \
--with-raster --with-topology \
--with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config


So, lwgeom builds, but I get the error in shp2pgsql-core.c.  The other 
shp2pgsql sources compile.  It looks like shp2pgsql-core.c compile doesn't get 
any -I flags so it can't find my libintl header.

-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
On Mar 18, 2011, at 8:40 AM, Nicklas Avén wrote:

> 
>> Does postgis2.0 have dependencies on particular library versions? like geos?
> 
> Yes. You must use latest GEOS trunk with PostGIS trunk.
> 
> I think the latest changes in GEOS needed for PostGIS trunk is less than
> a month old.

Don't know about that - I just compiled with released GEOS 3.2.2 with no errors 
in lwgeom.  It looks like the error is in shp2pgsql, which doesn't need GEOS.

-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread Nicklas Avén

> Does postgis2.0 have dependencies on particular library versions? like geos?

Yes. You must use latest GEOS trunk with PostGIS trunk.

I think the latest changes in GEOS needed for PostGIS trunk is less than
a month old.


/Nicklas

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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
How are you configuring PostGIS?  I have build instructions on my site (use the 
framework alternate at the bottom of the postgis page).  It's more than a 
simple configure, you need to set some environment variables.

This sort of error often happens when there was another error earlier in 
compilation that wasn't enough to stop compilation then.

On Mar 18, 2011, at 6:38 AM, AJ7 wrote:

> 
> 
> 
> Mark Cave-Ayland-3 wrote:
>> 
>> 
>> That looks strange. I've only seen similar symptoms before when I've run 
>> out of memory/disk space when attempting a build.
>> 
>> 
>> ATB,
>> 
>> Mark.
>> 
> hi mark, I have got more than enough disk space, and i have tried rebooting
> my machine several time in case it was out of memorybut still get the
> problem. 
> 
> Does postgis2.0 have dependencies on particular library versions? like geos?
> 
> -- 
> View this message in context: 
> http://old.nabble.com/postgis-2-installation-failing-tp31153068p31180402.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread AJ7



Mark Cave-Ayland-3 wrote:
> 
> 
> That looks strange. I've only seen similar symptoms before when I've run 
> out of memory/disk space when attempting a build.
> 
> 
> ATB,
> 
> Mark.
> 
hi mark, I have got more than enough disk space, and i have tried rebooting
my machine several time in case it was out of memorybut still get the
problem. 

Does postgis2.0 have dependencies on particular library versions? like geos?

-- 
View this message in context: 
http://old.nabble.com/postgis-2-installation-failing-tp31153068p31180402.html
Sent from the PostGIS - User mailing list archive at Nabble.com.

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


Re: [postgis-users] Infinite loop in st_intersects - because of incorrect data out of st_transform?

2011-03-18 Thread Mark Cave-Ayland

On 10/03/11 15:13, Magnus Hagander wrote:


What was the discussion with the GEOS people like? Did they consider this to
be a bug in GEOS or a bug in PostGIS?


Ugh. Re-reading the thread, I realize I've misunderstood this. I
thought both issues were "in the same way", but I see now once was
geos and one was proj. Thus, I expected your cross post in the
followup covered it :-) So given that, I haven't actually contacted
the geos community specifically - unless they are represented on this
list.

Having said that, if you (or somebody else who actually knows the
PostGIS code well) would handle that contact, that would be great.
Given my lack of knowledge in the 10 or so stack frames between my
calling and the actual geos call, I fear I won't be able to answer
their follow-up questions in a good way :-)


I think a basic question of "how do we handle NaNs, -Inf/+Inf etc.?", 
i.e. should GEOS error if it finds them or silently discard them could 
be answered better on the main GEOS list. Obviously there is some 
overlap here, but Martin Davis is probably the person with the best feel 
for how this should work and I don't think he's on any of the PostGIS lists.



ATB,

Mark.

--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: [postgis-users] make install as root on v1.5.2

2011-03-18 Thread Mark Cave-Ayland

On 10/03/11 02:58, Bill Teluk wrote:


Hi,
I have installed PostGIS 1.5.2 on a PostgreSQL 9.0.4 (OpenSCG RPM) on an
RHEL5.5 system - the instructions in the included README.postgis indicate
that I should perform "make install" as "postgres" user.  This didn't work
and generated the error below:

/bin/mkdir -p '/opt/postgres/9.0/share/postgresql/contrib/postgis-1.5'
/bin/mkdir: cannot create directory

`/opt/postgres/9.0/share/postgresql/contrib/postgis-1.5': Permission
denied
make[1]: *** [installdirs] Error 1
make[1]: Leaving directory

`/home/maptools/other/pgis_1_5_2/postgis-1.5.2/postgis'
make: *** [postgis-install] Error 2

I overcame this by performing "make install" as "root" user - I did this
because I noted that the online HTML documentation for v1.5 doesn't indicate
which user to install as - at least as far as I could see (ref
http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630263
)

Is this a documentation error, or should I really be installing as user
"postgres"?


Given that you've installed under /opt, I would think that it would be 
absolutely fine to build and install as the postgres user. It seems to 
me that this is either a permissions or an SELinux issue (if enabled).



HTH,

Mark.

--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: [postgis-users] make generates incorrect PERL variable value on v1.5.2

2011-03-18 Thread Mark Cave-Ayland

On 10/03/11 02:56, Bill Teluk wrote:


I used the solution provided in the Wiki page reporting the fault eg. after
running configure

sed 's,$(PERL),perl,g'postgis/Makefile2
mv postgis/Makefile2 postgis/Makefile


... and it then worked for me.  I was wondering if this is actually a bug or
is it something about my system that caused this problem?


That sounds strange. Can you show us the mangled and un-mangled versions?


ATB,

Mark.

--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread Mark Cave-Ayland

On 15/03/11 14:07, AJ7 wrote:


Hi,
I downloaded the source for Postgis2.0, and when trying to install (make) it
on snow leopard , its failing and this is the error:

collect2: ld returned 1 exit status
lipo: can't open input file:
/var/folders/Uz/Uz-J-wY0HAW5jjSNhXRDNk+++TI/-Tmp-//ccjtYJzA.out (No such
file or directory)
make[1]: *** [postgis-2.0.so] Error 1
make: *** [all] Error 1

- The ./configure worked fine. any ideas?
thanks


That looks strange. I've only seen similar symptoms before when I've run 
out of memory/disk space when attempting a build.



ATB,

Mark.

--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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