Re: [postgis-users] PostGIS table doesn't show up in QGIS

2011-09-14 Thread Mr. Puneet Kishor

On Sep 14, 2011, at 9:41 PM, Ben Madin wrote:

> Puneet,
> 
> Not uncommon problem - QGIS looks in the Geometry_columns table - you might 
> want to check that the geometry column is registered in this table. If not 
> you can run :
> 
> SELECT Populate_Geometry_Columns(); -- for all tables
> 
> or
> 
> SELECT Populate_Geometry_Columns('public.myspatial_table'::regclass); -- for 
> myspatial_table
> 
> http://postgis.refractions.net/documentation/manual-1.5/Populate_Geometry_Columns.html
> 
> Note that using AddGeometryColumns() does this, but it can be corrupted. 
> Importing tables doesn't do this automagically.



That was it Ben. Thanks. I had written a Perl program to load a sackful of data 
tables, and then combined them to make a seamless table. Doing so didn't create 
the correct row in the geometry_columns table.

Now I know.


> 
> cheers
> 
> Ben
> 
> 
> 
> 
> 
> 
> On 15/09/2011, at 10:07 AM, Puneet Kishor wrote:
> 
>> This happens from time to time... I have a table like so
>> 
>> CREATE TABLE foo
>> (
>> gid serial NOT NULL,
>> the_geom geometry,
>> CONSTRAINT foo_pk PRIMARY KEY (gid ),
>> CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2),
>> CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4326)
>> )
>> WITH (
>> OIDS=FALSE
>> );
>> 
>> ALTER TABLE foo
>> OWNER TO postgres;
>> 
>> CREATE INDEX foo_geom_idx
>> ON states
>> USING gist
>> (the_geom );
>> 
>> Yet, the above table doesn't show up in QGIS open dialog. If I check the box 
>> to show tables with no geometry, then the above table shows up as not having 
>> any geometry. The table has 20K+ rows, and while a few rows have invalid 
>> geometry, for the most part, the table has good data in it.
>> 
>> What is the reason for the above?
>> 
>> Puneet.
>> ___
>> 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 table doesn't show up in QGIS

2011-09-14 Thread Ben Madin
Puneet,

Not uncommon problem - QGIS looks in the Geometry_columns table - you might 
want to check that the geometry column is registered in this table. If not you 
can run :

SELECT Populate_Geometry_Columns(); -- for all tables

or

SELECT Populate_Geometry_Columns('public.myspatial_table'::regclass); -- for 
myspatial_table

http://postgis.refractions.net/documentation/manual-1.5/Populate_Geometry_Columns.html

Note that using AddGeometryColumns() does this, but it can be corrupted. 
Importing tables doesn't do this automagically.

cheers

Ben






On 15/09/2011, at 10:07 AM, Puneet Kishor wrote:

> This happens from time to time... I have a table like so
> 
> CREATE TABLE foo
> (
>  gid serial NOT NULL,
>  the_geom geometry,
>  CONSTRAINT foo_pk PRIMARY KEY (gid ),
>  CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2),
>  CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4326)
> )
> WITH (
>  OIDS=FALSE
> );
> 
> ALTER TABLE foo
>  OWNER TO postgres;
> 
> CREATE INDEX foo_geom_idx
>  ON states
>  USING gist
>  (the_geom );
> 
> Yet, the above table doesn't show up in QGIS open dialog. If I check the box 
> to show tables with no geometry, then the above table shows up as not having 
> any geometry. The table has 20K+ rows, and while a few rows have invalid 
> geometry, for the most part, the table has good data in it.
> 
> What is the reason for the above?
> 
> Puneet.
> ___
> 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] PostGIS table doesn't show up in QGIS

2011-09-14 Thread Puneet Kishor
This happens from time to time... I have a table like so

CREATE TABLE foo
(
  gid serial NOT NULL,
  the_geom geometry,
  CONSTRAINT foo_pk PRIMARY KEY (gid ),
  CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2),
  CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4326)
)
WITH (
  OIDS=FALSE
);

