From adams@terrestris.de Sat Dec 20 15:25:30 2003 From: adams@terrestris.de (Till Adams) Date: Sat, 20 Dec 2003 16:25:30 +0100 Subject: [Mapserver-users] query - JavaScript question Message-ID: <3FE469EA.9010207@terrestris.de> Dear list, running MS 3.6 with apache and a Dhtml/JavaScript enhanced application, no JavaApplet. In my app' when using "query" a new browserwindow pops up, based on a simple "if mode==query ... target="_blank". Fine. When I close the query-window, my map-window remains in a kind of "receiving position", which could be seen by an animated gif, which appears always, when the client is receiving a new map. When I now click on "reload", MS opens a new map in a new window, leaving the old one in the same condition. Bad. When I zoom in or out in the main map window, the new cutout appears in the same window as normal and the gif disappears. OK. I think the problem is, when passing the query by target="_blank", the main map window still waits for new parameters, because it knows something changed, but it doesn't receive anything. Is there a way to let MS "forget", that "_blank" is the actual target or to perform an action to the main map-window while closing the query-window? Thanks for your help and for all the support I received from you this year! Hopefully I can give back more next year. Have nice days with your family and your friends!! Cheers, Till ----- Dipl. Geogr. Till Adams terrestris, Paulsen&Adams GbR Meckenheimer Allee 166 * 53115 Bonn Tel.: 0228 73 9647 * Fax.: 0228 73 6538 info@terrestris.de * www.terrestris.de From adams@terrestris.de Fri Dec 19 11:15:06 2003 From: adams@terrestris.de (Till Adams) Date: Fri, 19 Dec 2003 12:15:06 +0100 Subject: [Mapserver-users] mapserver installation using IIS References: <000101c2a74a$9a9a30d0$1a01a8c0@ivvaachen.de> Message-ID: <3FE2DDBA.6080103@terrestris.de> Dear Nicole, the installation-directory is correct, try Mapserver installation by http:///scripts/mapserv.exe Mapserver should reply: "No query information to decode. QUERY_STRING is set, but empty" You'll need to write the *.exe extension on a win platform. Cheers, Till Nicole Bömeke schrieb: > Hi list, > > my root is d:/inetpub/wwwroot and I copied mapserver.exe to > d:/inetpub/scripts > as I have no cgi-bin directory in my IIS installation. Is that o.k.? > > Whow can I test if mapserver is installed correct? Should > http://server.name/servers/mapserv work > or is the link http://server.name/cgi-bin/mapserv as it is for the apache > server installation? > > Nicole > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > > -- ----- Dipl. Geogr. Till Adams terrestris, Paulsen&Adams GbR Meckenheimer Allee 166 * 53115 Bonn Tel.: 0228 73 9647 * Fax.: 0228 73 6538 info@terrestris.de * www.terrestris.de From green@fboweb.com Mon Dec 1 04:00:16 2003 From: green@fboweb.com (Andy Green) Date: Sun, 30 Nov 2003 23:00:16 -0500 Subject: [Mapserver-users] GeoTIFF's and some FAA Data Message-ID: <008a01c3b7bf$a19774c0$6501a8c0@aviation4> This is a multi-part message in MIME format. ------=_NextPart_000_008B_01C3B795.B8C16CC0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi folks. I just set up the server for the first time, and got it all running using the demo, so it seems to work great. I'm trying to use the server as a WMS server, and I'm having a bit of trouble. Specifically, I'm trying to use a particular GeoTIFF, available at the following link: http://www.naco.faa.gov/index.asp?xml=naco/catalog/charts/digital/Raster _Sectional_Sample/Raster#3 It includes a .tif file and a .tfw file (which I've renamed sample.wld, cuz that's what the docs say to do). When I try to pull the map from the mapserver when specifying a particular bounding box [that should return a valid map], I always get a blank image. however when I pull the map from the WMS server and OMIT a bounding box parameter, I get a big seemingly blank image with a thumbnail-sized view of the GeoTIFF way down at the bottom image. My guess is that somehow my projections are messed up, or perhaps the server is not seeing the .wld file. If anyone could provide some pointers, I'd greatly appreciate it.! Andy, green@fboweb.com PS: Here's my .MAP file. # # Start of map file # NAME DEMO STATUS ON SIZE 600 600 #EXTENT 435376.6668 167787.8676 455661.5904 176788.656 # original extent #EXTENT 388107.634400379 5203120.88405952 500896.339019834 5310243.30613897 # modified extent from andy EXTENT 455661.5904 167787.8676 435376.6670 5310243.30613897 # entire extent #EXTENT 0.0 0.0 684000.0 684000.0 #EXTENT 0.0 9999999.9 0.0 9999999.0 #EXTENT -408683.0 512426.0 -408683.0 512426.0 UNITS METERS SHAPEPATH "data" IMAGECOLOR 255 255 255 # you may need to change this to match your MapServer build #IMAGETYPE PNG # # Projection definition, consult the PROJ.4 documentation for parameter discussion # #PROJECTION # "proj=utm" # "ellps=GRS80" # "zone=15" # "north" # "no_defs" # # OR: # # "init=epsg:26915" #END PROJECTION "proj=lcc" "ellps=GRS80" "lat_1=41.333333" "lat_2=46.666667" "lat_0=44.5" "lon_0=-121.0" "x_0=0.0" "y_0=0.0" END # # Start of web interface definition (including WMS enabling metadata) # WEB HEADER demo_header.html TEMPLATE demo.html FOOTER demo_footer.html MINSCALE 1000 MAXSCALE 3550000 IMAGEPATH "set in demo_init.html" IMAGEURL "set in demo_init.html" METADATA "wms_title" "Seattle Sectional Demo" WMS_ABSTRACT "This is just me playing around with the Sectional .TIFFS to see if I can get them working." WMS_ACCESSCONSTRAINTS none # change this value to match your setup "wms_onlineresource" "http://localhost/ms/map.asp?&" #WMS_ONLINERESOURECE "http://localhost/ms/dm/itasca/demo_init.html" #WMS_SRS "EPSG:26915" "wms_srs" "EPSG:4326" END END QUERYMAP SIZE 200 200 STATUS ON STYLE HILITE COLOR 255 0 0 END # # Start of reference map # REFERENCE IMAGE graphics/reference.gif # EXTENT 435376.6668 167787.8676 455661.5904 176788.656 #EXTENT 435376.6668 167787.8676 455661.5904 176788.656 # entire extent #EXTENT 0.0 0.0 684000.0 684000.0 # modified extent from andy #EXTENT 455661.5904 167787.8676 435376.6670 5310243.30613897 # original extent #EXTENT 393234.393701263 5205405.16440722 495769.579718949 5307959.02579127 #EXTENT 0.0 9999999.9 0.0 9999999.0 #EXTENT -408683.0 512426.0 -408683.0 512426.0 SIZE 120 120 STATUS ON COLOR -1 -1 -1 OUTLINECOLOR 255 0 0 END # # Start of legend # LEGEND KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END STATUS ON END # # Start of scalebar # SCALEBAR IMAGECOLOR 255 255 255 LABEL COLOR 255 255 255 SIZE tiny END STYLE 1 SIZE 80 2 COLOR 255 255 255 UNITS MILES INTERVALS 1 TRANSPARENT TRUE STATUS TRUE END # # Start of layer definitions # LAYER NAME sectional DATA sample.tif TYPE RASTER STATUS ON METADATA WMS_TITLE "sectional" WMS_SRS "EPSG:4326" END END END # Map File ------=_NextPart_000_008B_01C3B795.B8C16CC0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi folks.

 

I just set up the server for the first time, and got = it all running using the demo, so it seems to work = great.

 

I’m trying to use the server as a WMS server, = and I’m having a bit of trouble.

 

Specifically, I’m trying to use a particular = GeoTIFF, available at the following = link:

http://www.naco.faa.gov/index.asp?xm= l=3Dnaco/catalog/charts/digital/Raster_Sectional_Sample/Raster#3=

 

It includes a .tif file = and a .tfw file (which I’ve renamed sample.wld, cuz that’s what the docs say to = do).

 

When I try to pull the map from the mapserver when specifying a particular bounding box [that should return a valid = map], I always get a blank image… however when I pull the map from the WMS = server and OMIT a bounding box parameter, I get a big seemingly blank image = with a thumbnail-sized view of the GeoTIFF way down at the bottom = image.

 

My guess is that somehow my projections are messed = up, or perhaps the server is not seeing the .wld = file…

 

If anyone could provide some pointers, I’d = greatly appreciate it…!

 

Andy, green@fboweb.com

 

PS: Here’s my .MAP = file…

 

#

# Start of map file

#

NAME DEMO

STATUS ON

SIZE 600 600

 

#EXTENT 435376.6668 167787.8676 455661.5904 = 176788.656

# original = extent

#EXTENT 388107.634400379 5203120.88405952 = 500896.339019834 5310243.30613897

# modified extent from andy

EXTENT 455661.5904 167787.8676 435376.6670 = 5310243.30613897

# entire = extent

#EXTENT 0.0 0.0 684000.0 = 684000.0

#EXTENT 0.0 9999999.9 0.0 = 9999999.0

#EXTENT -408683.0 512426.0 -408683.0 512426.0 =

UNITS METERS

SHAPEPATH = "data"

IMAGECOLOR 255 255 255

 

# you may need to change = this to match your MapServer = build

#IMAGETYPE PNG

 

#

# Projection definition, consult the PROJ.4 = documentation for parameter discussion

#

#PROJECTION

#  = "proj=3Dutm"

#  = "ellps=3DGRS80"

#  = "zone=3D15"

#  = "north"

#  = "no_defs"

#

#  OR: =

#

#  = "init=3Depsg:26915"=

