Re: [postgis-users] [PostGIS] Make error in building PostGIS 2.0

2012-02-14 Thread Paragon Corporation
compiling geojson on mingw is tricky. 

Did you try configure as the
http://trac.osgeo.org/postgis/wiki/DevWikiWinMingWSys_20 instructions
suggested with CFLAGS=-w

./configure --prefix=/c/projects/json-c/rel-0.9 CFLAGS=-w

I think I ran into similar issues without using the -w flag.

Hope that helps,
Regina
http://www.postgis.us

Pledge "postgis64windows"

"I will work on building a 64-bit PostGIS Windows but only if 20 other
people will put in $100 USD for the effort." 
http://www.pledgebank.com/postgis64windows
 

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net 
> [mailto:postgis-users-boun...@postgis.refractions.net] On 
> Behalf Of GeoFox
> Sent: Tuesday, February 14, 2012 6:25 PM
> To: postgis-users@postgis.refractions.net
> Subject: [postgis-users] [PostGIS] Make error in building PostGIS 2.0
> 
> Hi everyone,
> 
> I am try to build PostGIS 2.0 on Windows.  After following 
> the first 17 steps in the instruction manual, I am getting 
> the following error while running 'make' for PostGIS 2.0 alaph5.
> 
> make[1]: *** [lwgeom_in_geojson.o] Error 1
> 
> There is no error during ./configure
> 
> I did some research online but could not find anything useful.
> 
> Greatly appreciate if anyone can give advice on this issue.
> 
> Thanks.
> 
> -
> Edison Tam
> NGC SWE
> US
> --
> View this message in context: 
> http://postgis.17.n6.nabble.com/PostGIS-Make-error-in-building
-PostGIS-2-0-tp4470575p4470575.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
> 


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


[postgis-users] given the 4bands , How can i create the FCC(false color composite) from that 4 bands

2012-02-14 Thread Zelio Fernandes
Hi

can anybody tell me given the 4bands , How can i create the FCC(false color
composite) from that 4 bands

Q1. Is there any stored procedure / or function to do that diectly just by
assigning parameters?
or 
Q2. Do i have to write a query for that?

greatly appreciate if anybody can help me.

--
View this message in context: 
http://postgis.17.n6.nabble.com/given-the-4bands-How-can-i-create-the-FCC-false-color-composite-from-that-4-bands-tp4471075p4471075.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] When to use Vacuum Analyze

2012-02-14 Thread Stephen Woodbridge
May it is best to try to understand what this command does and that will 
help you understand how to use it. First, I'm not an expert on this, so 
I fear the my description may have some of my own misconceptions in it, 
but here goes:


vacuum and analyze are actually two separate operations but they can be 
run at the same time.


Vacuum is the operations of recovering free space and compacting data 
into pages. When you do operations on a table like update and delete, 
records get rewritten and the old row version is marked as dead. If you 
want to retrieve 5 rows and they all happen to be on the same page , 
then you only need to read one page of data, but if updates and 
deletions have fragmented you data across multiple pages, then to fetch 
all 5 records you need to load multiple pages which is more costly. The 
same thing happens to indexes as you update, delete and add records to a 
table.


I have a lot of databases where a prepare data initially and then the 
data is only queried repeatedly. So after I'm done preparing it I vacuum 
analyze it once and I'm done.


Analyze typically scans some percentage of the rows of a table and 
updates the statistics about the table. This helps the query planner 
make the correct assumptions about how to plan a query's execution in 
the most efficient manner.


You can ANALYZE  without running VACUUM ANALYZE  and this 
is fast.


Hope this helps.
  -Steve

On 2/14/2012 7:38 PM, Sheara Cohen wrote:

Hi –

I’m a relatively new user to PostGIS/Postgres and was told that I should
use Vacuum Analyze whenever a I create a new table. I have been
discovering, however, that the time it takes to run vacuum analyze on a
table is often **MUCH** greater than the time saved during dependent
operations.

So, this makes me wonder when it is really critical to run Vacuum
Analyze vs. when it is not worth it. (I’m leaning towards not worth it
the vast majority of the time.)

For instance, is it important to run AFTER…

·deleting rows?

·inserting rows?

·running st_union?

·intersecting two geometries?

Or perhaps BEFORE…

·intersecting two geometries

·joining two or more tables

·making row selections and column calculations

Etc…

Thank you!

Sheara

*Sheara Cohen*
Planner

*C A L T H O R P E**A S S O C I A T E S*
2095 ROSE STREET, SUITE 201, BERKELEY, CALIFORNIA, 94709 USA
510 809-1165 (direct) | 510-548-6800 x35 (main) | 510 548-6848 (fax)
she...@calthorpe.com  | www.calthorpe.com



___
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] When to use Vacuum Analyze

2012-02-14 Thread Sheara Cohen
Hi -

I'm a relatively new user to PostGIS/Postgres and was told that I should use 
Vacuum Analyze whenever a I create a new table. I have been discovering, 
however, that the time it takes to run vacuum analyze on a table is often 
*MUCH* greater than the time saved during dependent operations.

So, this makes me wonder when it is really critical to run Vacuum Analyze vs. 
when it is not worth it. (I'm leaning towards not worth it the vast majority of 
the time.)

For instance, is it important to run AFTER...

* deleting rows?

* inserting rows?

* running st_union?

* intersecting two geometries?

Or perhaps BEFORE...

* intersecting two geometries

* joining two or more tables

* making row selections and column calculations

Etc...

Thank you!
Sheara

Sheara Cohen
Planner
C A L T H O R P E  A S S O C I A T E S
2095 ROSE STREET, SUITE 201, BERKELEY, CALIFORNIA, 94709 USA
510 809-1165 (direct) | 510-548-6800 x35 (main) | 510 548-6848 (fax)
she...@calthorpe.com | www.calthorpe.com

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


Re: [postgis-users] Postgis Polygon to Google Maps Polygon

2012-02-14 Thread Bborie Park



On 02/14/2012 03:43 PM, Jeremy Hageman wrote:

Hi all,

What is the most efficient way to load a group of postgis polygons into a
google map api for display? It's possible to just iterate through all of
the point in the polygon's boundary data to draw the regions, but this
doesn't seem very efficient. Would it be better to utilize the ST_AsKML or
ST_AsSVG functions and dynamically stitch together a KML or SVG file to be
loaded? Or some other method?

-Jeremy H


For Google Maps, the most efficient method I've found is to use encoded 
polygons instead of using ST_AsKML or ST_AsSVG.  The link below provides 
more than enough information about the encoding...


http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/

For polygons with lots of vertices or complexity, I cache the encoding 
polygons as the polygons usually don't change much over time.


-bborie

--
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkp...@ucdavis.edu
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Postgis Polygon to Google Maps Polygon

2012-02-14 Thread Jeremy Hageman
Hi all,

What is the most efficient way to load a group of postgis polygons into a
google map api for display? It's possible to just iterate through all of
the point in the polygon's boundary data to draw the regions, but this
doesn't seem very efficient. Would it be better to utilize the ST_AsKML or
ST_AsSVG functions and dynamically stitch together a KML or SVG file to be
loaded? Or some other method?

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


[postgis-users] [PostGIS] Make error in building PostGIS 2.0

2012-02-14 Thread GeoFox
Hi everyone,

I am try to build PostGIS 2.0 on Windows.  After following the first 17
steps in the instruction manual, I am getting the following error while
running 'make' for PostGIS 2.0 alaph5.

make[1]: *** [lwgeom_in_geojson.o] Error 1

There is no error during ./configure

I did some research online but could not find anything useful.

Greatly appreciate if anyone can give advice on this issue.

Thanks.

-
Edison Tam
NGC SWE
US
--
View this message in context: 
http://postgis.17.n6.nabble.com/PostGIS-Make-error-in-building-PostGIS-2-0-tp4470575p4470575.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] ST_AsJpeg

2012-02-14 Thread Bborie Park

ST_AsKML(geometry) would be returning XML so suffers no binary issues.

-bborie

On 02/14/2012 02:53 PM, Pierre Racine wrote:

Curious that the question was never raised for ST_AsKML(geometry)...


-Original Message-
From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
boun...@postgis.refractions.net] On Behalf Of Paragon Corporation
Sent: Tuesday, February 14, 2012 5:43 PM
To: 'PostGIS Users Discussion'
Subject: Re: [postgis-users] ST_AsJpeg

Here it is in the docs now:

http://postgis.refractions.net/documentation/manual-
svn/using_raster.xml.html#RasterOutput_PSQL




From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-
users-boun...@postgis.refractions.net] On Behalf Of Joan
Sent: Tuesday, February 14, 2012 4:23 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] ST_AsJpeg


The last two solutions result in a black square, which I think is the 
tile.
But it's a good start. I will have to look more into that.
Regina, I have tried using \g to out put to a file but the file is 
corrupted.


I appreciate the help.

Joan

On 14 February 2012 21:27, Paragon Corporation  wrote:


We have this documented in the docs.

http://www.postgis.org/documentation/manual-
svn/using_raster.xml.html#RT_Raster_Applications

There is an example for doing it with PHP, .NET, Java, and
PLPython

Sorry don't have one for psql only.  Haven't tried using psql 
for
outputting
files.

Regina
http://www.postgis.us






>  -Original Message-
>  From: postgis-users-boun...@postgis.refractions.net
>  [mailto:postgis-users-boun...@postgis.refractions.net] On

>  Behalf Of Pierre Racine
>  Sent: Tuesday, February 14, 2012 11:05 AM
>  To: PostGIS Users Discussion
>  Subject: Re: [postgis-users] ST_AsJpeg
>

>  So you might have to write a script connecting to PostgreSQL
>  and writing the file for you. See an example in:
>
>  http://www.bostongis.com/blog/index.php?/archives/175-
Minimali
>  st-Web-based-PHP-PostGIS-2.0-Spatial-GeometryRaster-
Viewer.html
>
>  Pierre
>
>  >  -Original Message-
>  >  From: postgis-users-boun...@postgis.refractions.net
>  >  [mailto:postgis-users- boun...@postgis.refractions.net] On
>  Behalf Of
>  >  Joan
>  >  Sent: Tuesday, February 14, 2012 10:10 AM
>  >  To: PostGIS Users Discussion
>  >  Subject: Re: [postgis-users] ST_AsJpeg
>  >
>  >  Yes, I want to create a jpeg/tiff file. I am new to
>  cursors, how would
>  >  that work in a query.
>  >
>  >
>  >  On 14 February 2012 15:39, Pierre Racine
>wrote:
>  >
>  >
>  >  Thanks,
>  >
>  >  Do you see any way to make the file directly readable
>  (without having
>  >  to edit it)?
>  >
>  >
>  >  Pierre
>  >
>  >  >  -Original Message-
>  >  >  From: postgis-users-boun...@postgis.refractions.net
>  >  [mailto:postgis-
>  >  users-
>  >
>  >  >  boun...@postgis.refractions.net] On Behalf Of 
Sandro
Santilli
>  >  >  Sent: Tuesday, February 14, 2012 9:28 AM
>  >  >  To: PostGIS Users Discussion
>  >
>  >  >  Subject: Re: [postgis-users] ST_AsJpeg
>  >  >
>  >  >  On Tue, Feb 14, 2012 at 09:22:21AM -0500, Pierre
Racine wrote:
>  >  >  >  Yes. You want to write the file directly to the
filesystem?
>  >  Sandro wrote
>  >  >  something in the list about this recently but I 
can't
>  find it. Sandro?
>  >  Robe?
>  >  >  >
>  >  >
>  >  >  I ended up binary-editing the result afterwards.
>  >  >
>  >  >  Anyway, first step is declaring a binary cursor,
>  redirecting output
>  >  to a file and
>  >  >  calling the function.
>  >  >
>  >  >  For the binary editing, I looked at another fil