ALTER TABLE foo
  OWNER TO postgres;

CREATE INDEX foo_geom_idx
  ON states
  USING gist
  (the_geom );

Yet, the above table doesn't show up in QGIS open dialog. If I check the box to 
show tables with no geometry, then the above table shows up as not having any 
geometry. The table has 20K+ rows, and while a few rows have invalid geometry, 
for the most part, the table has good data in it.

What is the reason for the above?

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


Re: [postgis-users] Temporal image analysis in PostGIS

2011-09-14 Thread Pierre Racine
How/where is your time stored? In the raster itself or as the time attribute of 
the filesystem?

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of maduako ikechukwu
> Sent: Wednesday, September 14, 2011 3:56 PM
> To: postgis-users@postgis.refractions.net
> Subject: [postgis-users] Temporal image analysis in PostGIS
> 
> Hi,
> I mean different images gathered at different times. For example MODIS images
> of different days, how do i bring in the temporal (time) variation into the
> database to offer time based queries and analysis on these images?. Because i
> intend to have these images loaded in one table, how do include time of
> acquisition into the table?
> 
> --
> 
> Iyke Maduako
> 
> Masters in Geospatial Technologies
> [Erasmus-Mundus]
> 
> IfGI - Institute for Geoinformatics
> University of Muenster Germany
> 
> Phone: +4915129048460
> 
> Alternative Email:iykefirstcl...@yahoo.com
> 
> 
> 

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


Re: [postgis-users] OSX Server (Lion) link failures with Apple-provided PostgreSQL

2011-09-14 Thread William Kyngesburye
>From all this, it looks to me like Apple's Postgres is standard behavior.

Basically, as you say, you must compile Postgres extensions with the same 
architectures as Postgres.  And to do this you use the PG_CPPFLAGS and 
SHLIB_LINK variables.  These two are needed because they don't inherit from 
CFLAGS or LDFLAGS, and is normal behavior (though maybe an oversight for 
Postgres?).  (my instructions setting CFLAGS and LDFLAGS as well is probably 
just my making sure, since makefile.global, at least, forces LDFLAGS to include 
the Postgres-configured archs.)

If you want to compile only one architecture, then yes you need to do some 
hacking.  But there's nothing wrong with Postgres or Postgis makefiles.  

You could copy the whole pgxs folder and pg_config and change them all to be 
self-consistent, plus your hacks.  I do something similar so I can build 
multiple copies of Postgres and Postgis for different OSX versions and 
shared/static library configurations.  Your custom pg_config needs to point to 
your custom pgxs.  your custom makefile.global has your hacks.  configure 
postgis with --with-pgconfig=/path/to/your/pg_config.


On Sep 14, 2011, at 3:47 PM, Jerry Carter wrote:

