[Mapserver-users] Seg fault with labels

Matt Hatcher matt at phyreworks.com
Mon May 3 12:22:56 EDT 2004


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 at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu]On Behalf Of
mapserver-users-request at lists.gis.umn.edu
Sent: 02 May 2004 18:00
To: mapserver-users at lists.gis.umn.edu
Subject: Mapserver-users digest, Vol 1 #509 - 9 msgs


Send Mapserver-users mailing list submissions to
	mapserver-users at 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 at lists.gis.umn.edu

You can reach the person managing the list at
	mapserver-users-admin at 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" <ed at topozone.com>
To: "Antonio Cosenza" <antonio.cosenza at polito.it>,
        <mapserver-users at lists.gis.umn.edu>

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 at topozone.com
(978) 251-4242=20


  _____ =20

From: Antonio Cosenza [mailto:antonio.cosenza at polito.it]=20
Sent: Saturday, May 01, 2004 6:18 AM
To: mapserver-users at 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 at topozone.com
	(978) 251-4242 =20
=09
	-----Original Message-----
	From: Antonio Cosenza [mailto:antonio.cosenza at polito.it]=20
	Sent: Friday, April 30, 2004 5:43 AM
	To: Ed McNierney; mapserver-users at 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 at topozone.com
		(978) 251-4242
	=09
		-----Original Message-----
		From: Antonio Cosenza [mailto:antonio.cosenza at polito.it]
		Sent: Thursday, April 29, 2004 2:40 PM
		To: mapserver-users at 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 at 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 at 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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Antonio -</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Thanks - that is very =
helpful!</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>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.&nbsp; You need to create these world files.&nbsp; 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.&nbsp; With only three files you can =
relatively=20
easily do this by hand.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>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).</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN =
class=3D456053617-01052004>&nbsp;&nbsp;&nbsp; <FONT=20
face=3DArial color=3D#0000ff size=3D2>- Ed</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004>
<P><FONT size=3D2>Ed McNierney<BR>President and Chief =
Mapmaker<BR>TopoZone.com /=20
Maps a la carte, Inc.<BR>73 Princeton Street, Suite 305<BR>North =
Chelmsford,=20
MA&nbsp; 01863<BR>ed at topozone.com<BR>(978) 251-4242 =
</FONT></P></SPAN></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B> Antonio Cosenza=20
[mailto:antonio.cosenza at polito.it] <BR><B>Sent:</B> Saturday, May 01, =
2004 6:18=20
AM<BR><B>To:</B> mapserver-users at lists.gis.umn.edu<BR><B>Subject:</B> =
Re:=20
[Mapserver-users] world files and tile indexing<BR></FONT><BR></DIV>
<DIV></DIV><BR>
<BLOCKQUOTE =
cite=3Dmid13858AA1A74F30419F319ACB66A9D1224E4426 at mercator.topozone.com=20
type=3D"cite"><PRE wrap=3D"">It would help if you could explain what =
you're trying to do!  </PRE></BLOCKQUOTE>ok,=20
i'll try tou explain you my situation!<BR>
<BLOCKQUOTE =
cite=3Dmid13858AA1A74F30419F319ACB66A9D1224E4426 at mercator.topozone.com=20
type=3D"cite"><PRE wrap=3D"">What
format are the raster files in now, </PRE></BLOCKQUOTE>The raster files =
are in=20
jpg format.&nbsp; 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&nbsp; 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,&nbsp; i converted the jpg files in tiff =
files,=20
without the world files. I use this mapfile=20
configuration:<BR><BR>&nbsp;LAYER<BR>&nbsp;&nbsp;&nbsp; NAME=20
"pannelli"<BR>&nbsp;&nbsp;&nbsp; STATUS ON<BR>&nbsp;&nbsp;&nbsp; TYPE=20
RASTER<BR>&nbsp;&nbsp;&nbsp; TILEINDEX =
"./tile.shp"<BR>&nbsp;&nbsp;&nbsp;=20
TILEITEM "Path"<BR>&nbsp; END<BR><BR>I run maplab, but an error occurs: =
unable=20
to open tiff files:<BR><BR>
<TABLE cellSpacing=3D0 cellPadding=3D2 border=3D0>
  <TBODY>
  <TR>
    <TD colSpan=3D2><FONT face=3DArial,Helvetica,sans-serif =
color=3D#000000=20
      size=3D2>Description</FONT></TD></TR>
  <TR>
    <TD colSpan=3D2><FONT face=3DARIAL,Helvetica,sans-serif =
color=3D#ff3333=20
      size=3D2>Unable to open world file for reading. in=20
      /maplab/htdocs/common/wrapper/drawmap.php</FONT></TD></TR>
  <TR>
    <TD colSpan=3D2><FONT face=3DARIAL,Helvetica,sans-serif =
color=3D#ff3333=20
      size=3D2>Failed to draw layer named 'pannelli'. in=20
      /maplab/htdocs/common/wrapper/drawmap.php</FONT></TD></TR>
  <TR>
    <TD colSpan=3D2><FONT face=3DARIAL,Helvetica,sans-serif =
color=3D#ff3333=20
      size=3D2>Unable to open world file for reading. in=20
      /maplab/htdocs/common/wrapper/drawmap.php</FONT></TD></TR>
  <TR>
    <TD colSpan=3D2><FONT face=3DARIAL,Helvetica,sans-serif =