Re: [postgis-users] ST_AsJpeg

2012-02-14 Thread Pierre Racine
Curious that the question was never raised for ST_AsKML(geometry)...

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of Paragon Corporation
> Sent: Tuesday, February 14, 2012 5:43 PM
> To: 'PostGIS Users Discussion'
> Subject: Re: [postgis-users] ST_AsJpeg
> 
> Here it is in the docs now:
> 
> http://postgis.refractions.net/documentation/manual-
> svn/using_raster.xml.html#RasterOutput_PSQL
> 
> 
> 
> 
>   From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-
> users-boun...@postgis.refractions.net] On Behalf Of Joan
>   Sent: Tuesday, February 14, 2012 4:23 PM
>   To: PostGIS Users Discussion
>   Subject: Re: [postgis-users] ST_AsJpeg
> 
> 
>   The last two solutions result in a black square, which I think is the 
> tile.
> But it's a good start. I will have to look more into that.
>   Regina, I have tried using \g to out put to a file but the file is 
> corrupted.
> 
> 
>   I appreciate the help.
> 
>   Joan
> 
>   On 14 February 2012 21:27, Paragon Corporation  wrote:
> 
> 
>   We have this documented in the docs.
> 
>   http://www.postgis.org/documentation/manual-
> svn/using_raster.xml.html#RT_Raster_Applications
> 
>   There is an example for doing it with PHP, .NET, Java, and
> PLPython
> 
>   Sorry don't have one for psql only.  Haven't tried using psql 
> for
> outputting
>   files.
> 
>   Regina
>   http://www.postgis.us
> 
> 
> 
> 
> 
> 
>   > -Original Message-
>   > From: postgis-users-boun...@postgis.refractions.net
>   > [mailto:postgis-users-boun...@postgis.refractions.net] On
> 
>   > Behalf Of Pierre Racine
>   > Sent: Tuesday, February 14, 2012 11:05 AM
>   > To: PostGIS Users Discussion
>   > Subject: Re: [postgis-users] ST_AsJpeg
>   >
> 
>   > So you might have to write a script connecting to PostgreSQL
>   > and writing the file for you. See an example in:
>   >
>   > http://www.bostongis.com/blog/index.php?/archives/175-
> Minimali
>   > st-Web-based-PHP-PostGIS-2.0-Spatial-GeometryRaster-
> Viewer.html
>   >
>   > Pierre
>   >
>   > > -Original Message-
>   > > From: postgis-users-boun...@postgis.refractions.net
>   > > [mailto:postgis-users- boun...@postgis.refractions.net] On
>   > Behalf Of
>   > > Joan
>   > > Sent: Tuesday, February 14, 2012 10:10 AM
>   > > To: PostGIS Users Discussion
>   > > Subject: Re: [postgis-users] ST_AsJpeg
>   > >
>   > > Yes, I want to create a jpeg/tiff file. I am new to
>   > cursors, how would
>   > > that work in a query.
>   > >
>   > >
>   > > On 14 February 2012 15:39, Pierre Racine
>   >  wrote:
>   > >
>   > >
>   > > Thanks,
>   > >
>   > > Do you see any way to make the file directly readable
>   > (without having
>   > > to edit it)?
>   > >
>   > >
>   > > Pierre
>   > >
>   > > > -Original Message-
>   > > > From: postgis-users-boun...@postgis.refractions.net
>   > > [mailto:postgis-
>   > > users-
>   > >
>   > > > boun...@postgis.refractions.net] On Behalf Of Sandro
> Santilli
>   > > > Sent: Tuesday, February 14, 2012 9:28 AM
>   > > > To: PostGIS Users Discussion
>   > >
>   > > > Subject: Re: [postgis-users] ST_AsJpeg
>   > > >
>   > > > On Tue, Feb 14, 2012 at 09:22:21AM -0500, Pierre
> Racine wrote:
>   > > > > Yes. You want to write the file directly to the
> filesystem?
>   > > Sandro wrote
>   > > > something in the list about this recently but I can't
>   > find it. Sandro?
>   > > Robe?
>   > > > >
>   > > >
>   > > > I ended up binary-editing the result afterwards.
>   > > >
>   > > > Anyway, first step is declaring a binary cursor,
>   > redirecting output
>   > > to a file and
>   > > > calling the function.
>   > > >
>   > > > For the binary editing, I looked at another file with
>   > my expected
>   > > format to tell
>   > > > where it started (human eye pattern matching).
>

Re: [postgis-users] ST_AsJpeg

2012-02-14 Thread Paragon Corporation
Here it is in the docs now:
 
http://postgis.refractions.net/documentation/manual-svn/using_raster.xml.htm
l#RasterOutput_PSQL


  _  

From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Joan
Sent: Tuesday, February 14, 2012 4:23 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] ST_AsJpeg


The last two solutions result in a black square, which I think is the tile.
But it's a good start. I will have to look more into that.  
Regina, I have tried using \g to out put to a file but the file is
corrupted.


I appreciate the help.

Joan

On 14 February 2012 21:27, Paragon Corporation  wrote:


We have this documented in the docs.

http://www.postgis.org/documentation/manual-svn/using_raster.xml.html#RT_Ras
ter_Applications

There is an example for doing it with PHP, .NET, Java, and PLPython

Sorry don't have one for psql only.  Haven't tried using psql for outputting
files.

Regina
http://www.postgis.us






> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net
> [mailto:postgis-users-boun...@postgis.refractions.net] On

> Behalf Of Pierre Racine
> Sent: Tuesday, February 14, 2012 11:05 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] ST_AsJpeg
>