> Figured it out.  I believe that the PostGIS makefiles need to be changed for 
> Lion Server.  There is a workaround but I am unable to provide a more 
> appropriate patch.
> 
> System description:
>  * OS X Server 10.7.1 (Lion) running in 64-bit mode
>  * XCode 4.2 (4D177b) which includes GCC version 
> 'i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1'
>  * PostgreSQL 9.0.4 as built by Apple
> 
> Problem:
> 
> Following the normal steps
> 
>   cd postgis-1.5.3
>   ./configure
>   make
> 
> compilation succedes but the link fails.
> 
>   ld: warning: ignoring file ../liblwgeom/liblwgeom.a, file was built for 
> archive which is not the architecture being linked (i386)
> 
> Looking back at the output, you will notice that the arguments used for 
> compilation of postgis specify two architectures: "gcc -arch x86_64 -arch 
> i386 …"
> 
> 
> The problem is that the provided version of Postgres expects PostGIS to be a 
> hybrid 32/64 bit library.  To understand why this is occurring, we must 
> follow the convoluted chain of makefiles.  Starting at the top, the 'make' 
> command invokes the 'Makefile' which on this platform triggers several 
> commands including a 'gnumake -f GNUmakefile postgis'.  This in turn invokes 
> the 'postgis/Makefile' which includes the build infrastructure for Postgres 
> extensions (/usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk) that brings in 
> '/usr/lib/postgresql/pgxs/src/Makefile.global'.  Doing this ensures that 
> PostGIS is built using the same compiler settings as PostgreSQL.  Apple 
> builds Postgres as a universal binary, a hybrid of 32 and 64 bit, and they 
> expect all extensions to do likewise.
> 
> Workaround:
> 
> sudo cp /usr/lib/postgresql/pgxs/src/Makefile.global 
> /usr/lib/postgresql/pgxs/src/Makefile.global.orig
> sudo vi /usr/lib/postgresql/pgxs/src/Makefile.global
> # remove either '-arch i386' or '-arch x86_64' from the CFLAGS and LDFLAGS 
> definitions as appropriate, e.g. remove i386 for 64 bit platforms.
> 
> 
> Better Solution:
> 
> Rejigger the PostGIS makefile to build a hybrid library.
> 
> For the dependencies, this is straightforward.  Here are the steps for Proj.4:
> 
>   cd proj-4.7.0
>   ./configure
>   make
>   sudo make install
> 
>   setenv LDFLAGS="-arch i386 -m32"
>   setenv CFLAGS="-arch i386 -m32"
>   setenv CXXFLAGS="-arch i386 -m32"
>   ./configure --host=i386-apple-darwin11.1.0
>   make clean
>   make
>   lipo create src/.libs/libproj.0.6.6.dylib 
> /usr/local/lib/libproj.0.6.6.dylib -output libproj.0.6.6.dylib
>   sudo mv libproj.0.6.6.dylib /usr/local/lib/libproj.0.6.6.dylib
>   sudo chown root /usr/local/lib/libproj.0.6.6.dylib
>   unsetenv LDFLAGS
>   unsetenv CFLAGS
>   unsetenv CXXFLAGS
> 
> The steps for GEOS are similar.
> 
> Similar steps work for PostGIS.  These can be done manually but I'm not sure 
> how to automate them with the current make environment.
> 
> 
> 
> On Sep 14, 2011, at 11:16 AM, Jerry Carter wrote:
> 
>> 
>> I'm trying to compile PostGIS 1.5.3 and getting tripped up with 32 vs. 64 
>> bit.  Following the normal process,
>> 
>>  cd postgis-1.5.3
>>  ./configure
>>  make
>> 
>> compilation proceeds but the link fails.
>> 
>>  ld: warning: ignoring file ../liblwgeom/liblwgeom.a, file was built for 
>> archive which is not the architecture being linked (i386)
>> 
>> On the linking step, I noticed that the architecture flags specify both 32 
>> and 64 bit, i.e. "-arch x86_64 -arch i386", but can't figure out how to 
>> disable 32 bit.  I've already rebuilt Proj.4 4.7.0 and GEOS 3.2.2 as hybrid 
>> 32+64 bit libraries.
>> 
>> Any suggestions to either disable 32-bit entirely for PostGIS or to get the 
>> makefiles to build liblwgeom as a hybr

Re: [postgis-users] ogr2ogr GMT to Pg result is rotated -90

2011-09-14 Thread Puneet Kishor

On Sep 14, 2011, at 4:17 PM, Puneet Kishor wrote:

> I inherited a bunch of GMT files, so I converted them to Pg using ogr2ogr
> 
>$ogr2ogr -f "PostgreSQL" PG:".." -a_srs "EPSG:4326" .gmt -nln 
> schema.table
> 
> Interestingly, the result is rotated -90 deg. Any idea why that happened and 
> how I could correct it?