#END

 

PROJECTION

        = ;    "proj=3Dlcc"

        = ;    "ellps=3DGRS80"

        = ;    = "lat_1=3D41.333333"

        = ;    = "lat_2=3D46.666667"

        = ;    = "lat_0=3D44.5"

        = ;    = "lon_0=3D-121.0"

        = ;    = "x_0=3D0.0"

        = ;    = "y_0=3D0.0"

END

 

 

#

# Start of web interface definition (including WMS = enabling metadata)

#

WEB

  HEADER demo_header.html

  = TEMPLATE demo.html

  FOOTER demo_footer.html

  = MINSCALE 1000

  = MAXSCALE 3550000

  = IMAGEPATH "set in demo_init.html"

  = IMAGEURL "set in demo_init.html"

  = METADATA

    "wms_title" "Seattle = Sectional Demo"

    WMS_ABSTRACT "This is just me playing around with the = Sectional .TIFFS to see if I can get them = working.”

    WMS_ACCESSCONSTRAINTS none

 

    = # change this value to match your setup

    "wms_onlineresource" "http://localhost/ms/map.asp?&"

    #WMS_ONLINERESOURECE "http://localhost/ms/dm/itasca/demo_init.html"

 

    #WMS_SRS "EPSG:26915"

    "wms_srs" "EPSG:4326"

  = END

END

 

QUERYMAP

  SIZE = 200 200

  STATUS = ON

  STYLE = HILITE

  COLOR = 255 0 0

END

 

#

# Start of reference map

#

REFERENCE

  IMAGE = graphics/reference.gif

#  = EXTENT = 435376.6668 167787.8676 455661.5904 176788.656

#EXTENT 435376.6668 167787.8676 455661.5904 = 176788.656

# entire = extent

#EXTENT 0.0 0.0 684000.0 = 684000.0

# modified extent from andy

#EXTENT 455661.5904 167787.8676 435376.6670 = 5310243.30613897

# original = extent

#EXTENT 393234.393701263 5205405.16440722 = 495769.579718949 5307959.02579127

#EXTENT 0.0 9999999.9 0.0 = 9999999.0

#EXTENT -408683.0 512426.0 -408683.0 512426.0 =

  SIZE = 120 120

  STATUS = ON

  COLOR = -1 -1 -1

  = OUTLINECOLOR 255 0 0

END

 

#

# Start of legend

#

LEGEND

  = KEYSIZE 18 12

  = LABEL

    TYPE BITMAP

    SIZE MEDIUM

    COLOR 0 0 = 89

  = END

  STATUS = ON

END

 

#

# Start of scalebar

#

SCALEBAR

  = IMAGECOLOR 255 255 255

  = LABEL

    COLOR 255 255 255

    SIZE tiny    =

  = END

  STYLE = 1

  SIZE = 80 2

  COLOR = 255 255 255

  UNITS = MILES

  = INTERVALS 1

  = TRANSPARENT TRUE

  STATUS = TRUE

END

 

#

# Start of layer = definitions

#

 

LAYER

  NAME = sectional

  DATA = sample.tif

  TYPE = RASTER

  STATUS = ON

  = METADATA

    WMS_TITLE "sectional"

    WMS_SRS "EPSG:4326"

  = END

END

 

 

END # Map File