> So you might have to write a script connecting to PostgreSQL
> and writing the file for you. See an example in:
>
> http://www.bostongis.com/blog/index.php?/archives/175-Minimali
> st-Web-based-PHP-PostGIS-2.0-Spatial-GeometryRaster-Viewer.html
>
> Pierre
>
> > -Original Message-
> > From: postgis-users-boun...@postgis.refractions.net
> > [mailto:postgis-users- boun...@postgis.refractions.net] On
> Behalf Of
> > Joan
> > Sent: Tuesday, February 14, 2012 10:10 AM
> > To: PostGIS Users Discussion
> > Subject: Re: [postgis-users] ST_AsJpeg
> >
> > Yes, I want to create a jpeg/tiff file. I am new to
> cursors, how would
> > that work in a query.
> >
> >
> > On 14 February 2012 15:39, Pierre Racine
>  wrote:
> >
> >
> > Thanks,
> >
> > Do you see any way to make the file directly readable
> (without having
> > to edit it)?
> >
> >
> > Pierre
> >
> > > -Original Message-
> > > From: postgis-users-boun...@postgis.refractions.net
> > [mailto:postgis-
> > users-
> >
> > > boun...@postgis.refractions.net] On Behalf Of Sandro Santilli
> > > Sent: Tuesday, February 14, 2012 9:28 AM
> > > To: PostGIS Users Discussion
> >
> > > Subject: Re: [postgis-users] ST_AsJpeg
> > >
> > > On Tue, Feb 14, 2012 at 09:22:21AM -0500, Pierre Racine wrote:
> > > > Yes. You want to write the file directly to the filesystem?
> > Sandro wrote
> > > something in the list about this recently but I can't
> find it. Sandro?
> > Robe?
> > > >
> > >
> > > I ended up binary-editing the result afterwards.
> > >
> > > Anyway, first step is declaring a binary cursor,
> redirecting output
> > to a file and
> > > calling the function.
> > >
> > > For the binary editing, I looked at another file with
> my expected
> > format to tell
> > > where it started (human eye pattern matching).
> > >
> > > > You can also use gdal_translate...
> > >
> > > Much better, when it works (it wasn't working for me).
> > >
> > > --strk;
> > >
> > >   ,--o-.
> > >   |   __/  |Delivering high quality PostGIS 2.0 !
> > >   |  / 2.0 |http://strk.keybit.net
> > >   `-o--'
> > >
> > > ___
> > > 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 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 mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] ST_AsJpeg

2012-02-14 Thread Paragon Corporation
Yah psql doesn't make it easy.  I've put in an example of doing it in docs.
Which takes tips from this article:
http://people.planetpostgresql.org/andrew/index.php?/archives/196-Clever-tri
ck-challenge.html
 
There are other examples in that article but this is the only one that
doesn't require Perl or Unix so is more cross platform.
 
I think strk has one too though his probably requires perl or some unixy
thing.
 
 
Docs I don't think have rebuilt yet, but basic script is this:
 
SELECT oid, lowrite(lo_open(oid, 131072), png) As num_bytes
 FROM 
 ( VALUES (lo_create(0), 
   ST_AsPNG( (SELECT rast FROM aerials.boston WHERE rid=1) ) 
  ) ) As v(oid,png);
-- you'll get an output something like --
   oid   | num_bytes
-+---
 2630819 | 74860
 
-- next note the oid and do this replacing the c:/test.png to file path
location
-- on your local computer
 \lo_export 2630819 'C:/temp/aerial_samp.png'
 
-- this deletes the file from large object storage on db
SELECT lo_unlink(2630819);
 
Thanks,
Regina
h  ttp://www.postgis.us

 

  _  

From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Joan
Sent: Tuesday, February 14, 2012 4:23 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] ST_AsJpeg


The last two solutions result in a black square, which I think is the tile.
But it's a good start. I will have to look more into that.  
Regina, I have tried using \g to out put to a file but the file is
corrupted.


I appreciate the help.

Joan

On 14 February 2012 21:27, Paragon Corporation  wrote:


We have this documented in the docs.

http://www.postgis.org/documentation/manual-svn/using_raster.xml.html#RT_Ras
ter_Applications

There is an example for doing it with PHP, .NET, Java, and PLPython

Sorry don't have one for psql only.  Haven't tried using psql for outputting
files.

Regina
http://www.postgis.us






> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net
> [mailto:postgis-users-boun...@postgis.refractions.net] On

> Behalf Of Pierre Racine
> Sent: Tuesday, February 14, 2012 11:05 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] ST_AsJpeg
>

> So you might have to write a script connecting to PostgreSQL
> and writing the file for you. See an example in:
>
> http://www.bostongis.com/blog/index.php?/archives/175-Minimali
> st-Web-based-PHP-PostGIS-2.0-Spatial-GeometryRaster-Viewer.html
>
> Pierre
>
> > -Original Message-
> > From: postgis-users-boun...@postgis.refractions.net
> > [mailto:postgis-users- boun...@postgis.refractions.net] On
> Behalf Of
> > Joan
> > Sent: Tuesday, February 14, 2012 10:10 AM
> > To: PostGIS Users Discussion
> > Subject: Re: [postgis-users] ST_AsJpeg
> >
> > Yes, I want to create a jpeg/tiff file. I am new to
> cursors, how would
> > that work in a query.
> >
> >
> > On 14 February 2012 15:39, Pierre Racine
>  wrote:
> >
> >
> > Thanks,
> >
> > Do you see any way to make the file directly readable
> (without having
> > to edit it)?
> >
> >
> > Pierre
> >
> > > -Original Message-
> > > From: postgis-users-boun...@postgis.refractions.net
> > [mailto:postgis-
> > users-
> >
> > > boun...@postgis.refractions.net] On Behalf Of Sandro Santilli
> > > Sent: Tuesday, February 14, 2012 9:28 AM
> > > To: PostGIS Users Discussion
> >
> > > Subject: Re: [postgis-users] ST_AsJpeg
> > >
> > > On Tue, Feb 14, 2012 at 09:22:21AM -0500, Pierre Racine wrote:
> > > > Yes. You want to write the file directly to the filesystem?
> > Sandro wrote
> > > something in the list about this recently but I can't
> find it. Sandro?
> > Robe?
> > > >
> > >
> > > I ended up binary-editing the result afterwards.
> > >
> > > Anyway, first step is declaring a binary cursor,
> redirecting output
> > to a file and
> > > calling the function.
> > >
> > > For the binary editing, I looked at another file with
> my expected
> > format to tell
> > > where it started (human eye pattern matching).
> > >
> > > > You can also use gdal_translate...
> > >
> > > Much better, when it works (it wasn't working for me).
> > >
> > > --strk;
> > >
> > >   ,--o-.
> > >   |   __/  |Delivering high quality PostGIS 2.0 !
> > >   |  / 2.0 |http://strk.keybit.net
> > >   `-o--'
> > >
> > > ___
> > > 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 mailing list
> postgis-users@postgis.refraction

Re: [postgis-users] ST_AsJpeg

2012-02-14 Thread Joan
The last two solutions result in a black square, which I think is the tile.
But it's a good start. I will have to look more into that.
Regina, I have tried using \g to out put to a file but the file is
corrupted.

I appreciate the help.

Joan

On 14 February 2012 21:27, Paragon Corporation  wrote:

> We have this documented in the docs.
>
>
> http://www.postgis.org/documentation/manual-svn/using_raster.xml.html#RT_Ras
> ter_Applications
>
> There is an example for doing it with PHP, .NET, Java, and PLPython
>
> Sorry don't have one for psql only.  Haven't tried using psql for
> outputting
> files.
>
> Regina
> http://www.postgis.us
>
>
>
>
>
> > -Original Message-
> > From: postgis-users-boun...@postgis.refractions.net
> > [mailto:postgis-users-boun...@postgis.refractions.net] On
> > Behalf Of Pierre Racine
> > Sent: Tuesday, February 14, 2012 11:05 AM
> > To: PostGIS Users Discussion
> > Subject: Re: [postgis-users] ST_AsJpeg
> >
> > So you might have to write a script connecting to PostgreSQL
> > and writing the file for you. See an example in:
> >
> > http://www.bostongis.com/blog/index.php?/archives/175-Minimali
> > st-Web-based-PHP-PostGIS-2.0-Spatial-GeometryRaster-Viewer.html
> >
> > Pierre
> >
> > > -Original Message-
> > > From: postgis-users-boun...@postgis.refractions.net
> > > [mailto:postgis-users- boun...@postgis.refractions.net] On
> > Behalf Of
> > > Joan
> > > Sent: Tuesday, February 14, 2012 10:10 AM
> > > To: PostGIS Users Discussion
> > > Subject: Re: [postgis-users] ST_AsJpeg
> > >
> > > Yes, I want to create a jpeg/tiff file. I am new to
> > cursors, how would
> > > that work in a query.
> > >
> > >
> > > On 14 February 2012 15:39, Pierre Racine
> >  wrote:
> > >
> > >
> > > Thanks,
> > >
> > > Do you see any way to make the file directly readable
> > (without having
> > > to edit it)?
> > >
> > >
> > > Pierre
> > >
> > > > -Original Message-
> > > > From: postgis-users-boun...@postgis.refractions.net
> > > [mailto:postgis-
> > > users-
> > >
> > > > boun...@postgis.refractions.net] On Behalf Of Sandro Santilli
> > > > Sent: Tuesday, February 14, 2012 9:28 AM
> > > > To: PostGIS Users Discussion
> > >
> > > > Subject: Re: [postgis-users] ST_AsJpeg
> > > >
> > > > On Tue, Feb 14, 2012 at 09:22:21AM -0500, Pierre Racine wrote:
> > > > > Yes. You want to write the file directly to the filesystem?
> > > Sandro wrote
> > > > something in the list about this recently but I can't
> > find it. Sandro?
> > > Robe?
> > > > >
> > > >
> > > > I ended up binary-editing the result afterwards.
> > > >
> > > > Anyway, first step is declaring a binary cursor,
> > redirecting output
> > > to a file and
> > > > calling the function.
> > > >
> > > > For the binary editing, I looked at another file with
> > my expected
> > > format to tell
> > > > where it started (human eye pattern matching).
> > > >
> > > > > You can also use gdal_translate...
> > > >
> > > > Much better, when it works (it wasn't working for me).
> > > >
> > > > --strk;
> > > >
> > > >   ,--o-.
> > > >   |   __/  |Delivering high quality PostGIS 2.0 !
> > > >   |  / 2.0 |http://strk.keybit.net
> > > >   `-o--'
> > > >
> > > > ___
> > > > 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 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 mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] error: conversion to non-scalar type requested

2012-02-14 Thread itboyet
Thank you so much! It fixes the problem.

--
View this message in context: 
http://postgis.17.n6.nabble.com/error-conversion-to-non-scalar-type-requested-tp4381324p4470217.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] ST_AsJpeg

2012-02-14 Thread Paragon Corporation
We have this documented in the docs.

http://www.postgis.org/documentation/manual-svn/using_raster.xml.html#RT_Ras
ter_Applications

There is an example for doing it with PHP, .NET, Java, and PLPython

Sorry don't have one for psql only.  Haven't tried using psql for outputting
files.

Regina
http://www.postgis.us



 

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net 
> [mailto:postgis-users-boun...@postgis.refractions.net] On 
> Behalf Of Pierre Racine
> Sent: Tuesday, February 14, 2012 11:05 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] ST_AsJpeg
> 
> So you might have to write a script connecting to PostgreSQL 
> and writing the file for you. See an example in:
> 
> http://www.bostongis.com/blog/index.php?/archives/175-Minimali
> st-Web-based-PHP-PostGIS-2.0-Spatial-GeometryRaster-Viewer.html
> 
> Pierre
> 
> > -Original Message-
> > From: postgis-users-boun...@postgis.refractions.net 
> > [mailto:postgis-users- boun...@postgis.refractions.net] On 
> Behalf Of 
> > Joan
> > Sent: Tuesday, February 14, 2012 10:10 AM
> > To: PostGIS Users Discussion
> > Subject: Re: [postgis-users] ST_AsJpeg
> > 
> > Yes, I want to create a jpeg/tiff file. I am new to 
> cursors, how would 
> > that work in a query.
> > 
> > 
> > On 14 February 2012 15:39, Pierre Racine 
>  wrote:
> > 
> > 
> > Thanks,
> > 
> > Do you see any way to make the file directly readable 
> (without having 
> > to edit it)?
> > 
> > 
> > Pierre
> > 
> > > -Original Message-
> > > From: postgis-users-boun...@postgis.refractions.net 
> > [mailto:postgis-
> > users-
> > 
> > > boun...@postgis.refractions.net] On Behalf Of Sandro Santilli
> > > Sent: Tuesday, February 14, 2012 9:28 AM
> > > To: PostGIS Users Discussion
> > 
> > > Subject: Re: [postgis-users] ST_AsJpeg
> > >
> > > On Tue, Feb 14, 2012 at 09:22:21AM -0500, Pierre Racine wrote:
> > > > Yes. You want to write the file directly to the filesystem? 
> > Sandro wrote
> > > something in the list about this recently but I can't 
> find it. Sandro?
> > Robe?
> > > >
> > >
> > > I ended up binary-editing the result afterwards.
> > >
> > > Anyway, first step is declaring a binary cursor, 
> redirecting output 
> > to a file and
> > > calling the function.
> > >
> > > For the binary editing, I looked at another file with 
> my expected 
> > format to tell
> > > where it started (human eye pattern matching).
> > >
> > > > You can also use gdal_translate...
> > >
> > > Much better, when it works (it wasn't working for me).
> > >
> > > --strk;
> > >
> > >   ,--o-.
> > >   |   __/  |Delivering high quality PostGIS 2.0 !
> > >   |  / 2.0 |http://strk.keybit.net
> > >   `-o--'
> > >
> > > ___
> > > 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 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] advice for quicker display?

2012-02-14 Thread Stephen Woodbridge

On 2/14/2012 2:32 PM, Bistrais, Bob wrote:

OK, so it sounds like I need to create the index for starters (and not
bother with the layer at full scale).

As far as creating the index, is mytable_the_geom_gidx an existing
column, or the name of a new one?


mytable_the_geom_gidx is a unique name for a particular index, I 
construct mine roughly using:


__ where idx is a standart 
btree index and gidx is a gist index. You can use any name you want as 
long as it is not in use already because you are using it to put the 
newly created index into.


Beyond giving it a name so you can later reindex, or drop it the name 
name does not really matter, as the SQL planner will find the index and 
use it if appropriate.


-Steve W


-Original Message-
From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of
Stephen V. Mather
Sent: Tuesday, February 14, 2012 2:26 PM
To: 'PostGIS Users Discussion'
Subject: Re: [postgis-users] advice for quicker display?

To expand on that, the basic understanding is that file level access to
data
(e.g. shapefile) will always be faster for the entire dataset (all
things
being equal) because of the management overhead of the database, but for
accessing a subset of features of the dataset (often the typical use
case),
the database is faster if it has indices on the appropriate columns (the
geometry being the more important one).  Even if you are accessing all
of
the records in the database at once as a common case, you probably don't
need every node in the polygons/polylines, and might create a view or
column
that pre-generalizes those data before delivering them.

Best,
Steve

Stephen Mather
Geographic Information Systems (GIS) Manager
(216) 635-3243
s...@clevelandmetroparks.com
clevelandmetroparks.com




-Original Message-
From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of
Stephen
Woodbridge
Sent: Tuesday, February 14, 2012 2:15 PM
To: postgis-users@postgis.refractions.net
Subject: Re: [postgis-users] advice for quicker display?

On 2/14/2012 1:57 PM, Bistrais, Bob wrote:

As some of you already know, I'm a newbie to PostGIS and have just
barely got a test PostGIS database up and running. So, my latest
question is in regards to draw times. I created a statewide parcel

layer

from a shapefile. At statewide scale, when the application loads, the
parcel data draws far slower than the original shapefile did. How can

I

tune this so that draw times are better?


If you are drawing all the data, it will always be slower than
shapefiles. The trick is to not draw more than is reasonable at a given
scale. So the answer is don't try to draw all the parcels for the whole
state. As you zoom in and need to only draw a subset of the parcels, you

will start to get speed advantages by using the spatial (GIST) indexes
in postgis.

create index mytable_the_geom_gidx on mytable using gist (the_geom);

-Steve W
___
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 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] advice for quicker display?