Small update... the result is not really rotated -90, but it looks like lat and 
lng have gotten flipped. The raw data has lat, lng, and perhaps ogr2ogr was 
expecting lng, lat? If so, is there an option to flip the data as it converts?


> 
> Also, I was expecting these files to convert into POLYGONs, however the 
> resulting geometry was POINTs. Is there a way I could have ogr2ogr force the 
> data into POLYGONs?
> 
> Puneet.
> 

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


[postgis-users] Temporal image analysis in PostGIS

2011-09-14 Thread maduako ikechukwu
Hi,
I mean different images gathered at different times. For example MODIS
images of different days, how do i bring in the temporal (time) variation
into the database to offer time based queries and analysis on these images?.
Because i intend to have these images loaded in one table, how do include
time of acquisition into the table?

-- 
Iyke Maduako

Masters in Geospatial Technologies
[Erasmus-Mundus]
IfGI - Institute for Geoinformatics
University of Muenster Germany
Phone: +4915129048460
Alternative Email:iykefirstcl...@yahoo.com
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] ogr2ogr GMT to Pg result is rotated -90

2011-09-14 Thread Puneet Kishor
I inherited a bunch of GMT files, so I converted them to Pg using ogr2ogr

$ogr2ogr -f "PostgreSQL" PG:".." -a_srs "EPSG:4326" .gmt -nln 
schema.table

Interestingly, the result is rotated -90 deg. Any idea why that happened and 
how I could correct it?

Also, I was expecting these files to convert into POLYGONs, however the 
resulting geometry was POINTs. Is there a way I could have ogr2ogr force the 
data into POLYGONs?

Puneet.

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


Re: [postgis-users] OSX Server (Lion) link failures with Apple-provided PostgreSQL

2011-09-14 Thread Jerry Carter
Figured it out.  I believe that the PostGIS makefiles need to be changed for 
Lion Server.  There is a workaround but I am unable to provide a more 
appropriate patch.

System description:
  * OS X Server 10.7.1 (Lion) running in 64-bit mode
  * XCode 4.2 (4D177b) which includes GCC version 
'i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1'
  * PostgreSQL 9.0.4 as built by Apple

Problem:

Following the normal steps

cd postgis-1.5.3
./configure
make

compilation succedes but the link fails.

ld: warning: ignoring file ../liblwgeom/liblwgeom.a, file was built for 
archive which is not the architecture being linked (i386)

Looking back at the output, you will notice that the arguments used for 
compilation of postgis specify two architectures: "gcc -arch x86_64 -arch i386 
…"


The problem is that the provided version of Postgres expects PostGIS to be a 
hybrid 32/64 bit library.  To understand why this is occurring, we must follow 
the convoluted chain of makefiles.  Starting at the top, the 'make' command 
invokes the 'Makefile' which on this platform triggers several commands 
including a 'gnumake -f GNUmakefile postgis'.  This in turn invokes the 
'postgis/Makefile' which includes the build infrastructure for Postgres 
extensions (/usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk) that brings in 
'/usr/lib/postgresql/pgxs/src/Makefile.global'.  Doing this ensures that 
PostGIS is built using the same compiler settings as PostgreSQL.  Apple builds 
Postgres as a universal binary, a hybrid of 32 and 64 bit, and they expect all 
extensions to do likewise.

Workaround:

sudo cp /usr/lib/postgresql/pgxs/src/Makefile.global 
/usr/lib/postgresql/pgxs/src/Makefile.global.orig
sudo vi /usr/lib/postgresql/pgxs/src/Makefile.global
# remove either '-arch i386' or '-arch x86_64' from the CFLAGS and LDFLAGS 
definitions as appropriate, e.g. remove i386 for 64 bit platforms.


Better Solution:

Rejigger the PostGIS makefile to build a hybrid library.

For the dependencies, this is straightforward.  Here are the steps for Proj.4:

cd proj-4.7.0
./configure
make
sudo make install