color=3D#ff3333=20
      size=3D2>Failed to draw layer named 'pannelli'. in=20
      =
/maplab/htdocs/common/wrapper/drawmap.php</FONT></TD></TR></TBODY></TABLE=
><BR>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.<BR>Where is =
the=20
problem?<BR><BR><BR>
<BLOCKQUOTE =
cite=3Dmid13858AA1A74F30419F319ACB66A9D1224E4426 at mercator.topozone.com=20
type=3D"cite"><PRE wrap=3D"">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
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:ed at topozone.com">ed at topozone.com</A>
(978) 251-4242 =20

-----Original Message-----
From: Antonio Cosenza [<A class=3Dmoz-txt-link-freetext =
href=3D"mailto:antonio.cosenza at polito.it">mailto:antonio.cosenza at polito.i=
t</A>]=20
Sent: Friday, April 30, 2004 5:43 AM
To: Ed McNierney; <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:mapserver-users at lists.gis.umn.edu">mapserver-users at lists.g=
is.umn.edu</A>
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:

  </PRE>
  <BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">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
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:ed at topozone.com">ed at topozone.com</A>
(978) 251-4242

-----Original Message-----
From: Antonio Cosenza [<A class=3Dmoz-txt-link-freetext =
href=3D"mailto:antonio.cosenza at polito.it">mailto:antonio.cosenza at polito.i=
t</A>]
Sent: Thursday, April 29, 2004 2:40 PM
To: <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:mapserver-users at lists.gis.umn.edu">mapserver-users at lists.g=
is.umn.edu</A>
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
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:Mapserver-users at lists.gis.umn.edu">Mapserver-users at lists.g=
is.umn.edu</A>
<A class=3Dmoz-txt-link-freetext =
href=3D"http://lists.gis.umn.edu/mailman/listinfo/mapserver-users">http:/=
/lists.gis.umn.edu/mailman/listinfo/mapserver-users</A>


=20

    </PRE></BLOCKQUOTE><PRE wrap=3D""><!---->


_______________________________________________
Mapserver-users mailing list
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:Mapserver-users at lists.gis.umn.edu">Mapserver-users at lists.g=
is.umn.edu</A>
<A class=3Dmoz-txt-link-freetext =
href=3D"http://lists.gis.umn.edu/mailman/listinfo/mapserver-users">http:/=
/lists.gis.umn.edu/mailman/listinfo/mapserver-users</A>

  </PRE></BLOCKQUOTE><BR></BODY></HTML>

------_=_NextPart_001_01C42FA3.3437712E--

--__--__--

Message: 2
Date: Sat, 01 May 2004 15:03:03 -0400
From: Frank Warmerdam <warmerdam at pobox.com>
To: "Ryan, Adam" <ARyan at co.linn.or.us>
Cc: mapserver-users at 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 at 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 <warmerdam at pobox.com>
To: "Jason M. Nielsen" <jnielsen at aero-graphics.com>
Cc: mapserver-users at 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 at 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" <ljuvrud at info-link.net>
To: <mapserver-users at lists.gis.umn.edu>
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" <eduardo at consultoria.eti.br>
Date: Sat,  1 May 2004 23:58:10 -0300
To: "Mike Juvrud" <ljuvrud at info-link.net>
CC: mapserver-users at 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" <ljuvrud at info-link.net>
escreveu:

> De: "Mike Juvrud" <ljuvrud at info-link.net>
> Data: Sat, 1 May 2004 18:23:21 -0500
> Para: <mapserver-users at lists.gis.umn.edu>
> 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 at 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" <cpurvis at asg.sc.edu>
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>,
        <mapserver-users at lists.gis.umn.edu>
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 at 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 at 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" <gsw at globexplorer.com>
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>,
        <mapserver-users at lists.gis.umn.edu>
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 at 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 at 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 at 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" <cpurvis at asg.sc.edu>
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>,
        <mapserver-users at lists.gis.umn.edu>
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 at globexplorer.com]
	Sent: Sat 5/1/2004 11:11 PM
	To: PostGIS Users Discussion; mapserver-users at 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 at 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 at 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 at postgis.refractions.net
	http://postgis.refractions.net/mailman/listinfo/postgis-users





	_______________________________________________
	postgis-users mailing list
	postgis-users at 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 <pramsey at refractions.net>
Subject: Re: [Mapserver-users] RE: [postgis-users] RE: gone are my query
results
To: Charlton Purvis <cpurvis at asg.sc.edu>
Cc: PostGIS Users Discussion <postgis-users at postgis.refractions.net>,
        mapserver-users at 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 at globexplorer.com]
> 	Sent: Sat 5/1/2004 11:11 PM
> 	To: PostGIS Users Discussion; mapserver-users at 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 at 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 at 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 at postgis.refractions.net
> 	http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
>
>
> 	_______________________________________________
> 	postgis-users mailing list
> 	postgis-users at postgis.refractions.net
> 	http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
      Paul Ramsey
      Refractions Research
      Email: pramsey at refractions.net
      Phone: (250) 885-0632



--__--__--

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


End of Mapserver-users Digest





More information about the mapserver-users mailing list