2012-02-14 Thread Juan Marín Otero
You can find the documentation here. Also look at
ST_SimplifyPreserveTopology, might be better depending on how strict you
are with how your data gets modified.

http://postgis.org/docs/ST_Simplify.html



On Tue, Feb 14, 2012 at 3:09 PM, Bistrais, Bob wrote:

>  Wow!  Where are the ST_Simplify and other functions docuemented- in
> PostGIS docs or MapServer docs?
>
> ** **
>  --
>
> *From:* postgis-users-boun...@postgis.refractions.net [mailto:
> postgis-users-boun...@postgis.refractions.net] *On Behalf Of *
> pcr...@pcreso.com
> *Sent:* Tuesday, February 14, 2012 2:44 PM
> *To:* PostGIS Users Discussion
> *Subject:* Re: [postgis-users] advice for quicker display?
>
> ** **
>
> Also,
>
> In Postgis you can use the ST_Simplfy() function in mapserver zoom (scale
> dependent) layers. So you have one dataset, and as you zoom out you display
> features represented by progressively fewer vertices. You don't need every
> headland of a global coastline dataset plotted until you  until you zoom
> in. This can give vastly better performance than a shapefile when zoomed
> out.
>
> You can use pre-prepared geometries, so each record has more than one
> geometry column, or you can do the point reduction on the fly (in the SQL
> command in the mapfile DATA statement), whichever meets your needs.
>
> The default Postgres configuration is for pretty basic hardware. You might
> find & run pgtune, or look at the postgres admin docs to configure it to
> more effectively use the available memory, and see how to use tablespaces
> to manage data & indexes across filesystems to increase overall disk
> throughput.
>
> So it takes some work, but overall, Postgis provides spatial data
> management tools with substantial performance optimisation capabilities.
> But you need to use them.
>
> For plotting an entire unsimplified dataset, the overhead of a database
> will always be somewhat slower than a file streaming from disk. Note that
> on good hardware with an well optimised database even this difference can
> be minimised.
>
> Cheers,
>
>Brent Wood
>
> --- On *Wed, 2/15/12, Stephen Woodbridge * wrote:
> 
>
>
> From: Stephen Woodbridge 
> Subject: Re: [postgis-users] advice for quicker display?
> To: postgis-users@postgis.refractions.net
> Date: Wednesday, February 15, 2012, 8:14 AM
>
> On 2/14/2012 1:57 PM, Bistrais, Bob wrote:
> > As some of you already know, I’m a newbie to PostGIS and have just
> > barely got a test PostGIS database up and running. So, my latest
> > question is in regards to draw times. I created a statewide parcel layer
> > from a shapefile. At statewide scale, when the application loads, the
> > parcel data draws far slower than the original shapefile did. How can I
> > tune this so that draw times are better?
>
> If you are drawing all the data, it will always be slower than shapefiles.
> The trick is to not draw more than is reasonable at a given scale. So the
> answer is don't try to draw all the parcels for the whole state. As you
> zoom in and need to only draw a subset of the parcels, you will start to
> get speed advantages by using the spatial (GIST) indexes in postgis.
>
> create index mytable_the_geom_gidx on mytable using gist (the_geom);
>
> -Steve W
> ___
> 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
>
>


-- 
Juan Marín Otero
GIS Consultant

---Visita mi blog en-
http://guachintoneando.blogspot.com
---
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] advice for quicker display?

2012-02-14 Thread Bistrais, Bob
Wow!  Where are the ST_Simplify and other functions docuemented- in
PostGIS docs or MapServer docs?

 



From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of
pcr...@pcreso.com
Sent: Tuesday, February 14, 2012 2:44 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] advice for quicker display?

 

Also,

In Postgis you can use the ST_Simplfy() function in mapserver zoom
(scale dependent) layers. So you have one dataset, and as you zoom out
you display features represented by progressively fewer vertices. You
don't need every headland of a global coastline dataset plotted until
you  until you zoom in. This can give vastly better performance than a
shapefile when zoomed out.

You can use pre-prepared geometries, so each record has more than one
geometry column, or you can do the point reduction on the fly (in the
SQL command in the mapfile DATA statement), whichever meets your needs.

The default Postgres configuration is for pretty basic hardware. You
might find & run pgtune, or look at the postgres admin docs to configure
it to more effectively use the available memory, and see how to use
tablespaces to manage data & indexes across filesystems to increase
overall disk throughput. 

So it takes some work, but overall, Postgis provides spatial data
management tools with substantial performance optimisation capabilities.
But you need to use them.

For plotting an entire unsimplified dataset, the overhead of a database
will always be somewhat slower than a file streaming from disk. Note
that on good hardware with an well optimised database even this
difference can be minimised.

Cheers,

   Brent Wood

--- On Wed, 2/15/12, Stephen Woodbridge  wrote:


From: Stephen Woodbridge 
Subject: Re: [postgis-users] advice for quicker display?
To: postgis-users@postgis.refractions.net
Date: Wednesday, February 15, 2012, 8:14 AM

On 2/14/2012 1:57 PM, Bistrais, Bob wrote:
> As some of you already know, I'm a newbie to PostGIS and have just
> barely got a test PostGIS database up and running. So, my latest
> question is in regards to draw times. I created a statewide parcel
layer
> from a shapefile. At statewide scale, when the application loads, the
> parcel data draws far slower than the original shapefile did. How can
I
> tune this so that draw times are better?

If you are drawing all the data, it will always be slower than
shapefiles. The trick is to not draw more than is reasonable at a given
scale. So the answer is don't try to draw all the parcels for the whole
state. As you zoom in and need to only draw a subset of the parcels, you
will start to get speed advantages by using the spatial (GIST) indexes
in postgis.

create index mytable_the_geom_gidx on mytable using gist (the_geom);

-Steve W
___
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] advice for quicker display?

2012-02-14 Thread pcreso
That is the name you are giving the index. It is good practice for the 
name to include the table & column(s) the index applies to in the 
name you give it.

--- On Wed, 2/15/12, Bistrais, Bob  wrote:

From: Bistrais, Bob 
Subject: Re: [postgis-users] advice for quicker display?
To: s...@clevelandmetroparks.com, "PostGIS Users Discussion" 

Date: Wednesday, February 15, 2012, 8:32 AM

OK, so it sounds like I need to create the index for starters (and not
bother with the layer at full scale).

As far as creating the index, is mytable_the_geom_gidx an existing
column, or the name of a new one? 


-Original Message-
From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of
Stephen V. Mather
Sent: Tuesday, February 14, 2012 2:26 PM
To: 'PostGIS Users Discussion'
Subject: Re: [postgis-users] advice for quicker display?

To expand on that, the basic understanding is that file level access to
data
(e.g. shapefile) will always be faster for the entire dataset (all
things
being equal) because of the management overhead of the database, but for
accessing a subset of features of the dataset (often the typical use
case),
the database is faster if it has indices on the appropriate columns (the
geometry being the more important one).  Even if you are accessing all
of
the records in the database at once as a common case, you probably don't
need every node in the polygons/polylines, and might create a view or
column
that pre-generalizes those data before delivering them.

Best,
Steve

Stephen Mather
Geographic Information Systems (GIS) Manager
(216) 635-3243
s...@clevelandmetroparks.com
clevelandmetroparks.com




-Original Message-
From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of
Stephen
Woodbridge
Sent: Tuesday, February 14, 2012 2:15 PM
To: postgis-users@postgis.refractions.net
Subject: Re: [postgis-users] advice for quicker display?

On 2/14/2012 1:57 PM, Bistrais, Bob wrote:
> As some of you already know, I'm a newbie to PostGIS and have just
> barely got a test PostGIS database up and running. So, my latest
> question is in regards to draw times. I created a statewide parcel
layer
> from a shapefile. At statewide scale, when the application loads, the
> parcel data draws far slower than the original shapefile did. How can
I
> tune this so that draw times are better?

If you are drawing all the data, it will always be slower than 
shapefiles. The trick is to not draw more than is reasonable at a given 
scale. So the answer is don't try to draw all the parcels for the whole 
state. As you zoom in and need to only draw a subset of the parcels, you

will start to get speed advantages by using the spatial (GIST) indexes 
in postgis.

create index mytable_the_geom_gidx on mytable using gist (the_geom);

-Steve W
___
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 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] advice for quicker display?

2012-02-14 Thread pcreso
Also,

In Postgis you can use the ST_Simplfy() function in mapserver zoom (scale 
dependent) layers. So you have one dataset, and as you zoom out you display 
features represented by progressively fewer vertices. You don't need every 
headland of a global coastline dataset plotted until you  until you zoom in. 
This can give vastly better performance than a shapefile when zoomed out.

You can use pre-prepared geometries, so each record has more than one geometry 
column, or you can do the point reduction on the fly (in the SQL command in the 
mapfile DATA statement), whichever meets your needs.

The default Postgres configuration is for pretty basic hardware. You might find 
& run pgtune, or look at the postgres admin docs to configure it to more 
effectively use the available memory, and see how to use tablespaces to manage 
data & indexes across filesystems to increase overall disk throughput. 

So it takes some work, but overall, Postgis provides spatial data management 
tools with substantial performance optimisation capabilities. But you need to 
use them.

For plotting an entire unsimplified dataset, the overhead of a database will 
always be somewhat slower than a file streaming from disk. Note that on good 
hardware with an well optimised database even this difference can be minimised.

Cheers,

   Brent Wood

--- On Wed, 2/15/12, Stephen Woodbridge  wrote:

From: Stephen Woodbridge 
Subject: Re: [postgis-users] advice for quicker display?
To: postgis-users@postgis.refractions.net
Date: Wednesday, February 15, 2012, 8:14 AM

On 2/14/2012 1:57 PM, Bistrais, Bob wrote:
> As some of you already know, I’m a newbie to PostGIS and have just
> barely got a test PostGIS database up and running. So, my latest
> question is in regards to draw times. I created a statewide parcel layer
> from a shapefile. At statewide scale, when the application loads, the
> parcel data draws far slower than the original shapefile did. How can I
> tune this so that draw times are better?

If you are drawing all the data, it will always be slower than shapefiles. The 
trick is to not draw more than is reasonable at a given scale. So the answer is 
don't try to draw all the parcels for the whole state. As you zoom in and need 
to only draw a subset of the parcels, you will start to get speed advantages by 
using the spatial (GIST) indexes in postgis.

create index mytable_the_geom_gidx on mytable using gist (the_geom);

-Steve W
___
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] Landtype minus parcels ?

2012-02-14 Thread Brian Hamlin

Hi All-

  maybe I am missing an easier solution.. I would like to subtract  
the sum of all parcels in a county, from a "landtypes" table for the  
same county.
Landtypes are non-overlapping areas with a category..  Although this  
is straightforward to describe, I am writing things that take a long  
time, and are not simple.


note that I use python as much or more than SQL. Most jobs are in  
python using psycopg2 to execute the SQL. I have no problem with  
looping in python to get a desired result, but if there is something  
straightforward in SQL than of course the database can do a better  
job of optimizing..