setenv LDFLAGS="-arch i386 -m32"
setenv CFLAGS="-arch i386 -m32"
setenv CXXFLAGS="-arch i386 -m32"
./configure --host=i386-apple-darwin11.1.0
make clean
make
lipo create src/.libs/libproj.0.6.6.dylib 
/usr/local/lib/libproj.0.6.6.dylib -output libproj.0.6.6.dylib
sudo mv libproj.0.6.6.dylib /usr/local/lib/libproj.0.6.6.dylib
sudo chown root /usr/local/lib/libproj.0.6.6.dylib
unsetenv LDFLAGS
unsetenv CFLAGS
unsetenv CXXFLAGS

The steps for GEOS are similar.

Similar steps work for PostGIS.  These can be done manually but I'm not sure 
how to automate them with the current make environment.



On Sep 14, 2011, at 11:16 AM, Jerry Carter wrote:

> 
> I'm trying to compile PostGIS 1.5.3 and getting tripped up with 32 vs. 64 
> bit.  Following the normal process,
> 
>   cd postgis-1.5.3
>   ./configure
>   make
> 
> compilation proceeds but the link fails.
> 
>   ld: warning: ignoring file ../liblwgeom/liblwgeom.a, file was built for 
> archive which is not the architecture being linked (i386)
> 
> On the linking step, I noticed that the architecture flags specify both 32 
> and 64 bit, i.e. "-arch x86_64 -arch i386", but can't figure out how to 
> disable 32 bit.  I've already rebuilt Proj.4 4.7.0 and GEOS 3.2.2 as hybrid 
> 32+64 bit libraries.
> 
> Any suggestions to either disable 32-bit entirely for PostGIS or to get the 
> makefiles to build liblwgeom as a hybrid?  Thanks much.
> 
> -=- Jerry
> 
> P.S. I am using GCC version 'i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1' 
> which is shipped with Xcode 4.2.
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] OSX Server (Lion) linking failures on i386 architecture

2011-09-14 Thread William Kyngesburye
Just point --pgconfig to the Lion postgres.

I know Postgres compiles with the Lion llvm.

Now that I think about it more, you should leave out the 
MACOSX_DEPLOYMENT_TARGET export.  I just tried Postgis (with my Postgres) and 
it compiles.

The Postgis makefiles themselves don't need those env exports, it's the 
Postgres makefile fragments that it includes that do.

On Sep 14, 2011, at 12:50 PM, Jerry Carter wrote:

> This does not work.  There are at least two major variables which have 
> changed in that time.  First, the GCC version has changed.  Second, 
> PostgreSQL is now shipped with Lion Server and may have a different pgxs.mk 
> environment for compilation.
> 
> It looks like environment settings defined before running './configure' are 
> picked up everywhere except for the GNUmakefile postgis target.  Still 
> digging on that.
> 
> -=- Jerry
> 
> 
> On Sep 14, 2011, at 12:57 PM, William Kyngesburye wrote:
> 
>> 2 thoughts:
>> 
>> • See my postgis build instructions.
>> 
>> http://www.kyngchaos.com/macosx/build/postgis
>> 
>> The Snow Leopard instructions should work for Lion.
>> 
>> • I have ready-made packages for Postgres and PostGIS.
>> 
>> On Sep 14, 2011, at 11:16 AM, Jerry Carter wrote:
>> 
>>> 
>>> I'm trying to compile PostGIS 1.5.3 and getting tripped up with 32 vs. 64 
>>> bit.  Following the normal process,
>>> 
>>> cd postgis-1.5.3
>>> ./configure
>>> make
>>> 
>>> compilation proceeds but the link fails.
>>> 
>>> ld: warning: ignoring file ../liblwgeom/liblwgeom.a, file was built for 
>>> archive which is not the architecture being linked (i386)
>>> 
>>> On the linking step, I noticed that the architecture flags specify both 32 
>>> and 64 bit, i.e. "-arch x86_64 -arch i386", but can't figure out how to 
>>> disable 32 bit.  I've already rebuilt Proj.4 4.7.0 and GEOS 3.2.2 as hybrid 
>>> 32+64 bit libraries.
>>> 
>>> Any suggestions to either disable 32-bit entirely for PostGIS or to get the 
>>> makefiles to build liblwgeom as a hybrid?  Thanks much.
>>> 
>>> -=- Jerry
>>> 
>>> P.S. I am using GCC version 'i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1' 
>>> which is shipped with Xcode 4.2.
>>> ___
>>> postgis-users mailing list
>>> postgis-users@postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> 
>> -
>> William Kyngesburye 
>> http://www.kyngchaos.com/
>> 
>> Theory of the Universe
>> 
>> There is a theory which states that if ever anyone discovers exactly what 
>> the universe is for and why it is here, it will instantly disappear and be 
>> replaced by something even more bizarrely inexplicable.  There is another 
>> theory which states that this has already happened.
>> 
>> -Hitchhiker's Guide to the Galaxy 2nd season intro
>> 
>> 
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

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

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy


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

