From ARyan@co.linn.or.us Sat May 1 01:38:04 2004 From: ARyan@co.linn.or.us (Ryan, Adam) Date: Fri, 30 Apr 2004 17:38:04 -0700 Subject: [Mapserver-users] Shapelib, GPC, PHP, and polygon clipping Message-ID: <614FCE5F14A6D41180C200010240D6A25B34BE@LINNMS> Steve, Frank, etc... A while back Steve Lime wrote in response to a request for polygon clipping code. http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0201/msg00094.html He suggested using the GPC library. I checked this out and was able to get it to work. Is it worth trying to use GPC with either PHP mapscript or shapelib directly and write a little routine to grab the shapes in question, convert them to gpc ascii format, run the clip operation, and convert back to a shapefile result? In PHP I could build the ASCII files, then call a gpc executable, and then translate the ASCII result back into a new shapefile. Am I exploring old technology? Is there a better way? Seems like a lot of steps but all the really hard work has been done and it's just a matter of reformatting data to work with the different tools. I'd like to explore PostGis but we're a Windows shop and it's not in the cards. Thank you for any suggestions you might have, Adam Ryan GIS Analyst Linn County GIS Department Albany, OR 97321 aryan@co.linn.or.us From carl.anderson@vadose.org Sat May 1 02:40:41 2004 From: carl.anderson@vadose.org (Carl Anderson) Date: Fri, 30 Apr 2004 21:40:41 -0400 Subject: [Mapserver-users] Shapelib, GPC, PHP, and polygon clipping In-Reply-To: <614FCE5F14A6D41180C200010240D6A25B34BE@LINNMS> (from ARyan@co.linn.or.us on Fri, Apr 30, 2004 at 20:38:04 -0400) References: <614FCE5F14A6D41180C200010240D6A25B34BE@LINNMS> Message-ID: <20040501014041.GA7639@vadose.dvg> On 04/30/2004 08:38:04 PM, "Ryan, Adam" wrote: > > Steve, Frank, etc... > > A while back Steve Lime wrote in response to a request for polygon > clipping > code. > > http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0201/msg00094.html > > He suggested using the GPC library. I checked this out and was able > to get > it to work. > > Is it worth trying to use GPC with either PHP mapscript or shapelib > directly > and write a little routine to grab the shapes in question, convert > them to > gpc ascii format, run the clip operation, and convert back to a > shapefile > result? In PHP I could build the ASCII files, then call a gpc > executable, > and then translate the ASCII result back into a new shapefile. > I did that I while back and found that about 0.5% of clipped polygons were collected wrong from the base shapes. Not a big number but overtime it builds up.... either JTS (JAVA, http://www.vividsolutions.com/jts/) or GEOS (C++, http://geos.refractions.net) are a better starting point C. From antonio.cosenza@polito.it Sat May 1 11:18:20 2004 From: antonio.cosenza@polito.it (Antonio Cosenza) Date: Sat, 01 May 2004 12:18:20 +0200 Subject: [Mapserver-users] world files and tile indexing In-Reply-To: <13858AA1A74F30419F319ACB66A9D1224E4426@mercator.topozone.com> References: <13858AA1A74F30419F319ACB66A9D1224E4426@mercator.topozone.com> Message-ID: <4093796C.304@polito.it>
It would help if you could explain what you're trying to do!  
ok, i'll try tou explain you my situation!
What
format are the raster files in now, 
The raster files are in jpg format.  They are a set of 3 tiles NOT GEOREFERENCED (of course, they are jpg!). But, i have a shapefile, called tile.shp (so, georeferenced) representing the footprints of  the tiles. In tile.shp, I created a field (Path) including the absoulte path to tiff tiles on my disk (ex. /var/www/.....F4-C4.tif).Now,  i converted the jpg files in tiff files, without the world files. I use this mapfile configuration:

 LAYER
    NAME "pannelli"
    STATUS ON
    TYPE RASTER
    TILEINDEX "./tile.shp"
    TILEITEM "Path"
  END

I run maplab, but an error occurs: unable to open tiff files:

Description
Unable to open world file for reading. in /maplab/htdocs/common/wrapper/drawmap.php
Failed to draw layer named 'pannelli'. in /maplab/htdocs/common/wrapper/drawmap.php
Unable to open world file for reading. in /maplab/htdocs/common/wrapper/drawmap.php
Failed to draw layer named 'pannelli'. in /maplab/htdocs/common/wrapper/drawmap.php

So, i created some empty world files! This time, maplab runs without error, but it doesn't show me the tiles. It shows me only a blank page.
Where is the problem?


and what geographic reference data
do you have for them (and in what format)?

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed@topozone.com
(978) 251-4242  

-----Original Message-----
From: Antonio Cosenza [mailto:antonio.cosenza@polito.it] 
Sent: Friday, April 30, 2004 5:43 AM
To: Ed McNierney; mapserver-users@lists.gis.umn.edu
Subject: Re: [Mapserver-users] world files and tile indexing

so, i need to convert the raster tiles in tiff format, without world
files? Right?

thanks

Ed McNierney wrote:

  
Antonio -

Yes, as long as the georeference information is there for the tile 
index to be created (and for the image to be rendered properly).  
GeoTIFFs can be used in a TILEINDEX layer without world files.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed@topozone.com
(978) 251-4242

-----Original Message-----
From: Antonio Cosenza [mailto:antonio.cosenza@polito.it]
Sent: Thursday, April 29, 2004 2:40 PM
To: mapserver-users@lists.gis.umn.edu
Subject: [Mapserver-users] world files and tile indexing

Hi everyvody,
is it possible to use tile indexing without world file?

thanks
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users


 

    



_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

  

From ed@topozone.com Sat May 1 18:39:07 2004 From: ed@topozone.com (Ed McNierney) Date: Sat, 1 May 2004 13:39:07 -0400 Subject: [Mapserver-users] world files and tile indexing Message-ID: <13858AA1A74F30419F319ACB66A9D1224E4446@mercator.topozone.com> This is a multi-part message in MIME format. ------_=_NextPart_001_01C42FA3.3437712E Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Antonio - =20 Thanks - that is very helpful! =20 Things seem fine, but you need to create georeference data for the images in a way that can be used - the JPG files could have world files (.JGW files) or the TIF files could have world files (.TFW) but you need them. You need to create these world files. You should try to read the coordinates from the shapefile (use shpdump) and you need to calculate the values for the world files. With only three files you can relatively easily do this by hand. =20 The shapefile polygons should give you the upper-left corner coordinate of each tile, and you should be able to calculate the size of each pixel in X and Y units from the shapefile polygons and information about how many pixels wide and high each image is (use tiffinfo). =20 - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242=20 _____ =20 From: Antonio Cosenza [mailto:antonio.cosenza@polito.it]=20 Sent: Saturday, May 01, 2004 6:18 AM To: mapserver-users@lists.gis.umn.edu Subject: Re: [Mapserver-users] world files and tile indexing It would help if you could explain what you're trying to do! =20 ok, i'll try tou explain you my situation! What format are the raster files in now,=20 The raster files are in jpg format. They are a set of 3 tiles NOT GEOREFERENCED (of course, they are jpg!). But, i have a shapefile, called tile.shp (so, georeferenced) representing the footprints of the tiles. In tile.shp, I created a field (Path) including the absoulte path to tiff tiles on my disk (ex. /var/www/.....F4-C4.tif).Now, i converted the jpg files in tiff files, without the world files. I use this mapfile configuration: LAYER NAME "pannelli" STATUS ON TYPE RASTER TILEINDEX "./tile.shp" TILEITEM "Path" END I run maplab, but an error occurs: unable to open tiff files: Description=09 Unable to open world file for reading. in /maplab/htdocs/common/wrapper/drawmap.php=09 Failed to draw layer named 'pannelli'. in /maplab/htdocs/common/wrapper/drawmap.php=09 Unable to open world file for reading. in /maplab/htdocs/common/wrapper/drawmap.php=09 Failed to draw layer named 'pannelli'. in /maplab/htdocs/common/wrapper/drawmap.php=09 So, i created some empty world files! This time, maplab runs without error, but it doesn't show me the tiles. It shows me only a blank page. Where is the problem? and what geographic reference data do you have for them (and in what format)? =09 - Ed =09 Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 =20 =09 -----Original Message----- From: Antonio Cosenza [mailto:antonio.cosenza@polito.it]=20 Sent: Friday, April 30, 2004 5:43 AM To: Ed McNierney; mapserver-users@lists.gis.umn.edu Subject: Re: [Mapserver-users] world files and tile indexing =09 so, i need to convert the raster tiles in tiff format, without world files? Right? =09 thanks =09 Ed McNierney wrote: =09 =20 Antonio - =09 Yes, as long as the georeference information is there for the tile=20 index to be created (and for the image to be rendered properly). =20 GeoTIFFs can be used in a TILEINDEX layer without world files. =09 - Ed =09 Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 =09 -----Original Message----- From: Antonio Cosenza [mailto:antonio.cosenza@polito.it] Sent: Thursday, April 29, 2004 2:40 PM To: mapserver-users@lists.gis.umn.edu Subject: [Mapserver-users] world files and tile indexing =09 Hi everyvody, is it possible to use tile indexing without world file? =09 thanks _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu =09 http://lists.gis.umn.edu/mailman/listinfo/mapserver-users =09 =09 =20 =09 =20 =09 =09 =09 _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users =09 =20 ------_=_NextPart_001_01C42FA3.3437712E Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Antonio -
 
Thanks - that is very = helpful!
 
Things seem fine, but you need to create = georeference data=20 for the images in a way that can be used - the JPG files could have = world files=20 (.JGW files) or the TIF files could have world files (.TFW) but you need = them.  You need to create these world files.  You should try = to read=20 the coordinates from the shapefile (use shpdump) and you need to = calculate the=20 values for the world files.  With only three files you can = relatively=20 easily do this by hand.
 
The shapefile polygons should give you the = upper-left=20 corner coordinate of each tile, and you should be able to calculate the = size of=20 each pixel in X and Y units from the shapefile polygons and information = about=20 how many pixels wide and high each image is (use = tiffinfo).
 
    - Ed

Ed McNierney
President and Chief = Mapmaker
TopoZone.com /=20 Maps a la carte, Inc.
73 Princeton Street, Suite 305
North = Chelmsford,=20 MA  01863
ed@topozone.com
(978) 251-4242 =



From: Antonio Cosenza=20 [mailto:antonio.cosenza@polito.it]
Sent: Saturday, May 01, = 2004 6:18=20 AM
To: mapserver-users@lists.gis.umn.edu
Subject: = Re:=20 [Mapserver-users] world files and tile indexing


It would help if you could explain what =
you're trying to do!  
ok,=20 i'll try tou explain you my situation!
What
format are the raster files in now, 
The raster files = are in=20 jpg format.  They are a set of 3 tiles NOT GEOREFERENCED (of = course, they=20 are jpg!). But, i have a shapefile, called tile.shp (so, georeferenced)=20 representing the footprints of  the tiles. In tile.shp, I created a = field=20 (Path) including the absoulte path to tiff tiles on my disk (ex.=20 /var/www/.....F4-C4.tif).Now,  i converted the jpg files in tiff = files,=20 without the world files. I use this mapfile=20 configuration:

 LAYER
    NAME=20 "pannelli"
    STATUS ON
    TYPE=20 RASTER
    TILEINDEX = "./tile.shp"
   =20 TILEITEM "Path"
  END

I run maplab, but an error occurs: = unable=20 to open tiff files:


So,=20 i created some empty world files! This time, maplab runs without error, = but it=20 doesn't show me the tiles. It shows me only a blank page.
Where is = the=20 problem?


and what geographic reference data
do you have for them (and in what format)?

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed@topozone.com
(978) 251-4242 =20

-----Original Message-----
From: Antonio Cosenza [mailto:antonio.cosenza@polito.i=
t]=20
Sent: Friday, April 30, 2004 5:43 AM
To: Ed McNierney; mapserver-users@lists.g=
is.umn.edu
Subject: Re: [Mapserver-users] world files and tile indexing

so, i need to convert the raster tiles in tiff format, without world
files? Right?

thanks

Ed McNierney wrote:

  
Antonio -

Yes, as long as the georeference information is there for the tile=20
index to be created (and for the image to be rendered properly). =20
GeoTIFFs can be used in a TILEINDEX layer without world files.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed@topozone.com
(978) 251-4242

-----Original Message-----
From: Antonio Cosenza [mailto:antonio.cosenza@polito.i=
t]
Sent: Thursday, April 29, 2004 2:40 PM
To: mapserver-users@lists.g=
is.umn.edu
Subject: [Mapserver-users] world files and tile indexing

Hi everyvody,
is it possible to use tile indexing without world file?

thanks
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.g=
is.umn.edu
http:/=
/lists.gis.umn.edu/mailman/listinfo/mapserver-users


=20

    



_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.g=
is.umn.edu
http:/=
/lists.gis.umn.edu/mailman/listinfo/mapserver-users

  

------_=_NextPart_001_01C42FA3.3437712E-- From warmerdam@pobox.com Sat May 1 20:03:03 2004 From: warmerdam@pobox.com (Frank Warmerdam) Date: Sat, 01 May 2004 15:03:03 -0400 Subject: [Mapserver-users] Shapelib, GPC, PHP, and polygon clipping In-Reply-To: <614FCE5F14A6D41180C200010240D6A25B34BE@LINNMS> References: <614FCE5F14A6D41180C200010240D6A25B34BE@LINNMS> Message-ID: <4093F467.7050004@pobox.com> Ryan, Adam wrote: > Steve, Frank, etc... > > A while back Steve Lime wrote in response to a request for polygon clipping > code. > > http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0201/msg00094.html > > He suggested using the GPC library. I checked this out and was able to get > it to work. > > Is it worth trying to use GPC with either PHP mapscript or shapelib directly > and write a little routine to grab the shapes in question, convert them to > gpc ascii format, run the clip operation, and convert back to a shapefile > result? In PHP I could build the ASCII files, then call a gpc executable, > and then translate the ASCII result back into a new shapefile. > > Am I exploring old technology? Is there a better way? Seems like a lot of > steps but all the really hard work has been done and it's just a matter of > reformatting data to work with the different tools. Adam, Invoking GPC externally via an ascii file interface may be too slow depending on your needs but it is certainly doable. From a more general point of view, it is my hope to interface the GEOS library (http://geos.refractions.net) with OGR at some point with a convenient mechanism to convert OGR geometries into a form usable in GEOS. So from my point of view a GEOS is the "future" of complex geometry operations in OGR (and indirectly shapelib). In fact, I would like to see a nice SWIG'ed interface to GEOS so that it can be easily used in most/all of the mapscript supported languages. GEOS is the library used by PostGIS for geometry operations, but it is independent of PostGIS. I think it does more than GPC. I was also slightly soured on GPC because of problematic licensing issues as I recall. So, if you have a particular need that is satisfied by passing geometries to GPC then by all means go ahead. However, I don't forsee it as being of strategic value. If you are interested in cooperating on swigged interfaces for GEOS and closer integration with OGR, Shapelib or MapServer geometries then perhaps we could get something going. I hadn't really been intending to get started on this yet though, so you might get stuck doing quite a bit of the heavy lifting. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From warmerdam@pobox.com Sat May 1 20:17:56 2004 From: warmerdam@pobox.com (Frank Warmerdam) Date: Sat, 01 May 2004 15:17:56 -0400 Subject: [Mapserver-users] arcgrid to ascii(etc) In-Reply-To: <1083357821.4092ba7da1ffa@www.agi-lan.com> References: <1083357821.4092ba7da1ffa@www.agi-lan.com> Message-ID: <4093F7E4.6000400@pobox.com> Jason M. Nielsen wrote: > Anyone know of software that can convert arcgrid .adf files to ascii? > _______________________________________________ Jason, GDAL read Arc/Info binary grid files in .adf format and can export a variety of formats including Arc/Info ASCII Grid format which is ... ASCII. eg. gdal_translate -of AAIGrid in_cov/w001001.adf out.grd Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From ljuvrud@info-link.net Sun May 2 00:23:21 2004 From: ljuvrud@info-link.net (Mike Juvrud) Date: Sat, 1 May 2004 18:23:21 -0500 Subject: [Mapserver-users] Looking for reference links and online MapServer/MapScript Forum Message-ID: <000001c42fd3$4d0b5610$a8d17a41@dieter> I'm a MapServer/PHP MapScript newbie, looking for online reference materials, resources, sample code, etc. (beginner to advanced)...I would appreciate links to anything you might recommend. (english or deutsch) (I have already downloaded and gone through the tutorials, references, samples available on the mapserver & mapscript site.) Also - Is there a Mapserver/Mapscript forum/bulletin board online? Will sum, Mike Juvrud From eduardo@consultoria.eti.br Sun May 2 03:58:10 2004 From: eduardo@consultoria.eti.br (Eduardo Patto Kanegae) Date: Sat, 1 May 2004 23:58:10 -0300 Subject: [Mapserver-users] Looking for reference links and online MapServer/MapScript Forum In-Reply-To: <000001c42fd3$4d0b5610$a8d17a41@dieter> References: <000001c42fd3$4d0b5610$a8d17a41@dieter> Message-ID: <20040502025810.10633.qmail@hm47.locaweb.com.br> at the official website , section Documentation, u will find all u're looking for... for deutsch reference , take a look at www.mapmedia.de ... i think they have a book about mapserver. Eduardo Patto Kanegae http://www.consultoria.eti.br UIN: 303747254 I Encontro Nacional de Usuários MapServer - http://mapserver.cttmar.univali.br/encontro2004 Projeto MapServer Brasil - http://mapserver.cttmar.univali.br ***Fim da Mensagem / End of Message *** On Sat, 1 May 2004 18:23:21 -0500, "Mike Juvrud" escreveu: > De: "Mike Juvrud" > Data: Sat, 1 May 2004 18:23:21 -0500 > Para: > Assunto: [Mapserver-users] Looking for reference links and online MapServer/MapScript Forum > > I'm a MapServer/PHP MapScript newbie, looking for online reference > materials, resources, sample code, etc. (beginner to advanced)...I would > appreciate links to anything you might recommend. (english or deutsch) > > (I have already downloaded and gone through the tutorials, references, > samples available on the mapserver & mapscript site.) > > Also - Is there a Mapserver/Mapscript forum/bulletin board online? > > Will sum, > > Mike Juvrud > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > > > From cpurvis@asg.sc.edu Sun May 2 03:59:22 2004 From: cpurvis@asg.sc.edu (Charlton Purvis) Date: Sat, 1 May 2004 22:59:22 -0400 Subject: [Mapserver-users] RE: [postgis-users] RE: gone are my query results Message-ID: Thanks for your reply, Gregory. I'm forwarding this onto the MS folks to see if they have any pearls of wisdom. Everything looks great in the db. If I render a map, I see all the points correctly. If I take that query and plug it in to the command line, I see the rows. But the moment I try to do either a cgi query, WFS query, or a PHP query, I get nothing back. No error message. I'm actually getting panicky which isn't any fun. Has anyone seen anything like this before? Queries rely on OID's and SRID's. Is there any way they could have gotten mucked up? Can I somehow refresh them? Thanks, Charlton -----Original Message----- From: Gregory S. Williamson [mailto:gsw@globexplorer.com] Sent: Sat 5/1/2004 6:20 PM To: PostGIS Users Discussion Cc: Subject: [postgis-users] RE: gone are my query results If you do the query directly to postgres (via psql or pgAdmin or whatever) does the query return results ? If so, then my guess is that this is not a database error, at least not directly. If ot then yes, it would seem that somehow the postGIS itself has gottent snarfled. The change you made relating the geometryColumns doesn't sound to me like it should effect queries unless somehow the SRID info for the tables in your mapserver queries got clobbered; should be easy enough to confirm that this data is ok. I am not familiar enough with PHP and mapserver to have a clue; does the mapserver log itself show anything ? Not much help, I'm afraid, but perhaps posting this to the MMS list would add some more knowledge to the issue at hand ? Greg Williamson DBA GlobeXplorer LLC -----Original Message----- From: Charlton Purvis on behalf of Charlton Purvis Sent: Sat 5/1/2004 2:46 PM To: PostGIS Users Discussion Cc: Subject: gone are my query results Hi, folks: Bizarre and unnerving problem here. Up until last night, mapping was fine and point-query was fine. Now it appears that the mapping is still great, but the point query and WFS are toast. I don't get any errors in pgsql.log or php.log. I get . . . nothing. Even going mapserv cgi query returns empty for a query I know should work. Maybe I'm being taught a lesson. In a separate database, I noticed that addgeometrycolumn was taking too long -- I create about 400 smaller tables per day. So I commented out fix_geometry_columns(); from the addgeometrycolumn function and did it once I had finished creating all my new tables. So am I paying the price? Has this corrupted this database as well as my other? If all this is OID stuff, is there any way to refresh all OID's? Restarted . . . yes. VACUUM and ANALYZE'd . . . yes. Thanks, Charlton _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From gsw@globexplorer.com Sun May 2 04:11:41 2004 From: gsw@globexplorer.com (Gregory S. Williamson) Date: Sat, 1 May 2004 20:11:41 -0700 Subject: [Mapserver-users] RE: [postgis-users] RE: gone are my query results Message-ID: <71E37EF6B7DCC1499CEA0316A256832801057931@loki.wc.globexplorer.net> If you turn on the logging of statements in postgres and run the mapserver side of things, does the query show up in the logs ? If the query does not appear then I'd suspect networking or permissions or some darn thing keeping postgres from ever seeing the query. It it does show up then maybe the problem is in the return trip to MS or in the processing of that data (perhaps your OID suspicions), since it sounds as if the query itself can be processed. Any changes to *anything* on either server and anything in between ? (not likely but always worth ruling out) Or, shot in the dark, something messing with TOLERANCE so no points are selected in a query ? Very puzzling, I agree. Greg W. -----Original Message----- From: Charlton Purvis on behalf of Charlton Purvis Sent: Sat 5/1/2004 7:59 PM To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu Cc: Subject: RE: [postgis-users] RE: gone are my query results Thanks for your reply, Gregory. I'm forwarding this onto the MS folks to see if they have any pearls of wisdom. Everything looks great in the db. If I render a map, I see all the points correctly. If I take that query and plug it in to the command line, I see the rows. But the moment I try to do either a cgi query, WFS query, or a PHP query, I get nothing back. No error message. I'm actually getting panicky which isn't any fun. Has anyone seen anything like this before? Queries rely on OID's and SRID's. Is there any way they could have gotten mucked up? Can I somehow refresh them? Thanks, Charlton -----Original Message----- From: Gregory S. Williamson [mailto:gsw@globexplorer.com] Sent: Sat 5/1/2004 6:20 PM To: PostGIS Users Discussion Cc: Subject: [postgis-users] RE: gone are my query results If you do the query directly to postgres (via psql or pgAdmin or whatever) does the query return results ? If so, then my guess is that this is not a database error, at least not directly. If ot then yes, it would seem that somehow the postGIS itself has gottent snarfled. The change you made relating the geometryColumns doesn't sound to me like it should effect queries unless somehow the SRID info for the tables in your mapserver queries got clobbered; should be easy enough to confirm that this data is ok. I am not familiar enough with PHP and mapserver to have a clue; does the mapserver log itself show anything ? Not much help, I'm afraid, but perhaps posting this to the MMS list would add some more knowledge to the issue at hand ? Greg Williamson DBA GlobeXplorer LLC -----Original Message----- From: Charlton Purvis on behalf of Charlton Purvis Sent: Sat 5/1/2004 2:46 PM To: PostGIS Users Discussion Cc: Subject: gone are my query results Hi, folks: Bizarre and unnerving problem here. Up until last night, mapping was fine and point-query was fine. Now it appears that the mapping is still great, but the point query and WFS are toast. I don't get any errors in pgsql.log or php.log. I get . . . nothing. Even going mapserv cgi query returns empty for a query I know should work. Maybe I'm being taught a lesson. In a separate database, I noticed that addgeometrycolumn was taking too long -- I create about 400 smaller tables per day. So I commented out fix_geometry_columns(); from the addgeometrycolumn function and did it once I had finished creating all my new tables. So am I paying the price? Has this corrupted this database as well as my other? If all this is OID stuff, is there any way to refresh all OID's? Restarted . . . yes. VACUUM and ANALYZE'd . . . yes. Thanks, Charlton _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From cpurvis@asg.sc.edu Sun May 2 04:42:34 2004 From: cpurvis@asg.sc.edu (Charlton Purvis) Date: Sat, 1 May 2004 23:42:34 -0400 Subject: [Mapserver-users] RE: [postgis-users] RE: gone are my query results Message-ID: OK, Greg, I think we might be onto something. But it still looks very grim. I turned on all the logging, and I notice that MS sends it this query: LOCATION: pg_parse_query, postgres.c:464 LOG: 00000: statement: DECLARE mycursor BINARY CURSOR FOR SELECT temperature_celcius::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from sst_map WHERE (date_trunc('hour',report_time_stamp + interval '1 hour' * -04) = date_trunc('hour',timestamp without time zone '2004-05-01 22:00:00') and (label_z <= 5 or label_z is null)) and (the_geom && setSRID( 'BOX3D(-83.0454044480208 24.3838940085927,-82.6541628156105 24.775135641003)'::BOX3D,find_srid('','sst_map','the_geom') )) OK. That's good. Because if I stick the SELECT part at a psql prompt, I get back the row I want. And I also notice that its OID is 2185295089. But if I look at the last sql statement in the log, it's another cursor, but the OID is wrong. LOCATION: pg_parse_query, postgres.c:464 LOG: 00000: statement: DECLARE mycursor BINARY CURSOR FOR SELECT station_id::text,time_stamp::text,z::text,label_z::text,temperature_celcius::text,temperature_fahrenheit::text,value_temperature_celcius::text,value_temperature_fahrenheit::text,lon::text,lat::text,title::text,institution::text,institution_url::text,institution_dods_url::text,source::text,refs::text,contact::text,report_time_stamp::text,asbinary(force_collection(force_2d(the_geom)),'NDR') from sst_map WHERE OID = 2147483647 So had they kept the OID, I would be in good shape. This isn't looking good!!! Charlton -----Original Message----- From: Gregory S. Williamson [mailto:gsw@globexplorer.com] Sent: Sat 5/1/2004 11:11 PM To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu Cc: Subject: RE: [postgis-users] RE: gone are my query results If you turn on the logging of statements in postgres and run the mapserver side of things, does the query show up in the logs ? If the query does not appear then I'd suspect networking or permissions or some darn thing keeping postgres from ever seeing the query. It it does show up then maybe the problem is in the return trip to MS or in the processing of that data (perhaps your OID suspicions), since it sounds as if the query itself can be processed. Any changes to *anything* on either server and anything in between ? (not likely but always worth ruling out) Or, shot in the dark, something messing with TOLERANCE so no points are selected in a query ? Very puzzling, I agree. Greg W. -----Original Message----- From: Charlton Purvis on behalf of Charlton Purvis Sent: Sat 5/1/2004 7:59 PM To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu Cc: Subject: RE: [postgis-users] RE: gone are my query results Thanks for your reply, Gregory. I'm forwarding this onto the MS folks to see if they have any pearls of wisdom. Everything looks great in the db. If I render a map, I see all the points correctly. If I take that query and plug it in to the command line, I see the rows. But the moment I try to do either a cgi query, WFS query, or a PHP query, I get nothing back. No error message. I'm actually getting panicky which isn't any fun. Has anyone seen anything like this before? Queries rely on OID's and SRID's. Is there any way they could have gotten mucked up? Can I somehow refresh them? Thanks, Charlton -----Original Message----- From: Gregory S. Williamson [mailto:gsw@globexplorer.com] Sent: Sat 5/1/2004 6:20 PM To: PostGIS Users Discussion Cc: Subject: [postgis-users] RE: gone are my query results If you do the query directly to postgres (via psql or pgAdmin or whatever) does the query return results ? If so, then my guess is that this is not a database error, at least not directly. If ot then yes, it would seem that somehow the postGIS itself has gottent snarfled. The change you made relating the geometryColumns doesn't sound to me like it should effect queries unless somehow the SRID info for the tables in your mapserver queries got clobbered; should be easy enough to confirm that this data is ok. I am not familiar enough with PHP and mapserver to have a clue; does the mapserver log itself show anything ? Not much help, I'm afraid, but perhaps posting this to the MMS list would add some more knowledge to the issue at hand ? Greg Williamson DBA GlobeXplorer LLC -----Original Message----- From: Charlton Purvis on behalf of Charlton Purvis Sent: Sat 5/1/2004 2:46 PM To: PostGIS Users Discussion Cc: Subject: gone are my query results Hi, folks: Bizarre and unnerving problem here. Up until last night, mapping was fine and point-query was fine. Now it appears that the mapping is still great, but the point query and WFS are toast. I don't get any errors in pgsql.log or php.log. I get . . . nothing. Even going mapserv cgi query returns empty for a query I know should work. Maybe I'm being taught a lesson. In a separate database, I noticed that addgeometrycolumn was taking too long -- I create about 400 smaller tables per day. So I commented out fix_geometry_columns(); from the addgeometrycolumn function and did it once I had finished creating all my new tables. So am I paying the price? Has this corrupted this database as well as my other? If all this is OID stuff, is there any way to refresh all OID's? Restarted . . . yes. VACUUM and ANALYZE'd . . . yes. Thanks, Charlton _______________________________________________ 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 From pramsey@refractions.net Sun May 2 05:08:54 2004 From: pramsey@refractions.net (Paul Ramsey) Date: Sat, 01 May 2004 21:08:54 -0700 Subject: [Mapserver-users] RE: [postgis-users] RE: gone are my query results In-Reply-To: Message-ID: <6D6EE142-9BEE-11D8-85F1-000393D33C2E@refractions.net> Got your back, Charlton :) The problem is that your PostgreSQL oids are larger than the mapserver row number variable can store. The oid is larger than a signed 32 bit integer can store. So, solution. Do not use oid as your "unique" field. Make use of the "using unique" clause in your data statement, and reference a different unique field in your table. Make sure that field is indexed. If you have loaded your data with shp2pgsql, you probably have a 'gid' field you can use that is a primary key (and therefore already indexed). Yours, Paul On Saturday, May 1, 2004, at 08:42 PM, Charlton Purvis wrote: > OK, Greg, I think we might be onto something. But it still looks very > grim. > > I turned on all the logging, and I notice that MS sends it this query: > > LOCATION: pg_parse_query, postgres.c:464 > LOG: 00000: statement: DECLARE mycursor BINARY CURSOR FOR SELECT > temperature_celcius::text,asbinary(force_collection(force_2d(the_geom)) > ,'NDR'),OID::text from sst_map WHERE > (date_trunc('hour',report_time_stamp + interval '1 hour' * -04) = > date_trunc('hour',timestamp without time zone '2004-05-01 22:00:00') > and (label_z <= 5 or label_z is null)) and (the_geom && setSRID( > 'BOX3D(-83.0454044480208 24.3838940085927,-82.6541628156105 > 24.775135641003)'::BOX3D,find_srid('','sst_map','the_geom') )) > > OK. That's good. Because if I stick the SELECT part at a psql > prompt, I get back the row I want. And I also notice that its OID is > 2185295089. > > But if I look at the last sql statement in the log, it's another > cursor, but the OID is wrong. > > LOCATION: pg_parse_query, postgres.c:464 > LOG: 00000: statement: DECLARE mycursor BINARY CURSOR FOR SELECT > station_id::text,time_stamp::text,z::text,label_z::text,temperature_cel > cius::text,temperature_fahrenheit::text,value_temperature_celcius::text > ,value_temperature_fahrenheit::text,lon::text,lat::text,title::text,ins > titution::text,institution_url::text,institution_dods_url::text,source: > :text,refs::text,contact::text,report_time_stamp::text,asbinary(force_c > ollection(force_2d(the_geom)),'NDR') from sst_map WHERE OID = > 2147483647 > > So had they kept the OID, I would be in good shape. > > This isn't looking good!!! > > Charlton > > -----Original Message----- > From: Gregory S. Williamson [mailto:gsw@globexplorer.com] > Sent: Sat 5/1/2004 11:11 PM > To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu > Cc: > Subject: RE: [postgis-users] RE: gone are my query results > > > > > If you turn on the logging of statements in postgres and run the > mapserver side of things, does the query show up in the logs ? > > If the query does not appear then I'd suspect networking or > permissions or some darn thing keeping postgres from ever seeing the > query. > > It it does show up then maybe the problem is in the return trip to MS > or in the processing of that data (perhaps your OID suspicions), since > it sounds as if the query itself can be processed. > > Any changes to *anything* on either server and anything in between ? > (not likely but always worth ruling out) > > Or, shot in the dark, something messing with TOLERANCE so no points > are selected in a query ? > > Very puzzling, I agree. > > Greg W. > > -----Original Message----- > From: Charlton Purvis on behalf of Charlton Purvis > Sent: Sat 5/1/2004 7:59 PM > To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu > Cc: > Subject: RE: [postgis-users] RE: gone are my query results > Thanks for your reply, Gregory. I'm forwarding this onto the MS > folks to see if they have any pearls of wisdom. > > Everything looks great in the db. If I render a map, I see all the > points correctly. If I take that query and plug it in to the command > line, I see the rows. But the moment I try to do either a cgi query, > WFS query, or a PHP query, I get nothing back. No error message. > > I'm actually getting panicky which isn't any fun. Has anyone seen > anything like this before? > > Queries rely on OID's and SRID's. Is there any way they could have > gotten mucked up? Can I somehow refresh them? > > Thanks, > > Charlton > > -----Original Message----- > From: Gregory S. Williamson [mailto:gsw@globexplorer.com] > Sent: Sat 5/1/2004 6:20 PM > To: PostGIS Users Discussion > Cc: > Subject: [postgis-users] RE: gone are my query results > > > > > If you do the query directly to postgres (via psql or pgAdmin or > whatever) does the query return results ? > > If so, then my guess is that this is not a database error, at least > not directly. If ot then yes, it would seem that somehow the postGIS > itself has gottent snarfled. > > The change you made relating the geometryColumns doesn't sound to me > like it should effect queries unless somehow the SRID info for the > tables in your mapserver queries got clobbered; should be easy enough > to confirm that this data is ok. > > I am not familiar enough with PHP and mapserver to have a clue; does > the mapserver log itself show anything ? > > Not much help, I'm afraid, but perhaps posting this to the MMS list > would add some more knowledge to the issue at hand ? > > Greg Williamson > DBA > GlobeXplorer LLC > > -----Original Message----- > From: Charlton Purvis on behalf of Charlton Purvis > Sent: Sat 5/1/2004 2:46 PM > To: PostGIS Users Discussion > Cc: > Subject: gone are my query results > Hi, folks: > > Bizarre and unnerving problem here. > > Up until last night, mapping was fine and point-query was fine. Now > it appears that the mapping is still great, but the point query and > WFS are toast. I don't get any errors in pgsql.log or php.log. I get > . . . nothing. Even going mapserv cgi query returns empty for a query > I know should work. > > Maybe I'm being taught a lesson. In a separate database, I noticed > that addgeometrycolumn was taking too long -- I create about 400 > smaller tables per day. So I commented out fix_geometry_columns(); > from the addgeometrycolumn function and did it once I had finished > creating all my new tables. So am I paying the price? Has this > corrupted this database as well as my other? > > If all this is OID stuff, is there any way to refresh all OID's? > > Restarted . . . yes. VACUUM and ANALYZE'd . . . yes. > > Thanks, > > Charlton > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > Paul Ramsey Refractions Research Email: pramsey@refractions.net Phone: (250) 885-0632 From malonso@meso.com Sun May 2 20:06:08 2004 From: malonso@meso.com (malonso@meso.com) Date: Sun, 2 May 2004 15:06:08 -0400 (EDT) Subject: [Mapserver-users] Re: demo: legend, scalebar Message-ID: <55100.66.193.31.36.1083524768.squirrel@www.meso.com> Hello, Has anyone come across or developed any utilities that can incorporate TIGER line files? I also included a previous question (below) that I hadn't gotten any response to, if you can help with either that would be greatly appreciated. Thanks folks. Matt > Howdy all, > > I am trying to run the demo, and I can get most of it to work, but I > can't seem to get the legend or the 1st scalebar, the main map and the > 2nd bar in the bottom right corner works fine. I attached the modified > index.html and itasca.map files. Ironically I had them all working fine > at first, but I had set the various "image_" things wrong so I could not > see them. I made a couple changes and looked in the dir where the > images should've been and they were all there. All the previous legends > and scalebars where there from the previous runs, but I was no longer > able to generate the 1st scalebar and the legends. If anyone needs > anymore info please let me know. Thanks in advance for your help. > > Matt Matt Alonso Meso, Inc. 185 Jordan Road Troy, NY 12180 phone: 267-446-8657 work: 518-283-5169 From cpurvis@asg.sc.edu Mon May 3 04:05:21 2004 From: cpurvis@asg.sc.edu (Charlton Purvis) Date: Sun, 2 May 2004 23:05:21 -0400 Subject: [Mapserver-users] RE: [postgis-users] RE: gone are my queryresults Message-ID: Let's hear it for the Canadians!!! FabulOUS, Paul. You're an absolute life savior / saver / whatever! Talk about premature graying. That was an unpleasant couple of days, but it was solved by binding the UNIQUE to a home-grown column, and now everything is golden. Whew! Infinte thanks. So . . . are you interested in inheriting Alaska? Maybe I can talk Dubya into a little trade since I owe you big time. How about we start off w/ a case or two (thousand) of beer? Charlton -----Original Message----- From: Paul Ramsey [mailto:pramsey@refractions.net] Sent: Sun 5/2/2004 12:45 AM To: Administrator@netnation.refractions.net Cc: mapserver-users@lists.gis.umn.edu; PostGIS Users Discussion Subject: Re: [Mapserver-users] RE: [postgis-users] RE: gone are my queryresults Got your back, Charlton :) The problem is that your PostgreSQL oids are larger than the mapserver row number variable can store. The oid is larger than a signed 32 bit integer can store. So, solution. Do not use oid as your "unique" field. Make use of the "using unique" clause in your data statement, and reference a different unique field in your table. Make sure that field is indexed. If you have loaded your data with shp2pgsql, you probably have a 'gid' field you can use that is a primary key (and therefore already indexed). Yours, Paul On Saturday, May 1, 2004, at 08:42 PM, Charlton Purvis wrote: > OK, Greg, I think we might be onto something. But it still looks very > grim. > > I turned on all the logging, and I notice that MS sends it this query: > > LOCATION: pg_parse_query, postgres.c:464 > LOG: 00000: statement: DECLARE mycursor BINARY CURSOR FOR SELECT > temperature_celcius::text,asbinary(force_collection(force_2d(the_geom)) > ,'NDR'),OID::text from sst_map WHERE > (date_trunc('hour',report_time_stamp + interval '1 hour' * -04) = > date_trunc('hour',timestamp without time zone '2004-05-01 22:00:00') > and (label_z <= 5 or label_z is null)) and (the_geom && setSRID( > 'BOX3D(-83.0454044480208 24.3838940085927,-82.6541628156105 > 24.775135641003)'::BOX3D,find_srid('','sst_map','the_geom') )) > > OK. That's good. Because if I stick the SELECT part at a psql > prompt, I get back the row I want. And I also notice that its OID is > 2185295089. > > But if I look at the last sql statement in the log, it's another > cursor, but the OID is wrong. > > LOCATION: pg_parse_query, postgres.c:464 > LOG: 00000: statement: DECLARE mycursor BINARY CURSOR FOR SELECT > station_id::text,time_stamp::text,z::text,label_z::text,temperature_cel > cius::text,temperature_fahrenheit::text,value_temperature_celcius::text > ,value_temperature_fahrenheit::text,lon::text,lat::text,title::text,ins > titution::text,institution_url::text,institution_dods_url::text,source: > :text,refs::text,contact::text,report_time_stamp::text,asbinary(force_c > ollection(force_2d(the_geom)),'NDR') from sst_map WHERE OID = > 2147483647 > > So had they kept the OID, I would be in good shape. > > This isn't looking good!!! > > Charlton > > -----Original Message----- > From: Gregory S. Williamson [mailto:gsw@globexplorer.com] > Sent: Sat 5/1/2004 11:11 PM > To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu > Cc: > Subject: RE: [postgis-users] RE: gone are my query results > > > > > If you turn on the logging of statements in postgres and run the > mapserver side of things, does the query show up in the logs ? > > If the query does not appear then I'd suspect networking or > permissions or some darn thing keeping postgres from ever seeing the > query. > > It it does show up then maybe the problem is in the return trip to MS > or in the processing of that data (perhaps your OID suspicions), since > it sounds as if the query itself can be processed. > > Any changes to *anything* on either server and anything in between ? > (not likely but always worth ruling out) > > Or, shot in the dark, something messing with TOLERANCE so no points > are selected in a query ? > > Very puzzling, I agree. > > Greg W. > > -----Original Message----- > From: Charlton Purvis on behalf of Charlton Purvis > Sent: Sat 5/1/2004 7:59 PM > To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu > Cc: > Subject: RE: [postgis-users] RE: gone are my query results > Thanks for your reply, Gregory. I'm forwarding this onto the MS > folks to see if they have any pearls of wisdom. > > Everything looks great in the db. If I render a map, I see all the > points correctly. If I take that query and plug it in to the command > line, I see the rows. But the moment I try to do either a cgi query, > WFS query, or a PHP query, I get nothing back. No error message. > > I'm actually getting panicky which isn't any fun. Has anyone seen > anything like this before? > > Queries rely on OID's and SRID's. Is there any way they could have > gotten mucked up? Can I somehow refresh them? > > Thanks, > > Charlton > > -----Original Message----- > From: Gregory S. Williamson [mailto:gsw@globexplorer.com] > Sent: Sat 5/1/2004 6:20 PM > To: PostGIS Users Discussion > Cc: > Subject: [postgis-users] RE: gone are my query results > > > > > If you do the query directly to postgres (via psql or pgAdmin or > whatever) does the query return results ? > > If so, then my guess is that this is not a database error, at least > not directly. If ot then yes, it would seem that somehow the postGIS > itself has gottent snarfled. > > The change you made relating the geometryColumns doesn't sound to me > like it should effect queries unless somehow the SRID info for the > tables in your mapserver queries got clobbered; should be easy enough > to confirm that this data is ok. > > I am not familiar enough with PHP and mapserver to have a clue; does > the mapserver log itself show anything ? > > Not much help, I'm afraid, but perhaps posting this to the MMS list > would add some more knowledge to the issue at hand ? > > Greg Williamson > DBA > GlobeXplorer LLC > > -----Original Message----- > From: Charlton Purvis on behalf of Charlton Purvis > Sent: Sat 5/1/2004 2:46 PM > To: PostGIS Users Discussion > Cc: > Subject: gone are my query results > Hi, folks: > > Bizarre and unnerving problem here. > > Up until last night, mapping was fine and point-query was fine. Now > it appears that the mapping is still great, but the point query and > WFS are toast. I don't get any errors in pgsql.log or php.log. I get > . . . nothing. Even going mapserv cgi query returns empty for a query > I know should work. > > Maybe I'm being taught a lesson. In a separate database, I noticed > that addgeometrycolumn was taking too long -- I create about 400 > smaller tables per day. So I commented out fix_geometry_columns(); > from the addgeometrycolumn function and did it once I had finished > creating all my new tables. So am I paying the price? Has this > corrupted this database as well as my other? > > If all this is OID stuff, is there any way to refresh all OID's? > > Restarted . . . yes. VACUUM and ANALYZE'd . . . yes. > > Thanks, > > Charlton > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > Paul Ramsey Refractions Research Email: pramsey@refractions.net Phone: (250) 885-0632 _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From mapserver@resellmo.com Mon May 3 06:06:05 2004 From: mapserver@resellmo.com (K Resellmo) Date: Mon, 03 May 2004 00:06:05 -0500 Subject: [Mapserver-users] Lines between points and polygon colors Message-ID: <6.0.1.1.2.20040503000112.027b2340@resellmo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I have two questions about MapServer features: 1. Is it possible to use the MapServer symbol capabilities to draw lines between points? I have several sets of points that I would like to display using both a graphic to mark the point, and a line to connect the points. 2. Can I display polygons in different colors? (like a political map with different colors for different countries) Thanks for your time! Kris -----BEGIN PGP SIGNATURE----- Version: PGP 8.0.2 iQA/AwUBQJXTR54XWyzLnsoNEQKYhwCg1sVN1do8RYMOwDH+TefnJVaphRgAoJ7M K2gRAzDWoG8j2D127VlixRxx =VJjn -----END PGP SIGNATURE----- From samuzzal@linux.net Mon May 3 08:53:16 2004 From: samuzzal@linux.net (Sam Choudry) Date: Mon, 3 May 2004 00:53:16 -0700 (PDT) Subject: [Mapserver-users] Problem coloring layer Message-ID: <20040503075316.C18AD7262@sitemail.everyone.net> Hello, Here is the same old problem still not solved. I want to change the color of my area layer "nal-blk" according to user input. For that I am using the code: if($r!='' && $g!='' && $b!='') { $layer = $map->getlayerbyname("nal-blks"); $class = $layer->getclass(0); $layer->open($map->shapepath); $index = findindex($r,$g,$b); $class->set('color',index); } I am using a function I received from one of the list members, function findindex($r,$g,$b) { GLOBAL $map; $r1=(int) $r; $g1=(int) $g; $b1=(int) $b; for($i=-10;$i<0;$i++) { $col=$map->getColorByIndex($i); $tr=$col->red; $tg=$col->green; $tb=$col->blue; if(($r1 == $tr) && ($g1 == $tg) && ($b1 == $tb)) { $in=$i; break; } } $in=$in+1; return($in); } The Error message are : Warning: Wrong parameter count for open() in c:\inetpub\wwwroot\php\nalbari.php on line 21 Fatal error: Property 'color' does not exist in this object. in c:\inetpub\wwwroot\php\nalbari.php on line 23 The Map File snippet is also provided: LAYER #DISTRICT BLOCKS# NAME "nal-blks" DATA nal-blks STATUS ON TYPE POLYGON CLASS NAME '0' COLOR 219 250 253 OUTLINECOLOR 154 181 250 END END What can be the possile solution to this? Regards, Samuzzal _____________________________________________________________ Linux.Net -->Open Source to everyone Powered by Linare Corporation http://www.linare.com/ From mapserver@meteologica.es Mon May 3 10:36:39 2004 From: mapserver@meteologica.es (Paco Regodon) Date: Mon, 3 May 2004 11:36:39 +0200 Subject: [Mapserver-users] How to force GDAL to read tiffs? Message-ID: <200405031136.39601.mapserver@meteologica.es> Hello, i am using mapserver-4.0-1mdk, the rpm package from Mandrake. It is compiled with tiff support: $ /var/www/cgi-bin/mapserv -v MapServer version 4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Is there any way i can force using GDAL to read tiff images? I can't compile my own version. Is there any mapfile directive similar to OUTPUTFORMAT to force using GDAL instead of builtin support? From publiek@home.nl Mon May 3 13:05:29 2004 From: publiek@home.nl (publiek@home.nl) Date: Mon, 3 May 2004 14:05:29 +0200 Subject: [Mapserver-users] php mapscript - pasteimage Message-ID: <200405031205.i43C5jFS017932@lists.gis.umn.edu> Hello, I want to show several layers on top of each other. How do i combine the images? I looked at pasteimage, but the examples provided with mapserver 4 dont work. (Would be nice if someone updated these) Anyone willing to provide me a simple example? Thanks a heap. Marcel From jerl.simpson@rkiq.com Mon May 3 14:00:56 2004 From: jerl.simpson@rkiq.com (Jerl Simpson) Date: Mon, 03 May 2004 08:00:56 -0500 Subject: [Mapserver-users] Re: demo: legend, scalebar In-Reply-To: <55100.66.193.31.36.1083524768.squirrel@www.meso.com> References: <55100.66.193.31.36.1083524768.squirrel@www.meso.com> Message-ID: <40964288.30803@rkiq.com> Matt, You can find an quick example of how to read the TIGER/Line data here: http://mapserver.gis.umn.edu/doc40/ogr-howto.html#binary scroll down to example #3. I have done this, and it does work. However I would recommend converting the ASCII files to ESRI Shapefiles. The ESRI files will allow maps to be displayed much faster. If you have a small amount of data, it might be alright. As you add data however, it will slow down as ASCII is not very effecient for searching. Jerl malonso@meso.com wrote: > Hello, > > Has anyone come across or developed any utilities that can incorporate > TIGER line files? I also included a previous question (below) that I > hadn't gotten any response to, if you can help with either that would be > greatly appreciated. Thanks folks. > > Matt > > >>Howdy all, >> >>I am trying to run the demo, and I can get most of it to work, but I >>can't seem to get the legend or the 1st scalebar, the main map and the >>2nd bar in the bottom right corner works fine. I attached the modified >>index.html and itasca.map files. Ironically I had them all working fine >>at first, but I had set the various "image_" things wrong so I could not >>see them. I made a couple changes and looked in the dir where the >>images should've been and they were all there. All the previous legends >>and scalebars where there from the previous runs, but I was no longer >>able to generate the 1st scalebar and the legends. If anyone needs >>anymore info please let me know. Thanks in advance for your help. >> >>Matt > > > > Matt Alonso > Meso, Inc. > 185 Jordan Road > Troy, NY 12180 > phone: 267-446-8657 > work: 518-283-5169 > > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > . > From dmanian@ivesia.com Mon May 3 14:03:07 2004 From: dmanian@ivesia.com (Dharani Babu S) Date: Mon, 3 May 2004 18:33:07 +0530 Subject: [Mapserver-users] fatal error U1073: don't know how to make 'map.h' Message-ID: <007401c4310e$fa81cbd0$8702a8c0@hdsc.com> This is a multi-part message in MIME format. ------=_NextPart_000_0071_01C4313D.13EB4B90 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all I am compiling map server code with -nmake tool . But I am facing = this NMAKE error fatal error U1073: don't know how to make 'map.h' Could any of u advise me on this ?? regards and thanks in advance dharani babu s ------=_NextPart_000_0071_01C4313D.13EB4B90 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all I am compiling map server code = with -nmake=20 tool . But I am facing this NMAKE error
 
fatal error U1073: don't know how to = make=20 'map.h'
 
Could any of u advise me on this=20 ??
regards and thanks in=20 advance
dharani babu=20 s
------=_NextPart_000_0071_01C4313D.13EB4B90-- From warmerdam@pobox.com Mon May 3 14:09:16 2004 From: warmerdam@pobox.com (Frank Warmerdam) Date: Mon, 03 May 2004 09:09:16 -0400 Subject: [Mapserver-users] How to force GDAL to read tiffs? In-Reply-To: <200405031136.39601.mapserver@meteologica.es> References: <200405031136.39601.mapserver@meteologica.es> Message-ID: <4096447C.4080003@pobox.com> Paco Regodon wrote: > Hello, > > i am using mapserver-4.0-1mdk, the rpm package from Mandrake. It is compiled > with tiff support: > > $ /var/www/cgi-bin/mapserv -v > MapServer version 4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ > SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT > INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > > > Is there any way i can force using GDAL to read tiff images? I can't compile > my own version. Is there any mapfile directive similar to OUTPUTFORMAT to > force using GDAL instead of builtin support? Paco, There is no proper way to force use of the GDAL TIFF driver for reading if the internal TIFF is available. I kind of thought this had been corrected for 4.0. It certainly is fixed in 4.2 where the built-in TIFF support is only used when GDAL is not available. You could "trick" MapServer into using GDAL by setting a different projection on the raster layer ... say with a false easting or northing that differs by a 10th of a meter or something. Also, forcing 24bit output will trip things over to using GDAL. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From sebastien.dubois@esm2.imt-mrs.fr Mon May 3 14:28:05 2004 From: sebastien.dubois@esm2.imt-mrs.fr (=?iso-8859-1?b?U+liYXN0aWVu?= DUBOIS) Date: Mon, 3 May 2004 15:28:05 +0200 Subject: [Mapserver-users] mapserver on mandrake In-Reply-To: <200405031136.39601.mapserver@meteologica.es> References: <200405031136.39601.mapserver@meteologica.es> Message-ID: <1083590885.409648e54fe76@webmail.esm2.imt-mrs.fr> hello, I have used "urpmi" to install mapserver under Mandrake9.2 So like Paco Regodon i've got the mapserver-4.0-1mdk, the rpm package from Mandrake I install apache by the same way (urpmi apache) then i made > apachectl start is that enough to start apache? mapserv is in /var/www/ bu [root@sx-dubois sbin]# which apachectl /usr/sbin/apachectl so mapserv and apache are not in the same directory !!! I verified carefully that all the requires were installed Requires * webserver * libc.so.6 * libcrypto.so.0.9.7 * libcurl.so.2 * libdl.so.2 * libfreetype.so.6 * libgd.so.2 * libgdal.1.1.so * libjpeg.so.62 * libm.so.6 * libpng.so.3 * libproj.so.0 * libssl.so.0.9.7 * libstdc++.so.5 * libtiff.so.3 * libz.so.1 but when I test on my favourite browser: http://sx-dubois@rd.francetelecom.com/var/www/cgi-bin/mapserv I can red: Warning: Failed opening '../../../fr/navigation/cadres.php' for inclusion (include_path='.:/usr/local/lib/php') in /export/WWW/fr/navigation/bar.php on line 40 Warning: Failed opening '../../../fr/navigation/ftbar.php' for inclusion (include_path='.:/usr/local/lib/php') in /export/WWW/fr/navigation/bar.php on line 41 Warning: Failed opening '../../../fr/navigation/rubriques.php' for inclusion (include_path='.:/usr/local/lib/php') in /export/WWW/fr/navigation/bar.php on line 42 Fatal error: Call to undefined function: rd_head() in /export/WWW/404.html.php on line 27 Have you got a explanation for that? thanks in advance for the time you spend to help me... -- Sébastien DUBOIS Ecole Généraliste d'Ingénieurs de Marseille (ex ESM2) 1024D/A1140BCB Empreinte de la clé = 1BC8 7E21 4DA7 13D5 1B5F 876F F719 2B7A A114 0BCB disponible sur www.keyserver.net ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From jnielsen@aero-graphics.com Mon May 3 14:39:32 2004 From: jnielsen@aero-graphics.com (Jason M. Nielsen) Date: Mon, 3 May 2004 07:39:32 -0600 Subject: [Mapserver-users] arcgrid to ascii(etc) In-Reply-To: <4093F7E4.6000400@pobox.com> References: <1083357821.4092ba7da1ffa@www.agi-lan.com> <4093F7E4.6000400@pobox.com> Message-ID: <1083591572.40964b9440993@www.agi-lan.com> Quoting Frank Warmerdam : > Jason M. Nielsen wrote: > > Anyone know of software that can convert arcgrid .adf files to ascii? > > _______________________________________________ > > Jason, > > GDAL read Arc/Info binary grid files in .adf format and can export a > variety of formats including Arc/Info ASCII Grid format which is ... ASCII. > > eg. > > gdal_translate -of AAIGrid in_cov/w001001.adf out.grd > > > Best regards, I have posted this on the gdal mailing list as well. According to the --formats output and compilation AAIGrid and AIG(adf) are supported. In any case it will not write out arc binary or ascii grids. At least not for me. It explicitly tells me output of that format is not supported: [root@localhost NED11342]# gdalwarp -s_srs epsg:4326 -t_srs epsg:26711 DEM11041/W001001.ADF W001001A.GRD -of AAIGrid Output driver `AAIGrid' not recognised or does not support [root@localhost NED11342]# gdalinfo --formats Supported Formats: VRT: Virtual Raster GTiff: GeoTIFF NITF: National Imagery Transmission Format HFA: Erdas Imagine Images (.img) SAR_CEOS: CEOS SAR Image CEOS: CEOS Image ELAS: ELAS AIG: Arc/Info Binary Grid AAIGrid: Arc/Info ASCII Grid SDTS: SDTS Raster DTED: DTED Elevation Raster PNG: Portable Network Graphics Unless I missed a compile option where I need to tell it I want output formats for these or include libraries I did not I am not seeing how to use gdal for this. Anyone know what I have wrong with regard to the gdal 1.1.9 compilation? The aaigrid and aigrid directories did indeed compile. I dont see any explicit settings in the HOWTO nor the config files. From jnielsen@aero-graphics.com Mon May 3 14:55:10 2004 From: jnielsen@aero-graphics.com (Jason M. Nielsen) Date: Mon, 3 May 2004 07:55:10 -0600 Subject: [Mapserver-users] How to force GDAL to read tiffs? In-Reply-To: <200405031136.39601.mapserver@meteologica.es> References: <200405031136.39601.mapserver@meteologica.es> Message-ID: <1083592510.40964f3eaa4e4@www.agi-lan.com> Quoting Paco Regodon : > > Hello, > > i am using mapserver-4.0-1mdk, the rpm package from Mandrake. It is compiled > > with tiff support: > > $ /var/www/cgi-bin/mapserv -v > MapServer version 4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ > SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT > > INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > > > Is there any way i can force using GDAL to read tiff images? I can't compile > > my own version. Is there any mapfile directive similar to OUTPUTFORMAT to > force using GDAL instead of builtin support? If I recall there is an option --WITHOUT-TIFF or something similar. There is at least one thread on the mailing list about this. I had the same problem. Basically if you tell mapserver itself no tiff but also tell it use gdal TIFF suport will just be automagically used via gdal. From warmerdam@pobox.com Mon May 3 15:18:04 2004 From: warmerdam@pobox.com (Frank Warmerdam) Date: Mon, 03 May 2004 10:18:04 -0400 Subject: [Mapserver-users] arcgrid to ascii(etc) In-Reply-To: <1083591572.40964b9440993@www.agi-lan.com> References: <1083357821.4092ba7da1ffa@www.agi-lan.com> <4093F7E4.6000400@pobox.com> <1083591572.40964b9440993@www.agi-lan.com> Message-ID: <4096549C.7020309@pobox.com> Jason M. Nielsen wrote: > I have posted this on the gdal mailing list as well. According to the --formats > output and compilation AAIGrid and AIG(adf) are supported. In any case it will > not write out arc binary or ascii grids. At least not for me. It explicitly > tells me output of that format is not supported: > > [root@localhost NED11342]# gdalwarp -s_srs epsg:4326 -t_srs epsg:26711 > DEM11041/W001001.ADF W001001A.GRD -of AAIGrid > Output driver `AAIGrid' not recognised or does not support Jason, I hope the above isn't the complete error message. It should have reported something about AAIGrid does not support Create() method. For gdalwarp you will have to output to a format that supports random writing of raster data (aka has a Create() method - such as GeoTIFF). Then translate to Arc/Info ASCII Grid with gdal_translate. > Anyone know what I have wrong with regard to the gdal 1.1.9 compilation? The > aaigrid and aigrid directories did indeed compile. I dont see any explicit > settings in the HOWTO nor the config files. I would add that 1.1.9 is getting a bit dated. When you have a chance you might want to upgrade to 1.2.0. In any event, this issue doesn't change between the versions. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From mapserver@meteologica.es Mon May 3 16:20:01 2004 From: mapserver@meteologica.es (Paco Regodon) Date: Mon, 3 May 2004 17:20:01 +0200 Subject: [Mapserver-users] How to force GDAL to read tiffs? In-Reply-To: <4096447C.4080003@pobox.com> References: <200405031136.39601.mapserver@meteologica.es> <4096447C.4080003@pobox.com> Message-ID: <200405031720.01781.mapserver@meteologica.es> On Monday 03 May 2004 15:09, Frank Warmerdam wrote: > Paco Regodon wrote: > > > > Is there any way i can force using GDAL to read tiff images? I can't > > compile my own version. Is there any mapfile directive similar to > > OUTPUTFORMAT to force using GDAL instead of builtin support? > > You could "trick" MapServer into using GDAL by setting a different > projection on the raster layer ... say with a false easting or northing > that differs by a 10th of a meter or something. Also, forcing 24bit output > will trip things over to using GDAL. Hello Frank, no luck. :-( I have tryed changing utm "zone=29" on the map and "zone=30" on the layer without success. Also, i changed IMAGETYPE from PNG to PNG24, and i have discovered that transparency information is being lost, as i am getting now an ugly green background. Also there is an speed penalty because of the extra reprojection time. I have tryed renaming ".tif" to ".png", but it didn't work. He. I allways get an Internal Server Error if i try to use tiff raster layers. I am now using tiff2png to batch-convert all my tiffs to PNG, and it works perfectly. Thanks for your help. From mapserver@meteologica.es Mon May 3 16:26:14 2004 From: mapserver@meteologica.es (Paco Regodon) Date: Mon, 3 May 2004 17:26:14 +0200 Subject: [Mapserver-users] mapserver on mandrake In-Reply-To: <1083590885.409648e54fe76@webmail.esm2.imt-mrs.fr> References: <200405031136.39601.mapserver@meteologica.es> <1083590885.409648e54fe76@webmail.esm2.imt-mrs.fr> Message-ID: <200405031726.14083.mapserver@meteologica.es> Have you tried the demo? mapserver-demo-3.5-2mdk you should be able to test it on http://[your_host]/mapserver/itasca/index.html Paco On Monday 03 May 2004 15:28, Sébastien DUBOIS wrote: > hello, > > I have used "urpmi" to install mapserver under Mandrake9.2 > So like Paco Regodon i've got the mapserver-4.0-1mdk, the rpm package from > Mandrake > > I install apache by the same way (urpmi apache) then i made > > > apachectl start > > is that enough to start apache? > > mapserv is in /var/www/ > bu > > [root@sx-dubois sbin]# which apachectl > /usr/sbin/apachectl > > so mapserv and apache are not in the same directory !!! > > I verified carefully that all the requires were installed > Requires > > * webserver > * libc.so.6 > * libcrypto.so.0.9.7 > * libcurl.so.2 > * libdl.so.2 > * libfreetype.so.6 > * libgd.so.2 > * libgdal.1.1.so > * libjpeg.so.62 > * libm.so.6 > * libpng.so.3 > * libproj.so.0 > * libssl.so.0.9.7 > * libstdc++.so.5 > * libtiff.so.3 > * libz.so.1 > > but when I test on my favourite browser: > http://sx-dubois@rd.francetelecom.com/var/www/cgi-bin/mapserv > > I can red: > > Warning: Failed opening '../../../fr/navigation/cadres.php' for inclusion > (include_path='.:/usr/local/lib/php') in /export/WWW/fr/navigation/bar.php > on line 40 > > Warning: Failed opening '../../../fr/navigation/ftbar.php' for inclusion > (include_path='.:/usr/local/lib/php') in /export/WWW/fr/navigation/bar.php > on line 41 > > Warning: Failed opening '../../../fr/navigation/rubriques.php' for > inclusion (include_path='.:/usr/local/lib/php') in > /export/WWW/fr/navigation/bar.php on line 42 > > Fatal error: Call to undefined function: rd_head() in > /export/WWW/404.html.php on line 27 > > > > Have you got a explanation for that? > thanks in advance for the time you spend to help me... From matt@phyreworks.com Mon May 3 17:22:56 2004 From: matt@phyreworks.com (Matt Hatcher) Date: Mon, 3 May 2004 17:22:56 +0100 Subject: [Mapserver-users] Seg fault with labels In-Reply-To: <20040502170003.11314.16323.Mailman@lists.gis.umn.edu> Message-ID: Hi all, I'm running Mapserver 4.0.2 on Mandrake Linux 9.2. It was built with the help of the redhat 9 guide in the wiki. Thanks to the guy who put that together! I'm having problems with labelling layers. Mapserver works beautifully providing I don't try to use labels. If I do (either using bitmap or truetype), I get Internal Server Error. Running the query at the command line using the QUERY_STRING debug, I get a seg fault. This suggests to me a problem with my freetype or gd libraries - I'm using: freetype-1.3.1-20mdk.rpm, libfreetype6-2.1.4-6mdk and gd-2.0.15 My mapserv -v is: MapServer version 4.0.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE I've tried to run ./configure without freetype, but it still compiles the libraries in and I get the same result. Anybody got any bright ideas?! Thanks in advance Matt. -----Original Message----- From: mapserver-users-admin@lists.gis.umn.edu [mailto:mapserver-users-admin@lists.gis.umn.edu]On Behalf Of mapserver-users-request@lists.gis.umn.edu Sent: 02 May 2004 18:00 To: mapserver-users@lists.gis.umn.edu Subject: Mapserver-users digest, Vol 1 #509 - 9 msgs Send Mapserver-users mailing list submissions to mapserver-users@lists.gis.umn.edu To subscribe or unsubscribe via the World Wide Web, visit http://lists.gis.umn.edu/mailman/listinfo/mapserver-users or, via email, send a message with subject or body 'help' to mapserver-users-request@lists.gis.umn.edu You can reach the person managing the list at mapserver-users-admin@lists.gis.umn.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of Mapserver-users digest..." Today's Topics: 1. RE: world files and tile indexing (Ed McNierney) 2. Re: Shapelib, GPC, PHP, and polygon clipping (Frank Warmerdam) 3. Re: arcgrid to ascii(etc) (Frank Warmerdam) 4. Looking for reference links and online MapServer/MapScript Forum (Mike Juvrud) 5. Re: Looking for reference links and online MapServer/MapScript Forum (Eduardo Patto Kanegae) 6. RE: [postgis-users] RE: gone are my query results (Charlton Purvis) 7. RE: [postgis-users] RE: gone are my query results (Gregory S. Williamson) 8. RE: [postgis-users] RE: gone are my query results (Charlton Purvis) 9. Re: RE: [postgis-users] RE: gone are my query results (Paul Ramsey) --__--__-- Message: 1 Subject: RE: [Mapserver-users] world files and tile indexing Date: Sat, 1 May 2004 13:39:07 -0400 From: "Ed McNierney" To: "Antonio Cosenza" , This is a multi-part message in MIME format. ------_=_NextPart_001_01C42FA3.3437712E Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Antonio - =20 Thanks - that is very helpful! =20 Things seem fine, but you need to create georeference data for the images in a way that can be used - the JPG files could have world files (.JGW files) or the TIF files could have world files (.TFW) but you need them. You need to create these world files. You should try to read the coordinates from the shapefile (use shpdump) and you need to calculate the values for the world files. With only three files you can relatively easily do this by hand. =20 The shapefile polygons should give you the upper-left corner coordinate of each tile, and you should be able to calculate the size of each pixel in X and Y units from the shapefile polygons and information about how many pixels wide and high each image is (use tiffinfo). =20 - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242=20 _____ =20 From: Antonio Cosenza [mailto:antonio.cosenza@polito.it]=20 Sent: Saturday, May 01, 2004 6:18 AM To: mapserver-users@lists.gis.umn.edu Subject: Re: [Mapserver-users] world files and tile indexing It would help if you could explain what you're trying to do! =20 ok, i'll try tou explain you my situation! What format are the raster files in now,=20 The raster files are in jpg format. They are a set of 3 tiles NOT GEOREFERENCED (of course, they are jpg!). But, i have a shapefile, called tile.shp (so, georeferenced) representing the footprints of the tiles. In tile.shp, I created a field (Path) including the absoulte path to tiff tiles on my disk (ex. /var/www/.....F4-C4.tif).Now, i converted the jpg files in tiff files, without the world files. I use this mapfile configuration: LAYER NAME "pannelli" STATUS ON TYPE RASTER TILEINDEX "./tile.shp" TILEITEM "Path" END I run maplab, but an error occurs: unable to open tiff files: Description=09 Unable to open world file for reading. in /maplab/htdocs/common/wrapper/drawmap.php=09 Failed to draw layer named 'pannelli'. in /maplab/htdocs/common/wrapper/drawmap.php=09 Unable to open world file for reading. in /maplab/htdocs/common/wrapper/drawmap.php=09 Failed to draw layer named 'pannelli'. in /maplab/htdocs/common/wrapper/drawmap.php=09 So, i created some empty world files! This time, maplab runs without error, but it doesn't show me the tiles. It shows me only a blank page. Where is the problem? and what geographic reference data do you have for them (and in what format)? =09 - Ed =09 Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 =20 =09 -----Original Message----- From: Antonio Cosenza [mailto:antonio.cosenza@polito.it]=20 Sent: Friday, April 30, 2004 5:43 AM To: Ed McNierney; mapserver-users@lists.gis.umn.edu Subject: Re: [Mapserver-users] world files and tile indexing =09 so, i need to convert the raster tiles in tiff format, without world files? Right? =09 thanks =09 Ed McNierney wrote: =09 =20 Antonio - =09 Yes, as long as the georeference information is there for the tile=20 index to be created (and for the image to be rendered properly). =20 GeoTIFFs can be used in a TILEINDEX layer without world files. =09 - Ed =09 Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 =09 -----Original Message----- From: Antonio Cosenza [mailto:antonio.cosenza@polito.it] Sent: Thursday, April 29, 2004 2:40 PM To: mapserver-users@lists.gis.umn.edu Subject: [Mapserver-users] world files and tile indexing =09 Hi everyvody, is it possible to use tile indexing without world file? =09 thanks _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu =09 http://lists.gis.umn.edu/mailman/listinfo/mapserver-users =09 =09 =20 =09 =20 =09 =09 =09 _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users =09 =20 ------_=_NextPart_001_01C42FA3.3437712E Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Antonio -
 
Thanks - that is very = helpful!
 
Things seem fine, but you need to create = georeference data=20 for the images in a way that can be used - the JPG files could have = world files=20 (.JGW files) or the TIF files could have world files (.TFW) but you need = them.  You need to create these world files.  You should try = to read=20 the coordinates from the shapefile (use shpdump) and you need to = calculate the=20 values for the world files.  With only three files you can = relatively=20 easily do this by hand.
 
The shapefile polygons should give you the = upper-left=20 corner coordinate of each tile, and you should be able to calculate the = size of=20 each pixel in X and Y units from the shapefile polygons and information = about=20 how many pixels wide and high each image is (use = tiffinfo).
 
    - Ed

Ed McNierney
President and Chief = Mapmaker
TopoZone.com /=20 Maps a la carte, Inc.
73 Princeton Street, Suite 305
North = Chelmsford,=20 MA  01863
ed@topozone.com
(978) 251-4242 =



From: Antonio Cosenza=20 [mailto:antonio.cosenza@polito.it]
Sent: Saturday, May 01, = 2004 6:18=20 AM
To: mapserver-users@lists.gis.umn.edu
Subject: = Re:=20 [Mapserver-users] world files and tile indexing


It would help if you could explain what =
you're trying to do!  
ok,=20 i'll try tou explain you my situation!
What
format are the raster files in now, 
The raster files = are in=20 jpg format.  They are a set of 3 tiles NOT GEOREFERENCED (of = course, they=20 are jpg!). But, i have a shapefile, called tile.shp (so, georeferenced)=20 representing the footprints of  the tiles. In tile.shp, I created a = field=20 (Path) including the absoulte path to tiff tiles on my disk (ex.=20 /var/www/.....F4-C4.tif).Now,  i converted the jpg files in tiff = files,=20 without the world files. I use this mapfile=20 configuration:

 LAYER
    NAME=20 "pannelli"
    STATUS ON
    TYPE=20 RASTER
    TILEINDEX = "./tile.shp"
   =20 TILEITEM "Path"
  END

I run maplab, but an error occurs: = unable=20 to open tiff files:

Description
Unable to open world file for reading. in=20 /maplab/htdocs/common/wrapper/drawmap.php
Failed to draw layer named 'pannelli'. in=20 /maplab/htdocs/common/wrapper/drawmap.php
Unable to open world file for reading. in=20 /maplab/htdocs/common/wrapper/drawmap.php
Failed to draw layer named 'pannelli'. in=20 = /maplab/htdocs/common/wrapper/drawmap.php

So,=20 i created some empty world files! This time, maplab runs without error, = but it=20 doesn't show me the tiles. It shows me only a blank page.
Where is = the=20 problem?


and what geographic reference data
do you have for them (and in what format)?

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed@topozone.com
(978) 251-4242 =20

-----Original Message-----
From: Antonio Cosenza [mailto:antonio.cosenza@polito.i=
t]=20
Sent: Friday, April 30, 2004 5:43 AM
To: Ed McNierney; mapserver-users@lists.g=
is.umn.edu
Subject: Re: [Mapserver-users] world files and tile indexing

so, i need to convert the raster tiles in tiff format, without world
files? Right?

thanks

Ed McNierney wrote:

  
Antonio -

Yes, as long as the georeference information is there for the tile=20
index to be created (and for the image to be rendered properly). =20
GeoTIFFs can be used in a TILEINDEX layer without world files.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed@topozone.com
(978) 251-4242

-----Original Message-----
From: Antonio Cosenza [mailto:antonio.cosenza@polito.i=
t]
Sent: Thursday, April 29, 2004 2:40 PM
To: mapserver-users@lists.g=
is.umn.edu
Subject: [Mapserver-users] world files and tile indexing

Hi everyvody,
is it possible to use tile indexing without world file?

thanks
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.g=
is.umn.edu
http:/=
/lists.gis.umn.edu/mailman/listinfo/mapserver-users


=20

    



_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.g=
is.umn.edu
http:/=
/lists.gis.umn.edu/mailman/listinfo/mapserver-users

  

------_=_NextPart_001_01C42FA3.3437712E-- --__--__-- Message: 2 Date: Sat, 01 May 2004 15:03:03 -0400 From: Frank Warmerdam To: "Ryan, Adam" Cc: mapserver-users@lists.gis.umn.edu Subject: Re: [Mapserver-users] Shapelib, GPC, PHP, and polygon clipping Ryan, Adam wrote: > Steve, Frank, etc... > > A while back Steve Lime wrote in response to a request for polygon clipping > code. > > http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0201/msg00094.html > > He suggested using the GPC library. I checked this out and was able to get > it to work. > > Is it worth trying to use GPC with either PHP mapscript or shapelib directly > and write a little routine to grab the shapes in question, convert them to > gpc ascii format, run the clip operation, and convert back to a shapefile > result? In PHP I could build the ASCII files, then call a gpc executable, > and then translate the ASCII result back into a new shapefile. > > Am I exploring old technology? Is there a better way? Seems like a lot of > steps but all the really hard work has been done and it's just a matter of > reformatting data to work with the different tools. Adam, Invoking GPC externally via an ascii file interface may be too slow depending on your needs but it is certainly doable. From a more general point of view, it is my hope to interface the GEOS library (http://geos.refractions.net) with OGR at some point with a convenient mechanism to convert OGR geometries into a form usable in GEOS. So from my point of view a GEOS is the "future" of complex geometry operations in OGR (and indirectly shapelib). In fact, I would like to see a nice SWIG'ed interface to GEOS so that it can be easily used in most/all of the mapscript supported languages. GEOS is the library used by PostGIS for geometry operations, but it is independent of PostGIS. I think it does more than GPC. I was also slightly soured on GPC because of problematic licensing issues as I recall. So, if you have a particular need that is satisfied by passing geometries to GPC then by all means go ahead. However, I don't forsee it as being of strategic value. If you are interested in cooperating on swigged interfaces for GEOS and closer integration with OGR, Shapelib or MapServer geometries then perhaps we could get something going. I hadn't really been intending to get started on this yet though, so you might get stuck doing quite a bit of the heavy lifting. Best regards, -- ---------------------------------------+------------------------------------ -- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent --__--__-- Message: 3 Date: Sat, 01 May 2004 15:17:56 -0400 From: Frank Warmerdam To: "Jason M. Nielsen" Cc: mapserver-users@lists.gis.umn.edu Subject: Re: [Mapserver-users] arcgrid to ascii(etc) Jason M. Nielsen wrote: > Anyone know of software that can convert arcgrid .adf files to ascii? > _______________________________________________ Jason, GDAL read Arc/Info binary grid files in .adf format and can export a variety of formats including Arc/Info ASCII Grid format which is ... ASCII. eg. gdal_translate -of AAIGrid in_cov/w001001.adf out.grd Best regards, -- ---------------------------------------+------------------------------------ -- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent --__--__-- Message: 4 From: "Mike Juvrud" To: Date: Sat, 1 May 2004 18:23:21 -0500 Subject: [Mapserver-users] Looking for reference links and online MapServer/MapScript Forum I'm a MapServer/PHP MapScript newbie, looking for online reference materials, resources, sample code, etc. (beginner to advanced)...I would appreciate links to anything you might recommend. (english or deutsch) (I have already downloaded and gone through the tutorials, references, samples available on the mapserver & mapscript site.) Also - Is there a Mapserver/Mapscript forum/bulletin board online? Will sum, Mike Juvrud --__--__-- Message: 5 From: "Eduardo Patto Kanegae" Date: Sat, 1 May 2004 23:58:10 -0300 To: "Mike Juvrud" CC: mapserver-users@lists.gis.umn.edu Subject: Re: [Mapserver-users] Looking for reference links and online MapServer/MapScript Forum at the official website , section Documentation, u will find all u're looking for... for deutsch reference , take a look at www.mapmedia.de ... i think they have a book about mapserver. Eduardo Patto Kanegae http://www.consultoria.eti.br UIN: 303747254 I Encontro Nacional de Usuários MapServer - http://mapserver.cttmar.univali.br/encontro2004 Projeto MapServer Brasil - http://mapserver.cttmar.univali.br ***Fim da Mensagem / End of Message *** On Sat, 1 May 2004 18:23:21 -0500, "Mike Juvrud" escreveu: > De: "Mike Juvrud" > Data: Sat, 1 May 2004 18:23:21 -0500 > Para: > Assunto: [Mapserver-users] Looking for reference links and online MapServer/MapScript Forum > > I'm a MapServer/PHP MapScript newbie, looking for online reference > materials, resources, sample code, etc. (beginner to advanced)...I would > appreciate links to anything you might recommend. (english or deutsch) > > (I have already downloaded and gone through the tutorials, references, > samples available on the mapserver & mapscript site.) > > Also - Is there a Mapserver/Mapscript forum/bulletin board online? > > Will sum, > > Mike Juvrud > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > > > --__--__-- Message: 6 Date: Sat, 1 May 2004 22:59:22 -0400 From: "Charlton Purvis" To: "PostGIS Users Discussion" , Subject: [Mapserver-users] RE: [postgis-users] RE: gone are my query results Thanks for your reply, Gregory. I'm forwarding this onto the MS folks to see if they have any pearls of wisdom. Everything looks great in the db. If I render a map, I see all the points correctly. If I take that query and plug it in to the command line, I see the rows. But the moment I try to do either a cgi query, WFS query, or a PHP query, I get nothing back. No error message. I'm actually getting panicky which isn't any fun. Has anyone seen anything like this before? Queries rely on OID's and SRID's. Is there any way they could have gotten mucked up? Can I somehow refresh them? Thanks, Charlton -----Original Message----- From: Gregory S. Williamson [mailto:gsw@globexplorer.com] Sent: Sat 5/1/2004 6:20 PM To: PostGIS Users Discussion Cc: Subject: [postgis-users] RE: gone are my query results If you do the query directly to postgres (via psql or pgAdmin or whatever) does the query return results ? If so, then my guess is that this is not a database error, at least not directly. If ot then yes, it would seem that somehow the postGIS itself has gottent snarfled. The change you made relating the geometryColumns doesn't sound to me like it should effect queries unless somehow the SRID info for the tables in your mapserver queries got clobbered; should be easy enough to confirm that this data is ok. I am not familiar enough with PHP and mapserver to have a clue; does the mapserver log itself show anything ? Not much help, I'm afraid, but perhaps posting this to the MMS list would add some more knowledge to the issue at hand ? Greg Williamson DBA GlobeXplorer LLC -----Original Message----- From: Charlton Purvis on behalf of Charlton Purvis Sent: Sat 5/1/2004 2:46 PM To: PostGIS Users Discussion Cc: Subject: gone are my query results Hi, folks: Bizarre and unnerving problem here. Up until last night, mapping was fine and point-query was fine. Now it appears that the mapping is still great, but the point query and WFS are toast. I don't get any errors in pgsql.log or php.log. I get . . . nothing. Even going mapserv cgi query returns empty for a query I know should work. Maybe I'm being taught a lesson. In a separate database, I noticed that addgeometrycolumn was taking too long -- I create about 400 smaller tables per day. So I commented out fix_geometry_columns(); from the addgeometrycolumn function and did it once I had finished creating all my new tables. So am I paying the price? Has this corrupted this database as well as my other? If all this is OID stuff, is there any way to refresh all OID's? Restarted . . . yes. VACUUM and ANALYZE'd . . . yes. Thanks, Charlton _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users --__--__-- Message: 7 Date: Sat, 1 May 2004 20:11:41 -0700 From: "Gregory S. Williamson" To: "PostGIS Users Discussion" , Subject: [Mapserver-users] RE: [postgis-users] RE: gone are my query results If you turn on the logging of statements in postgres and run the mapserver side of things, does the query show up in the logs ? If the query does not appear then I'd suspect networking or permissions or some darn thing keeping postgres from ever seeing the query. It it does show up then maybe the problem is in the return trip to MS or in the processing of that data (perhaps your OID suspicions), since it sounds as if the query itself can be processed. Any changes to *anything* on either server and anything in between ? (not likely but always worth ruling out) Or, shot in the dark, something messing with TOLERANCE so no points are selected in a query ? Very puzzling, I agree. Greg W. -----Original Message----- From: Charlton Purvis on behalf of Charlton Purvis Sent: Sat 5/1/2004 7:59 PM To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu Cc: Subject: RE: [postgis-users] RE: gone are my query results Thanks for your reply, Gregory. I'm forwarding this onto the MS folks to see if they have any pearls of wisdom. Everything looks great in the db. If I render a map, I see all the points correctly. If I take that query and plug it in to the command line, I see the rows. But the moment I try to do either a cgi query, WFS query, or a PHP query, I get nothing back. No error message. I'm actually getting panicky which isn't any fun. Has anyone seen anything like this before? Queries rely on OID's and SRID's. Is there any way they could have gotten mucked up? Can I somehow refresh them? Thanks, Charlton -----Original Message----- From: Gregory S. Williamson [mailto:gsw@globexplorer.com] Sent: Sat 5/1/2004 6:20 PM To: PostGIS Users Discussion Cc: Subject: [postgis-users] RE: gone are my query results If you do the query directly to postgres (via psql or pgAdmin or whatever) does the query return results ? If so, then my guess is that this is not a database error, at least not directly. If ot then yes, it would seem that somehow the postGIS itself has gottent snarfled. The change you made relating the geometryColumns doesn't sound to me like it should effect queries unless somehow the SRID info for the tables in your mapserver queries got clobbered; should be easy enough to confirm that this data is ok. I am not familiar enough with PHP and mapserver to have a clue; does the mapserver log itself show anything ? Not much help, I'm afraid, but perhaps posting this to the MMS list would add some more knowledge to the issue at hand ? Greg Williamson DBA GlobeXplorer LLC -----Original Message----- From: Charlton Purvis on behalf of Charlton Purvis Sent: Sat 5/1/2004 2:46 PM To: PostGIS Users Discussion Cc: Subject: gone are my query results Hi, folks: Bizarre and unnerving problem here. Up until last night, mapping was fine and point-query was fine. Now it appears that the mapping is still great, but the point query and WFS are toast. I don't get any errors in pgsql.log or php.log. I get . . . nothing. Even going mapserv cgi query returns empty for a query I know should work. Maybe I'm being taught a lesson. In a separate database, I noticed that addgeometrycolumn was taking too long -- I create about 400 smaller tables per day. So I commented out fix_geometry_columns(); from the addgeometrycolumn function and did it once I had finished creating all my new tables. So am I paying the price? Has this corrupted this database as well as my other? If all this is OID stuff, is there any way to refresh all OID's? Restarted . . . yes. VACUUM and ANALYZE'd . . . yes. Thanks, Charlton _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users --__--__-- Message: 8 Date: Sat, 1 May 2004 23:42:34 -0400 From: "Charlton Purvis" To: "PostGIS Users Discussion" , Subject: [Mapserver-users] RE: [postgis-users] RE: gone are my query results OK, Greg, I think we might be onto something. But it still looks very grim. I turned on all the logging, and I notice that MS sends it this query: LOCATION: pg_parse_query, postgres.c:464 LOG: 00000: statement: DECLARE mycursor BINARY CURSOR FOR SELECT temperature_celcius::text,asbinary(force_collection(force_2d(the_geom)),'NDR '),OID::text from sst_map WHERE (date_trunc('hour',report_time_stamp + interval '1 hour' * -04) = date_trunc('hour',timestamp without time zone '2004-05-01 22:00:00') and (label_z <= 5 or label_z is null)) and (the_geom && setSRID( 'BOX3D(-83.0454044480208 24.3838940085927,-82.6541628156105 24.775135641003)'::BOX3D,find_srid('','sst_map','the_geom') )) OK. That's good. Because if I stick the SELECT part at a psql prompt, I get back the row I want. And I also notice that its OID is 2185295089. But if I look at the last sql statement in the log, it's another cursor, but the OID is wrong. LOCATION: pg_parse_query, postgres.c:464 LOG: 00000: statement: DECLARE mycursor BINARY CURSOR FOR SELECT station_id::text,time_stamp::text,z::text,label_z::text,temperature_celcius: :text,temperature_fahrenheit::text,value_temperature_celcius::text,value_tem perature_fahrenheit::text,lon::text,lat::text,title::text,institution::text, institution_url::text,institution_dods_url::text,source::text,refs::text,con tact::text,report_time_stamp::text,asbinary(force_collection(force_2d(the_ge om)),'NDR') from sst_map WHERE OID = 2147483647 So had they kept the OID, I would be in good shape. This isn't looking good!!! Charlton -----Original Message----- From: Gregory S. Williamson [mailto:gsw@globexplorer.com] Sent: Sat 5/1/2004 11:11 PM To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu Cc: Subject: RE: [postgis-users] RE: gone are my query results If you turn on the logging of statements in postgres and run the mapserver side of things, does the query show up in the logs ? If the query does not appear then I'd suspect networking or permissions or some darn thing keeping postgres from ever seeing the query. It it does show up then maybe the problem is in the return trip to MS or in the processing of that data (perhaps your OID suspicions), since it sounds as if the query itself can be processed. Any changes to *anything* on either server and anything in between ? (not likely but always worth ruling out) Or, shot in the dark, something messing with TOLERANCE so no points are selected in a query ? Very puzzling, I agree. Greg W. -----Original Message----- From: Charlton Purvis on behalf of Charlton Purvis Sent: Sat 5/1/2004 7:59 PM To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu Cc: Subject: RE: [postgis-users] RE: gone are my query results Thanks for your reply, Gregory. I'm forwarding this onto the MS folks to see if they have any pearls of wisdom. Everything looks great in the db. If I render a map, I see all the points correctly. If I take that query and plug it in to the command line, I see the rows. But the moment I try to do either a cgi query, WFS query, or a PHP query, I get nothing back. No error message. I'm actually getting panicky which isn't any fun. Has anyone seen anything like this before? Queries rely on OID's and SRID's. Is there any way they could have gotten mucked up? Can I somehow refresh them? Thanks, Charlton -----Original Message----- From: Gregory S. Williamson [mailto:gsw@globexplorer.com] Sent: Sat 5/1/2004 6:20 PM To: PostGIS Users Discussion Cc: Subject: [postgis-users] RE: gone are my query results If you do the query directly to postgres (via psql or pgAdmin or whatever) does the query return results ? If so, then my guess is that this is not a database error, at least not directly. If ot then yes, it would seem that somehow the postGIS itself has gottent snarfled. The change you made relating the geometryColumns doesn't sound to me like it should effect queries unless somehow the SRID info for the tables in your mapserver queries got clobbered; should be easy enough to confirm that this data is ok. I am not familiar enough with PHP and mapserver to have a clue; does the mapserver log itself show anything ? Not much help, I'm afraid, but perhaps posting this to the MMS list would add some more knowledge to the issue at hand ? Greg Williamson DBA GlobeXplorer LLC -----Original Message----- From: Charlton Purvis on behalf of Charlton Purvis Sent: Sat 5/1/2004 2:46 PM To: PostGIS Users Discussion Cc: Subject: gone are my query results Hi, folks: Bizarre and unnerving problem here. Up until last night, mapping was fine and point-query was fine. Now it appears that the mapping is still great, but the point query and WFS are toast. I don't get any errors in pgsql.log or php.log. I get . . . nothing. Even going mapserv cgi query returns empty for a query I know should work. Maybe I'm being taught a lesson. In a separate database, I noticed that addgeometrycolumn was taking too long -- I create about 400 smaller tables per day. So I commented out fix_geometry_columns(); from the addgeometrycolumn function and did it once I had finished creating all my new tables. So am I paying the price? Has this corrupted this database as well as my other? If all this is OID stuff, is there any way to refresh all OID's? Restarted . . . yes. VACUUM and ANALYZE'd . . . yes. Thanks, Charlton _______________________________________________ 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 --__--__-- Message: 9 Date: Sat, 01 May 2004 21:08:54 -0700 From: Paul Ramsey Subject: Re: [Mapserver-users] RE: [postgis-users] RE: gone are my query results To: Charlton Purvis Cc: PostGIS Users Discussion , mapserver-users@lists.gis.umn.edu Got your back, Charlton :) The problem is that your PostgreSQL oids are larger than the mapserver row number variable can store. The oid is larger than a signed 32 bit integer can store. So, solution. Do not use oid as your "unique" field. Make use of the "using unique" clause in your data statement, and reference a different unique field in your table. Make sure that field is indexed. If you have loaded your data with shp2pgsql, you probably have a 'gid' field you can use that is a primary key (and therefore already indexed). Yours, Paul On Saturday, May 1, 2004, at 08:42 PM, Charlton Purvis wrote: > OK, Greg, I think we might be onto something. But it still looks very > grim. > > I turned on all the logging, and I notice that MS sends it this query: > > LOCATION: pg_parse_query, postgres.c:464 > LOG: 00000: statement: DECLARE mycursor BINARY CURSOR FOR SELECT > temperature_celcius::text,asbinary(force_collection(force_2d(the_geom)) > ,'NDR'),OID::text from sst_map WHERE > (date_trunc('hour',report_time_stamp + interval '1 hour' * -04) = > date_trunc('hour',timestamp without time zone '2004-05-01 22:00:00') > and (label_z <= 5 or label_z is null)) and (the_geom && setSRID( > 'BOX3D(-83.0454044480208 24.3838940085927,-82.6541628156105 > 24.775135641003)'::BOX3D,find_srid('','sst_map','the_geom') )) > > OK. That's good. Because if I stick the SELECT part at a psql > prompt, I get back the row I want. And I also notice that its OID is > 2185295089. > > But if I look at the last sql statement in the log, it's another > cursor, but the OID is wrong. > > LOCATION: pg_parse_query, postgres.c:464 > LOG: 00000: statement: DECLARE mycursor BINARY CURSOR FOR SELECT > station_id::text,time_stamp::text,z::text,label_z::text,temperature_cel > cius::text,temperature_fahrenheit::text,value_temperature_celcius::text > ,value_temperature_fahrenheit::text,lon::text,lat::text,title::text,ins > titution::text,institution_url::text,institution_dods_url::text,source: > :text,refs::text,contact::text,report_time_stamp::text,asbinary(force_c > ollection(force_2d(the_geom)),'NDR') from sst_map WHERE OID = > 2147483647 > > So had they kept the OID, I would be in good shape. > > This isn't looking good!!! > > Charlton > > -----Original Message----- > From: Gregory S. Williamson [mailto:gsw@globexplorer.com] > Sent: Sat 5/1/2004 11:11 PM > To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu > Cc: > Subject: RE: [postgis-users] RE: gone are my query results > > > > > If you turn on the logging of statements in postgres and run the > mapserver side of things, does the query show up in the logs ? > > If the query does not appear then I'd suspect networking or > permissions or some darn thing keeping postgres from ever seeing the > query. > > It it does show up then maybe the problem is in the return trip to MS > or in the processing of that data (perhaps your OID suspicions), since > it sounds as if the query itself can be processed. > > Any changes to *anything* on either server and anything in between ? > (not likely but always worth ruling out) > > Or, shot in the dark, something messing with TOLERANCE so no points > are selected in a query ? > > Very puzzling, I agree. > > Greg W. > > -----Original Message----- > From: Charlton Purvis on behalf of Charlton Purvis > Sent: Sat 5/1/2004 7:59 PM > To: PostGIS Users Discussion; mapserver-users@lists.gis.umn.edu > Cc: > Subject: RE: [postgis-users] RE: gone are my query results > Thanks for your reply, Gregory. I'm forwarding this onto the MS > folks to see if they have any pearls of wisdom. > > Everything looks great in the db. If I render a map, I see all the > points correctly. If I take that query and plug it in to the command > line, I see the rows. But the moment I try to do either a cgi query, > WFS query, or a PHP query, I get nothing back. No error message. > > I'm actually getting panicky which isn't any fun. Has anyone seen > anything like this before? > > Queries rely on OID's and SRID's. Is there any way they could have > gotten mucked up? Can I somehow refresh them? > > Thanks, > > Charlton > > -----Original Message----- > From: Gregory S. Williamson [mailto:gsw@globexplorer.com] > Sent: Sat 5/1/2004 6:20 PM > To: PostGIS Users Discussion > Cc: > Subject: [postgis-users] RE: gone are my query results > > > > > If you do the query directly to postgres (via psql or pgAdmin or > whatever) does the query return results ? > > If so, then my guess is that this is not a database error, at least > not directly. If ot then yes, it would seem that somehow the postGIS > itself has gottent snarfled. > > The change you made relating the geometryColumns doesn't sound to me > like it should effect queries unless somehow the SRID info for the > tables in your mapserver queries got clobbered; should be easy enough > to confirm that this data is ok. > > I am not familiar enough with PHP and mapserver to have a clue; does > the mapserver log itself show anything ? > > Not much help, I'm afraid, but perhaps posting this to the MMS list > would add some more knowledge to the issue at hand ? > > Greg Williamson > DBA > GlobeXplorer LLC > > -----Original Message----- > From: Charlton Purvis on behalf of Charlton Purvis > Sent: Sat 5/1/2004 2:46 PM > To: PostGIS Users Discussion > Cc: > Subject: gone are my query results > Hi, folks: > > Bizarre and unnerving problem here. > > Up until last night, mapping was fine and point-query was fine. Now > it appears that the mapping is still great, but the point query and > WFS are toast. I don't get any errors in pgsql.log or php.log. I get > . . . nothing. Even going mapserv cgi query returns empty for a query > I know should work. > > Maybe I'm being taught a lesson. In a separate database, I noticed > that addgeometrycolumn was taking too long -- I create about 400 > smaller tables per day. So I commented out fix_geometry_columns(); > from the addgeometrycolumn function and did it once I had finished > creating all my new tables. So am I paying the price? Has this > corrupted this database as well as my other? > > If all this is OID stuff, is there any way to refresh all OID's? > > Restarted . . . yes. VACUUM and ANALYZE'd . . . yes. > > Thanks, > > Charlton > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > Paul Ramsey Refractions Research Email: pramsey@refractions.net Phone: (250) 885-0632 --__--__-- _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users End of Mapserver-users Digest From jnielsen@aero-graphics.com Mon May 3 17:26:49 2004 From: jnielsen@aero-graphics.com (Jason M. Nielsen) Date: Mon, 3 May 2004 10:26:49 -0600 Subject: [Mapserver-users] arcgrid to ascii(etc) In-Reply-To: <4096549C.7020309@pobox.com> References: <1083357821.4092ba7da1ffa@www.agi-lan.com> <4093F7E4.6000400@pobox.com> <1083591572.40964b9440993@www.agi-lan.com> <4096549C.7020309@pobox.com> Message-ID: <1083601609.409672c9e551f@www.agi-lan.com> Quoting Frank Warmerdam : > Jason, > > I hope the above isn't the complete error message. It should have reported > something about AAIGrid does not support Create() method. For gdalwarp you > will have to output to a format that supports random writing of raster data > (aka has a Create() method - such as GeoTIFF). Then translate to Arc/Info > ASCII Grid with gdal_translate. Part of my cut and past didnt make it into the email. Output driver `AAIGrid' not recognised or does not support direct output file creation. The following format drivers are configured and support direct output: VRT: Virtual Raster GTiff: GeoTIFF NITF: National Imagery Transmission Format HFA: Erdas Imagine Images (.img) ELAS: ELAS MEM: In Memory Raster BMP: MS Windows Device Independent Bitmap PNM: Portable Pixmap Format (netpbm) ENVI: ENVI .hdr Labelled PAux: PCI .aux Labelled MFF: Atlantis MFF Raster MFF2: Atlantis MFF2 (HKV) Raster Anyhow, I was unaware of not being able to go directly through gdalwarp. I tried the gdal_translate and it seems to have had no problem. Thanks! From dmorissette@dmsolutions.ca Mon May 3 17:36:17 2004 From: dmorissette@dmsolutions.ca (Daniel Morissette) Date: Mon, 03 May 2004 12:36:17 -0400 Subject: [Mapserver-users] php mapscript - pasteimage In-Reply-To: <200405031205.i43C5jFS017932@lists.gis.umn.edu> References: <200405031205.i43C5jFS017932@lists.gis.umn.edu> Message-ID: <40967501.9030005@dmsolutions.ca> This is a multi-part message in MIME format. --------------080500060909030205020503 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit publiek@home.nl wrote: > > I want to show several layers on top of each other. > How do i combine the images? > Just calling $layer->draw($image) for each layer will do the trick. You need to use $map->prepareImage() to create a balnk image first. > I looked at pasteimage, but the examples provided with mapserver 4 dont work. (Would be nice if someone updated these) > > Anyone willing to provide me a simple example? > Thanks for pointing that. I have fixed the mapscript/php3/examples/test_layer_mask.phtml forV4.x and updated the copies in CVS for v4.2 and 4.3. I also attached a copy of the updated script. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ --------------080500060909030205020503 Content-Type: text/html; name="test_layer_mask.phtml" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test_layer_mask.phtml"

PHP/MapScript layer mask test

SelectOutputFormat("PNG"); //////// // Draw the base layers into an imageObj $img1 = $map->prepareimage(); $layer = $map->getLayerByName("bathymetry"); $layer->set("status", 1); $layer->draw($img1); //$img = $map->draw(); $url = $img1->saveWebImage(); echo "

Draw the base layers into an image...

\n"; printf("\n", $url, $map->width, $map->height); ////////////// // Use the parks layer as a mask... we only want to see the base layers // through the area of the park polygons and the rest should be light grey. // Start by creating a new image ... $img2 = $map->prepareimage(); // ... and we'll use a rectObj to draw the opaque mask background $rect = ms_newRectObj(); $rect->setExtent(0, 0, $map->width, $map->height); // We need to create a temporary layer and class to use in drawing the // filled rectangle that will be the opaque part of the mask. $tmplayer = ms_newLayerObj($map); $tmplayer->set("type", MS_LAYER_POLYGON); $tmplayer->set("status", 1); $tmplayer->set("transform", MS_FALSE); $tmpclass = ms_newClassObj($tmplayer); $tmpstyle = ms_newStyleObj($tmpclass); $tmpstyle->color->setRGB(222,222,222); $rect->draw($map, $tmplayer, $img2, 0, ""); // Draw rect with class 0 // Now fetch the park layer and change its only class to use color index 0 // which is the transparent background color... so the parks polygons will // create transparent holes in the mask $layer = $map->getLayerByName("park"); $layer->set("status", 1); $class = $layer->getClass(0); $style = $class->getStyle(0); $style->color->setRGB(12,12,12); $style->outlinecolor->setRGB(12,12,12); $layer->draw($img2); $url = $img2->saveWebImage(); echo "

Draw the mask into another image...

\n"; printf("\n", $url, $map->width, $map->height); //////// // Last step... combine the two images using pasteImage() // echo "

And combine the two with pasteImage()... you see the base layer through the holes in the mask...

\n"; $img1->pasteImage($img2, 0x0c0c0c); $url = $img1->saveWebImage(); printf("\n", $url, $map->width, $map->height); ?> --------------080500060909030205020503-- From eduardo@consultoria.eti.br Mon May 3

Description
Unable to open world file for reading. in=20 /maplab/htdocs/common/wrapper/drawmap.php
Failed to draw layer named 'pannelli'. in=20 /maplab/htdocs/common/wrapper/drawmap.php
Unable to open world file for reading. in=20 /maplab/htdocs/common/wrapper/drawmap.php
Failed to draw layer named 'pannelli'. in=20 = /maplab/htdocs/common/wrapper/drawmap.php