The best I have so far is as follows:

  in python, loop through all landtype records
for that landtype record, find all parcels that intersect it
   ST_UNION() those parcels
   subtract the ST_UNION'd result from that landtype record, and  
store it


this is how I wrote it -- suggestions and improvements requested
(yes I left the DISTINCT ON in there.. I was getting multiple,  
identical rows back instead of one row ??)


---
SELECT distinct on (tgeom)
 st_difference(
   l.wkb_geometry,

   (select st_union(p.wkb_geometry )
   from
 big_landtypes l,
 small_parcels p
   where st_intersects(
 l.wkb_geometry, p.wkb_geometry) AND
 l.pkey = 1)
   ) tgeom
 FROM
   big_landtypes l,
   small_parcels p
 WHERE
   l.pkey = 1
 ORDER BY
   tgeom;
---
 Unique  (cost=3044213.34..3047941.15 rows=1 width=9069) (actual  
time=190578.880..190865.979 rows=1 loops=1)

   InitPlan 1 (returns $1)
 ->  Aggregate  (cost=29.92..29.93 rows=1 width=3203) (actual  
time=5.276..5.277 rows=1 loops=1)
   ->  Nested Loop  (cost=0.00..29.83 rows=35 width=3203)  
(actual time=0.765..2.317 rows=11 loops=1)
 Join Filter: _st_intersects(l.wkb_geometry,  
p.wkb_geometry)
 ->  Index Scan using big_landtypes_pkey on  
big_landtypes l  (cost=0.00..8.27 rows=1 width=9069) (actual  
time=0.004..0.006 rows=1 loops=1)

   Index Cond: (pkey = 1)
 ->  Index Scan using small_parcels_geom_idx on  
small_parcels p  (cost=0.00..20.51 rows=4 width=3203) (actual  
time=0.075..0.649 rows=55 loops=1)

   Index Cond: (l.wkb_geometry && wkb_geometry)
   ->  Sort  (cost=3044183.42..3046047.32 rows=745562 width=9069)  
(actual time=190578.878..190616.465 rows=745808 loops=1)

 Sort Key: (st_difference(l.wkb_geometry, $1))
 Sort Method: quicksort  Memory: 59536kB
 ->  Nested Loop  (cost=0.00..74035.41 rows=745562  
width=9069) (actual time=5.732..189597.837 rows=745808 loops=1)
   ->  Index Scan using big_landtypes_pkey on  
big_landtypes l  (cost=0.00..8.27 rows=1 width=9069) (actual  
time=0.011..0.015 rows=1 loops=1)

 Index Cond: (pkey = 1)
   ->  Seq Scan on small_parcels p  (cost=0.00..64707.62  
rows=745562 width=0) (actual time=0.004..491.980 rows=745808 loops=1)







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


Re: [postgis-users] advice for quicker display?

2012-02-14 Thread Bistrais, Bob
OK, so it sounds like I need to create the index for starters (and not
bother with the layer at full scale).

As far as creating the index, is mytable_the_geom_gidx an existing
column, or the name of a new one? 


-Original Message-
From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of
Stephen V. Mather
Sent: Tuesday, February 14, 2012 2:26 PM
To: 'PostGIS Users Discussion'
Subject: Re: [postgis-users] advice for quicker display?

To expand on that, the basic understanding is that file level access to
data
(e.g. shapefile) will always be faster for the entire dataset (all
things
being equal) because of the management overhead of the database, but for
accessing a subset of features of the dataset (often the typical use
case),
the database is faster if it has indices on the appropriate columns (the
geometry being the more important one).  Even if you are accessing all
of
the records in the database at once as a common case, you probably don't
need every node in the polygons/polylines, and might create a view or
column
that pre-generalizes those data before delivering them.

Best,
Steve

Stephen Mather
Geographic Information Systems (GIS) Manager
(216) 635-3243
s...@clevelandmetroparks.com
clevelandmetroparks.com




-Original Message-
From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of
Stephen
Woodbridge
Sent: Tuesday, February 14, 2012 2:15 PM
To: postgis-users@postgis.refractions.net
Subject: Re: [postgis-users] advice for quicker display?

On 2/14/2012 1:57 PM, Bistrais, Bob wrote:
> As some of you already know, I'm a newbie to PostGIS and have just
> barely got a test PostGIS database up and running. So, my latest
> question is in regards to draw times. I created a statewide parcel
layer
> from a shapefile. At statewide scale, when the application loads, the
> parcel data draws far slower than the original shapefile did. How can
I
> tune this so that draw times are better?

If you are drawing all the data, it will always be slower than 
shapefiles. The trick is to not draw more than is reasonable at a given 
scale. So the answer is don't try to draw all the parcels for the whole 
state. As you zoom in and need to only draw a subset of the parcels, you

will start to get speed advantages by using the spatial (GIST) indexes 
in postgis.

create index mytable_the_geom_gidx on mytable using gist (the_geom);

-Steve W
___
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 mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] advice for quicker display?

2012-02-14 Thread Stephen V. Mather
To expand on that, the basic understanding is that file level access to data
(e.g. shapefile) will always be faster for the entire dataset (all things
being equal) because of the management overhead of the database, but for
accessing a subset of features of the dataset (often the typical use case),
the database is faster if it has indices on the appropriate columns (the
geometry being the more important one).  Even if you are accessing all of
the records in the database at once as a common case, you probably don't
need every node in the polygons/polylines, and might create a view or column
that pre-generalizes those data before delivering them.

Best,
Steve

Stephen Mather
Geographic Information Systems (GIS) Manager
(216) 635-3243
s...@clevelandmetroparks.com
clevelandmetroparks.com




-Original Message-
From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Stephen
Woodbridge
Sent: Tuesday, February 14, 2012 2:15 PM
To: postgis-users@postgis.refractions.net
Subject: Re: [postgis-users] advice for quicker display?

On 2/14/2012 1:57 PM, Bistrais, Bob wrote:
> As some of you already know, I'm a newbie to PostGIS and have just
> barely got a test PostGIS database up and running. So, my latest
> question is in regards to draw times. I created a statewide parcel layer
> from a shapefile. At statewide scale, when the application loads, the
> parcel data draws far slower than the original shapefile did. How can I
> tune this so that draw times are better?

If you are drawing all the data, it will always be slower than 
shapefiles. The trick is to not draw more than is reasonable at a given 
scale. So the answer is don't try to draw all the parcels for the whole 
state. As you zoom in and need to only draw a subset of the parcels, you 
will start to get speed advantages by using the spatial (GIST) indexes 
in postgis.

create index mytable_the_geom_gidx on mytable using gist (the_geom);

-Steve W
___
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] advice for quicker display?

2012-02-14 Thread Stephen Woodbridge

On 2/14/2012 1:57 PM, Bistrais, Bob wrote:

As some of you already know, I’m a newbie to PostGIS and have just
barely got a test PostGIS database up and running. So, my latest
question is in regards to draw times. I created a statewide parcel layer
from a shapefile. At statewide scale, when the application loads, the
parcel data draws far slower than the original shapefile did. How can I
tune this so that draw times are better?


If you are drawing all the data, it will always be slower than 
shapefiles. The trick is to not draw more than is reasonable at a given 
scale. So the answer is don't try to draw all the parcels for the whole 
state. As you zoom in and need to only draw a subset of the parcels, you 
will start to get speed advantages by using the spatial (GIST) indexes 
in postgis.


create index mytable_the_geom_gidx on mytable using gist (the_geom);

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


Re: [postgis-users] advice for quicker display?

2012-02-14 Thread Puneet Kishor

On Feb 14, 2012, at 12:57 PM, Bistrais, Bob wrote:

> As some of you already know, I'm a newbie to PostGIS and have just
> barely got a test PostGIS database up and running.  So, my latest
> question is in regards to draw times.  I created a statewide parcel
> layer from a shapefile.  At statewide scale, when the application loads,
> the parcel data draws far slower than the original shapefile did.  How
> can I tune this so that draw times are better?


for starters, do you have a GIST index on the geometry column?



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


[postgis-users] advice for quicker display?

2012-02-14 Thread Bistrais, Bob
As some of you already know, I'm a newbie to PostGIS and have just
barely got a test PostGIS database up and running.  So, my latest
question is in regards to draw times.  I created a statewide parcel
layer from a shapefile.  At statewide scale, when the application loads,
the parcel data draws far slower than the original shapefile did.  How
can I tune this so that draw times are better?

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


Re: [postgis-users] why does the raster_columns , geometry_columns and raster_overviews are made as view istead of tables

2012-02-14 Thread Bborie Park

On 02/14/2012 10:01 AM, Zelio Fernandes wrote:

Hi

after going to one of the post i read that raster_columns , geometry_columns
and raster_overview were initially  tables. i am very curious to know why it
has been changed to Views ..*what is the reason behind it??*



When raster_columns and geometry_columns were tables, they required 
manual updating of records, typically resulting in out-of-date 
information over time.  With views, the records are always up-to-date 
because of the use of geometry typemod or table/column constraints.


-bborie

--
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkp...@ucdavis.edu
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] why does the raster_columns , geometry_columns and raster_overviews are made as view istead of tables

2012-02-14 Thread Zelio Fernandes
Hi

after going to one of the post i read that raster_columns , geometry_columns
and raster_overview were initially  tables. i am very curious to know why it
has been changed to Views ..*what is the reason behind it??*

--
View this message in context: 
http://postgis.17.n6.nabble.com/why-does-the-raster-columns-geometry-columns-and-raster-overviews-are-made-as-view-istead-of-tables-tp4469602p4469602.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


[postgis-users] why does the raster_columns , geometry_columns and raster_overviews are made as view istead of tables

2012-02-14 Thread Zelio Fernandes
Hi

after going to one of the post i read that raster_columns , geometry_columns
and raster_overview were initially  tables. i am very curious to know why it
has been changed to Views ..*what is the reason behind it??*

--
View this message in context: 
http://postgis.17.n6.nabble.com/why-does-the-raster-columns-geometry-columns-and-raster-overviews-are-made-as-view-istead-of-tables-tp4469601p4469601.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


[postgis-users] POSTGIS2.0 RASTER (raster2pgsql) IMPORT PROBLEM SOLVED - IT WORKS

2012-02-14 Thread Zelio Fernandes
USE OF COMMAND LIKE GIVEN BELOW :

$ /usr/lib/postgresql/9.1/bin/raster2pgsql -s 4236 -I -C -M
/home/gise/Desktop/postgis_installation/zelio/ThaneDist_srtm_mosaic.tif  -F
-t 30x30 public.demelevation | psql -d db3


AND IT WORKS

raster2pgsql x-executable file exists in  /usr/lib/postgresql/9.1/bin/
folder 
so go to the *Ubuntu Terminal* and type
/usr/lib/postgresql/9.1/bin/raster2pgsql  instead of navigating to that bin
folder 





--
View this message in context: 
http://postgis.17.n6.nabble.com/POSTGIS2-0-RASTER-raster2pgsql-IMPORT-PROBLEM-SOLVED-IT-WORKS-tp4469568p4469568.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] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Zelio Fernandes
Iam Very thankful to Sandro santilli and all the others who patiently replied
to my posts regarding import of POSTGIS raster , I Re-Read the post of
Sandro santilli