All generalizations are dangerous, even this one.


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


Re: [postgis-users] OSX Server (Lion) linking failures on i386 architecture

2011-09-14 Thread Jerry Carter
This does not work.  There are at least two major variables which have changed 
in that time.  First, the GCC version has changed.  Second, PostgreSQL is now 
shipped with Lion Server and may have a different pgxs.mk environment for 
compilation.

It looks like environment settings defined before running './configure' are 
picked up everywhere except for the GNUmakefile postgis target.  Still digging 
on that.

-=- Jerry


On Sep 14, 2011, at 12:57 PM, William Kyngesburye wrote:

> 2 thoughts:
> 
> • See my postgis build instructions.
> 
> http://www.kyngchaos.com/macosx/build/postgis
> 
> The Snow Leopard instructions should work for Lion.
> 
> • I have ready-made packages for Postgres and PostGIS.
> 
> On Sep 14, 2011, at 11:16 AM, Jerry Carter wrote:
> 
>> 
>> I'm trying to compile PostGIS 1.5.3 and getting tripped up with 32 vs. 64 
>> bit.  Following the normal process,
>> 
>>  cd postgis-1.5.3
>>  ./configure
>>  make
>> 
>> compilation proceeds but the link fails.
>> 
>>  ld: warning: ignoring file ../liblwgeom/liblwgeom.a, file was built for 
>> archive which is not the architecture being linked (i386)
>> 
>> On the linking step, I noticed that the architecture flags specify both 32 
>> and 64 bit, i.e. "-arch x86_64 -arch i386", but can't figure out how to 
>> disable 32 bit.  I've already rebuilt Proj.4 4.7.0 and GEOS 3.2.2 as hybrid 
>> 32+64 bit libraries.
>> 
>> Any suggestions to either disable 32-bit entirely for PostGIS or to get the 
>> makefiles to build liblwgeom as a hybrid?  Thanks much.
>> 
>> -=- Jerry
>> 
>> P.S. I am using GCC version 'i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1' 
>> which is shipped with Xcode 4.2.
>> ___
>> postgis-users mailing list
>> postgis-users@postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> -
> William Kyngesburye 
> http://www.kyngchaos.com/
> 
> Theory of the Universe
> 
> There is a theory which states that if ever anyone discovers exactly what the 
> universe is for and why it is here, it will instantly disappear and be 
> replaced by something even more bizarrely inexplicable.  There is another 
> theory which states that this has already happened.
> 
> -Hitchhiker's Guide to the Galaxy 2nd season intro
> 
> 

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


Re: [postgis-users] OSX Server (Lion) linking failures on i386 architecture

2011-09-14 Thread William Kyngesburye
2 thoughts:

• See my postgis build instructions.

http://www.kyngchaos.com/macosx/build/postgis

The Snow Leopard instructions should work for Lion.