------=_NextPart_000_008B_01C3B795.B8C16CC0-- From Martin.Kiuru@Elion.ee Mon Dec 1 06:38:34 2003 From: Martin.Kiuru@Elion.ee (Martin Kiuru) Date: Mon, 1 Dec 2003 08:38:34 +0200 Subject: [Mapserver-users] MapLab 2.1 -rc3 installation problems. Message-ID: <1D6EE6E7F017B2479C94CAC3903E5DE18C0A66@KIRJATUVI.cc.et.ee> I'm using IE 6.0.2800.1106CO Yes, fonts referenced by mapfile are present. Also, I have already tried to change paths to absolute - unfortunately, it does not change anything... Thanks for your reply, Martin Kiuru. -----Original Message----- From: Zak James [mailto:zak-ms@hoppsan.org] Sent: Friday, November 28, 2003 6:43 PM To: Martin Kiuru Cc: mapserver-users@lists.gis.umn.edu Subject: Re: [Mapserver-users] MapLab 2.1 -rc3 installation problems. Can you provide some additional information? What web browser are you using to view the map browser? Can you check that the fonts file referenced by your map is present? Also, make sure that any fonts required by the layers in your map file are referenced in that fonts file. If all of that looks ok, you can try making the paths to the symbol and fonts files in the map absolute rather than relative (e.g. ./data would become //data). On some platforms, Mapserver 4.0 has problems with relative paths. Ideally, these problems would result in more instructive error messages. We hope to be able to address that before the final release of 2.1. -- Zak James Applications and Software Development DM Solutions Group Inc. http://www.dmsolutions.ca On Nov 28, 2003, at 8:22 AM, Martin Kiuru wrote: > Hi, > > I have a problem with Maplab installation and tutorial project. Maplab > generally works, but with the following problems : > > - Browser main window shows only a white screen - not map. Only after > some movements/zooms around the map image appears. > > - Map preview not working - appears new window with following errors : > > Warning: [MapServer Error]: msGetLabelSize(): Could not find/open font > in C:\Program Files\Apache > Group\Apache2\htdocs\maplab\htdocs\mapedit\preview.php on line 469 > Fatal > error: Call to a member function on a non-object in C:\Program > Files\Apache Group\Apache2\htdocs\maplab\htdocs\mapedit\preview.php on > line 474 > > -Following error appears in map browser > > Error Parsing tutorial.map > > Description > > Could not find/open font in /maplab/htdocs/common/wrapper/drawmap.php > > > > Please advice! Here is the configuration of my test server : > > Windows 2000 SP4 > > MapLab (2.1 -rc3) > > Mapserver 4.0 > > Apache 2.0.48 > > PHP 4.3.4 > > Martin Kiuru > > From ter-haseborg@sf-datentechnik.de Mon Dec 1 08:28:06 2003 From: ter-haseborg@sf-datentechnik.de (Frieso ter Haseborg) Date: Mon, 1 Dec 2003 09:28:06 +0100 Subject: [Mapserver-users] how to use variable substitution in mapscript-client? Message-ID: <0DF955F15A102E4F81B948D44A45015A069261@nt-sf-exchange.Windows2000> Hi, how do I use mapservers variable-substition-function with a mapscript-client? I'm using a PHP/Mapscript as wms-server which expects parameters for security-purposes, the corresponding mapfile section looks like this: [...] CONNECTIONTYPE WMS CONNECTION "http://my.ip/wms/wms.php?uid=%uid%" [...] A request like http://my.ip/cgi-bin/mapserv.exe?map=../htdocs/wms/test.map&version=1.1. 0&request=getMap&uid=test works great, so uid's value is available in the wms.php. But how do I implement this function when using another PHP/Mapscript as a wms-client? When creating a new MapObj and drawing the map, url-parameters or cookies appear not to be passed to the mapserver or rather the wms.php. Any hint would be appreciated. TIA, Frieso ter Haseborg - Software Development - -- -------------------------------------------------- S&F Datentechnik GmbH&Co.KG Reimersstr. 41b 26789 Leer, Germany From Richard.Holzmeier@epost.de Mon Dec 1 08:58:02 2003 From: Richard.Holzmeier@epost.de (Richard Holzmeier) Date: Mon, 1 Dec 2003 09:58:02 +0100 Subject: [Mapserver-users] SDE error: Layer not found Message-ID: <3FCAF695000000B3@PPD27104.x.de> I met a problem trying to access a SDE layer (ArcSDE 8.3) with MapServer 4.0.1. The same layer is accessible via ArcExplorer. Could it be a problem with the empty (but to my knowledge optional) database name? See details below. Any ideas? Thanks in advance, Richard the sde-related part of the mapfile: CONNECTIONTYPE sde CONNECTION "telco,port:5152, ,usr,pwd" DATA "ESSEN_BPLAN.MESSPUNKT1,POINT" the sde-structure via ArcExplorer Catalog: ArcSDE telco:5152:essen_bplan the problem layer via ArcExplorer Catalog: ESSEN_BPLAN.MESSPUNKT point the error message from MapServer: msDrawMap(): Image handling error. Failed to draw layer named 'essen'. msSDELayerOpen(): SDE error. SE_layer_get_info(): Layer not found. (-20) ________________________________________ http://www.epost.de - das Kommunikationsportal der Deutschen Post From stephane.riff@cerene.fr Mon Dec 1 09:34:17 2003 From: stephane.riff@cerene.fr (=?ISO-8859-1?Q?St=E9phane_RIFF?=) Date: Mon, 01 Dec 2003 10:34:17 +0100 Subject: [Mapserver-users] scalebar Message-ID: <3FCB0B19.400@cerene.fr> Is it possible to have a vertical scalebar ??? Steff From stephane.riff@cerene.fr Mon Dec 1 09:42:25 2003 From: stephane.riff@cerene.fr (=?ISO-8859-1?Q?St=E9phane_RIFF?=) Date: Mon, 01 Dec 2003 10:42:25 +0100 Subject: [Mapserver-users] Zoom previous In-Reply-To: <4ACBA1414DD9EE418CC250E4AAA9035A192C9C@STL-EXBE-I03.corp.erac.com> References: <4ACBA1414DD9EE418CC250E4AAA9035A192C9C@STL-EXBE-I03.corp.erac.com> Message-ID: <3FCB0D01.7070106@cerene.fr> I tried store prvious extent in sessions but i nerver get the same previous view... the extent is recaculate by mapserver when i do the drawmap function. When i have to store the previous extent ??? Martin, Daniel A wrote: >Of course, you are assuming Stéphane is using a scripting language, and not the standard CGI MapServer. > >Using the history has definite problems. Perhaps the new page loaded a new layer or other dynamic change to the content. Another problem with using history is that changes to a form stay with the history. If you use an HTML legend that displays checkboxes for indicating which layers or on and for turning on and off layers (as many apps do) loading history after turning on some layers displays an incorrect legend. > >You could try to work around these issues, but I think you could accomplish this through better means. You could pass previous extents in your form. Something like this (code is untested): > >
>... > onclick="document.myMapForm.imgext='[lastextent]';document.myMapForm.submit()"> > > onclick="document.myMapForm.lastextent='[imgext]';document.myMapForm.submit()"> >
> >The first button sets the new extent to the previous extent, whereas the second button submits as normal, but saves the current extent as the last extent for the next map. > >-Dan > > > > >>-----Original Message----- >>From: mapserver-users-admin@lists.gis.umn.edu >>[mailto:mapserver-users-admin@lists.gis.umn.edu] On Behalf Of >>Lawrence, Kevin >>Sent: Wednesday, November 26, 2003 9:04 AM >>To: stephane.riff@cerene.fr; >>mapserver-users@lists.gis.umn.edu; 'Chip Hankley' >>Subject: RE: [Mapserver-users] Zoom previous >> >> >>if you are using sessions store the previous coordinates in a >>session variable and when previous is requested simply re-use >>those extents. >> >> >> >>>---------- >>>From: Chip Hankley[SMTP:Chip.Hankley@rmtinc.com] >>>Sent: Wednesday, November 26, 2003 9:39 AM >>>To: stephane.riff@cerene.fr; >>> >>> >>mapserver-users@lists.gis.umn.edu >> >> >>>Subject: Re: [Mapserver-users] Zoom previous >>> >>> >>> >>>>Does anyone already did a zoom previous function... >>>> >>>> >>>A low-tech way to do this that works a LOT of times is to >>> >>> >>simply use >> >> >>>the 'back' function inherent in the web-browser. You can >>> >>> >>simply apply >> >> >>>the javascript 'history.back()' to a button, and call it "zoom to >>>previous extent" or something. This is the equivalent of >>> >>> >>hitting the >> >> >>>'back' button. >>> >>>Chip Hankley >>> >>>Outgoing messages, along with any attachments, are scanned >>> >>> >>for viruses >> >> >>>at RMT prior to sending. >>> >>> >>> >>---------------------------------------------------------------------- >> >> >>>---- >>>---- >>>NOTICE--This email may contain confidential and privileged >>> >>> >>information >> >> >>>for the sole use of the intended recipient. Any review or >>> >>> >>distribution >> >> >>>by others is strictly prohibited. If you are not the >>> >>> >>intended recipient, >> >> >>>please contact the sender immediately and delete all copies. >>>_______________________________________________ >>>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/maps> erver-users >> >> >> > > > > From skoehler@buschjena.de Mon Dec 1 11:36:28 2003 From: skoehler@buschjena.de (Steffen Koehler) Date: Mon, 01 Dec 2003 12:36:28 +0100 Subject: [Mapserver-users] query a point theme Message-ID: <6.0.0.22.1.20031201123306.022e3558@172.16.1.1> Hello, how can I query an point layer. I have defined an template like an polygon layer. But mapserver found no mathing result record. In mapscript I can define an radius for the query point. Can I do this in normal map-file also? Thanks for answer Steffen From cgowens@softhome.net Mon Dec 1 14:25:30 2003 From: cgowens@softhome.net (cgowens@softhome.net) Date: Mon, 01 Dec 2003 07:25:30 -0700 Subject: [Mapserver-users] Re: querybyattributes with Postgres/Postgis Layer In-Reply-To: <20031129180004.17374.43272.Mailman@lists.gis.umn.edu> References: <20031129180004.17374.43272.Mailman@lists.gis.umn.edu> Message-ID: Try using the TEMPLATE option under CLASS for the LAYER. Set the the url to your query.php file that runs the SQL statement. Colin mapserver-users-request@lists.gis.umn.edu writes: > 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. Problems with tab files in MapLab (Stephen Wallace) > 2. Re: [ms4w-users] Problems with tab files in MapLab (Daniel Morissette) > 3. MapServer passes 82/83 tests of the OGC WMS testsuite (Daniel Morissette) > 4. Re: MapServer passes 82/83 tests of the OGC WMS testsuite (Daniel Morissette) > 5. Re: Re: MapServer passes 82/83 tests of the OGC > WMS testsuite (Doug Cates) > 6. RE: MapServer passes 82/83 tests of the OGC WMS > testsuite (Kralidis,Tom [Burlington]) > 7. Re: Re: MapServer passes 82/83 tests of the OGC > WMS testsuite (Gerry Creager N5JXS) > 8. Re: MapServer passes 82/83 tests of the OGC WMS testsuite (Bart van den Eijnden) > 9. Re: querybyattributes with Postgres/Postgis Layer (Damian Schroder) > 10. Segmentation Fault -- reference image -- PHP (Ed Martin) > > --__--__-- > > Message: 9 > Date: Sat, 29 Nov 2003 08:41:48 -0800 (PST) > From: Damian Schroder > Subject: Re: [Mapserver-users] querybyattributes with Postgres/Postgis Layer > To: mapserver-users@lists.gis.umn.edu > > --0-1435250590-1070124108=:89418 > Content-Type: text/plain; charset=us-ascii > > try using a filter instead of querybyattributes. > > Nicol Hermann wrote:Dear List, > > i trying to do a querybyattributes Query with a Postgres/Postgis layer > and get the following error: > > Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE > (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT > plzort01::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from plz_gebiete WHERE (Mutterstadt) and (the_geom && setSRID( 'BOX3D(5.865627 46.57242768,15.039879 55.75900832)'::BOX3D,find_srid('','plz_gebiete','the_geom') ))' > > here is the relevant part of my code: > > $layer = $Map ->getLayerbyname("Regionen"); > $layer -> set("status", MS_ON ); > $status = $layer->querybyattributes("plzort01", "Mutterstadt", > MS_MULTIPLE); > > It seems that the 'qitem' (plzort01) won't be evaluated because it is > not present in the SQL statement. > I also tried the qitem with upper case. The same error appears. > > The debugging message on my shell says: > ERROR: Attribute "mutterstadt" not found > > My Postgis Version is: Mappostgis.c - version of June 12/2003. > and i`am using Mapserver 4.0.1 on a Linux box. > > Does anybody know how I can solve this problem? > Many thanks > Nicol > > > -- > Nicol Hermann > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > > > --------------------------------- > Do you Yahoo!? > Free Pop-Up Blocker - Get it now > --0-1435250590-1070124108=:89418 > Content-Type: text/html; charset=us-ascii > >
try using a filter instead of querybyattributes.

Nicol Hermann <mapserver@geochem.de> wrote: >
Dear List,

i trying to do a querybyattributes Query with a Postgres/Postgis layer
and get the following error:

Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE
(the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
plzort01::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from plz_gebiete WHERE (Mutterstadt) and (the_geom && setSRID( 'BOX3D(5.865627 46.57242768,15.039879 55.75900832)'::BOX3D,find_srid('','plz_gebiete','the_geom') ))'

here is the relevant part of my code:

$layer = $Map ->getLayerbyname("Regionen");
$layer -> set("status", MS_ON );
$status = $layer->querybyattributes("plzort01", "Mutterstadt",
MS_MULTIPLE);

It seems that the 'qitem' (plzort01) won't be evaluated because it is
not present in the SQL statement.
I also tried the q! > item with > upper case. The same error appears.

The debugging message on my shell says:
ERROR: Attribute "mutterstadt" not found

My Postgis Version is: Mappostgis.c - version of June 12/2003.
and i`am using Mapserver 4.0.1 on a Linux box.

Does anybody know how I can solve this problem?
Many thanks
Nicol


--
Nicol Hermann

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


> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now > --0-1435250590-1070124108=:89418-- > > --__--__-- > > Message: 10 > Date: Sat, 29 Nov 2003 11:59:53 -0500 > From: Ed Martin > To: mapserver-users@lists.gis.umn.edu > Subject: [Mapserver-users] Segmentation Fault -- reference image -- PHP > > i am using the map file and map stuff from the cvs mapserver (did not > compile from cvs, i used the stable version 4.0.1) and when i try to > get the reference image using a very simple script i get the jpeg > header an then a segmentation fault when run in the command line and a > blank page when in a browser, turning off the jpeg header still gives > me a blank page > > here is the php file i am using > > require_once('../inc/conf.inc.php');//get config > //load mapscript > dl("php_mapscript.so"); > header("Content-type: image/jpeg"); > // start map > $map=ms_newMapObj("tests/test.map"); > $img=$map->drawReferenceMap(); > $img->saveImage(''); > ?> > > and here is the reference part of the map file > > #refence map > REFERENCE > IMAGE ./reference.jpeg > EXTENT -0.5 50.977222 0.5 51.977222 > SIZE 120 120 > STATUS ON > COLOR 255 255 0 > OUTLINECOLOR 255 100 0 > STATUS ON > MARKER "line" > MARKERSIZE 5 > MINBOXSIZE 50 > MINBOXSIZE 100 > END > > i have output set to jpeg and changing the reference image to jpg or > png doesn't help and i tried gif and that gave an error saying that it > couldn't load it (probably because gifs aren't supported by gd, but > this page ( > http://mapserver.gis.umn.edu/doc40/mapfile-reference.html#referencemap > ) says it has to be a gif) > > could it be the way i made the reference image, i just took the main > image, cropped out the boarder, shrunk it to 120x120 and saved it in > various formats > > i see nothing in my apache logs, but i know it is logging to them > because a parse error will show up, i have error reporting set to the > highest (E_ALL), i'm using mapserver 4.0.1, php 4.3.4 as CGI, apache > 2.0.48, slackware linux 9.0 > > so does anyone have any clue as to what is causing this, my map file, > do i have to put more stuff in the php file, is it the way i made the > image, or is it a bug > > > > --__--__-- > > _______________________________________________ > 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 mcilhagga@dmsolutions.ca Mon Dec 1 15:35:09 2003 From: mcilhagga@dmsolutions.ca (Dave McIlhagga) Date: Mon, 01 Dec 2003 10:35:09 -0500 Subject: [Mapserver-users] Support for WMS time parameter In-Reply-To: <2576812186CDD411BF1500508B6DCE950583D2A8@ECNWRI1.ontario.int.ec.gc.ca> References: <2576812186CDD411BF1500508B6DCE950583D2A8@ECNWRI1.ontario.int.ec.gc.ca> Message-ID: <3FCB5FAD.70107@dmsolutions.ca> Hi Tom, There is no "true" support for time in MapServer 4.0. However, we're currently involved in some discussions to see if we can get this completed for the next release of MapServer 4.2 in January. If you would be interested in getting involved in this discussion to ensure our approach will meet the needs of the Climate Group, please contact me directly. Dave Kralidis,Tom [Burlington] wrote: > Hi, > > As per OGC WMS 1.1.1 and later, the specification allows a client to request > maps with an additional/optional "TIME" parameter. The format of the value > is as per ISO8601. > > Having said this, is there support for this in MapServer? > > Applicability > > Vector: we have climate databases with daily records dating back to 1840 > > Raster: consider a repository of satellite images with idential spatial > properties but acquired at different dates. > > Any word on this? > > Thanks > > ..Tom > > ============================================ > Tom Kralidis > Systems Scientist > Integrated Environmental Applications Branch > Knowledge Integration Directorate > Environment Canada > 867 Lakeshore Road > Burlington, ON > L7R 4A6 > Canada > Tel: +01-905-336-4409 > http://www.cise-scie.ca/ > > ============================================ > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > -- Dave McIlhagga President, DM Solutions Group http://www.dmsolutions.ca EMail : mcilhagga@dmsolutions.ca Phone : 613-565-5056 x15 Fax : 613-565-0925 From robert-fritz@web.de Mon Dec 1 15:49:15 2003 From: robert-fritz@web.de (robert fritz) Date: Mon, 1 Dec 2003 16:49:15 +0100 Subject: [Mapserver-users] XP / TrueType Fonts Message-ID: <200312011549.hB1FnFQ08857@mailgate5.cinetic.de> Hello, i moved a mapserver project from a W2K to a WinXP Pro. Now I get the error message "msGetLabelSize(): TrueType Font Error Couldnot find/open font". I adapted the font-path (C:\windows\fonts\), i copied the font in an new directory, i took the font from the W2K PC - but every time I get the error message. What is going wrong? The path is correct. What is the difference between W2K - XP Pro? I use mapserv 4. Thank you, Robert my font.txt: arial C:\windows\Fonts\arial.ttf my map-file: ... Fontset "D:\mapserver\sub\l2\mapserver\font.txt" ... label type truetype font "arial" size 12 outlinecolor 0 0 0 position uc force true angle auto color 255 255 0 ______________________________________________________________________________ Horoskop, Comics, VIPs, Wetter, Sport und Lotto im WEB.DE Screensaver1.2 Kostenlos downloaden: http://screensaver.web.de/?mc=021110 From kapatter@srpnet.com Mon Dec 1 18:23:03 2003 From: kapatter@srpnet.com (PATTERSON KENNETH ALLEN) Date: Mon, 1 Dec 2003 11:23:03 -0700 Subject: [Mapserver-users] Problems with queryByRect() in Perl with 3.6.4 Message-ID: <25D4A9F614A1964BA08A67C4FB9D3DF31E0188@srpexc2.srp.gov> I am trying to query the mapfile to get all point shapes within a rectangle. I have a very simple shape file with three layers. One layer contains point data (gauge). After the call to $gLayer ->queryByRect( $ms, $rectang ) that returns 1, I call $gLayer ->getResult(0). GetResult(0) returns nothing and $gLayer ->{resultcach} is also empty. What is going on? I've checked through the archive and find some discussions like this but none have given me any insight. I am able to draw and see all the data just fine. This is the code (more or less): my $gLayer = $msMap->getLayerByName( "gauge" ); if (!$gLayer) { print "\tError: unable to find layer we want\n"; return( 0 ); } my $rectang = new mapscript::rectObj(); # Just load up the full extent. $rectang->{minx} = $msMap->{extent}->{minx}; $rectang->{maxx} = $msMap->{extent}->{maxx}; $rectang->{miny} = $msMap->{extent}->{miny}; $rectang->{maxy} = $msMap->{extent}->{maxy}; print "\tCurrent Query Rectangle (minx, maxx, miny, maxy):\n"; print "\t\t($rectang->{minx}, $rectang->{maxx}, $rectang->{miny}, $rectang->{maxy} )\n"; my $query_status = $gLayer->queryByRect( $msMap, $rectang ); print "\tQuery Status = $query_status\n"; my $result_mem = $gLayer->getResult(0); my $result_cache = $gLayer->{resultcache}; print "\t\tGauge layer query results: $query_status, $result_mem, $result_cache\n"; This produces the following output: Current Query Rectangle (minx, maxx, miny, maxy): (-114.8, -109.06, 31.2808666666667, 37.0231333333333 ) Query Status = 1 Gauge layer query results: 1, , -------------------------------------------------------- My mapfile is: # # Start of map file # NAME HyTest STATUS ON SIZE 600 600 # SRP Extent EXTENT -114.8 31.3 -109.06 37.004 # UNITS dd SHAPEPATH "/var/www/html/hymap/data" IMAGECOLOR 0 0 0 # Black colored background TRANSPARENT on FONTSET "/var/www/cgi-bin/prod/fontset.txt" IMAGETYPE PNG (Blah, blah, blah) # # Start of layer definitions # LAYER NAME "All Roads" TYPE LINE GROUP Geographical STATUS on DATA .../roads3.shp" CLASS NAME 'All Roads' #COLOR 100 100 100 # Colors for Gray Background COLOR 150 150 150 # Colors for Black/White Background TEXT ([HWYNAME]) LABEL TYPE TRUETYPE FONT universB ANTIALIAS TRUE ANGLE AUTO POSITION AUTO MINSIZE 6 MAXSIZE 6 MINFEATURESIZE 200 MINDISTANCE 300 #COLOR 100 100 100 # Colors for Gray Background COLOR 150 150 150 # Colors for Black/White Background OFFSET 0 2 END # Label END END # All roads LAYER NAME "gauge" GROUP "Point Source Data" TYPE POINT STATUS ON DATA "...gauge.shp" CLASS NAME 'gauge' STATUS ON COLOR 0 200 0 SYMBOL 'circle' MINSCALE 800000 SIZE 4 END # Class CLASS NAME 'gauge' STATUS ON COLOR 0 200 0 SYMBOL 'circle' MINSCALE 100 MAXSCALE 800000 SIZE 8 TEXT ([DB_NM]|[STATN_ID]) LABEL BACKGROUNDCOLOR 80 80 80 TYPE TRUETYPE FONT helmetBI MINSIZE 7 MAXSIZE 12 PARTIALS FALSE BUFFER 2 MINFEATURESIZE 40 MINDISTANCE 50 OFFSET 0 4 POSITION LC WRAP "|" COLOR 250 250 0 END #LABEL END # Class end # mapfile From remi.baud@eivd.ch Mon Dec 1 18:34:16 2003 From: remi.baud@eivd.ch (BAUD remi) Date: Mon, 1 Dec 2003 19:34:16 +0100 Subject: [Mapserver-users] querybyattributes problems Message-ID: Hi the list. I've done a function that uses querybyattribute. The goal is to enter a number of parcel and then to zoom in to it. I've seen many samples in the list, but i got a little problem: When I use for the first time this function with a number, all work very good. When I use it a second time with another number, querybyattribut warns that he founds no objects. Thats false, I'm sure that they exist. If I search the parcel 200 for example, mapserver zooms to it. After doing some pan or unzoom .. etc, I retry my function with the same parcel (200), no problem. I got only problems with other numbers. Do someone knows something about this problem? cheers Remi From nicolas.fortin@ec.gc.ca Mon Dec 1 19:04:39 2003 From: nicolas.fortin@ec.gc.ca (nicolas.fortin@ec.gc.ca) Date: Mon, 1 Dec 2003 14:04:39 -0500 Subject: [Mapserver-users] Problem out of my control... Message-ID: This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C3B83D.F80F6460 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, =20 I got Mapserver to works perfectly on my workstation (intranet) and I = want to make it works on our internet server. I'm not admin on this server = and I have almost no right on it. The IT guy install it with my instruction = (the same I use on my workstation) and mapserver dosen't work at all. All = the permissions are ok (execute on IIS and read/read-execute on windows for mapserv.exe) but if I point to http://ourserver/cgi-bin/mapserv.exe I got a Page not found!! The = link is right cause I put a junk page there and I can see it. =20 We are on Windows 2000 server with IIS =20 Any suggestions? Nicolas Fortin=20 Math=E9maticien, Programmeur, Analyste de donn=E9es=20 SMC-Qu=E9bec Hydrologie, Environnement Canada=20 1141, Rte de l'=C9glise, Sainte-Foy(QC) G1V 4H5=20 (418)648-2516=20 nicolas.fortin@ec.gc.ca >=20 =20 ------_=_NextPart_001_01C3B83D.F80F6460 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message
Hi,
 
I got = Mapserver to=20 works perfectly on my workstation (intranet) and I want to make it = works on=20 our internet server.  I'm not admin on this server and I have = almost no=20 right on it.  The IT guy install it with my instruction (the same = I use on=20 my workstation) and mapserver dosen't work at all. All the = permissions are=20 ok (execute on IIS and read/read-execute on windows for mapserv.exe) = but if I=20 point to http://ourserver/cgi-bin/m= apserv.exe=20 I got a Page not found!!  The link is right cause I put a junk = page there=20 and I can see it.
 
We = are on Windows=20 2000 server with IIS
 
Any=20 suggestions?

Nicolas=20 Fortin
Math=E9maticien,=20 Programmeur, Analyste de donn=E9es
SMC-Qu=E9bec Hydrologie, Environnement Canada =
1141, Rte de l'=C9glise, Sainte-Foy(QC) G1V = 4H5
=20
(418)648-2516 =
nicolas.fortin@ec.gc.ca <mailto:nicolas.fortin@ec.gc.ca>=20

 
------_=_NextPart_001_01C3B83D.F80F6460-- From mapserver@geochem.de Mon Dec 1 19:44:18 2003 From: mapserver@geochem.de (Nicol Hermann) Date: 01 Dec 2003 20:44:18 +0100 Subject: [Mapserver-users] Re: querybyattributes with Postgres/Postgis Layer In-Reply-To: References: <20031129180004.17374.43272.Mailman@lists.gis.umn.edu> Message-ID: <1070307857.979.0.camel@katrin> Hi Colin, thank you very much for your answer. I'am not sure if i understood your tip correct. I modified my code to: $layer = $Map ->getLayerbyname("Regionen"); $layer -> set("status", MS_ON ); $cobj = $layer -> getclass(0); $cobj -> set ("template", "postgis_query_attribut.php"); $status = $layer->querybyattributes("plzort01", "Mutterstadt", MS_MULTIPLE); The url/filename of my template is the name of the script itself. Is this right? When i execute my script with the 'getclass(0)' request the Message: "Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE ..." disappeared and i get back a blank page. If i comment out the line with this request the message appears again. I both cases i futher on get the Message: ERROR: Attribute "mutterstadt" not found on my shell whenever i reload my script. According to the documentation "mutterstadt" is the 'qstring' of the method an not the 'qitem' (-> int queryByAttributes(string qitem, string qstring, int mode) ) Futher hints would be greatly appreciated. Many thanks Nicol Am Mo, 2003-12-01 um 15.25 schrieb cgowens@softhome.net: > Try using the TEMPLATE option under CLASS for the LAYER. Set the the url to > your query.php file that runs the SQL statement. > > Colin > > > mapserver-users-request@lists.gis.umn.edu writes: > > > 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. Problems with tab files in MapLab (Stephen Wallace) > > 2. Re: [ms4w-users] Problems with tab files in MapLab (Daniel Morissette) > > 3. MapServer passes 82/83 tests of the OGC WMS testsuite (Daniel Morissette) > > 4. Re: MapServer passes 82/83 tests of the OGC WMS testsuite (Daniel Morissette) > > 5. Re: Re: MapServer passes 82/83 tests of the OGC > > WMS testsuite (Doug Cates) > > 6. RE: MapServer passes 82/83 tests of the OGC WMS > > testsuite (Kralidis,Tom [Burlington]) > > 7. Re: Re: MapServer passes 82/83 tests of the OGC > > WMS testsuite (Gerry Creager N5JXS) > > 8. Re: MapServer passes 82/83 tests of the OGC WMS testsuite (Bart van den Eijnden) > > 9. Re: querybyattributes with Postgres/Postgis Layer (Damian Schroder) > > 10. Segmentation Fault -- reference image -- PHP (Ed Martin) > > > > --__--__-- > > > > > Message: 9 > > Date: Sat, 29 Nov 2003 08:41:48 -0800 (PST) > > From: Damian Schroder > > Subject: Re: [Mapserver-users] querybyattributes with Postgres/Postgis Layer > > To: mapserver-users@lists.gis.umn.edu > > > > --0-1435250590-1070124108=:89418 > > Content-Type: text/plain; charset=us-ascii > > > > try using a filter instead of querybyattributes. > > > > Nicol Hermann wrote:Dear List, > > > > i trying to do a querybyattributes Query with a Postgres/Postgis layer > > and get the following error: > > > > Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE > > (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT > > plzort01::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from plz_gebiete WHERE (Mutterstadt) and (the_geom && setSRID( 'BOX3D(5.865627 46.57242768,15.039879 55.75900832)'::BOX3D,find_srid('','plz_gebiete','the_geom') ))' > > > > here is the relevant part of my code: > > > > $layer = $Map ->getLayerbyname("Regionen"); > > $layer -> set("status", MS_ON ); > > $status = $layer->querybyattributes("plzort01", "Mutterstadt", > > MS_MULTIPLE); > > > > It seems that the 'qitem' (plzort01) won't be evaluated because it is > > not present in the SQL statement. > > I also tried the qitem with upper case. The same error appears. > > > > The debugging message on my shell says: > > ERROR: Attribute "mutterstadt" not found > > > > My Postgis Version is: Mappostgis.c - version of June 12/2003. > > and i`am using Mapserver 4.0.1 on a Linux box. > > > > Does anybody know how I can solve this problem? > > Many thanks > > Nicol > > > > > > -- > > Nicol Hermann > > > > _______________________________________________ > > Mapserver-users mailing list > > Mapserver-users@lists.gis.umn.edu > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > > > > > > --------------------------------- > > Do you Yahoo!? > > Free Pop-Up Blocker - Get it now > > --0-1435250590-1070124108=:89418 > > Content-Type: text/html; charset=us-ascii > > > >
try using a filter instead of querybyattributes.

Nicol Hermann <mapserver@geochem.de> wrote: > >
Dear List,

i trying to do a querybyattributes Query with a Postgres/Postgis layer
and get the following error:

Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE
(the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
plzort01::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from plz_gebiete WHERE (Mutterstadt) and (the_geom && setSRID( 'BOX3D(5.865627 46.57242768,15.039879 55.75900832)'::BOX3D,find_srid('','plz_gebiete','the_geom') ))'

here is the relevant part of my code:

$layer = $Map ->getLayerbyname("Regionen");
$layer -> set("status", MS_ON );
$status = $layer->querybyattributes("plzort01", "Mutterstadt",
MS_MULTIPLE);

It seems that the 'qitem' (plzort01) won't be evaluated because it is
not present in the SQL statement.
I also tried the! > q! > > item with > > upper case. The same error appears.

The debugging message on my shell says:
ERROR: Attribute "mutterstadt" not found

My Postgis Version is: Mappostgis.c - version of June 12/2003.
and i`am using Mapserver 4.0.1 on a Linux box.

Does anybody know how I can solve this problem?
Many thanks
Nicol


--
Nicol Hermann

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


> > Do you Yahoo!?
> > Free Pop-Up Blocker - Get it now > > --0-1435250590-1070124108=:89418-- > > > > --__--__-- > > > > Message: 10 > > Date: Sat, 29 Nov 2003 11:59:53 -0500 > > From: Ed Martin > > To: mapserver-users@lists.gis.umn.edu > > Subject: [Mapserver-users] Segmentation Fault -- reference image -- PHP > > > > i am using the map file and map stuff from the cvs mapserver (did not > > compile from cvs, i used the stable version 4.0.1) and when i try to > > get the reference image using a very simple script i get the jpeg > > header an then a segmentation fault when run in the command line and a > > blank page when in a browser, turning off the jpeg header still gives > > me a blank page > > > > here is the php file i am using > > > > > require_once('../inc/conf.inc.php');//get config > > //load mapscript > > dl("php_mapscript.so"); > > header("Content-type: image/jpeg"); > > // start map > > $map=ms_newMapObj("tests/test.map"); > > $img=$map->drawReferenceMap(); > > $img->saveImage(''); > > ?> > > > > and here is the reference part of the map file > > > > #refence map > > REFERENCE > > IMAGE ./reference.jpeg > > EXTENT -0.5 50.977222 0.5 51.977222 > > SIZE 120 120 > > STATUS ON > > COLOR 255 255 0 > > OUTLINECOLOR 255 100 0 > > STATUS ON > > MARKER "line" > > MARKERSIZE 5 > > MINBOXSIZE 50 > > MINBOXSIZE 100 > > END > > > > i have output set to jpeg and changing the reference image to jpg or > > png doesn't help and i tried gif and that gave an error saying that it > > couldn't load it (probably because gifs aren't supported by gd, but > > this page ( > > http://mapserver.gis.umn.edu/doc40/mapfile-reference.html#referencemap > > ) says it has to be a gif) > > > > could it be the way i made the reference image, i just took the main > > image, cropped out the boarder, shrunk it to 120x120 and saved it in > > various formats > > > > i see nothing in my apache logs, but i know it is logging to them > > because a parse error will show up, i have error reporting set to the > > highest (E_ALL), i'm using mapserver 4.0.1, php 4.3.4 as CGI, apache > > 2.0.48, slackware linux 9.0 > > > > so does anyone have any clue as to what is causing this, my map file, > > do i have to put more stuff in the php file, is it the way i made the > > image, or is it a bug > > > > > > > > --__--__-- > > > > _______________________________________________ > > Mapserver-users mailing list > > Mapserver-users@lists.gis.umn.edu > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > > > > > > End of Mapserver-users Digest > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users -- Nicol Hermann From gayathri@ou.edu Mon Dec 1 19:22:20 2003 From: gayathri@ou.edu (Swaminathan, Gayathri) Date: Mon, 1 Dec 2003 13:22:20 -0600 Subject: [Mapserver-users] Problem out of my control... Message-ID: This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C3B840.71016380 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Nicolas, =20 Need some more information. Try or have your IT guy try the following. =20 1) Have him go command prompt and try doing "mapserv.exe" under your = cgi-bin folder? What response do you have? =20 2) Try doing "mapserv.exe -v" at command prompt under cgi-bin...what = do you get here? =20 =20 Are you sure all the dlls are in a findable place and registered correctly? =20 What version of mapserver is there? What are all the supporting = libraries? =20 What is the permission on the cgi-bin virtual directory under IIS?=20 =20 Did the IT person register all supporting dlls too? =20 Let me know how goes it. Thanks Gayathri =20 -----Original Message----- From: nicolas.fortin@ec.gc.ca [mailto:nicolas.fortin@ec.gc.ca]=20 Sent: Monday, December 01, 2003 1:05 PM To: mapserver-users@lists.gis.umn.edu Subject: [Mapserver-users] Problem out of my control... Hi, =20 I got Mapserver to works perfectly on my workstation (intranet) and I = want to make it works on our internet server. I'm not admin on this server = and I have almost no right on it. The IT guy install it with my instruction = (the same I use on my workstation) and mapserver dosen't work at all. All = the permissions are ok (execute on IIS and read/read-execute on windows for mapserv.exe) but if I point to http://ourserver/cgi-bin/mapserv.exe I got a Page not found!! The = link is right cause I put a junk page there and I can see it. =20 We are on Windows 2000 server with IIS =20 Any suggestions? Nicolas Fortin=20 Math=E9maticien, Programmeur, Analyste de donn=E9es=20 SMC-Qu=E9bec Hydrologie, Environnement Canada=20 1141, Rte de l'=C9glise, Sainte-Foy(QC) G1V 4H5=20 (418)648-2516=20 nicolas.fortin@ec.gc.ca >=20 =20 ------_=_NextPart_001_01C3B840.71016380 Content-Type: text/html; charset="iso-8859-1" Message
Nicolas,
 
Need some more information. Try or have your IT guy try the following.
 
1) Have him go command prompt and try doing "mapserv.exe" under your cgi-bin folder? What response do you have?
 
2) Try doing "mapserv.exe  -v"  at command prompt under cgi-bin...what do you get here?
 
 
Are you sure all the dlls are in a findable place <windows system directory> and registered correctly?
 
What version of mapserver is there? What are all the supporting libraries?
 
What is the permission on the cgi-bin virtual directory under IIS?
 
Did the IT person register all supporting dlls too?
 
Let me know how goes it.
Thanks
Gayathri
 
-----Original Message-----
From: nicolas.fortin@ec.gc.ca [mailto:nicolas.fortin@ec.gc.ca]
Sent: Monday, December 01, 2003 1:05 PM
To: mapserver-users@lists.gis.umn.edu
Subject: [Mapserver-users] Problem out of my control...

Hi,
 
I got Mapserver to works perfectly on my workstation (intranet) and I want to make it works on our internet server.  I'm not admin on this server and I have almost no right on it.  The IT guy install it with my instruction (the same I use on my workstation) and mapserver dosen't work at all. All the permissions are ok (execute on IIS and read/read-execute on windows for mapserv.exe) but if I point to http://ourserver/cgi-bin/mapserv.exe I got a Page not found!!  The link is right cause I put a junk page there and I can see it.
 
We are on Windows 2000 server with IIS
 
Any suggestions?

Nicolas Fortin
Mathématicien, Programmeur, Analyste de données
SMC-Québec Hydrologie, Environnement Canada
1141, Rte de l'Église, Sainte-Foy(QC) G1V 4H5
(418)648-2516
nicolas.fortin@ec.gc.ca <mailto:nicolas.fortin@ec.gc.ca>

 
------_=_NextPart_001_01C3B840.71016380-- From nicolas.fortin@ec.gc.ca Mon Dec 1 19:38:48 2003 From: nicolas.fortin@ec.gc.ca (nicolas.fortin@ec.gc.ca) Date: Mon, 1 Dec 2003 14:38:48 -0500 Subject: [Mapserver-users] Problem out of my control... Message-ID: This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C3B842.BDE3C880 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thx for your answer, see below: -----Message d'origine----- De : Swaminathan, Gayathri [mailto:gayathri@ou.edu]=20 Envoy=E9 : Monday, December 01, 2003 2:22 PM =C0 : 'nicolas.fortin@ec.gc.ca'; mapserver-users@lists.gis.umn.edu Objet : RE: [Mapserver-users] Problem out of my control... Nicolas, =20 Need some more information. Try or have your IT guy try the following. =20 1) Have him go command prompt and try doing "mapserv.exe" under your = cgi-bin folder? What response do you have?=20 =20 As an admin, he got the usual : This script can only be used to decode form results and=20 should be initiated as a CGI process via a httpd server. =20 But as a normal user via Terminal Service I got an application failed = to initialize.=20 =20 2) Try doing "mapserv.exe -v" at command prompt under cgi-bin...what = do you get here? =20 Same as 1), as an admin he got the usual : MapServer version 4.0 OUTPUT=3DGIF OUTPUT=3DPNG OUTPUT=3DJPEG = OUTPUT=3DWBMP OUTPUT=3DPDF OUTPUT=3DSWF SUPPORTS=3DPROJ SUPPORTS=3DFREETYPE = SUPPORTS=3DWMS_SERVER SUPPORTS=3DWMS_CLIENT SUPPORTS=3DWFS_SERVER SUPPORTS=3DWFS_CLIENT = INPUT=3DEPPL7 INPUT=3DORACLESPATIAL INPUT=3DOGR INPUT=3DGDAL INPUT=3DSHAPEFILE But as a normal user via Terminal Service I got an application failed = to initialize =20 Are you sure all the dlls are in a findable place and registered correctly?=20 =20 He add C:\Mapserver\lib to the system PATH=20 I'll ask him to verify about the correct registering. =20 What version of mapserver is there? What are all the supporting = libraries?=20 =20 Mapserver 4.0 with Oracle support. Oracle client is correctly install = and tested on the server.=20 =20 What is the permission on the cgi-bin virtual directory under IIS? =20 =20 Scripts and Executable=20 =20 Did the IT person register all supporting dlls too?=20 =20 I hope so...=20 =20 By the time i reply to you, I just received an e-mail form him...the mapserv.exe was rejected by URLScan ... DOH!! Beware all windows users ... too much security is bad :p =20 Let me know how goes it. Thanks Gayathri =20 -----Original Message----- From: nicolas.fortin@ec.gc.ca [mailto:nicolas.fortin@ec.gc.ca]=20 Sent: Monday, December 01, 2003 1:05 PM To: mapserver-users@lists.gis.umn.edu Subject: [Mapserver-users] Problem out of my control... Hi, =20 I got Mapserver to works perfectly on my workstation (intranet) and I = want to make it works on our internet server. I'm not admin on this server = and I have almost no right on it. The IT guy install it with my instruction = (the same I use on my workstation) and mapserver dosen't work at all. All = the permissions are ok (execute on IIS and read/read-execute on windows for mapserv.exe) but if I point to http://ourserver/cgi-bin/mapserv.exe I got a Page not found!! The = link is right cause I put a junk page there and I can see it. =20 We are on Windows 2000 server with IIS =20 Any suggestions? Nicolas Fortin=20 Math=E9maticien, Programmeur, Analyste de donn=E9es=20 SMC-Qu=E9bec Hydrologie, Environnement Canada=20 1141, Rte de l'=C9glise, Sainte-Foy(QC) G1V 4H5=20 (418)648-2516=20 nicolas.fortin@ec.gc.ca >=20 =20 ------_=_NextPart_001_01C3B842.BDE3C880 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message
Thx=20 for your answer, see below:
-----Message d'origine-----
De : Swaminathan, = Gayathri=20 [mailto:gayathri@ou.edu]
Envoy=E9 : Monday, December = 01, 2003=20 2:22 PM
=C0 : 'nicolas.fortin@ec.gc.ca';=20 mapserver-users@lists.gis.umn.edu
Objet : RE: = [Mapserver-users]=20 Problem out of my control...

Nicolas,
 
Need=20 some more information. Try or have your IT guy try the=20 following.
 
1) Have him go command prompt and try doing "mapserv.exe" = under your=20 cgi-bin folder? What response do you have? 
 
As an admin, he = got the usual=20 :

This script can only be used to decode form results = and=20

should=20 be initiated as a CGI process via a httpd server.  =

But as a=20 normal user via Terminal Service I got an application failed to=20 initialize. 
 
2)=20 Try doing "mapserv.exe  -v"  at command prompt under = cgi-bin...what=20 do you get here?
 
Same as 1), as an admin he got = the usual=20 :

MapServer version 4.0 OUTPUT=3DGIF OUTPUT=3DPNG = OUTPUT=3DJPEG=20 OUTPUT=3DWBMP OUTPUT=3DPDF OUTPUT=3DSWF SUPPORTS=3DPROJ = SUPPORTS=3DFREETYPE=20 SUPPORTS=3DWMS_SERVER SUPPORTS=3DWMS_CLIENT SUPPORTS=3DWFS_SERVER=20 SUPPORTS=3DWFS_CLIENT INPUT=3DEPPL7 INPUT=3DORACLESPATIAL INPUT=3DOGR = INPUT=3DGDAL=20 INPUT=3DSHAPEFILE

But as a normal user via Terminal = Service I got=20 an application failed to initialize
 
Are you sure all the dlls are in a findable place = <windows system=20 directory> and registered correctly? 
 
He add = C:\Mapserver\lib to=20 the system PATH 
I'll ask him to verify = about the correct=20 registering.
 
What version of mapserver is there? What are all the = supporting=20 libraries? 
 
Mapserver 4.0 with Oracle = support. =20 Oracle client is correctly install and tested on the=20 server. 
 
What is the permission on the cgi-bin virtual directory = under=20 IIS?  
 
Scripts and=20 Executable 
 
Did the IT person register all supporting dlls too? 
 
I = hope=20 so... 
 
By the time = i reply to=20 you, I just received an e-mail form him...the mapserv.exe was = rejected by=20 URLScan ... DOH!!
Beware all = windows users=20 ... too much security is bad = :p
 
Let=20 me know how goes it.
Thanks
Gayathri
 
-----Original Message-----
From:=20 nicolas.fortin@ec.gc.ca [mailto:nicolas.fortin@ec.gc.ca] =
Sent:=20 Monday, December 01, 2003 1:05 PM
To:=20 mapserver-users@lists.gis.umn.edu
Subject: = [Mapserver-users]=20 Problem out of my control...

Hi,
 
I = got Mapserver=20 to works perfectly on my workstation (intranet) and I want to = make it=20 works on our internet server.  I'm not admin on this server = and I have=20 almost no right on it.  The IT guy install it with my = instruction (the=20 same I use on my workstation) and mapserver dosen't work at = all. All=20 the permissions are ok (execute on IIS and read/read-execute on = windows for=20 mapserv.exe) but if I point to http://ourserver/cgi-bin/m= apserv.exe=20 I got a Page not found!!  The link is right cause I put a junk = page=20 there and I can see it.
 
We are on=20 Windows 2000 server with IIS
 
Any=20 suggestions?

Nicolas=20 Fortin
Math=E9maticien,=20 Programmeur, Analyste de donn=E9es
SMC-Qu=E9bec Hydrologie, Environnement Canada =
1141, Rte de l'=C9glise, Sainte-Foy(QC) G1V = 4H5=20
(418)648-2516 =
nicolas.fortin@ec.gc.ca = <mailto:nicolas.fortin@ec.gc.ca>=20

 
------_=_NextPart_001_01C3B842.BDE3C880-- From map_surfer@yahoo.com Mon Dec 1 20:09:47 2003 From: map_surfer@yahoo.com (Damian Schroder) Date: Mon, 1 Dec 2003 12:09:47 -0800 (PST) Subject: [Mapserver-users] Re: querybyattributes with Postgres/Postgis Layer In-Reply-To: <1070307857.979.0.camel@katrin> Message-ID: <20031201200947.62452.qmail@web80707.mail.yahoo.com> --0-735338114-1070309387=:61657 Content-Type: text/plain; charset=us-ascii You should try using a filter with querybyrect. here is an example: $oRect = $oMap->extent;//or set it to your map's max extents $oLayer = $oMap->getLayerbyName("yourlayername"); $filter = "\"query ="."'".$yourattributename."'\""; $oLayer->setFilter($filter); if ($oLayer->queryByrect($oRect) == MS_SUCCESS){ whatever you want to code here } Nicol Hermann wrote: Hi Colin, thank you very much for your answer. I'am not sure if i understood your tip correct. I modified my code to: $layer = $Map ->getLayerbyname("Regionen"); $layer -> set("status", MS_ON ); $cobj = $layer -> getclass(0); $cobj -> set ("template", "postgis_query_attribut.php"); $status = $layer->querybyattributes("plzort01", "Mutterstadt", MS_MULTIPLE); The url/filename of my template is the name of the script itself. Is this right? When i execute my script with the 'getclass(0)' request the Message: "Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE ..." disappeared and i get back a blank page. If i comment out the line with this request the message appears again. I both cases i futher on get the Message: ERROR: Attribute "mutterstadt" not found on my shell whenever i reload my script. According to the documentation "mutterstadt" is the 'qstring' of the method an not the 'qitem' (-> int queryByAttributes(string qitem, string qstring, int mode) ) Futher hints would be greatly appreciated. Many thanks Nicol Am Mo, 2003-12-01 um 15.25 schrieb cgowens@softhome.net: > Try using the TEMPLATE option under CLASS for the LAYER. Set the the url to > your query.php file that runs the SQL statement. > > Colin > > > mapserver-users-request@lists.gis.umn.edu writes: > > > 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. Problems with tab files in MapLab (Stephen Wallace) > > 2. Re: [ms4w-users] Problems with tab files in MapLab (Daniel Morissette) > > 3. MapServer passes 82/83 tests of the OGC WMS testsuite (Daniel Morissette) > > 4. Re: MapServer passes 82/83 tests of the OGC WMS testsuite (Daniel Morissette) > > 5. Re: Re: MapServer passes 82/83 tests of the OGC > > WMS testsuite (Doug Cates) > > 6. RE: MapServer passes 82/83 tests of the OGC WMS > > testsuite (Kralidis,Tom [Burlington]) > > 7. Re: Re: MapServer passes 82/83 tests of the OGC > > WMS testsuite (Gerry Creager N5JXS) > > 8. Re: MapServer passes 82/83 tests of the OGC WMS testsuite (Bart van den Eijnden) > > 9. Re: querybyattributes with Postgres/Postgis Layer (Damian Schroder) > > 10. Segmentation Fault -- reference image -- PHP (Ed Martin) > > > > --__--__-- > > > > > Message: 9 > > Date: Sat, 29 Nov 2003 08:41:48 -0800 (PST) > > From: Damian Schroder > > Subject: Re: [Mapserver-users] querybyattributes with Postgres/Postgis Layer > > To: mapserver-users@lists.gis.umn.edu > > > > --0-1435250590-1070124108=:89418 > > Content-Type: text/plain; charset=us-ascii > > > > try using a filter instead of querybyattributes. > > > > Nicol Hermann wrote:Dear List, > > > > i trying to do a querybyattributes Query with a Postgres/Postgis layer > > and get the following error: > > > > Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE > > (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT > > plzort01::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from plz_gebiete WHERE (Mutterstadt) and (the_geom && setSRID( 'BOX3D(5.865627 46.57242768,15.039879 55.75900832)'::BOX3D,find_srid('','plz_gebiete','the_geom') ))' > > > > here is the relevant part of my code: > > > > $layer = $Map ->getLayerbyname("Regionen"); > > $layer -> set("status", MS_ON ); > > $status = $layer->querybyattributes("plzort01", "Mutterstadt", > > MS_MULTIPLE); > > > > It seems that the 'qitem' (plzort01) won't be evaluated because it is > > not present in the SQL statement. > > I also tried the qitem with upper case. The same error appears. > > > > The debugging message on my shell says: > > ERROR: Attribute "mutterstadt" not found > > > > My Postgis Version is: Mappostgis.c - version of June 12/2003. > > and i`am using Mapserver 4.0.1 on a Linux box. > > > > Does anybody know how I can solve this problem? > > Many thanks > > Nicol > > > > > > -- > > Nicol Hermann > > > > _______________________________________________ > > Mapserver-users mailing list > > Mapserver-users@lists.gis.umn.edu > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > > > > > > --------------------------------- > > Do you Yahoo!? > > Free Pop-Up Blocker - Get it now > > --0-1435250590-1070124108=:89418 > > Content-Type: text/html; charset=us-ascii > > > > try using a filter instead of querybyattributes. Nicol Hermann wrote: > > Dear List, i trying to do a querybyattributes Query with a Postgres/Postgis layer and get the following error: Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT plzort01::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from plz_gebiete WHERE (Mutterstadt) and (the_geom && setSRID( 'BOX3D(5.865627 46.57242768,15.039879 55.75900832)'::BOX3D,find_srid('','plz_gebiete','the_geom') ))' here is the relevant part of my code: $layer = $Map ->getLayerbyname("Regionen"); $layer -> set("status", MS_ON ); $status = $layer->querybyattributes("plzort01", "Mutterstadt", MS_MULTIPLE); It seems that the 'qitem' (plzort01) won't be evaluated because it is not present in the SQL statement. I also tried t! he! > q! > > item with > > upper case. The same error appears. The debugging message on my shell says: ERROR: Attribute "mutterstadt" not found My Postgis Version is: Mappostgis.c - version of June 12/2003. and i`am using Mapserver 4.0.1 on a Linux box. Does anybody know how I can solve this problem? Many thanks Nicol -- Nicol Hermann _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users --------------------------------- > > Do you Yahoo!? > > Free Pop-Up Blocker - Get it now > > --0-1435250590-1070124108=:89418-- > > > > --__--__-- > > > > Message: 10 > > Date: Sat, 29 Nov 2003 11:59:53 -0500 > > From: Ed Martin > > To: mapserver-users@lists.gis.umn.edu > > Subject: [Mapserver-users] Segmentation Fault -- reference image -- PHP > > > > i am using the map file and map stuff from the cvs mapserver (did not > > compile from cvs, i used the stable version 4.0.1) and when i try to > > get the reference image using a very simple script i get the jpeg > > header an then a segmentation fault when run in the command line and a > > blank page when in a browser, turning off the jpeg header still gives > > me a blank page > > > > here is the php file i am using > > > > > > require_once('../inc/conf.inc.php');//get config > > //load mapscript > > dl("php_mapscript.so"); > > header("Content-type: image/jpeg"); > > // start map > > $map=ms_newMapObj("tests/test.map"); > > $img=$map->drawReferenceMap(); > > $img->saveImage(''); > > ?> > > > > and here is the reference part of the map file > > > > #refence map > > REFERENCE > > IMAGE ./reference.jpeg > > EXTENT -0.5 50.977222 0.5 51.977222 > > SIZE 120 120 > > STATUS ON > > COLOR 255 255 0 > > OUTLINECOLOR 255 100 0 > > STATUS ON > > MARKER "line" > > MARKERSIZE 5 > > MINBOXSIZE 50 > > MINBOXSIZE 100 > > END > > > > i have output set to jpeg and changing the reference image to jpg or > > png doesn't help and i tried gif and that gave an error saying that it > > couldn't load it (probably because gifs aren't supported by gd, but > > this page ( > > http://mapserver.gis.umn.edu/doc40/mapfile-reference.html#referencemap > > ) says it has to be a gif) > > > > could it be the way i made the reference image, i just took the main > > image, cropped out the boarder, shrunk it to 120x120 and saved it in > > various formats > > > > i see nothing in my apache logs, but i know it is logging to them > > because a parse error will show up, i have error reporting set to the > > highest (E_ALL), i'm using mapserver 4.0.1, php 4.3.4 as CGI, apache > > 2.0.48, slackware linux 9.0 > > > > so does anyone have any clue as to what is causing this, my map file, > > do i have to put more stuff in the php file, is it the way i made the > > image, or is it a bug > > > > > > > > --__--__-- > > > > _______________________________________________ > > Mapserver-users mailing list > > Mapserver-users@lists.gis.umn.edu > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > > > > > > End of Mapserver-users Digest > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users -- Nicol Hermann _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users --------------------------------- Do you Yahoo!? Free Pop-Up Blocker - Get it now --0-735338114-1070309387=:61657 Content-Type: text/html; charset=us-ascii
You should try using a filter with querybyrect. here is an example:

$oRect = $oMap->extent;//or set it to your map's max extents

$oLayer = $oMap->getLayerbyName("yourlayername");

$filter = "\"query ="."'".$yourattributename."'\"";

$oLayer->setFilter($filter);

if ($oLayer->queryByrect($oRect) == MS_SUCCESS){

whatever you want to code here

}

Nicol Hermann <mapserver@geochem.de> wrote:
Hi Colin,

thank you very much for your answer.
I'am not sure if i understood your tip correct.

I modified my code to:

$layer = $Map ->getLayerbyname("Regionen");
$layer -> set("status", MS_ON );
$cobj = $layer -> getclass(0);
$cobj -> set ("template", "postgis_query_attribut.php");
$status = $layer->querybyattributes("plzort01", "Mutterstadt",
MS_MULTIPLE);

The url/filename of my template is the name of the script itself. Is
this right?

When i execute my script with the 'getclass(0)' request the Message:
"Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE
..." disappeared and i get back a blank page. If i comment out the line
with this request the message appears again.

I both cases i futher on get the Message:
ERROR: Attribute "mutterstadt" not found
on my shell whenever i reload my script.

According to the documentation "mutterstadt" is the 'qstring' of the
method an not the 'qitem' (->
int queryByAttributes(string qitem, string qstring, int mode) )

Futher hints would be greatly appreciated.
Many thanks
Nicol


Am Mo, 2003-12-01 um 15.25 schrieb cgowens@softhome.net:
> Try using the TEMPLATE option under CLASS for the LAYER. Set the the url to
> your query.php file that runs the SQL statement.
>
> Colin
>
>
> mapserver-users-request@lists.gis.umn.edu writes:
>
> > 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. Problems with tab files in MapLab (Stephen Wallace)
> > 2. Re: [ms4w-users] Problems with tab files in MapLab (Daniel Morissette)
> > 3. MapServer passes 82/83 tests of the OGC WMS testsuite (Daniel Morissette)
> > 4. Re: MapServer passes 82/83 tests of the OGC WMS testsuite (Daniel Morissette)
> > 5. Re: Re: MapServer passes 82/83 tests of the OGC
> > WMS testsuite (Doug Cates)
> > 6. RE: MapServer passes 82/83 tests of the OGC WMS
> > testsuite (Kralidis,Tom [Burlington])
> > 7. Re: Re: MapServer passes 82/83 tests of the OGC
> > WMS testsuite (Gerry Creager N5JXS)
> > 8. Re: MapServer passes 82/83 tests of the OGC WMS testsuite (Bart van den Eijnden)
> > 9. Re: querybyattributes with Postgres/Postgis Layer (Damian Schroder)
> > 10. Segmentation Fault -- reference image -- PHP (Ed Martin)
> >
> > --__--__--
>
> >
> > Message: 9
> > Date: Sat, 29 Nov 2003 08:41:48 -0800 (PST)
> > From: Damian Schroder
> > Subject: Re: [Mapserver-users] querybyattributes with Postgres/Postgis Layer
> > To: mapserver-users@lists.gis.umn.edu
> >
> > --0-1435250590-1070124108=:89418
> > Content-Type: text/plain; charset=us-ascii
> >
> > try using a filter instead of querybyattributes.
> >
> > Nicol Hermann wrote:Dear List,
> >
> > i trying to do a querybyattributes Query with a Postgres/Postgis layer
> > and get the following error:
> >
> > Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE
> > (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
> > plzort01::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from plz_gebiete WHERE (Mutterstadt) and (the_geom && setSRID( 'BOX3D(5.865627 46.57242768,15.039879 55.75900832)'::BOX3D,find_srid('','plz_gebiete','the_geom') ))'
> >
> > here is the relevant part of my code:
> >
> > $layer = $Map ->getLayerbyname("Regionen");
> > $layer -> set("status", MS_ON );
> > $status = $layer->querybyattributes("plzort01", "Mutterstadt",
> > MS_MULTIPLE);
> >
> > It seems that the 'qitem' (plzort01) won't be evaluated because it is
> > not present in the SQL statement.
> > I also tried the qitem with upper case. The same error appears.
> >
> > The debugging message on my shell says:
> > ERROR: Attribute "mutterstadt" not found
> >
> > My Postgis Version is: Mappostgis.c - version of June 12/2003.
> > and i`am using Mapserver 4.0.1 on a Linux box.
> >
> > Does anybody know how I can solve this problem?
> > Many thanks
> > Nicol
> >
> >
> > --
> > Nicol Hermann
> >
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users@lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Free Pop-Up Blocker - Get it now
> > --0-1435250590-1070124108=:89418
> > Content-Type: text/html; charset=us-ascii
> >
> >
try using a filter instead of querybyattributes.

Nicol Hermann <mapserver@geochem.de> wrote:
> >
Dear List,

i trying to do a querybyattributes Query with a Postgres/Postgis layer
and get the following error:

Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE
(the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
plzort01::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from plz_gebiete WHERE (Mutterstadt) and (the_geom && setSRID( 'BOX3D(5.865627 46.57242768,15.039879 55.75900832)'::BOX3D,find_srid('','plz_gebiete','the_geom') ))'

here is the relevant part of my code:

$layer = $Map ->getLayerbyname("Regionen");
$layer -> set("status", MS_ON );
$status = $layer->querybyattributes("plzort01", "Mutterstadt",
MS_MULTIPLE);

It seems that the 'qitem' (plzort01) won't be evaluated because it is
not present in the SQL statement.
I also tried t!
he!
> q!
> > item with
> > upper case. The same error appears.

The debugging message on my shell says:
ERROR: Attribute "mutterstadt" not found

My Postgis Version is: Mappostgis.c - version of June 12/2003.
and i`am using Mapserver 4.0.1 on a Linux box.

Does anybody know how I can solve this problem?
Many thanks
Nicol


--
Nicol Hermann

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



> > Do you Yahoo!?

> > Free Pop-Up Blocker - Get it now
> > --0-1435250590-1070124108=:89418--
> >
> > --__--__--
> >
> > Message: 10
> > Date: Sat, 29 Nov 2003 11:59:53 -0500
> > From: Ed Martin
> > To: mapserver-users@lists.gis.umn.edu
> > Subject: [Mapserver-users] Segmentation Fault -- reference image -- PHP
> >
> > i am using the map file and map stuff from the cvs mapserver (did not
> > compile from cvs, i used the stable version 4.0.1) and when i try to
> > get the reference image using a very simple script i get the jpeg
> > header an then a segmentation fault when run in the command line and a
> > blank page when in a browser, turning off the jpeg header still gives
> > me a blank page
> >
> > here is the php file i am using
> >
> > > > require_once('../inc/conf.inc.php');//get config
> > //load mapscript
> > dl("php_mapscript.so");
> > header("Content-type: image/jpeg");
> > // start map
> > $map=ms_newMapObj("tests/test.map");
> > $img=$map->drawReferenceMap();
> > $img->saveImage('');
> > ?>
> >
> > and here is the reference part of the map file
> >
> > #refence map
> > REFERENCE
> > IMAGE ./reference.jpeg
> > EXTENT -0.5 50.977222 0.5 51.977222
> > SIZE 120 120
> > STATUS ON
> > COLOR 255 255 0
> > OUTLINECOLOR 255 100 0
> > STATUS ON
> > MARKER "line"
> > MARKERSIZE 5
> > MINBOXSIZE 50
> > MINBOXSIZE 100
> > END
> >
> > i have output set to jpeg and changing the reference image to jpg or
> > png doesn't help and i tried gif and that gave an error saying that it
> > couldn't load it (probably because gifs aren't supported by gd, but
> > this page (
> > http://mapserver.gis.umn.edu/doc40/mapfile-reference.html#referencemap
> > ) says it has to be a gif)
> >
> > could it be the way i made the reference image, i just took the main
> > image, cropped out the boarder, shrunk it to 120x120 and saved it in
> > various formats
> >
> > i see nothing in my apache logs, but i know it is logging to them
> > because a parse error will show up, i have error reporting set to the
> > highest (E_ALL), i'm using mapserver 4.0.1, php 4.3.4 as CGI, apache
> > 2.0.48, slackware linux 9.0
> >
> > so does anyone have any clue as to what is causing this, my map file,
> > do i have to put more stuff in the php file, is it the way i made the
> > image, or is it a bug
> >
> >
> >
> > --__--__--
> >
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users@lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >
> >
> > End of Mapserver-users Digest
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users@lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listin