Use this:

 $ /usr/lib/postgresql/9.1/bin/raster2pgsql

Or set your path:

 $ PATH=$PATH:/usr/lib/postgresql/9.1/bin/

I've to admit I'm not sure why we don't install those binaries
into /usr/local/bin

and the below command worked


$ /usr/lib/postgresql/9.1/bin/raster2pgsql -s 4236 -I -C -M
/home/gise/Desktop/postgis_installation/zelio/ThaneDist_srtm_mosaic.tif  -F
-t 30x30 public.demelevation | psql -d db3


AND IT WORKED .HURRAY

i am sorry to disturb you'll with my post , i was new to unix.



THANK YOU  ALL 

--
View this message in context: 
http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4469551.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] postgis 2.0 cannot import raster

2012-02-14 Thread Zelio Fernandes
Iam Very thankful to Sandro santilli and all the others who patiently replied
to my posts regarding import of POSTGIS raster , I Re-Read the post of
Sandro santilli 

Use this:

* $ /usr/lib/postgresql/9.1/bin/raster2pgsql*

Or set your path:

 $ PATH=$PATH:/usr/lib/postgresql/9.1/bin/

I've to admit I'm not sure why we don't install those binaries
into /usr/local/bin 

and the below command worked

*
$ /usr/lib/postgresql/9.1/bin/raster2pgsql -s 4236 -I -C -M
/home/gise/Desktop/postgis_installation/zelio/ThaneDist_srtm_mosaic.tif  -F
-t 30x30 public.demelevation | psql -d db3*


AND IT WORKED .HURRAY

i am sorry to disturb you'll with my post , i was new to unix.



THANK YOU  ALL 


--
View this message in context: 
http://postgis.17.n6.nabble.com/postgis-2-0-cannot-import-raster-tp4468791p4469542.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] setting up or accessing a host

2012-02-14 Thread Bistrais, Bob
Hi Ben,

 

I think I've had some success, thanks to your input.  But please let me
know if this is OK...

 

I edited pg_hba.conf, adding a line like this:

Host all all mymachinename   md5

 

-where mymachinename is actually the fully qualified domain name of the
machine.

 

This works, in the sense that I can now display the data through other
than localhost.  But is this a good practice?  Am I breaching security,
or setting myself up for some other disaster?  

 

Thanks,

Bob  

 



From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Ben
Madin
Sent: Tuesday, February 14, 2012 10:42 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] setting up or accessing a host

 

Bob,

 

the security is by default tight - but it sounds like you want host
based authentication (hba)

 

You will need to read this page a few times :

 

http://www.postgresql.org/docs/9.1/interactive/auth-pg-hba-conf.html

 

and then before you do anything else edit your postgresql.conf file
(about 60 lines down) to look like :

 

listen_addresses = '*'  # what IP address(es) to listen on;

# comma-separated list of
addresses;

# defaults to 'localhost', '*' =
all

# (change requires restart)

 

Note the * in between the quotes (you may well have localhost there
now). 

 

Then edit your pg_hba.conf file.

 

note that you need to restart the server when you change the listen
addresses, but you only need to reload it when you edit the pg_hba.conf
file

 

Also note that this can be really painful for users with dynamic ip
address allocation.

 

good luck.

 

cheers

 

Ben

 

 

 

 

On 14/02/2012, at 11:04 PM, Bistrais, Bob wrote:





So at this point I figured out how to get a PostGIS layer to display
through MapServer, but that is only where host=localhost.  Now I'm
trying to figure out how to access the data from other machines.  I'm
looking through the documentation but haven't found out how yet.  Can
anyone point me in the right direction?

___
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] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Sandro Santilli
On Tue, Feb 14, 2012 at 08:10:42AM -0800, Zelio Fernandes wrote:

> i have first navigated to usr/lib/postgres9.1/bin/ and then executed
> raster2pgsql -G and it gave error message as command not found.

Did you read my reply ?
Re-read it.

Did you understand it ?
Re-read it.

Did it work ?
Re-read it.

Did it work now ?
Find some information online about using a UNIX shell.

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


Re: [postgis-users] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Pierre Racine
This is kind of strange...

Can you execute any other command located in this same folder?

What is the extension of the file raster2pgsql? What if you add it at the end?

On which OS are you operating?

Pierre

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of Zelio Fernandes
> Sent: Tuesday, February 14, 2012 11:11 AM
> To: postgis-users@postgis.refractions.net
> Subject: Re: [postgis-users] what is the default password of Postgres user in
> POSTGIS 2.0
> 
> I have POSTGIS 2.0 alpha5 build and it is located in the same folder you
> mentioned that is in usr/lib/postgres9.1/bin/
> 
> i have first navigated to usr/lib/postgres9.1/bin/ and then executed 
> raster2pgsql
> -G and it gave error message as command not found.
> 
> --
> View this message in context: http://postgis.17.n6.nabble.com/what-is-the-
> default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4469300.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
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Zelio Fernandes
I have POSTGIS 2.0 alpha5 build and it is located in the same folder you
mentioned that is in usr/lib/postgres9.1/bin/

i have first navigated to usr/lib/postgres9.1/bin/ and then executed
raster2pgsql -G and it gave error message as command not found.

--
View this message in context: 
http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4469300.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] ST_AsJpeg

2012-02-14 Thread Pierre Racine
So you might have to write a script connecting to PostgreSQL and writing the 
file for you. See an example in:

http://www.bostongis.com/blog/index.php?/archives/175-Minimalist-Web-based-PHP-PostGIS-2.0-Spatial-GeometryRaster-Viewer.html

Pierre

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of Joan
> Sent: Tuesday, February 14, 2012 10:10 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] ST_AsJpeg
> 
> Yes, I want to create a jpeg/tiff file. I am new to cursors, how would that 
> work
> in a query.
> 
> 
> On 14 February 2012 15:39, Pierre Racine  wrote:
> 
> 
>   Thanks,
> 
>   Do you see any way to make the file directly readable (without having to
> edit it)?
> 
> 
>   Pierre
> 
>   > -Original Message-
>   > From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-
> users-
> 
>   > boun...@postgis.refractions.net] On Behalf Of Sandro Santilli
>   > Sent: Tuesday, February 14, 2012 9:28 AM
>   > To: PostGIS Users Discussion
> 
>   > Subject: Re: [postgis-users] ST_AsJpeg
>   >
>   > On Tue, Feb 14, 2012 at 09:22:21AM -0500, Pierre Racine wrote:
>   > > Yes. You want to write the file directly to the filesystem? Sandro
> wrote
>   > something in the list about this recently but I can't find it. Sandro?
> Robe?
>   > >
>   >
>   > I ended up binary-editing the result afterwards.
>   >
>   > Anyway, first step is declaring a binary cursor, redirecting output 
> to a
> file and
>   > calling the function.
>   >
>   > For the binary editing, I looked at another file with my expected
> format to tell
>   > where it started (human eye pattern matching).
>   >
>   > > You can also use gdal_translate...
>   >
>   > Much better, when it works (it wasn't working for me).
>   >
>   > --strk;
>   >
>   >   ,--o-.
>   >   |   __/  |Delivering high quality PostGIS 2.0 !
>   >   |  / 2.0 |http://strk.keybit.net
>   >   `-o--'
>   >
>   > ___
>   > 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 mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] How to import raster file (*.tiff) into POSTGIS 2.0

2012-02-14 Thread Zelio Fernandes
postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ raster2pgsql -s 4236 -I
-C -M /home/zelio/Desktop/Zelio/Zelio/L3-NE43A16-094-059-13oct08-BAND2.tif
-F -t 30x30 public.demelevation | psql -d mydb

raster2pgsql: command not found

postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ raster2pgsql -G

raster2pgsql: command not found
 

The x-executable file exists in /usr/lib/postgresql/9.1/bin   and all my
*.tiff files exists in zelio folder in desktop folder of home in ubuntu
11.04

i want to import all the files available in zelio folder on desktop into
postgis2.0

give me the information to which folder i have to navigate on command line
to run raster2pgsql?

--
View this message in context: 
http://postgis.17.n6.nabble.com/How-to-import-raster-file-tiff-into-POSTGIS-2-0-tp4468383p4469289.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] Raster and shapefile in POSTGIS

2012-02-14 Thread Zelio Fernandes
*postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ raster2pgsql -s 4236 -I
-C -M /home/zelio/Desktop/Zelio/Zelio/L3-NE43A16-094-059-13oct08-BAND2.tif
-F -t 30x30 public.demelevation | psql -d mydb

raster2pgsql: command not found

postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ raster2pgsql -G

raster2pgsql: command not found
 *

/The x-executable gile exists in /usr/lib/postgresql/9.1/bin   and all my
*.tiff files exists in zelio folder in desktop folder of home in ubuntu
11.04

i want to import all the files available in zelio folder on desktop into
postgis2.0

give me the information to which folder i have to navigate on command line
to run raster2pgsql?/


--
View this message in context: 
http://postgis.17.n6.nabble.com/Raster-and-shapefile-in-POSTGIS-tp4468024p4469275.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] raster2pgsql problems

2012-02-14 Thread Zelio Fernandes
what the search path should be ?? the file x-executable is already available
in usr/lib/postgresql/9.1/bin/
and i libgdal 1.9.0  but still the command 

$raster2pgsql -G  does not work.

--
View this message in context: 
http://postgis.17.n6.nabble.com/raster2pgsql-problems-tp4468732p4469259.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] setting up or accessing a host

2012-02-14 Thread Ben Madin
Bob,

the security is by default tight - but it sounds like you want host based 
authentication (hba)

You will need to read this page a few times :

http://www.postgresql.org/docs/9.1/interactive/auth-pg-hba-conf.html

and then before you do anything else edit your postgresql.conf file (about 60 
lines down) to look like :

listen_addresses = '*'  # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)

Note the * in between the quotes (you may well have localhost there now). 

Then edit your pg_hba.conf file.

note that you need to restart the server when you change the listen addresses, 
but you only need to reload it when you edit the pg_hba.conf file

Also note that this can be really painful for users with dynamic ip address 
allocation.

good luck.

cheers

Ben




On 14/02/2012, at 11:04 PM, Bistrais, Bob wrote:

> So at this point I figured out how to get a PostGIS layer to display through 
> MapServer, but that is only where host=localhost.  Now I’m trying to figure 
> out how to access the data from other machines.  I’m looking through the 
> documentation but haven’t found out how yet.  Can anyone point me in the 
> right direction?
> ___
> 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] ST_AsJpeg

2012-02-14 Thread Sandro Santilli
On Tue, Feb 14, 2012 at 09:39:44AM -0500, Pierre Racine wrote:
> Thanks,
> 
> Do you see any way to make the file directly readable (without having to edit 
> it)?

I could find no way with current psql. Something to improve there.
You can of course do it with scripts.

--strk;

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net
  `-o--'

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


Re: [postgis-users] ST_AsJpeg

2012-02-14 Thread Joan
Yes, I want to create a jpeg/tiff file. I am new to cursors, how would that
work in a query.

On 14 February 2012 15:39, Pierre Racine wrote:

> Thanks,
>
> Do you see any way to make the file directly readable (without having to
> edit it)?
>
> Pierre
>
> > -Original Message-
> > From: postgis-users-boun...@postgis.refractions.net [mailto:
> postgis-users-
> > boun...@postgis.refractions.net] On Behalf Of Sandro Santilli
> > Sent: Tuesday, February 14, 2012 9:28 AM
> > To: PostGIS Users Discussion
> > Subject: Re: [postgis-users] ST_AsJpeg
> >
> > On Tue, Feb 14, 2012 at 09:22:21AM -0500, Pierre Racine wrote:
> > > Yes. You want to write the file directly to the filesystem? Sandro
> wrote
> > something in the list about this recently but I can't find it. Sandro?
> Robe?
> > >
> >
> > I ended up binary-editing the result afterwards.
> >
> > Anyway, first step is declaring a binary cursor, redirecting output to a
> file and
> > calling the function.
> >
> > For the binary editing, I looked at another file with my expected format
> to tell
> > where it started (human eye pattern matching).
> >
> > > You can also use gdal_translate...
> >
> > Much better, when it works (it wasn't working for me).
> >
> > --strk;
> >
> >   ,--o-.
> >   |   __/  |Delivering high quality PostGIS 2.0 !
> >   |  / 2.0 |http://strk.keybit.net
> >   `-o--'
> >
> > ___
> > 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 mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] setting up or accessing a host

2012-02-14 Thread Bistrais, Bob
So at this point I figured out how to get a PostGIS layer to display
through MapServer, but that is only where host=localhost.  Now I'm
trying to figure out how to access the data from other machines.  I'm
looking through the documentation but haven't found out how yet.  Can
anyone point me in the right direction? 

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


Re: [postgis-users] ST_AsJpeg

2012-02-14 Thread Pierre Racine
Thanks,

Do you see any way to make the file directly readable (without having to edit 
it)?

Pierre

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of Sandro Santilli
> Sent: Tuesday, February 14, 2012 9:28 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] ST_AsJpeg
> 
> On Tue, Feb 14, 2012 at 09:22:21AM -0500, Pierre Racine wrote:
> > Yes. You want to write the file directly to the filesystem? Sandro wrote
> something in the list about this recently but I can't find it. Sandro? Robe?
> >
> 
> I ended up binary-editing the result afterwards.
> 
> Anyway, first step is declaring a binary cursor, redirecting output to a file 
> and
> calling the function.
> 
> For the binary editing, I looked at another file with my expected format to 
> tell
> where it started (human eye pattern matching).
> 
> > You can also use gdal_translate...
> 
> Much better, when it works (it wasn't working for me).
> 
> --strk;
> 
>   ,--o-.
>   |   __/  |Delivering high quality PostGIS 2.0 !
>   |  / 2.0 |http://strk.keybit.net
>   `-o--'
> 
> ___
> 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] raster2pgsql problems

2012-02-14 Thread Pierre Racine
raster2pgsql must not be able to find and load the gdal shared library. Search 
for libgdal-1.* and make sure its location is in your search paths.

Pierre

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of nikhil
> Sent: Tuesday, February 14, 2012 8:02 AM
> To: postgis-users@postgis.refractions.net
> Subject: [postgis-users] raster2pgsql problems
> 
> Hi,
> 
> I have installed postgres 9.1 with postgis (raster). Now when i am running
> "raster2pgsql -G" does not give any output. Some one help me rectifying this
> issue. I further wanted to import " .tiff " file into my database.Please send 
> me
> the link of any step by step documentation if available.
> 
> Help will be greatly appreciated.
> 
> thanks
> nikhil morajkar
> IIT Bombay, India
> 
> --
> View this message in context: http://postgis.17.n6.nabble.com/raster2pgsql-
> problems-tp4468732p4468732.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
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] ST_AsJpeg