• I have ready-made packages for Postgres and PostGIS.

On Sep 14, 2011, at 11:16 AM, Jerry Carter wrote:

> 
> I'm trying to compile PostGIS 1.5.3 and getting tripped up with 32 vs. 64 
> bit.  Following the normal process,
> 
>   cd postgis-1.5.3
>   ./configure
>   make
> 
> compilation proceeds but the link fails.
> 
>   ld: warning: ignoring file ../liblwgeom/liblwgeom.a, file was built for 
> archive which is not the architecture being linked (i386)
> 
> On the linking step, I noticed that the architecture flags specify both 32 
> and 64 bit, i.e. "-arch x86_64 -arch i386", but can't figure out how to 
> disable 32 bit.  I've already rebuilt Proj.4 4.7.0 and GEOS 3.2.2 as hybrid 
> 32+64 bit libraries.
> 
> Any suggestions to either disable 32-bit entirely for PostGIS or to get the 
> makefiles to build liblwgeom as a hybrid?  Thanks much.
> 
> -=- Jerry
> 
> P.S. I am using GCC version 'i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1' 
> which is shipped with Xcode 4.2.
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

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

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the 
universe is for and why it is here, it will instantly disappear and be replaced 
by something even more bizarrely inexplicable.  There is another theory which 
states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro


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


[postgis-users] OSX Server (Lion) linking failures on i386 architecture

2011-09-14 Thread Jerry Carter

I'm trying to compile PostGIS 1.5.3 and getting tripped up with 32 vs. 64 bit.  
Following the normal process,

cd postgis-1.5.3
./configure
make

compilation proceeds but the link fails.

ld: warning: ignoring file ../liblwgeom/liblwgeom.a, file was built for 
archive which is not the architecture being linked (i386)

On the linking step, I noticed that the architecture flags specify both 32 and 
64 bit, i.e. "-arch x86_64 -arch i386", but can't figure out how to disable 32 
bit.  I've already rebuilt Proj.4 4.7.0 and GEOS 3.2.2 as hybrid 32+64 bit 
libraries.

Any suggestions to either disable 32-bit entirely for PostGIS or to get the 
makefiles to build liblwgeom as a hybrid?  Thanks much.

-=- Jerry

 P.S. I am using GCC version 'i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1' 
which is shipped with Xcode 4.2.
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Temporal image analysis in PostGIS

2011-09-14 Thread Pierre Racine
> loading multi-band images with different timestamps in PostGIS ( observed at
> different time), how can one deal with the time attribute of these images in 
> case
> of time-dependent queries and analysis on these images?

You mean one band has a time stamp and another band of the same image has 
another time stamp?

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


Re: [postgis-users] calculate NDVI from multiband raster

2011-09-14 Thread Pierre Racine
Hi Marco,

MapAlgebra taking multiple band or multiple raster is not implemented yet. You 
can however try the plpgsql prototype of two raster ST_Mapalgebra at:

http://trac.osgeo.org/postgis/browser/trunk/raster/scripts/plpgsql/st_mapalgebra.sql

Just execute the .sql file in PostgreSQL/PostGIS and do something like:

SELECT ST_MapAlgebra(ST_MapAlgebra(rast, 4, rast, 3, "rast1 - rast2", "32BSI"), 
ST_MapAlgebra(rast, 4, rast, 3, "rast1 + rast2", "32BSI"), "rast1 / rast2", 
"32BF")
FROM your rastertable

Be careful at the pixeltypes of the result of each ST_MapAlgebra call.

Let me know  how this works. Remember this is just a prototype (might be slow 
and buggy)...

Pierre

> how to access the specific bands to make st_mapalgebra calculate some new
> raster?
> 
> select st_mapalgebra(rast, '(4-3)/(4+3)') from foo; or select 
> st_mapalgebra(rast,
> '(st_band(rast, 4)-st_band(rast, 3))/(st_band(rast, 4)+st_band(rast, 3))') 
> from foo;
> 
> does not work
> 
> Marco
> ___
> 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] Problem moving database

2011-09-14 Thread Sveen Atle Frenvik (Geomatikk IKT)
You might want to have a look at this blog post, which explains the 
problem, and gives the solution

http://blog.cleverelephant.ca/2010/09/postgis-back-up-restore.html

short version: do not store your data in the public schema, and only 
dump and restore your data-schema.

-atle


On 2011-09-09 23:52, Michael A. Peters wrote:
> pcr...@pcreso.com wrote:
>> The issue is that you are trying to install an old version of postgis 
>> into the new database.
>>
>> My normal approach (yet to fail - for me at least):
>>
>> create the new database
>> install the appropriate/current version of Postgis in that db (this 
>> may require plpgsql as well as running postgis.sql & 
>> spatial_ref_sys.sql)
>>
>> dump the old db without the "create new db option" & copy the dump 
>> file to the new system
>>
>> run psql -d  -f 
>> (optionally create any users you want in the new db to be compatible 
>> with the old db)
>>
>> you will still get errors as it fails to install the old postgis on 
>> top of the one that is already there, but that is fine - you don't 
>> want or need the old postgis.
>>
>> That should give you a working new db.
>
> All my GIS data is from shape files, I wonder if the best approach may 
> be to just load them fresh rather than as part of the restore - IE 
> dump the database without the GIS data tables and restore that, add 
> the tables and load from the shape files.
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


-- 
Atle Frenvik Sveen
Utvikler
Geomatikk IKT AS
tlf: 45 27 86 89
atle.frenvik.sv...@geomatikk.no
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] [postgis-devel] CreateTopoGeom -- why can't create polygon topo from edges

2011-09-14 Thread Sandro Santilli
On Wed, Sep 14, 2011 at 01:53:57PM +0200, Sandro Santilli wrote:
> On Wed, Sep 14, 2011 at 12:17:57AM -0400, Paragon Corporation wrote:
> > strk and Andrea,
> >  
> > Perhaps this is just illegal by specs, but I'm wondering why I couldn't
> > logically create a multi/poly topogeometry from edges that form the boundary
> > of a polygon? or do the specs just not
> > allow that.  I see the CreateTopoGeom just throws an error if I dear try to
> > create a polygon from edges.
> 
> The existing CreateTopoGeom is just plain broken.
> I'm going to work on it in the upcoming weeks.

Oops, sorry, I was confusing it with ST_CreateTopoGeo...
CreateTopoGeom can probably be improved to accept different
kind of inputs. It's not an ISO function so we're free to 
make it as good as we like. First step is figuring out interfaces
and file enhancement tickets :)

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] [postgis-devel] CreateTopoGeom -- why can't create polygon topo from edges

2011-09-14 Thread Sandro Santilli
On Wed, Sep 14, 2011 at 12:17:57AM -0400, Paragon Corporation wrote:
> strk and Andrea,
>  
> Perhaps this is just illegal by specs, but I'm wondering why I couldn't
> logically create a multi/poly topogeometry from edges that form the boundary
> of a polygon? or do the specs just not
> allow that.  I see the CreateTopoGeom just throws an error if I dear try to
> create a polygon from edges.

The existing CreateTopoGeom is just plain broken.
I'm going to work on it in the upcoming weeks.

--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Temporal image analysis in PostGIS

2011-09-14 Thread maduako ikechukwu
Hi guys,
loading multi-band images with different timestamps in PostGIS ( observed at
different time), how can one deal with the time attribute of these images in
case of time-dependent queries and analysis on these images?

Thanks in advance.

-- 
Iyke Maduako

Masters in Geospatial Technologies
[Erasmus-Mundus]
IfGI - Institute for Geoinformatics
University of Muenster Germany
Phone: +4915129048460
Alternative Email:iykefirstcl...@yahoo.com
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users