2012-02-14 Thread Sandro Santilli
On Tue, Feb 14, 2012 at 09:22:21AM -0500, Pierre Racine wrote:
> Yes. You want to write the file directly to the filesystem? Sandro wrote 
> something in the list about this recently but I can't find it. Sandro? Robe?
> 

I ended up binary-editing the result afterwards.

Anyway, first step is declaring a binary cursor,
redirecting output to a file and calling the function.

For the binary editing, I looked at another file with
my expected format to tell where it started (human eye
pattern matching). 

> You can also use gdal_translate...

Much better, when it works (it wasn't working for me).

--strk;

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net
  `-o--'

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


Re: [postgis-users] ST_AsJpeg

2012-02-14 Thread Pierre Racine
Yes. You want to write the file directly to the filesystem? Sandro wrote 
something in the list about this recently but I can't find it. Sandro? Robe?

You can also use gdal_translate...

Pierre

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of Joan
> Sent: Tuesday, February 14, 2012 6:27 AM
> To: PostGIS Users Discussion
> Subject: [postgis-users] ST_AsJpeg
> 
> Hi guys,
> 
> Is it possible to create an actual jpeg image using ST_AsJPEG? For example
> 
> select ST_AsJPEG(rast) from area_dem \g image.jpg
> 
> Joan
> 

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


Re: [postgis-users] How to import raster file (*.tiff) into POSTGIS 2.0

2012-02-14 Thread Pierre Racine
The python script is replaced by and equivalent C loader: raster2pgsql

To import many rasters you can use wildcards: *.tif

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of Zelio Fernandes
> Sent: Tuesday, February 14, 2012 6:23 AM
> To: postgis-users@postgis.refractions.net
> Subject: [postgis-users] How to import raster file (*.tiff) into POSTGIS 2.0
> 
> Hi
> 
> it has been said in one of the post that the  python script to import raster 
> file in
> POSTGIS 2.0 has been deprecated.
> if this is so...then how to import the raster file
> 
> 
> please give me the detailed steps.
> 
> --
> View this message in context: http://postgis.17.n6.nabble.com/How-to-import-
> raster-file-tiff-into-POSTGIS-2-0-tp4468383p4468383.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
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] what is the future of POSTGIS Raster support and POSTGIS raster database design model

2012-02-14 Thread Pierre Racine
> please tell me about the future plans of postgis raster and give me some good
> links that provide that information.

Everything is in this page:

http://trac.osgeo.org/postgis/wiki/WKTRaster

Check the working  specifications and the tickets.

> also give me a link on POSTGIS raster database design model.

There is no database model, just a data type: RASTER. Like for the GEOMETRY 
type you can store raster in different arrangement (topological, 
non-topological, with or without overlaps, gaps, tiled or not) depending on the 
needs of your application. Have a look at the unofficial documentation:

http://trac.osgeo.org/postgis/wiki/WKTRaster/Documentation01

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


Re: [postgis-users] Raster and shapefile in POSTGIS

2012-02-14 Thread Pierre Racine
Could you be more explicit on how it did not work? What message did you get 
after you did raster2pgsql?

Thanks,

Pierre

> The following command which were given in postgis link
> (http://www.postgis.org/documentation/manual-
> svn/using_raster.xml.html#RT_Loading_Rasters
> )  did not worked
> 
> raster2pgsql -G  --- did not work
> 
> raster2pgsql -s 4236 -I -C -M *.tif -F -t 100x100 public.demelevation | psql 
> -d
> gisdb --- did not work
> 
> 
> I executed above commands from commandline as wall as POSTGIS
> 
> *also provide me the link which provide detailed(step by step) information 
> about
> raster and shapefile import in POSTGIS 2.0*


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


Re: [postgis-users] postgis 2.0 cannot import raster

2012-02-14 Thread Sandro Santilli
On Tue, Feb 14, 2012 at 05:15:25AM -0800, Zelio Fernandes wrote:
> The error i get is :
> 
> postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ *raster2pgsql -s 4236 -I
> -C -M /home/zelio/Desktop/Zelio/Zelio/L3-NE43A16-094-059-13oct08-BAND2.tif
> -F -t 30x30 public.demelevation | psql -d mydb*
> 
> raster2pgsql: command not found
> 
> postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ *raster2pgsql -G
> *
> raster2pgsql: command not found

Use this:

 $ /usr/lib/postgresql/9.1/bin/raster2pgsql 

Or set your path:

 $ PATH=$PATH:/usr/lib/postgresql/9.1/bin/

I've to admit I'm not sure why we don't install those binaries
into /usr/local/bin

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


Re: [postgis-users] Rasters - world wide SRTM dataset for altitude profile?

2012-02-14 Thread Sandro Santilli
On Tue, Feb 14, 2012 at 12:54:54PM +0100, Frederik Ramm wrote:

> I wonder if, with PostGIS raster support, I could:
> 
> * simply import a world-wide SRTM data set (I'm sure people must
> have done that already?)
> * and then efficiently query the nearest raster values for a given
> linestring geometry, thereby getting an altitude profile?

Yes and yes !

> Without having checked the limits of PostGIS raster support, it
> sounds to me as if this could be much simpler than the old approach.
> Can you see any obvious problems with that idea, or should I go
> ahead and try it?

I think you should be fine to go ahead and try it.
Let us know how it goes !

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


Re: [postgis-users] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Andreas Forø Tollefsen
Strange.
Mine is located in /usr/lib/postgresql/9.1/bin/raster2pgsql
Which build do you have? Have you tried:
sudo updatedb
and then
located raster2pgsql
?

Andreas

2012/2/14 Zelio Fernandes :
> postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ raster2pgsql -s 4236 -I
> -C -M /home/zelio/Desktop/Zelio/Zelio/L3-NE43A16-094-059-13oct08-BAND2.tif
> -F -t 30x30 public.demelevation | psql -d mydb
>
> raster2pgsql: command not found
>
> postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ raster2pgsql -G
>
> raster2pgsql: command not found
>
>
> --
> View this message in context: 
> http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4468779.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
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] postgis 2.0 cannot import raster

2012-02-14 Thread Zelio Fernandes
The error i get is :

postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ *raster2pgsql -s 4236 -I
-C -M /home/zelio/Desktop/Zelio/Zelio/L3-NE43A16-094-059-13oct08-BAND2.tif
-F -t 30x30 public.demelevation | psql -d mydb*

raster2pgsql: command not found

postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ *raster2pgsql -G
*
raster2pgsql: command not found


--
View this message in context: 
http://postgis.17.n6.nabble.com/postgis-2-0-cannot-import-raster-tp4468791p4468791.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] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Zelio Fernandes
postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ raster2pgsql -s 4236 -I
-C -M /home/zelio/Desktop/Zelio/Zelio/L3-NE43A16-094-059-13oct08-BAND2.tif
-F -t 30x30 public.demelevation | psql -d mydb

raster2pgsql: command not found

postgres@zelio-desktop:/usr/lib/postgresql/9.1/bin$ raster2pgsql -G

raster2pgsql: command not found


--
View this message in context: 
http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4468779.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] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Andreas Forø Tollefsen
It seems most of your questions is covered by the PostGIS documentation.

Here are the links to these documents if you have not already read them:

GIST Index: 
http://postgis.refractions.net/documentation/manual-svn/using_postgis_dbmanagement.html#id2764176
Loading raster:
http://postgis.refractions.net/documentation/manual-svn/using_raster.xml.html#RT_Loading_Rasters
Loading vector:
http://postgis.refractions.net/documentation/manual-svn/using_postgis_dbmanagement.html#shp2pgsql_usage

Andreas

2012/2/14 Zelio Fernandes :
> thankyou all of you for quick reply this is really a good opensource
> forum
>
>
> i have also 3 more posts pending
>
> 1)on GiST  and SP-GiST indexes architecture
> 2)How to import raster and shape file
> 3)Future of PostGis raster
>
>
>
> please , can anybody reply to it.
>
> NOW HOW TO IMPORT RASTER file to database is very important for me to start
> with Raster analysis.
>
> --
> View this message in context: 
> http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4468234.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
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] raster2pgsql problems

2012-02-14 Thread nikhil
Hi,

I have installed postgres 9.1 with postgis (raster). Now when i am running
"raster2pgsql -G" does not give any output. Some one help me rectifying this
issue. I further wanted to import " .tiff " file into my database.Please
send me the link of any step by step documentation if available.

Help will be greatly appreciated.

thanks
nikhil morajkar
IIT Bombay, India

--
View this message in context: 
http://postgis.17.n6.nabble.com/raster2pgsql-problems-tp4468732p4468732.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


[postgis-users] Rasters - world wide SRTM dataset for altitude profile?

2012-02-14 Thread Frederik Ramm

Hi,

   forgive me for barging in with little background knowledge. I'm a 
regular PostGIS user but haven't used rasters with PostGIS yet, and I 
was hoping that you could give me a quick "reality check" on the 
following idea.


In OpenStreetMap we sometimes have the requirement to generate altitude 
profiles for a route. There's a 4-year-old summer of code project that 
imports SRTM data into Postgres, by creating a two-column table of 
quadtile location code (bigint) and altitude (int), and then 
step-by-step assembling height values for a given route geometry.


Importing SRTM data into that structure takes quite long and needs a lot 
of storage space.


I wonder if, with PostGIS raster support, I could:

* simply import a world-wide SRTM data set (I'm sure people must have 
done that already?)
* and then efficiently query the nearest raster values for a given 
linestring geometry, thereby getting an altitude profile?


Without having checked the limits of PostGIS raster support, it sounds 
to me as if this could be much simpler than the old approach. Can you 
see any obvious problems with that idea, or should I go ahead and try it?


Bye
Frederik

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


[postgis-users] ST_AsJpeg

2012-02-14 Thread Joan
Hi guys,

Is it possible to create an actual jpeg image using ST_AsJPEG? For example

select ST_AsJPEG(rast) from area_dem \g image.jpg

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


[postgis-users] How to import raster file (*.tiff) into POSTGIS 2.0

2012-02-14 Thread Zelio Fernandes
Hi

it has been said in one of the post that the  python script to import raster
file in POSTGIS 2.0 has been deprecated. 
if this is so...then how to import the raster file 


please give me the detailed steps.

--
View this message in context: 
http://postgis.17.n6.nabble.com/How-to-import-raster-file-tiff-into-POSTGIS-2-0-tp4468383p4468383.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] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Zelio Fernandes
thankyou all of you for quick reply this is really a good opensource
forum


i have also 3 more posts pending 

1)on GiST  and SP-GiST indexes architecture
2)How to import raster and shape file
3)Future of PostGis raster



please , can anybody reply to it.

NOW HOW TO IMPORT RASTER file to database is very important for me to start
with Raster analysis.

--
View this message in context: 
http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4468234.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] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Denis Rouzaud

You should add the following ppa to have last version of pgadmin

https://launchpad.net/~flexiondotorg/+archive/postgres 



Then, it will be ok for 9.1

On 02/14/2012 11:14 AM, Zelio Fernandes wrote:

Warning:

This version of pgAdmin has only been tested with PostgreSQL version 9.0 and
below and may not function correctly with this server. Please upgrade
pgAdmin.

--
View this message in context: 
http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4468182.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
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Zelio Fernandes
Warning:

This version of pgAdmin has only been tested with PostgreSQL version 9.0 and
below and may not function correctly with this server. Please upgrade
pgAdmin.

--
View this message in context: 
http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4468182.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] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Zelio Fernandes
thankyou

yeah i know it works if i give  sudo su postgres
psqland createdb

BUT i was using pgadmin3 for POSTGIS 2.0  to create the new database SO i
want to create it through pgadmin3.

when i opened pgadmin3 for the first time after installation it gave me
error .. some of the feature may not be supported for posgresql9.0+

--
View this message in context: 
http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4468169.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] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Sandro Santilli
On Tue, Feb 14, 2012 at 01:52:52AM -0800, Zelio Fernandes wrote:
> Hi also tried with no password and it gave me error as :
> 
> *An error has occurred:
> 
> Error connecting to the server: fe_sendauth: no password supplied
> *

You should lookup into the documentation of your distribution.
Also, you can change the security model by editing pg_hba.conf

--strk; 

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net
  `-o--'

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


Re: [postgis-users] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Helen San Segundo Navazo


  
  
hi,

what you have to do first is to change the default password that
comes from the installation process, to do this:

sudo su postgres -c "psql template1" 

template1=# ALTER USER postgres WITH PASSWORD 'new_password';

I hope this helps you,
Helen

El 14/02/12 10:26, Zelio Fernandes escribió:

  Hi 

I use ubuntu 11.04 operating system.
i installed POSTGIS 2.0 and POSTGRES 9.1.2 but while installing POSTGIS has
not asked me to give any password.
and when i tried to create a new database through SUPERUSER that is 
username : postgres
password : ? (i dont know) - tried password as postgres and root but both
didnt work.

How to access the super user password?

The error i get is : 

An error has occurred:

Error connecting to the server: FATAL:  password authentication failed for
user "postgres"
FATAL:  password authentication failed for user "postgres"





--
View this message in context: http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4468052.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





-- 
   Helen San Segundo Navazo

Tècnica de productes
Tel. 93 567 60 90
Fax 93 567 61 02
A/e hsansegu...@meteo.cat
  
  

http://www.meteo.cat

Carrer Berlín 38-46, 4a planta
08029 Barcelona
  
  Abans d’imprimir aquest correu,
  assegureu-vos que és del tot necessari. El medi ambient és
  cosa de tothom!
  La informació d'aquesta transmissió electrònica és confidencial
i el seu ús sols està permès als seus destinataris. Si Vostè no
és la persona destinatària d'aquesta transmissió electrònica, li
preguem que ens ho comuniqui de forma immediata i destrueixi
qualsevol copia de la mateixa (tant digital com en paper).

  

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


Re: [postgis-users] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Thomas Baschetti
in ubuntu you can try this:

sudo su postgres

which should make you the ubuntu-user "postgres"
As this you can run psql, createdb ...

generally read
https://help.ubuntu.com/10.04/serverguide/C/postgresql.html
and
https://help.ubuntu.com/community/PostgreSQL
which gives some nice startingpoints

Thomas

Am 14.02.2012 10:52, schrieb Zelio Fernandes:
> Hi also tried with no password and it gave me error as :
>
> *An error has occurred:
>
> Error connecting to the server: fe_sendauth: no password supplied
> *
>
> i cannot do anything because postgres is a superuser and only it has all the
> roles. 
> Unless i give current password it wont allow me to change the password of
> superuser(postgres).
> How can i delete the postgres super user and create it again so that i can
> give a new password
>
> --
> View this message in context: 
> http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4468107.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


-- 

Thomas Baschetti - Systemanalyse Geographische Informationssysteme
Hakenstraße 8D
49074 Osnabrück

Tel: 0541 25 91 90 | mobil 01577 189 25 91
E-Mail: i...@thomas-baschetti.de
www.thomas-baschetti.de
Ust-IdNr.: DE264355072


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


Re: [postgis-users] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Zelio Fernandes
Hi also tried with no password and it gave me error as :

*An error has occurred:

Error connecting to the server: fe_sendauth: no password supplied
*

i cannot do anything because postgres is a superuser and only it has all the
roles. 
Unless i give current password it wont allow me to change the password of
superuser(postgres).
How can i delete the postgres super user and create it again so that i can
give a new password

--
View this message in context: 
http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4468107.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


[postgis-users] How GiST indexes work and what is its architecture

2012-02-14 Thread Zelio Fernandes
Hi can anybody provide me the link for documentation on :

*How GiST indexes work and what is its architecture "?*
*what is the time complexity of GiSt inedexes?*
*give the link with examples?*


i have also heard on new *SP-GiST indexes* ...can anybody provide me the
information on it ---very well documented?


--
View this message in context: 
http://postgis.17.n6.nabble.com/How-GiST-indexes-work-and-what-is-its-architecture-tp4468070p4468070.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] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Sandro Santilli
On Tue, Feb 14, 2012 at 01:26:05AM -0800, Zelio Fernandes wrote:

> How to access the super user password?
> 
> The error i get is : 
> 
> An error has occurred:
> 
> Error connecting to the server: FATAL:  password authentication failed for
> user "postgres"
> FATAL:  password authentication failed for user "postgres"

If I'm not wrong the default is using ident authentication, so
that if you connect as the "postgres" unix username you get in
with no password.

--strk; 

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net
  `-o--'

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


[postgis-users] what is the future of POSTGIS Raster support and POSTGIS raster database design model

2012-02-14 Thread Zelio Fernandes
Hi,

please tell me about the future plans of postgis raster and give me some
good links that provide that information.

also give me a link on POSTGIS raster database design model.

--
View this message in context: 
http://postgis.17.n6.nabble.com/what-is-the-future-of-POSTGIS-Raster-support-and-POSTGIS-raster-database-design-model-tp4468061p4468061.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


[postgis-users] what is the default password of Postgres user in POSTGIS 2.0

2012-02-14 Thread Zelio Fernandes
Hi 

I use ubuntu 11.04 operating system.
i installed POSTGIS 2.0 and POSTGRES 9.1.2 but while installing POSTGIS has
not asked me to give any password.
and when i tried to create a new database through SUPERUSER that is 
username : postgres
password : ? (i dont know) - tried password as postgres and root but both
didnt work.

How to access the super user password?

The error i get is : 

An error has occurred:

Error connecting to the server: FATAL:  password authentication failed for
user "postgres"
FATAL:  password authentication failed for user "postgres"





--
View this message in context: 
http://postgis.17.n6.nabble.com/what-is-the-default-password-of-Postgres-user-in-POSTGIS-2-0-tp4468052p4468052.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


[postgis-users] Raster and shapefile in POSTGIS

2012-02-14 Thread Zelio Fernandes
Hi,

i want to know how to import raster and shapefile in POSTGIS 2.0. However
after the installation i tried to create a dummy raster data from the
examples and it worked BUT i want to know  how to store raster and shapefile
in POSTGIS 2.0  database.

The following command which were given in postgis link
(http://www.postgis.org/documentation/manual-svn/using_raster.xml.html#RT_Loading_Rasters
)  did not worked

raster2pgsql -G  --- did not work

raster2pgsql -s 4236 -I -C -M *.tif -F -t 100x100 public.demelevation | psql
-d gisdb --- did not work


I executed above commands from commandline as wall as POSTGIS

*also provide me the link which provide detailed(step by step) information
about raster and shapefile import in POSTGIS 2.0*

--
View this message in context: 
http://postgis.17.n6.nabble.com/Raster-and-shapefile-in-POSTGIS-tp4468024p4468024.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