From dadark at DADARK.DE Thu Nov 1 03:34:10 2007 From: dadark at DADARK.DE (Pascal Ehlert) Date: Thu, 1 Nov 2007 11:34:10 +0100 Subject: Raster layer - Howto? In-Reply-To: <4728F15C.1000701@hostgis.com> Message-ID: Gregor Mosheh wrote: > I don't have a world file handy at the moment, but it only took me > about 5 minutes to learn it for the first time. Name the worldfile > land_shallow_topo_8192.tfw and gdalinfo will automagically detect > it and suddenly change its tone. :) Sorry, apparently I'm not as clever as you are.. ;-) I'm totally new to the GIS sector and thus don't really understand the terms used there and the techniques behind. Would you (or someone else, of course) mind giving me an example world file with a few comments, so that I can understand it? Unfortunately I couldn't find such an example on the web. Thank you again. Pascal From jorn at SPACETEC.NO Thu Nov 1 03:47:14 2007 From: jorn at SPACETEC.NO (=?iso-8859-1?q?J=F8rn_Vegard_R=F8snes?=) Date: Thu, 1 Nov 2007 12:47:14 +0200 Subject: Raster layer - Howto? In-Reply-To: <64847CDA-F7C2-44B9-8EB6-E998EF0BB9C9@dadark.de> Message-ID: Have you had a look at this one: http://mapserver.gis.umn.edu/docs/howto/raster_data/#georeference-with-world-files On Thursday 01 November 2007 11:34, Pascal Ehlert wrote: > Gregor Mosheh wrote: > > I don't have a world file handy at the moment, but it only took me > > about 5 minutes to learn it for the first time. Name the worldfile > > land_shallow_topo_8192.tfw and gdalinfo will automagically detect > > it and suddenly change its tone. :) > > Sorry, apparently I'm not as clever as you are.. ;-) > I'm totally new to the GIS sector and thus don't really understand > the terms used there and the techniques behind. > > Would you (or someone else, of course) mind giving me an example > world file with a few comments, so that I can understand it? > Unfortunately I couldn't find such an example on the web. > > > Thank you again. > > > Pascal From dadark at DADARK.DE Thu Nov 1 03:53:40 2007 From: dadark at DADARK.DE (Pascal Ehlert) Date: Thu, 1 Nov 2007 11:53:40 +0100 Subject: Raster layer - Howto? In-Reply-To: <200711011147.15026.jorn@spacetec.no> Message-ID: J?rn Vegard R?snes wrote: > Have you had a look at this one: > http://mapserver.gis.umn.edu/docs/howto/raster_data/#georeference- > with-world-files Thanks a lot, I didn't find that one. It really helps! From siki at AGT.BME.HU Thu Nov 1 06:51:12 2007 From: siki at AGT.BME.HU (Siki Zoltan) Date: Thu, 1 Nov 2007 12:51:12 -0100 Subject: Raster layer - Howto? {Scanned} In-Reply-To: <64847CDA-F7C2-44B9-8EB6-E998EF0BB9C9@dadark.de> Message-ID: Hi Pascal, A world file contains the six parameters of an affine transformation like x1 = Ax + By + C y1 = Dx + Ey + F All parameters are in separate rows in A, D, B, E, C, F order example: 0.15 (A) pixel size in nature in x direction (e.g. 15 cm resolution) 0.0 (D) depends on rotational angle, afaik it must be zero for mapserver 0.0 (B) same as above -0.15 (E) negative pixel size in nature in y direction 1234.56 (C) x position of the center of the pixel at upper-left corner 4567.89 (F) y position of the center of the pixel at upper-left corner Zoltan On Thu, 1 Nov 2007, Pascal Ehlert wrote: > Gregor Mosheh wrote: >> I don't have a world file handy at the moment, but it only took me about 5 >> minutes to learn it for the first time. Name the worldfile >> land_shallow_topo_8192.tfw and gdalinfo will automagically detect it and >> suddenly change its tone. :) > > Sorry, apparently I'm not as clever as you are.. ;-) > I'm totally new to the GIS sector and thus don't really understand the terms > used there and the techniques behind. > > Would you (or someone else, of course) mind giving me an example world file > with a few comments, so that I can understand it? > Unfortunately I couldn't find such an example on the web. > > > Thank you again. > > > Pascal From nhv at CAPE.COM Thu Nov 1 03:53:52 2007 From: nhv at CAPE.COM (Norman Vine) Date: Thu, 1 Nov 2007 06:53:52 -0400 Subject: Raster layer - Howto? In-Reply-To: <64847CDA-F7C2-44B9-8EB6-E998EF0BB9C9@dadark.de> Message-ID: Pascal Ehlert writes: > > Gregor Mosheh wrote: > > I don't have a world file handy at the moment, but it only took me > > about 5 minutes to learn it for the first time. Name the worldfile > > land_shallow_topo_8192.tfw and gdalinfo will automagically detect > > it and suddenly change its tone. :) > > Sorry, apparently I'm not as clever as you are.. ;-) > I'm totally new to the GIS sector and thus don't really understand > the terms used there and the techniques behind. > > Would you (or someone else, of course) mind giving me an example > world file with a few comments, so that I can understand it? > Unfortunately I couldn't find such an example on the web. http://www.gdal.org/frmt_various.html#WLD Google("tfw tif") should yield lots of examples Being new to GIS you will probably need to study a bit :-) This is a decent general introduction http://www.colorado.edu/geography/gcraft/contents.html Here is a gentle intro to 'projections' http://www.colorado.edu/geography/gcraft/notes/mapproj/mapproj.html Here is an overview of a popular OpenSource programing implementation of the GIS 'raster' data model. eg maps and 'photos' http://www.gdal.org/gdal_datamodel.html HTH Norman From dadark at DADARK.DE Thu Nov 1 04:15:57 2007 From: dadark at DADARK.DE (Pascal Ehlert) Date: Thu, 1 Nov 2007 12:15:57 +0100 Subject: Raster layer - Howto? In-Reply-To: Message-ID: Siki Zoltan wrote: > 0.15 (A) pixel size in nature in x direction (e.g. 15 cm resolution) > 0.0 (D) depends on rotational angle, afaik it must be zero for > mapserver > 0.0 (B) same as above > -0.15 (E) negative pixel size in nature in y direction > 1234.56 (C) x position of the center of the pixel at upper-left corner > 4567.89 (F) y position of the center of the pixel at upper-left corner Okay, I was able to figure out the first four values now! The data has a resolution of 1km/px so I want something like 1000.00 0.00 0.00 -1000.00 there, is that correct? The only thing I'm unsure about are the last two values. It is an image of the whole world, so shouldn't that be something like -180.00 for the first value and 90.00 for the last? When using these values gdalinfo gives me a strange output for the offsets which can't be correct. Sorry to bother you again. Pascal From j.l.h.hartmann at UVA.NL Thu Nov 1 04:37:30 2007 From: j.l.h.hartmann at UVA.NL (Jan Hartmann) Date: Thu, 1 Nov 2007 12:37:30 +0100 Subject: MapServer and PostGIS GEOMETRY type In-Reply-To: <472967E2.8070205@zeelandnet.nl> Message-ID: Hallo Milo, Sorry, ik forwarde een posting voor de mailing van jou, die je per abuis alleen aan mij het gestuurd, naar de list, zonder jouw naar te vermelden. Wist niet dat de header erafgehaald werd. http://lists.umn.edu/cgi-bin/wa?A2=ind0710&L=mapserver-users&T=0&F=&S=&P=62968 Groeten, Jan Hartmann From jorn at SPACETEC.NO Thu Nov 1 04:41:17 2007 From: jorn at SPACETEC.NO (=?iso-8859-1?q?J=F8rn_Vegard_R=F8snes?=) Date: Thu, 1 Nov 2007 13:41:17 +0200 Subject: Raster layer - Howto? In-Reply-To: <79BF2569-21D1-4B94-AD1B-05B6357A175A@DADARK.DE> Message-ID: > > Okay, I was able to figure out the first four values now! > The data has a resolution of 1km/px so I want something like > 1000.00 > 0.00 > 0.00 > -1000.00 > there, is that correct? > Probably > The only thing I'm unsure about are the last two values. > It is an image of the whole world, so shouldn't that be something > like -180.00 for the first value and 90.00 for the last? > > When using these values gdalinfo gives me a strange output for the > offsets which can't be correct. > I utilize proj4 to convert the lon/lat values to x/y for the projection of the image. These values I put into the tfw file. cheers J?rn Vegard From dadark at DADARK.DE Thu Nov 1 05:18:04 2007 From: dadark at DADARK.DE (Pascal Ehlert) Date: Thu, 1 Nov 2007 13:18:04 +0100 Subject: Raster layer - Howto? Message-ID: J?rn Vegard R?snes wrote: > I utilize proj4 to convert the lon/lat values to x/y for the > projection of the > image. These values I put into the tfw file. Hi J?rn, thank you for that hint, but I can't find how to use proj4 to covert these values. Would you mind giving me a quick example? Regards, Pascal From bartvde at GMAIL.COM Thu Nov 1 06:42:12 2007 From: bartvde at GMAIL.COM (Bart van den Eijnden) Date: Thu, 1 Nov 2007 14:42:12 +0100 Subject: legend for polygon layer with only outlinecolor Message-ID: Hi list, why does the legend for a polygon layer with only an outlinecolor defined draw like a line and not like a (transparent) box? Is this intentional? Best regards, Bart -------------- next part -------------- An HTML attachment was scrubbed... URL: From siki at AGT.BME.HU Thu Nov 1 10:16:35 2007 From: siki at AGT.BME.HU (Siki Zoltan) Date: Thu, 1 Nov 2007 16:16:35 -0100 Subject: Raster layer - Howto? {Scanned} In-Reply-To: <79BF2569-21D1-4B94-AD1B-05B6357A175A@DADARK.DE> Message-ID: Hi Pascal, Use mustnot mix meters and degree, use the same unit for these parameters. It may depend on what projection you use. Zoltan On Thu, 1 Nov 2007, Pascal Ehlert wrote: > Siki Zoltan wrote: > >> 0.15 (A) pixel size in nature in x direction (e.g. 15 cm resolution) >> 0.0 (D) depends on rotational angle, afaik it must be zero for mapserver >> 0.0 (B) same as above >> -0.15 (E) negative pixel size in nature in y direction >> 1234.56 (C) x position of the center of the pixel at upper-left corner >> 4567.89 (F) y position of the center of the pixel at upper-left corner > > Okay, I was able to figure out the first four values now! > The data has a resolution of 1km/px so I want something like > 1000.00 > 0.00 > 0.00 > -1000.00 > there, is that correct? > > The only thing I'm unsure about are the last two values. > It is an image of the whole world, so shouldn't that be something like > -180.00 for the first value and 90.00 for the last? > > When using these values gdalinfo gives me a strange output for the offsets > which can't be correct. > > Sorry to bother you again. > > > Pascal From bfraser at GEOANALYTIC.COM Thu Nov 1 07:23:54 2007 From: bfraser at GEOANALYTIC.COM (Brent Fraser) Date: Thu, 1 Nov 2007 08:23:54 -0600 Subject: Raster layer - Howto? Message-ID: Pascal, I would guess the data is in a geographic coordinate system. This means the units of coordinates and pixel sizes for the image would be degrees not meters. I would also assume that the image covers the entire Earth, not just a part of it, so: Calculating the X (longitude) pixel size, 360 degrees covers the Earth all the way around: 360 degrees / 8192 pixels = 0.0439453125 degrees per pixel in X Calculating the Y (latitude) pixel size, 180 degrees covers the Earth pole to pole: 180 degrees / 4096 pixels = 0.0439453125 degrees per pixel in Y Notice the pixel size in X is the same as Y. This is typical for a raster map (but not a hard rule). --------------- And now for a reality check. Approximately how many meters-on-the-ground is each pixel? 0.0439453125 degrees/pixel * 60 minutes/degree * 60 seconds/minute * 30 meters/second (approx) = 4700 meters/pixel Interesting information, but not needed for the tfw file. --------------- So back to the calculations for the tfw file: The coordinates of the upper-left corner of the upper left pixel would be X = -180 degrees Y = 90 degrees But the tfw file specifies the MIDDLE of the upper left pixel (so we need to subtract half a pixel width from each coordinate): X = -180 + 0.0439453125/2 = -179.97802734375 Y = 90 - 0.0439453125/2 = 89.97802734375 So the tfw file would be: 0.0439453125 0 0 -0.0439453125 -179.97802734375 89.97802734375 One more step for Mapserver: Since the tiff file is not a geotiff, you need to tell mapserver the coordinate system of the raster file. So your layer definition in the the map file would be (note the PROJECTION object): ########## NASA BLUE MARBLE ########### LAYER NAME "satellite" DATA "/var/www/odamap/blue_marble.tif" TYPE RASTER PROJECTION "geographic" END METADATA "wms_title" "ODAdata WMS Server SATELLITE" END END ####################################### Brent Fraser GeoAnalytic Inc. Calgary, Alberta ----- Original Message ----- From: "Pascal Ehlert" To: Sent: Thursday, November 01, 2007 5:15 AM Subject: Re: [UMN_MAPSERVER-USERS] Raster layer - Howto? > Siki Zoltan wrote: > > > 0.15 (A) pixel size in nature in x direction (e.g. 15 cm resolution) > > 0.0 (D) depends on rotational angle, afaik it must be zero for > > mapserver > > 0.0 (B) same as above > > -0.15 (E) negative pixel size in nature in y direction > > 1234.56 (C) x position of the center of the pixel at upper-left corner > > 4567.89 (F) y position of the center of the pixel at upper-left corner > > Okay, I was able to figure out the first four values now! > The data has a resolution of 1km/px so I want something like > 1000.00 > 0.00 > 0.00 > -1000.00 > there, is that correct? > > The only thing I'm unsure about are the last two values. > It is an image of the whole world, so shouldn't that be something > like -180.00 for the first value and 90.00 for the last? > > When using these values gdalinfo gives me a strange output for the > offsets which can't be correct. > > Sorry to bother you again. > > > Pascal From Steve.Lime at DNR.STATE.MN.US Thu Nov 1 08:08:07 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Thu, 1 Nov 2007 10:08:07 -0500 Subject: QueryByRect problem in PHPmapscript Message-ID: Keeping the SWIG and PHP versions of MapScript sync'd has always been a challenge so it's possible it didn't get added until 4.10.1 or later. At 4.10.0 you should have getShape which works the same as getFeature (they wrap the same C code) but with getShape you must pass a tile index in addition to the shape index. Usually it's just: $shape = $layer->getShape(-1, $shpindex); Steve >>> Bill Thoen 10/31/07 5:48 PM >>> getFeature doesn't seem to be defined in version 4.10.0. When I try to use it I get an error message that says it's undefined. Is this a recent change, or should it be there? Steve Lime wrote: > getFeature is the method to use to retreive a feature from a layer. It is a layer method and > exists for both PHP and the SWIG-based bindings. It replaces the getShape method which > I created with stupid parameter orderings that made it impossible to not pass a tile index. > > I see that it is missing from the PHP/MapScript docs but is present in the Swig docs. I'll file > a ticket on that one... There's already a note at the bottom of the page but it hasn't been > noticed. > From Steve.Lime at DNR.STATE.MN.US Thu Nov 1 08:08:58 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Thu, 1 Nov 2007 10:08:58 -0500 Subject: Mapserver Color Binding: Blue and Greenswapped (bug?) Message-ID: Guys, I'll file the bug... Steve >>> "Delfos, Jacob" 10/31/07 11:01 PM >>> From dadark at DADARK.DE Thu Nov 1 08:10:34 2007 From: dadark at DADARK.DE (Pascal Ehlert) Date: Thu, 1 Nov 2007 16:10:34 +0100 Subject: Raster layer - Howto? In-Reply-To: <021801c81c92$da9aa530$140002c0@shark> Message-ID: Hi Brent! Thank you so much for your effort, I definitely owe you a drink! This is a really cool overview of world files and mapping stuff at all! Greetings, Pascal Brent Fraser wrote: > Pascal, > > I would guess the data is in a geographic coordinate > system. This means the units of coordinates and pixel sizes > for the image would be degrees not meters. I would also > assume that the image covers the entire Earth, not just a > part of it, so: > > Calculating the X (longitude) pixel size, 360 degrees covers > the Earth all the way around: > 360 degrees / 8192 pixels = 0.0439453125 degrees per pixel > in X > > Calculating the Y (latitude) pixel size, 180 degrees covers > the Earth pole to pole: > 180 degrees / 4096 pixels = 0.0439453125 degrees per pixel > in Y > > Notice the pixel size in X is the same as Y. This is > typical for a raster map (but not a hard rule). > > --------------- > And now for a reality check. Approximately how many > meters-on-the-ground is each pixel? > 0.0439453125 degrees/pixel * 60 minutes/degree * 60 > seconds/minute * 30 meters/second (approx) = 4700 > meters/pixel > Interesting information, but not needed for the tfw file. > --------------- > > So back to the calculations for the tfw file: > > The coordinates of the upper-left corner of the upper left > pixel would be > X = -180 degrees > Y = 90 degrees > > But the tfw file specifies the MIDDLE of the upper left > pixel (so we need to subtract half a pixel width from each > coordinate): > X = -180 + 0.0439453125/2 = -179.97802734375 > Y = 90 - 0.0439453125/2 = 89.97802734375 > > So the tfw file would be: > > 0.0439453125 > 0 > 0 > -0.0439453125 > -179.97802734375 > 89.97802734375 > > > One more step for Mapserver: > > Since the tiff file is not a geotiff, you need to tell > mapserver the coordinate system of the raster file. So your > layer definition in the the map file would be (note the > PROJECTION object): > > ########## NASA BLUE MARBLE ########### > LAYER > NAME "satellite" > DATA "/var/www/odamap/blue_marble.tif" > TYPE RASTER > PROJECTION > "geographic" > END > > METADATA > "wms_title" "ODAdata WMS Server SATELLITE" > END > END > ####################################### From yjacolin at FREE.FR Thu Nov 1 08:16:58 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Thu, 1 Nov 2007 16:16:58 +0100 Subject: SLD resquest issue with EXPRESSION parameter Message-ID: Hi list, I am using Mapserver as a OGC webserver. I am trying the GetStyles request and find some issues. Someone asked about this issue in the mailing list in the short last few monthes. I got some LAYER which contains about 12 CLASS objets, this CLASS contains EXPRESSION parameter. Here an exemple : CLASS NAME "M1 : La D?fense - Ch?teau de Vincennes" EXPRESSION ('[TYPE]' eq 'M' AND '[NUMERO]' eq '1' AND '[DATE_LIV]' < '200712') COLOR 255 255 0 SIZE 3 SYMBOL 1 END There are 24 class like this one. If I try a GetStyles request on this kind of layer, nothing occurs (ie blank page), if I remove most CLASS the XML response is displayed, If I remove only the EXPRESSION parameter, again the XML response is displayed. So I think the issue is not link to the number of CLASS object, but rather with EXPRESSION parameter. BUT, in an other LAYER, I got only three CLASS object with EXPRESSION parameter, and the xml response is displayed. Finally, it seems that if a LAYER got a lot of CLASS object with EXPRESSION parameter inside, the XML response failed. And if a LAYER object got a lot of CLASS object, the XML response failed as well. I am using Mapserver 4.10. Are someone aware of this issue and know a workaround. Thanks, Y. -- Yves Jacolin --- http://softlibre.gloobe.org From bthoen at GISNET.COM Thu Nov 1 08:52:14 2007 From: bthoen at GISNET.COM (Bill Thoen) Date: Thu, 1 Nov 2007 09:52:14 -0600 Subject: QueryByRect problem in PHPmapscript In-Reply-To: <4729A5880200008F0001100E@co5.dnr.state.mn.us> Message-ID: Ah HA! I just clued into the fact that the parameters for getShape() are in the opposite order from those in getFeature(). Doh! When I pass them in the proper order getShape works fine. Damn computers; they're just so picky about the details... Steve Lime wrote: > Keeping the SWIG and PHP versions of MapScript sync'd has always been a challenge so it's possible > it didn't get added until 4.10.1 or later. At 4.10.0 you should have getShape which works the same > as getFeature (they wrap the same C code) but with getShape you must pass a tile index in addition > to the shape index. Usually it's just: > > $shape = $layer->getShape(-1, $shpindex); > > Steve > > >>>> Bill Thoen 10/31/07 5:48 PM >>> >>>> > getFeature doesn't seem to be defined in version 4.10.0. When I try to > use it I get an error message that says it's undefined. Is this a recent > change, or should it be there? > > Steve Lime wrote: > >> getFeature is the method to use to retreive a feature from a layer. It is a layer method and >> exists for both PHP and the SWIG-based bindings. It replaces the getShape method which >> I created with stupid parameter orderings that made it impossible to not pass a tile index. >> >> I see that it is missing from the PHP/MapScript docs but is present in the Swig docs. I'll file >> a ticket on that one... There's already a note at the bottom of the page but it hasn't been >> noticed. >> >> > > > From john.cole at UAI.COM Thu Nov 1 08:53:57 2007 From: john.cole at UAI.COM (John Cole) Date: Thu, 1 Nov 2007 08:53:57 -0700 Subject: Legend problem in MapServer 5.0 In-Reply-To: Message-ID: tbonfort wrote: > > thanks all for feedback. > there's a typo bug in the legend rendering. will fix this in trunk > soon and should be incorporated in 5.0.1 > > tb > > Any word on when a 5.0.1 will be issued with this fix in it? It's a pain to have to load both MS5 and MS4 just to get legend support. Thanks, John -- View this message in context: http://www.nabble.com/Legend-problem-in-MapServer-5.0-tf4482729.html#a13531369 Sent from the Mapserver - User mailing list archive at Nabble.com. From thomas.bonfort at GMAIL.COM Thu Nov 1 09:58:23 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Thu, 1 Nov 2007 17:58:23 +0100 Subject: Legend problem in MapServer 5.0 In-Reply-To: <13531369.post@talk.nabble.com> Message-ID: John, you can either wait for 5.0.1 or just pick the modified maplegend.c and replace it in your build directory. the file is here: http://trac.osgeo.org/mapserver/browser/branches/branch-5-0/mapserver/maplegend.c?format=raw thomas On 11/1/07, John Cole wrote: > tbonfort wrote: > > > > thanks all for feedback. > > there's a typo bug in the legend rendering. will fix this in trunk > > soon and should be incorporated in 5.0.1 > > > > tb > > > > > > Any word on when a 5.0.1 will be issued with this fix in it? It's a pain to > have to load both MS5 and MS4 just to get legend support. > > Thanks, > > John > -- > View this message in context: http://www.nabble.com/Legend-problem-in-MapServer-5.0-tf4482729.html#a13531369 > Sent from the Mapserver - User mailing list archive at Nabble.com. > From Steve.Lime at DNR.STATE.MN.US Thu Nov 1 11:18:05 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Thu, 1 Nov 2007 13:18:05 -0500 Subject: Mapserver Color Binding: Blue and Greenswapped (bug?) In-Reply-To: <4729A5BA0200008F00011011@co5.dnr.state.mn.us> Message-ID: See http://trac.osgeo.org/mapserver/ticket/2378 if you want to follow along. Steve >>> On 11/1/2007 at 10:08 AM, in message <4729A5BA0200008F00011011 at co5.dnr.state.mn.us>, Steve Lime wrote: > Guys, I'll file the bug... > > Steve > >>>> "Delfos, Jacob" 10/31/07 11:01 PM >>> From bfischer at HOUSTONENGINEERINGINC.COM Thu Nov 1 13:57:44 2007 From: bfischer at HOUSTONENGINEERINGINC.COM (Fischer, Brian) Date: Thu, 1 Nov 2007 15:57:44 -0500 Subject: nearest search with MapServer Message-ID: MapServer users, I am curious to hear if anyone knows if it is possible to implement a nearest search with mapscript. For example I want to take an xy point that a user clicked on the map and find the nearest feature in many different layers to that point. For example nearest park, library, school, etc. It is also possible the point could be contained with in a polygon. Is there a Geos function in mapscript to do this? I haven't seen this done before with mapserver, but thought I would ask anyway. I know I could do it with PostGIS, but I'm trying to get away without making that a requirement for my application. Thanks for any feedback you can give me. -Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: From lgonzalez at GMX.NET Thu Nov 1 14:41:15 2007 From: lgonzalez at GMX.NET (=?iso-8859-1?Q?=22Luis_Gonz=E1lez_Medina=22?=) Date: Thu, 1 Nov 2007 22:41:15 +0100 Subject: AGG line offset problem Message-ID: Hi guys: I will aprecciate if you can help me with a problem with OFFSET feature when I use AGG/PNG output format in Mapserver 5.0. When I used Mapserver 4.x for create my maps images, Hi guys: I really appreciate if you can help me with a problem with OFFSET feature when I use AGG/PNG output format in Mapserver 5.0. In Mapserver 4.x I used OFFSET x -99 in the STYLE section on my Mapfile for do displaced lines that follow the same direction of the original line: LAYER TYPE LINE .... CLASS STYLE SYMBOL "circle" COLOR 180 180 180 SIZE 3 OFFSET 5 -99 END .... ..... But using Mapserver 5.0 and AGG/PNG output format, this feature doesn't work. Anny idea? Thanks, Luis -- Luis Gonz?lez Medina Software Engineer lgonzalez at gmx.net _____________________________________________ GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail From andresch at IWAY.NA Thu Nov 1 22:25:48 2007 From: andresch at IWAY.NA (Andre Schoonbee) Date: Fri, 2 Nov 2007 07:25:48 +0200 Subject: Mapfile definition In-Reply-To: <20071101214115.285920@gmx.net> Message-ID: What is the best way to define a road so that, when you zoom in, the line type changes. LAYER CLASS 1 STYLE 1 CLASS 2 STYLE 2 END Or is there a better way? Andre From adams at TERRESTRIS.DE Fri Nov 2 00:18:49 2007 From: adams at TERRESTRIS.DE (Till Adams) Date: Fri, 2 Nov 2007 08:18:49 +0100 Subject: Mapfile definition In-Reply-To: <20071102052604.3BB73B9B@mx1.iway.na> Message-ID: Andre Schoonbee schrieb: >What is the best way to define a road so that, when you zoom in, the line >type changes. > >LAYER > CLASS 1 > STYLE 1 > CLASS 2 > STYLE 2 >END > >Or is there a better way? >Andre > > > Andre, this is the way to do, if you want to use several single symbols as one, e.g. thin line on thick line with other color. (use the style operator for that) What you need are the min/maxscale keywords for your class: http://mapserver.gis.umn.edu/docs/reference/mapfile/class Or if you just want to change size, use the SYMBOLSCALE key for layers: http://mapserver.gis.umn.edu/docs/reference/mapfile/layer Regars, Till ---------------------------------------------------------- terrestris GmbH & Co. KG Irmintrudisstrasse 17 53111 Bonn Germany Till Adams Gesch?ftsf?hrung Tel: +49 (0)228 / 962 899-52 Fax: +49 (0)228 / 962 899-57 adams at terrestris.de http://www.terrestris.de Amtsgericht Bonn, HRA 6835 --------------------------------------------------------- Komplement?rin: terrestris Verwaltungs GmbH vertreten durch: Hinrich Paulsen, Till Adams From andreas.albarello at TERRITORIUMONLINE.COM Fri Nov 2 01:27:00 2007 From: andreas.albarello at TERRITORIUMONLINE.COM (Andreas Albarello) Date: Fri, 2 Nov 2007 09:27:00 +0100 Subject: AGG line offset problem In-Reply-To: <20071101214115.285920@gmx.net> Message-ID: Luis Gonz?lez Medina wrote: > I really appreciate if you can help me with a problem with OFFSET feature when I use AGG/PNG output format in Mapserver 5.0. > > In Mapserver 4.x I used OFFSET x -99 in the STYLE section on my Mapfile for do displaced lines that follow the same direction of the original line: > > LAYER > TYPE LINE > .... > CLASS > STYLE > SYMBOL "circle" > COLOR 180 180 180 > SIZE 3 > OFFSET 5 -99 > END > .... > ..... > > But using Mapserver 5.0 and AGG/PNG output format, this feature doesn't work. Luis, some time ago there was a post by Thomas Bonfort to this list that explained in great detail how to do this with AGG. You can find it here: http://lists.umn.edu/cgi-bin/wa?A2=ind0708&L=mapserver-users&T=0&F=&S=&P=57127 Best regards, -- -------------------------------------------------------------------- Andreas Albarello Analysis & SW Development Territorium Online srl/GmbH Via Buozzi/Buozzistra?e 12 - I 39100 Bolzano/Bozen email: andreas.albarello at territoriumonline.com web: www.territoriumonline.com -------------------------------------------------------------------- From pal.kristensen at STATKART.NO Fri Nov 2 01:42:00 2007 From: pal.kristensen at STATKART.NO (=?UTF-8?Q?P=C3=A5l_Kristensen?=) Date: Fri, 2 Nov 2007 01:42:00 -0700 Subject: LINCAP Butt with AGG renderer Message-ID: Hi! With MapServer version 5.x the symbol type cartoline was deprecated when using AGG rendering, but is it possible to achieve butt linecaps when using AGG in an other way then using cartoline? Regards P?l Kristensen -- View this message in context: http://www.nabble.com/LINCAP-Butt-with-AGG-renderer-tf4736145.html#a13543899 Sent from the Mapserver - User mailing list archive at Nabble.com. From thomas.bonfort at GMAIL.COM Fri Nov 2 02:27:18 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Fri, 2 Nov 2007 10:27:18 +0100 Subject: LINCAP Butt with AGG renderer In-Reply-To: <13543899.post@talk.nabble.com> Message-ID: For the time being, the answer is no. support for this will probably make its way into 5.2, with cap and join keywords being added to the style blocks. thomas On 11/2/07, P?l Kristensen wrote: > Hi! > > With MapServer version 5.x the symbol type cartoline was deprecated when > using AGG rendering, but is it possible to achieve butt linecaps when using > AGG in an other way then using cartoline? > > Regards > P?l Kristensen > -- > View this message in context: http://www.nabble.com/LINCAP-Butt-with-AGG-renderer-tf4736145.html#a13543899 > Sent from the Mapserver - User mailing list archive at Nabble.com. > From helenagarcia at GRUPOTECOPY.ES Fri Nov 2 02:58:15 2007 From: helenagarcia at GRUPOTECOPY.ES (H Garcia) Date: Fri, 2 Nov 2007 04:58:15 -0500 Subject: turn off warning messages? Message-ID: Hi list! I'm trying to use EMPTY and ERROR tags into WEB tag, but I don't get the expected results. I'm still getting the ugly message containing the password of the user, which, I think, is a security problem. I've tried with: MAP ... WEB ... ERROR error.html EMPTY empty.html LOG "C:/path_to_log/hidrocarburos.log" ... END ... END and with ERROR "http://localhost/mapserver/my_application/error.html" EMPTY "http://localhost/mapserver/my_application/empty.html" but I still get the message "msDrawMap ...". Must the html pages error.html and empty.html have a special format? Thanks in advance! From Steve.Lime at DNR.STATE.MN.US Fri Nov 2 06:24:14 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Fri, 2 Nov 2007 08:24:14 -0500 Subject: turn off warning messages? Message-ID: What is the exact message you are seeing (minus the password)? Because the EMPTY and ERROR parameters are in the mapfile (they are given as URLs for the user to be redirected to) it is possible that they won't be used IF the error encountered is in the parsing of the mapfile. In that case the mapObj structure isn't populated and the software can't know their values. So, a bit more information would help: - version - exact error message - URL being passed to the CGI that generates the issue Steve >>> H Garcia 11/02/07 4:58 AM >>> Hi list! I'm trying to use EMPTY and ERROR tags into WEB tag, but I don't get the expected results. I'm still getting the ugly message containing the password of the user, which, I think, is a security problem. I've tried with: MAP ... WEB ... ERROR error.html EMPTY empty.html LOG "C:/path_to_log/hidrocarburos.log" ... END ... END and with ERROR "http://localhost/mapserver/my_application/error.html" EMPTY "http://localhost/mapserver/my_application/empty.html" but I still get the message "msDrawMap ...". Must the html pages error.html and empty.html have a special format? Thanks in advance! From richard.greenwood at GMAIL.COM Fri Nov 2 06:39:36 2007 From: richard.greenwood at GMAIL.COM (Richard Greenwood) Date: Fri, 2 Nov 2007 07:39:36 -0600 Subject: MapServer on Leopard? In-Reply-To: Message-ID: Yeah, I laughed at Dave's first email also. The scary thing is, I knew exactly what he was saying. I read that Leopard comes with Apache 2.2 and PHP5, but that there is not a php_postgres extension. Regards, Rich On 10/31/07, P Kishor wrote: > On 10/31/07, Fawcett, David wrote: > > Is anyone out there using William Kyngesburye on Leopard? I see that > > there is an issue with competing Pythons and I was wondering what people > > have done as a workaround. > > > > > This has to be absolutely the funniest message ever. I mean, using > William Kyngesburye on Leopard. Competing with Pythons. How utterly > animalistic. > > Thanks for a good, genuine smile David. > -- Richard Greenwood richard.greenwood at gmail.com www.greenwoodmap.com From john.cole at UAI.COM Fri Nov 2 06:45:24 2007 From: john.cole at UAI.COM (John Cole) Date: Fri, 2 Nov 2007 06:45:24 -0700 Subject: Legend problem in MapServer 5.0 In-Reply-To: Message-ID: Thomas, Thanks, but I'm using the MS4W release, and I've tried to compile it before :-) (with lots of help from Frank, Tamas and Howard). Even if I absolutely needed it now, that doesn't solve the issue for other users. I'm curious about the 5.0.1 release date, since it's been over a month now since the release, with what I would consider a fairly major bug (legends) that was fixed in code already. For anyone who uses legends with their maps, this issue is a major roadblock to adopting MS5, and I'm wondering if the consensus of the MS guru's agree with my opinion or not :-) Thanks, John tbonfort wrote: > > John, you can either wait for 5.0.1 or just pick the modified > maplegend.c and replace it in your build directory. > the file is here: > http://trac.osgeo.org/mapserver/browser/branches/branch-5-0/mapserver/maplegend.c?format=raw > > thomas > > On 11/1/07, John Cole wrote: >> tbonfort wrote: >> > >> > thanks all for feedback. >> > there's a typo bug in the legend rendering. will fix this in trunk >> > soon and should be incorporated in 5.0.1 >> > >> > tb >> > >> > >> >> Any word on when a 5.0.1 will be issued with this fix in it? It's a pain >> to >> have to load both MS5 and MS4 just to get legend support. >> >> Thanks, >> >> John >> -- >> View this message in context: >> http://www.nabble.com/Legend-problem-in-MapServer-5.0-tf4482729.html#a13531369 >> Sent from the Mapserver - User mailing list archive at Nabble.com. >> > > -- View this message in context: http://www.nabble.com/Legend-problem-in-MapServer-5.0-tf4482729.html#a13547925 Sent from the Mapserver - User mailing list archive at Nabble.com. From Steve.Lime at DNR.STATE.MN.US Fri Nov 2 06:46:50 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Fri, 2 Nov 2007 08:46:50 -0500 Subject: nearest search with MapServer Message-ID: Brian: Via the CGI or can you use MapScript? The normal mode=query does this but only one layer at a time. Simple point queries make distance computations to find the closest feature within a search area. For example, you set the tolerance for a layer (say 5 miles for schools) and then MapServer finds the closest school to the XY point. If no schools are within that tolerance then the query fails. If the XY is in a polygon the distance is zero and the search returns quickly. You also have other options. With MapScript, of course, you could loop through your candidate layers and do a simple point query. Your client software could also issue multiple simple mode=query requests, one for each layer, using AJAX and you could build a result set that way. Steve >>> "Fischer, Brian" 11/01/07 3:57 PM >>> MapServer users, I am curious to hear if anyone knows if it is possible to implement a nearest search with mapscript. For example I want to take an xy point that a user clicked on the map and find the nearest feature in many different layers to that point. For example nearest park, library, school, etc. It is also possible the point could be contained with in a polygon. Is there a Geos function in mapscript to do this? I haven't seen this done before with mapserver, but thought I would ask anyway. I know I could do it with PostGIS, but I'm trying to get away without making that a requirement for my application. Thanks for any feedback you can give me. -Brian From woklist at KYNGCHAOS.COM Fri Nov 2 07:08:46 2007 From: woklist at KYNGCHAOS.COM (William Kyngesburye) Date: Fri, 2 Nov 2007 09:08:46 -0500 Subject: MapServer on Leopard? In-Reply-To: Message-ID: Oh joy, I guess I have to stop ignoring Apache 2. I always thought that Apache 2 was not so much an updated version of Apache, but meant for a different purpose (I forget what) [something I read on the Apache site once long ago?]. And yes, it's PHP 5.2, but as before as a dynamic Apache module. The stability of PHP-Mapscript is still an unknown with a DSO PHP, so I'll be looking at making a PHP CGI installer for Leopard. Since it's Apache 2, it'll have to be separate Tiger/Leopard installers. On Nov 2, 2007, at 8:39 AM, Richard Greenwood wrote: > Yeah, I laughed at Dave's first email also. The scary thing is, I knew > exactly what he was saying. > > I read that Leopard comes with Apache 2.2 and PHP5, but that there is > not a php_postgres extension. > > Regards, > Rich ----- William Kyngesburye http://www.kyngchaos.com/ "This is a question about the past, is it? ... How can I tell that the past isn't a fiction designed to account for the discrepancy between my immediate physical sensations and my state of mind?" - The Ruler of the Universe From dmorissette at MAPGEARS.COM Fri Nov 2 07:17:33 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Fri, 2 Nov 2007 10:17:33 -0400 Subject: Legend problem in MapServer 5.0 In-Reply-To: <13547925.post@talk.nabble.com> Message-ID: John Cole wrote: > > I'm curious about the 5.0.1 release date, since it's been over a month now > since the release, with what I would consider a fairly major bug (legends) > that was fixed in code already. For anyone who uses legends with their > maps, this issue is a major roadblock to adopting MS5, and I'm wondering if > the consensus of the MS guru's agree with my opinion or not :-) > I agree that we're due for a 5.0.1. One big issue that needs to be resolved before we can release 5.0.1 is the requirement for the STYLE= parameter in WMS GetMap request that has been enforced (as required by the spec) in MapServer 5.0.0 but that prevents clients such as Google Earth from connecting to MapServer 5.0.0 WMS servers. There is a RFC in the making to resolve this: http://mapserver.gis.umn.edu/development/rfc/ms-rfc-35 I'll reopen the discussion on this today and we should have a 5.0.1 release soon. Daniel -- Daniel Morissette http://www.mapgears.com/ From warmerdam at POBOX.COM Fri Nov 2 07:33:37 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Fri, 2 Nov 2007 10:33:37 -0400 Subject: Legend problem in MapServer 5.0 In-Reply-To: <472B317D.9090607@mapgears.com> Message-ID: Daniel Morissette wrote: > One big issue that needs to be resolved before we can release 5.0.1 is > the requirement for the STYLE= parameter in WMS GetMap request that has > been enforced (as required by the spec) in MapServer 5.0.0 but that > prevents clients such as Google Earth from connecting to MapServer 5.0.0 > WMS servers. > > There is a RFC in the making to resolve this: > http://mapserver.gis.umn.edu/development/rfc/ms-rfc-35 Daniel, I have reviewed your updates, and I've made one more small change, removing the "quick and dirty" part. Permissive mode should be seen as a mechanism to get the widest possible interoperability with clients (even slightly broken clients), rather than as a quick and dirty approach. The other 5.0.1 issue that I think is critical is: http://trac.osgeo.org/mapserver/ticket/2373 That is, to make sure we don't release 5.0.1 with a non-portable mapparser.c by accident. It seems that most of the other pending 5.0.1 milestone bugs could be easily put off to 5.0.2 in the interest of getting 5.0.1 out the door within a week or two. 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 | President OSGeo, http://osgeo.org From john.cole at UAI.COM Fri Nov 2 07:35:40 2007 From: john.cole at UAI.COM (John Cole) Date: Fri, 2 Nov 2007 07:35:40 -0700 Subject: state plane shapefile Message-ID: Does anyone have, or know where I can find, a shapefile that has all of the state-plain projection zones for the US? Thx, John -- View this message in context: http://www.nabble.com/state-plane-shapefile-tf4737790.html#a13548780 Sent from the Mapserver - User mailing list archive at Nabble.com. From jeff at PROPERTYKEY.COM Fri Nov 2 08:33:24 2007 From: jeff at PROPERTYKEY.COM (Jeff Hoffmann) Date: Fri, 2 Nov 2007 10:33:24 -0500 Subject: state plane shapefile In-Reply-To: <13548780.post@talk.nabble.com> Message-ID: John Cole wrote: > Does anyone have, or know where I can find, a shapefile that has all of the > state-plain projection zones for the US? I have a list of counties & their zones (well, EPSG codes for those zones at least) that I've joined against the TIGER counties layers. It's located at ftp://ftp.propertykey.com/pub/files/gis/county_sp.zip I don't have a source for the list, so use it at your own risk. I know there's one county (Maricopa, AZ) that is shown in a different zone than I expected (all of the data we get for that county seems to be AZ Central but it's shown as AZ East; I'm not sure which one is right). -- Jeff Hoffmann Head Plate Spinner PropertyKey.com From hobu.inc at GMAIL.COM Fri Nov 2 09:45:14 2007 From: hobu.inc at GMAIL.COM (Howard Butler) Date: Fri, 2 Nov 2007 11:45:14 -0500 Subject: MapServer on Leopard? In-Reply-To: <11F20F15-5281-4F10-8E86-271FD15B9238@kyngchaos.com> Message-ID: William, Leopard is Apache 2.2, not 2.0. It makes things even more interesting... :) Also, there's a showstopper on Leopard and AGG, and it looks like it is Apple's (gcc's) fault. http://trac.osgeo.org/mapserver/ticket/2368 I don't have a good workaround yet. Howard On Nov 2, 2007, at 9:08 AM, William Kyngesburye wrote: > Oh joy, I guess I have to stop ignoring Apache 2. I always thought > that Apache 2 was not so much an updated version of Apache, but > meant for a different purpose (I forget what) [something I read on > the Apache site once long ago?]. > > And yes, it's PHP 5.2, but as before as a dynamic Apache module. > The stability of PHP-Mapscript is still an unknown with a DSO PHP, > so I'll be looking at making a PHP CGI installer for Leopard. > Since it's Apache 2, it'll have to be separate Tiger/Leopard > installers. > > On Nov 2, 2007, at 8:39 AM, Richard Greenwood wrote: > >> Yeah, I laughed at Dave's first email also. The scary thing is, I >> knew >> exactly what he was saying. >> >> I read that Leopard comes with Apache 2.2 and PHP5, but that there is >> not a php_postgres extension. >> >> Regards, >> Rich > > ----- > William Kyngesburye > http://www.kyngchaos.com/ > > "This is a question about the past, is it? ... How can I tell that > the past isn't a fiction designed to account for the discrepancy > between my immediate physical sensations and my state of mind?" > > - The Ruler of the Universe From woklist at KYNGCHAOS.COM Fri Nov 2 10:04:50 2007 From: woklist at KYNGCHAOS.COM (William Kyngesburye) Date: Fri, 2 Nov 2007 12:04:50 -0500 Subject: MapServer on Leopard? In-Reply-To: <0A2E8B76-5184-4A69-AA2E-B66756AAFFB2@gmail.com> Message-ID: On Nov 2, 2007, at 11:45 AM, Howard Butler wrote: > William, > > Leopard is Apache 2.2, not 2.0. It makes things even more > interesting... :) > I was just generalizing it to 2.x, as opposed to 1.3. But it sounds like 2.2 is yet another completely different beast from 2.0? > Also, there's a showstopper on Leopard and AGG, and it looks like it > is Apple's (gcc's) fault. http://trac.osgeo.org/mapserver/ticket/ > 2368 I don't have a good workaround yet. > Ouch. Haven't tried yet myself. I'll see what happens when I get there. ----- William Kyngesburye http://www.kyngchaos.com/ First Pogril: Why is life like sticking your head in a bucket filled with hyena offal? Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal? First Pogril: I don't know either. Wretched, isn't it? -HitchHiker's Guide to the Galaxy From gregor at HOSTGIS.COM Fri Nov 2 10:18:41 2007 From: gregor at HOSTGIS.COM (Gregor Mosheh) Date: Fri, 2 Nov 2007 11:18:41 -0600 Subject: A really weird problem with querying a map In-Reply-To: <6246727221874A4FB8D3F9BBC37D9BD5021FB82E@s-sp22.pca.state.mn.us> Message-ID: Fawcett, David wrote: > I wasn't trying to imply that the best solution was to 'pre-project' > your data. I was just trying to figure out if the issue was in the > projection code or the tolerance code. (could be both I guess) Understood. > Have you tried displaying both a layer in the original SRS (projected > on-the-fly) and your pre-projected data layer? Actually, yes. I had the one query layer reprojected, and all others at geographic. At this time, map alignment was still A-OK, same as it was when all layers were geographic and the map's output was 26709. Therefore, reprojection for map generation seemed to work just fine. The issue seems to be in reprojecting from map SRS to layer SRS when querying. Unfortunately, the customer has now signed off on the map, using all data in the same SRS, so I am no longer able to work on that map. To reiterate for a bug report: * This was under 4.10.3 Perhaps it has already been fixed in 5.0 ? * The map output was EPSG:26709 and the layers were all EPSG:4269 (geographic nad27). All layers were of contiguous polygons. * The only way queries would work under those conditions was to use a very large buffer (1000 pixels), and making the buffer smaller seemed to cause the hits to become looser, hitting neighboring polygons. A buffer of 0px caused queries to always fail, rather than the intended behavior of a click matching only inside the polygon. * Changing the layer to 26709 solved the problem entirely. -- Gregor Mosheh / Greg Allensworth System Administrator, HostGIS cartographic development & hosting services http://www.HostGIS.com/ "Remember that no one cares if you can back up, only if you can restore." - AMANDA From andreas.albarello at TERRITORIUMONLINE.COM Fri Nov 2 11:02:09 2007 From: andreas.albarello at TERRITORIUMONLINE.COM (Andreas Albarello) Date: Fri, 2 Nov 2007 19:02:09 +0100 Subject: Class or filter expression on date field in shapefile In-Reply-To: <47266012.1070202@duke.edu> Message-ID: Ei Fujioka wrote: > What is the date format for class/filter expression? > I use Mapserver 4.2. > I tried the following expression but failed. > EXPRESSION ([DATE_S] > '2003-01-01') Ei, I happened to stumble upon some MapServer 4.2 code today and a quick look at the lexer and parser made me think that the following expression might even work: EXPRESSION ('[DATE_S]' > '2003-01-01') Note that it was single quotes back then, not backticks, and the field needs to be quoted too. Besides, YYYY-MM-DD seems to be the only recognized format, any other character combination is treated as a string. I wasn't able to actually test this, though, so take it FWIW. Best regards, -- -------------------------------------------------------------------- Andreas Albarello Analysis & SW Development Territorium Online srl/GmbH Via Buozzi/Buozzistra?e 12 - I 39100 Bolzano/Bozen email: andreas.albarello at territoriumonline.com web: www.territoriumonline.com -------------------------------------------------------------------- From bthoen at GISNET.COM Fri Nov 2 11:46:13 2007 From: bthoen at GISNET.COM (Bill Thoen) Date: Fri, 2 Nov 2007 12:46:13 -0600 Subject: Using Demo in the Wiki Causes All My PHP/Mapscript Examples to Die Message-ID: I've been experimenting with PHP/mapscript and came across an example of how to display points dynamically (it's in the wiki at http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint), and so I wanted to try it. It seems to work for several points in a row (basically moving a single point to the next place I click) but after about 10 clicks or so, the application dies with a loadLayer() error (which causes a cascade of subsequent errors.) Worse, I discover that when this happens NONE of my other PHP/mapscript applications will work, even though they've been working fine and use other data sources and map files. I have to reboot my machine to get them to work again. I've added a call to $pt->free() following the line with $pt->draw() in it and fixed the parameter list in click2map() to include the $map->extent, but that doesn't seem to cure it. I'm using MapServer 4.10.0 and I think mapscript 4.8, and this is all running on Fedora Core 5 Linux machine. Does anyone have any idea what's happening and how I can correct it? TIA, - Bill Thoen From dmorissette at MAPGEARS.COM Fri Nov 2 12:05:14 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Fri, 2 Nov 2007 15:05:14 -0400 Subject: Using Demo in the Wiki Causes All My PHP/Mapscript Examples to Die In-Reply-To: <472B7075.3060103@gisnet.com> Message-ID: Are you using PHP as an Apache module or as a CGI? If using PHP as a module then what you got could be the symptoms of a memory trashing problem which over time corrupts/kills all Apache child processes. The easy workaround would be to switch to using PHP as a CGI, this way every request gets a new fresh process to work with and you avoid the problem. However if possible we should try to identify the source of the problem, and if it's a bug in MapServer then try to fix it. First, the usual suspects: GD... if your PHP has GD enabled, then is it using the same copy of GD as PHP MapScript? If PHP uses its bundled GD that could be a problem because MapScript likely uses the system GD and you have two different versions of GD used in the same process. It's important that both PHP and MapServer/MapScript use the system GD. If you are convinced that conflicting GD versions is not the cause of the problems then I'd suggest that you try again with MapServer 5.0. If you can reproduce the bug with 5.0 then please file a ticket in Trac with as much detail as you can, including a script + mapfile to reproduce. Daniel Bill Thoen wrote: > I've been experimenting with PHP/mapscript and came across an example of > how to display points dynamically (it's in the wiki at > http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint), and > so I wanted to try it. > > It seems to work for several points in a row (basically moving a single > point to the next place I click) but after about 10 clicks or so, the > application dies with a loadLayer() error (which causes a cascade of > subsequent errors.) Worse, I discover that when this happens NONE of my > other PHP/mapscript applications will work, even though they've been > working fine and use other data sources and map files. I have to reboot > my machine to get them to work again. > > I've added a call to $pt->free() following the line with $pt->draw() in > it and fixed the parameter list in click2map() to include the > $map->extent, but that doesn't seem to cure it. > > I'm using MapServer 4.10.0 and I think mapscript 4.8, and this is all > running on Fedora Core 5 Linux machine. > > Does anyone have any idea what's happening and how I can correct it? > > TIA, > - Bill Thoen -- Daniel Morissette http://www.mapgears.com/ From bthoen at GISNET.COM Fri Nov 2 13:09:37 2007 From: bthoen at GISNET.COM (Bill Thoen) Date: Fri, 2 Nov 2007 14:09:37 -0600 Subject: Using Demo in the Wiki Causes All My PHP/Mapscript Examples to Die In-Reply-To: <472B74EA.6000500@mapgears.com> Message-ID: Going back through my notes on how I installed PHP and mapscript I quoted you in my notes: > "Well, by downloading and using the PHP source of the same version as > what is installed on your machine the build worked fine, but there is > a small possibility that you may still encounter intermittent crashes > at runtime because the PHP headers are customized to match your build > options by PHP's configure, and you didn't use the headers that match > exactly your PHP build options. Options such as the version of REGEX > or GD used by PHP have an impact on MapScript." I guess this is what you meant... I think I need to re-examine this install. Daniel Morissette wrote: > Are you using PHP as an Apache module or as a CGI? > If using PHP as a module then what you got could be the symptoms of a > memory trashing problem which over time corrupts/kills all Apache > child processes. > > The easy workaround would be to switch to using PHP as a CGI, this way > every request gets a new fresh process to work with and you avoid the > problem. > > However if possible we should try to identify the source of the > problem, and if it's a bug in MapServer then try to fix it. > > First, the usual suspects: GD... if your PHP has GD enabled, then is > it using the same copy of GD as PHP MapScript? If PHP uses its bundled > GD that could be a problem because MapScript likely uses the system GD > and you have two different versions of GD used in the same process. > It's important that both PHP and MapServer/MapScript use the system GD. > > If you are convinced that conflicting GD versions is not the cause of > the problems then I'd suggest that you try again with MapServer 5.0. > If you can reproduce the bug with 5.0 then please file a ticket in > Trac with as much detail as you can, including a script + mapfile to > reproduce. > > Daniel > > > Bill Thoen wrote: >> I've been experimenting with PHP/mapscript and came across an example >> of how to display points dynamically (it's in the wiki at >> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint), >> and so I wanted to try it. >> >> It seems to work for several points in a row (basically moving a >> single point to the next place I click) but after about 10 clicks or >> so, the application dies with a loadLayer() error (which causes a >> cascade of subsequent errors.) Worse, I discover that when this >> happens NONE of my other PHP/mapscript applications will work, even >> though they've been working fine and use other data sources and map >> files. I have to reboot my machine to get them to work again. >> >> I've added a call to $pt->free() following the line with $pt->draw() >> in it and fixed the parameter list in click2map() to include the >> $map->extent, but that doesn't seem to cure it. >> >> I'm using MapServer 4.10.0 and I think mapscript 4.8, and this is all >> running on Fedora Core 5 Linux machine. >> >> Does anyone have any idea what's happening and how I can correct it? >> >> TIA, >> - Bill Thoen > > From garyg+maps at GARRARDFAMILY.US Fri Nov 2 19:59:45 2007 From: garyg+maps at GARRARDFAMILY.US (Gary Garrard) Date: Fri, 2 Nov 2007 19:59:45 -0700 Subject: state plane shapefile In-Reply-To: <13548780.post@talk.nabble.com> Message-ID: On Fri, 2 Nov 2007 07:35:40 -0700 John Cole wrote: > Does anyone have, or know where I can find, a shapefile that has all > of the state-plain projection zones for the US? > > Thx, > I found a zip file containing such shape files for NAD 27 & 83 by going to http://www.geographynetwork.com/data/downloadable.html, clicking on 'Geography network explorer', entering "state plane" in the 'optional keyword' box, and performing a search. It is the first returned result. > John From yjacolin at FREE.FR Sat Nov 3 02:41:54 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Sat, 3 Nov 2007 10:41:54 +0100 Subject: SLD resquest issue with EXPRESSION parameter In-Reply-To: <472B7E6A.8060504@dmsolutions.ca> Message-ID: Thanks Yewondwossen Assefa, One more question, do you know some issue with the EXPRESSION parameter (for instance a simple EXPRESSION ('[ZONE_]' eq 'UCa')) AND the number of CLASS in a LAYER? My problem is that the GetStyles request send back an empty xml file with EXPRESSION and if more than 6 CLASSE objects are used. If I coment all the EXPRESSION, I get an XML file. Actualy, if I uncoment EXPRESSION in more than 6 CLASSes, the xml file will be empty. Furthermore, even if I get an xml file, it seems there is a problem in my XML data : ZONE_ Or for one of them : ZONE_ ??p ?$~????? As you can see, the Literal properties is empty or unusable :( Tthe FILTER parameter doesn't seem to be usable for the GetStyles request. Am I right? Best regards, Y. Le Friday 02 November 2007 20:45:46 Yewondwossen Assefa, vous avez ?crit?: > Hi There, > > I have entered a bug regarding this at > http://trac.osgeo.org/mapserver/ticket/2380. Only one level of logical > expression ( A AND B) was initially supported. It should be possible to > extend it to support several levels using para theses (something like (A > AND B) AND (C). > > Best Regards > > Jacolin Yves wrote: > > Hi list, > > > > I am using Mapserver as a OGC webserver. I am trying the GetStyles > > request and find some issues. Someone asked about this issue in the > > mailing list in the short last few monthes. > > > > I got some LAYER which contains about 12 CLASS objets, this CLASS > > contains EXPRESSION parameter. Here an exemple : > > CLASS > > NAME "M1 : La D?fense - Ch?teau de Vincennes" > > EXPRESSION ('[TYPE]' eq 'M' AND '[NUMERO]' eq '1' AND '[DATE_LIV]' > > < '200712') > > COLOR 255 255 0 > > SIZE 3 > > SYMBOL 1 > > END > > > > There are 24 class like this one. > > > > If I try a GetStyles request on this kind of layer, nothing occurs (ie > > blank page), if I remove most CLASS the XML response is displayed, If I > > remove only the EXPRESSION parameter, again the XML response is > > displayed. So I think the issue is not link to the number of CLASS > > object, but rather with EXPRESSION parameter. > > > > BUT, in an other LAYER, I got only three CLASS object with EXPRESSION > > parameter, and the xml response is displayed. > > > > Finally, it seems that if a LAYER got a lot of CLASS object with > > EXPRESSION parameter inside, the XML response failed. And if a LAYER > > object got a lot of CLASS object, the XML response failed as well. > > > > I am using Mapserver 4.10. Are someone aware of this issue and know a > > workaround. > > > > Thanks, > > > > Y. -- Yves Jacolin --- http://softlibre.gloobe.org From yjacolin at FREE.FR Sat Nov 3 02:50:57 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Sat, 3 Nov 2007 10:50:57 +0100 Subject: SLD resquest issue with EXPRESSION parameter In-Reply-To: <200711031041.54485.yjacolin@free.fr> Message-ID: Hi again, I find away to get the GetStyles XML file correctly for the last problem: I have to used CLASSITEM parameter in the LAYER object then use EXPRESSION 'UPZ.' for exemple. I get : ZONE_ UPZ. Unhopefully, the "6 CLASS" issue is still present :( Y. Le Saturday 03 November 2007 10:41:54 Jacolin Yves, vous avez ?crit?: > Thanks Yewondwossen Assefa, > > One more question, do you know some issue with the EXPRESSION parameter > (for instance a simple EXPRESSION ('[ZONE_]' eq 'UCa')) AND the number of > CLASS in a LAYER? > > My problem is that the GetStyles request send back an empty xml file with > EXPRESSION and if more than 6 CLASSE objects are used. > > If I coment all the EXPRESSION, I get an XML file. Actualy, if I uncoment > EXPRESSION in more than 6 CLASSes, the xml file will be empty. > > Furthermore, even if I get an xml file, it seems there is a problem in my > XML data : > > > ZONE_ > > > > > Or for one of them : > > > > ZONE_ > ??p ?$~????? > > > > As you can see, the Literal properties is empty or unusable :( > > Tthe FILTER parameter doesn't seem to be usable for the GetStyles request. > Am I right? > > Best regards, > > Y. > > Le Friday 02 November 2007 20:45:46 Yewondwossen Assefa, vous avez ?crit?: > > Hi There, > > > > I have entered a bug regarding this at > > http://trac.osgeo.org/mapserver/ticket/2380. Only one level of logical > > expression ( A AND B) was initially supported. It should be possible to > > extend it to support several levels using para theses (something like (A > > AND B) AND (C). > > > > Best Regards > > > > Jacolin Yves wrote: > > > Hi list, > > > > > > I am using Mapserver as a OGC webserver. I am trying the GetStyles > > > request and find some issues. Someone asked about this issue in the > > > mailing list in the short last few monthes. > > > > > > I got some LAYER which contains about 12 CLASS objets, this CLASS > > > contains EXPRESSION parameter. Here an exemple : > > > CLASS > > > NAME "M1 : La D?fense - Ch?teau de Vincennes" > > > EXPRESSION ('[TYPE]' eq 'M' AND '[NUMERO]' eq '1' AND '[DATE_LIV]' > > > < '200712') > > > COLOR 255 255 0 > > > SIZE 3 > > > SYMBOL 1 > > > END > > > > > > There are 24 class like this one. > > > > > > If I try a GetStyles request on this kind of layer, nothing occurs (ie > > > blank page), if I remove most CLASS the XML response is displayed, If I > > > remove only the EXPRESSION parameter, again the XML response is > > > displayed. So I think the issue is not link to the number of CLASS > > > object, but rather with EXPRESSION parameter. > > > > > > BUT, in an other LAYER, I got only three CLASS object with EXPRESSION > > > parameter, and the xml response is displayed. > > > > > > Finally, it seems that if a LAYER got a lot of CLASS object with > > > EXPRESSION parameter inside, the XML response failed. And if a LAYER > > > object got a lot of CLASS object, the XML response failed as well. > > > > > > I am using Mapserver 4.10. Are someone aware of this issue and know a > > > workaround. > > > > > > Thanks, > > > > > > Y. -- Yves Jacolin --- http://softlibre.gloobe.org From yjacolin at FREE.FR Sat Nov 3 05:50:28 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Sat, 3 Nov 2007 13:50:28 +0100 Subject: WRAP parameter in LABEL of LEGEND object Message-ID: Hi, Does the WRAP parameter is suppose to work in a LABEL object inside a LEGEND object? Thanks, Y. -- Yves Jacolin --- http://softlibre.gloobe.org From ryanollerenshaw at GMAIL.COM Sat Nov 3 20:21:14 2007 From: ryanollerenshaw at GMAIL.COM (Ryan Ollerenshaw) Date: Sat, 3 Nov 2007 20:21:14 -0700 Subject: queryByAttributes returns 0 every time Message-ID: I cant seem to get queryByAttributes to work correctly, I always get 0 results every time, here is the php code that i am using: $queryString = "(TEAM_ID > 1)"; $mroLayer->queryByAttributes('TEAM_ID',$queryString, MS_SINGLE); echo "RESULTS: ".$mroLayer->getNumResults() I have also tried: $queryString = "(TEAM_ID > '1')"; $queryString = "('TEAM_ID' > '1')"; $queryString = "('[TEAM_ID]' > 1)"; Nothing seems to work, I am using php 5.4.1 and mapserver 4.10.1 From woodbri at SWOODBRIDGE.COM Sat Nov 3 21:31:35 2007 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Sat, 3 Nov 2007 23:31:35 -0500 Subject: queryByAttributes returns 0 every time In-Reply-To: <20b31d4d0711032021k7447db49k5fa779a4bb3a6bdb@mail.gmail.com> Message-ID: Ryan Ollerenshaw wrote: > I cant seem to get queryByAttributes to work correctly, I always get 0 > results every time, here is the php code that i am using: > > $queryString = "(TEAM_ID > 1)"; > $mroLayer->queryByAttributes('TEAM_ID',$queryString, MS_SINGLE); > echo "RESULTS: ".$mroLayer->getNumResults() > > I have also tried: > $queryString = "(TEAM_ID > '1')"; > $queryString = "('TEAM_ID' > '1')"; > $queryString = "('[TEAM_ID]' > 1)"; > > Nothing seems to work, I am using php 5.4.1 and mapserver 4.10.1 Try: $queryString = "([TEAM_ID] > 1)"; -Steve W From ryanollerenshaw at GMAIL.COM Sat Nov 3 20:35:13 2007 From: ryanollerenshaw at GMAIL.COM (Ryan Ollerenshaw) Date: Sat, 3 Nov 2007 20:35:13 -0700 Subject: queryByAttributes returns 0 every time In-Reply-To: <472D4B27.2020005@swoodbridge.com> Message-ID: On 11/3/07, Stephen Woodbridge wrote: > Ryan Ollerenshaw wrote: > > I cant seem to get queryByAttributes to work correctly, I always get 0 > > results every time, here is the php code that i am using: > > > > $queryString = "(TEAM_ID > 1)"; > > $mroLayer->queryByAttributes('TEAM_ID',$queryString, MS_SINGLE); > > echo "RESULTS: ".$mroLayer->getNumResults() > > > > I have also tried: > > $queryString = "(TEAM_ID > '1')"; > > $queryString = "('TEAM_ID' > '1')"; > > $queryString = "('[TEAM_ID]' > 1)"; > > > > Nothing seems to work, I am using php 5.4.1 and mapserver 4.10.1 > > Try: $queryString = "([TEAM_ID] > 1)"; > > -Steve W > $queryString = "([TEAM_ID] > 1)"; $queryString = "[TEAM_ID] > 1"; $queryString = "('[TEAM_ID]' > 1)"; $queryString = "'[TEAM_ID]' > 1"; Still no good. From ryanollerenshaw at GMAIL.COM Sat Nov 3 20:59:23 2007 From: ryanollerenshaw at GMAIL.COM (Ryan Ollerenshaw) Date: Sat, 3 Nov 2007 20:59:23 -0700 Subject: queryByAttributes returns 0 every time In-Reply-To: <20b31d4d0711032035v45ca9ac0gfe948975022ab9fb@mail.gmail.com> Message-ID: On 11/3/07, Ryan Ollerenshaw wrote: > On 11/3/07, Stephen Woodbridge wrote: > > Ryan Ollerenshaw wrote: > > > I cant seem to get queryByAttributes to work correctly, I always get 0 > > > results every time, here is the php code that i am using: > > > > > > $queryString = "(TEAM_ID > 1)"; > > > $mroLayer->queryByAttributes('TEAM_ID',$queryString, MS_SINGLE); > > > echo "RESULTS: ".$mroLayer->getNumResults() > > > > > > I have also tried: > > > $queryString = "(TEAM_ID > '1')"; > > > $queryString = "('TEAM_ID' > '1')"; > > > $queryString = "('[TEAM_ID]' > 1)"; > > > > > > Nothing seems to work, I am using php 5.4.1 and mapserver 4.10.1 > > > > Try: $queryString = "([TEAM_ID] > 1)"; > > > > -Steve W > > > > $queryString = "([TEAM_ID] > 1)"; > $queryString = "[TEAM_ID] > 1"; > $queryString = "('[TEAM_ID]' > 1)"; > $queryString = "'[TEAM_ID]' > 1"; > > Still no good. > I changed my filter back to: $mroLayer->set("filteritem","gid"); $mroLayer->setFilter("gid =".$gid.""); This works file for integers but for some reason strings dont work. But i can live with this solution for now. From thomas.bonfort at GMAIL.COM Sun Nov 4 05:51:24 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Sun, 4 Nov 2007 14:51:24 +0100 Subject: WRAP parameter in LABEL of LEGEND object In-Reply-To: <200711031350.28627.yjacolin@free.fr> Message-ID: Yves, this isn't currently supported. I'll be looking into this and another side effect which concerns vertical spacing between legend items and let you know when/if things change on this end. cheers, tb On 11/3/07, Jacolin Yves wrote: > Hi, > > Does the WRAP parameter is suppose to work in a LABEL object inside a LEGEND > object? > > Thanks, > > Y. > -- > Yves Jacolin > --- > http://softlibre.gloobe.org > From yjacolin at FREE.FR Sun Nov 4 06:26:19 2007 From: yjacolin at FREE.FR (Yves Jacolin) Date: Sun, 4 Nov 2007 15:26:19 +0100 Subject: WRAP parameter in LABEL of LEGEND object In-Reply-To: Message-ID: Thanks Thomas, Y. Le dimanche 4 novembre 2007 14:51, thomas bonfort a ?crit?: > Yves, > this isn't currently supported. I'll be looking into this and another > side effect which concerns vertical spacing between legend items and > let you know when/if things change on this end. > > cheers, > tb > > On 11/3/07, Jacolin Yves wrote: > > Hi, > > > > Does the WRAP parameter is suppose to work in a LABEL object inside a > > LEGEND object? > > > > Thanks, > > > > Y. > > -- > > Yves Jacolin > > --- > > http://softlibre.gloobe.org -- Yves Jacolin ------------- http://yjacolin.gloobe.org http://softlibre.gloobe.org From vishu_73ns at YAHOO.COM Sun Nov 4 21:03:33 2007 From: vishu_73ns at YAHOO.COM (Vishal Nagpal) Date: Sun, 4 Nov 2007 23:03:33 -0600 Subject: Raster layer - Howto? Message-ID: Hi, All this time got great inputs from the discussion, I have tried using the same for tiff files where coordinates are in DD, But when I try to do it with dgn files where unit is METRE, there seems to be a problem, it is difficult to remove the georeference information attached with the file, From Todd.Harris at LANDGATE.WA.GOV.AU Mon Nov 5 01:47:41 2007 From: Todd.Harris at LANDGATE.WA.GOV.AU (Todd Harris) Date: Mon, 5 Nov 2007 18:47:41 +0900 Subject: Mapfile classes Message-ID: Hi all, In a mapfile, using classes, is there any way to ensure that the correct polygons are displayed last (ie: on top). I assumed that the last CLASS listed would always display on top but I've found that is not necessarily the case. I have multiple classes that have overlapping polygons required to be filled and displayed in the correct order. Any suggestions would be appreciated. Regards ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Todd Harris Geospatial Product Consultant, SLIP GIS Support Information Management Division Landgate Western Australia (08) 9273 7866 www.landgate.wa.gov.au ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This e-mail and any files transmitted with it are intended only for the use of the addressee(s). It may contain information that is confidential and privileged, in which case neither is intended to be waived or lost by mistaken delivery to you. If you are not an intended recipient, any use, interference with, disclosure, distribution or copying of this material is unauthorised and prohibited. If you receive this e-mail in error, please notify the sender by return e-mail and delete the message and any attachments from your system. Unless specifically indicated, this e-mail does not constitute formal advice or commitment by the sender or the Western Australian Land Information Authority (Landgate). Information in this message not relating to the official business of Landgate shall be understood as neither given nor endorsed by it. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. Landgate?s liability is limited to re-supplying affected attachments. From bartvde at GMAIL.COM Mon Nov 5 02:23:42 2007 From: bartvde at GMAIL.COM (Bart van den Eijnden) Date: Mon, 5 Nov 2007 11:23:42 +0100 Subject: Mapfile classes In-Reply-To: <82C223B25A75614D9F884563CE191C1404E704EF@MAIL.dli.wa.gov.au> Message-ID: Hi Todd, you will need to sort your data, for shapefiles you can use sortshp. http://mapserver.gis.umn.edu/docs/reference/utilityreference/sortshp Best regards, Bart On 11/5/07, Todd Harris wrote: > > Hi all, > > In a mapfile, using classes, is there any way to ensure that the correct > polygons are displayed last (ie: on top). I assumed that the last CLASS > listed would always display on top but I've found that is not > necessarily the case. > I have multiple classes that have overlapping polygons required to be > filled and displayed in the correct order. > > Any suggestions would be appreciated. > > Regards > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Todd Harris > Geospatial Product Consultant, SLIP GIS Support > Information Management Division > Landgate Western Australia > (08) 9273 7866 > www.landgate.wa.gov.au > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > This e-mail and any files transmitted with it are intended only for the > use of the addressee(s). It may contain information that is confidential and > privileged, in which case neither is intended to be waived or lost by > mistaken delivery to you. If you are not an intended recipient, any use, > interference with, disclosure, distribution or copying of this material is > unauthorised and prohibited. If you receive this e-mail in error, please > notify the sender by return e-mail and delete the message and any > attachments from your system. Unless specifically indicated, this e-mail > does not constitute formal advice or commitment by the sender or the Western > Australian Land Information Authority (Landgate). Information in this > message not relating to the official business of Landgate shall be > understood as neither given nor endorsed by it. It is your responsibility to > check any attachments for viruses and defects before opening or sending them > on. Landgate's liability is limited to re-supplying affected attachments. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanscastorp76 at YAHOO.ES Mon Nov 5 02:33:49 2007 From: hanscastorp76 at YAHOO.ES (Hans Castorp) Date: Mon, 5 Nov 2007 11:33:49 +0100 Subject: Update data Message-ID: HI to everyone, I?m developing a gis site using ka-map and mapserver, but my customer wants to go one step further He needs to update his data on-line, so I must to develop a module to: add points (and add alphanumeric data to these points), delete point, update alphanumeric data, etc. So, my question is: is it possible using shape files??? It?s better to change to post-gis?? Anyway, where can I find information about these questions?? Thanks in advance. Hans Castorp Hans Castorp No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.22/1111 - Release Date: 05/11/2007 4:36 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartvde at GMAIL.COM Mon Nov 5 02:52:22 2007 From: bartvde at GMAIL.COM (Bart van den Eijnden) Date: Mon, 5 Nov 2007 11:52:22 +0100 Subject: Update data In-Reply-To: <00a401c81f97$5bd704c0$6501a8c0@signo3> Message-ID: You can probably get it done using some custom PHP/Mapscript, though it will always be suboptimal IMHO. Mapserver has never been intended to do editing/updating of data. I personally would use OpenLayers and Geoserver for this kind of task. These kind of project requirements should be clear before you choose your tools ofcourse :-) Best regards, Bart On 11/5/07, Hans Castorp wrote: > > HI to everyone, > > > > I'm developing a gis site using ka-map and mapserver, but my customer > wants to go one step further? > > He needs to update his data on-line, so I must to develop a module to: add > points (and add alphanumeric data to these points), delete point, update > alphanumeric data, etc. > > > > So, my question is: is it possible using shape files??? It's better to > change to post-gis?? > > Anyway, where can I find information about these questions?? > > > > Thanks in advance. > > > > > > Hans Castorp > > > > > > Hans Castorp > > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.15.22/1111 - Release Date: > 05/11/2007 4:36 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From correosig at GMAIL.COM Mon Nov 5 02:56:04 2007 From: correosig at GMAIL.COM (Ruben Pardo) Date: Mon, 5 Nov 2007 11:56:04 +0100 Subject: SLD not working on linux Fedora Core 5 Message-ID: Hi everybody, I'm using mapserver attaching SLD to a mapserver request. On windows the same request, with the same mapfile, with the same SLD works perfectly but it doesn't with my linux configuration. I read that the only thing that i need to get working SLD is OGR. works with windows. what could id do? where can i see what it happens? The request is: http://localhost/cgi-bin/mapserv?map=/usr/local/apache2/apps/mosaico_sandbox/htdocs/prbmosaico.map&service=WMS&request=GetMap&Layers=Municipios&version=1.1.1&SLD=http://localhost:8989/mosaico/jspx/sig/tmp/prb.xml My linux mapserver version is: MapServer version 4.10.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS INPUT=TIFF INPUT=EPPL7 INPUT=SDE INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG The linux os is: 2.6.15-1.2054_FC5 thanks a lot. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at GMAIL.COM Mon Nov 5 02:59:40 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Mon, 5 Nov 2007 11:59:40 +0100 Subject: Update data In-Reply-To: <00a401c81f97$5bd704c0$6501a8c0@signo3> Message-ID: Hans, * using shapefiles, this isn't possible with mapserver (or at least I don't think so, someone correct me if not) * if you're using postgis, you could implement this with some server side scripting, with or without some help from the mapscript functions I think the way to go for your case is geoserver and its wfs-t functionality: http://sigma.openplans.org:8080/geoserver/wfst_demo/wfs-t.html cheers, tb From Tom.Kralidis at EC.GC.CA Mon Nov 5 04:25:51 2007 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Mon, 5 Nov 2007 07:25:51 -0500 Subject: SLD not working on linux Fedora Core 5 In-Reply-To: A<736d33ec0711050256g3d876c64x70ba818d79462a11@mail.gmail.com> Message-ID: Hi, A couple of initial ideas: - when you do a GetCapabilities request on Windows, do you get the following within the XML: - I notice that the SLD is on a host with a different port. Can the WMS box see the box of the SLD document (not sure if your example below is actual or has been modified for the list) ..Tom ________________________________ From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Ruben Pardo Sent: 05 November, 2007 5:56 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] SLD not working on linux Fedora Core 5 Hi everybody, I'm using mapserver attaching SLD to a mapserver request. On windows the same request, with the same mapfile, with the same SLD works perfectly but it doesn't with my linux configuration. I read that the only thing that i need to get working SLD is OGR. works with windows. what could id do? where can i see what it happens? The request is: http://localhost/cgi-bin/mapserv?map=/usr/local/apache2/apps/mosaico_san dbox/htdocs/prbmosaico.map&service=WMS&request=GetMap&Layers=Municipios& version=1.1.1&SLD=http://localhost:8989/mosaico/jspx/sig/tmp/prb.xml My linux mapserver version is: MapServer version 4.10.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS INPUT=TIFF INPUT=EPPL7 INPUT=SDE INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG The linux os is: 2.6.15-1.2054_FC5 thanks a lot. From luca76 at GMAIL.COM Mon Nov 5 04:31:31 2007 From: luca76 at GMAIL.COM (Luca Manganelli) Date: Mon, 5 Nov 2007 13:31:31 +0100 Subject: Polygon style with outline width Message-ID: Hi, I would like to know if there's any way to assign a style for a polygon with these attributes: - FILL COLOR: cyan - OUTLINE COLOR: blue - OUTLINE WIDTH: 3 pixel I can do to it in this way, with two layers for same shp: LAYER [...CUT...] TYPE POLYGON # FOR FILL COLOR CLASS NAME "FILL" STYLE COLOR 197 227 252 OUTLINECOLOR 0 0 255 SIZE 8 END END END LAYER [...CUT...] TYPE LINE # FOR OUTLINE COLOR AND WIDTH CLASS NAME "OUTLINE" SIZE 3 STYLE SYMBOL 'circle' COLOR 0 0 255 END END END Is possible to do it with one single LAYER ? From thomas.bonfort at GMAIL.COM Mon Nov 5 04:39:01 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Mon, 5 Nov 2007 13:39:01 +0100 Subject: Polygon style with outline width In-Reply-To: Message-ID: Luca: yes you can, you just have to specify two style blocks LAYER [...CUT...] TYPE POLYGON # FOR FILL COLOR CLASS STYLE COLOR 197 227 252 END STYLE SIZE 3 SYMBOL 'circle' OUTLINECOLOR 0 0 255 END END END if you're using AGG, it's even simpler STYLE COLOR 197 227 252 WIDTH 3 OUTLINECOLOR 0 0 255 END cheers, tb From correosig at GMAIL.COM Mon Nov 5 04:40:45 2007 From: correosig at GMAIL.COM (Ruben Pardo) Date: Mon, 5 Nov 2007 13:40:45 +0100 Subject: SLD not working on linux Fedora Core 5 In-Reply-To: <2DC5CCA14756424BBBEE8B4B2E4A682F0105A006@ecburexch1.ontario.int.ec.gc.ca> Message-ID: Thanks Tom, when i do a GetCapabilities request on Linux i get on windows i get the same ... I've got differents ports because i've got two servers, an oc4j that generate SLD's, and a apache with mapserver. The SLDs are visible from the mapserver machine. I also test with a SLD in the same server, but i doesn't work thanks 2007/11/5, Kralidis,Tom [Burlington] : > > > Hi, > > A couple of initial ideas: > > - when you do a GetCapabilities request on Windows, do you get the > following within the XML: > RemoteWFS="0"/> > > - I notice that the SLD is on a host with a different port. Can the WMS > box see the box of the SLD document (not sure if your example below is > actual or has been modified for the list) > > ..Tom > > > > > > ________________________________ > > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Ruben Pardo > Sent: 05 November, 2007 5:56 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] SLD not working on linux Fedora > Core 5 > > > Hi everybody, > > I'm using mapserver attaching SLD to a mapserver request. On > windows the same request, with the same mapfile, with the same SLD > works perfectly but it doesn't with my linux configuration. > I read that the only thing that i need to get working SLD is > OGR. > works with windows. > > > what could id do? where can i see what it happens? > > > The request is: > > http://localhost/cgi-bin/mapserv?map=/usr/local/apache2/apps/mosaico_san > dbox/htdocs/prbmosaico.map&service=WMS&request=GetMap&Layers=Municipios& > version=1.1.1&SLD=http://localhost:8989/mosaico/jspx/sig/tmp/prb.xml > ndbox/htdocs/prbmosaico.map&service=WMS&request=GetMap&Layers=Municipios > &version=1.1.1&SLD=http://localhost:8989/mosaico/jspx/sig/tmp/prb.xml> > > My linux mapserver version is: > MapServer version 4.10.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG > OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE > SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER > SUPPORTS=FASTCGI SUPPORTS=THREADS INPUT=TIFF INPUT=EPPL7 INPUT=SDE > INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG > > The linux os is: > 2.6.15-1.2054_FC5 > > thanks a lot. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luca76 at GMAIL.COM Mon Nov 5 04:55:41 2007 From: luca76 at GMAIL.COM (Luca Manganelli) Date: Mon, 5 Nov 2007 13:55:41 +0100 Subject: Polygon style with outline width In-Reply-To: Message-ID: On Nov 5, 2007 1:39 PM, thomas bonfort wrote: > Luca: > yes you can, you just have to specify two style blocks > LAYER > [...CUT...] > TYPE POLYGON # FOR FILL COLOR > CLASS > STYLE > COLOR 197 227 252 > END > STYLE > SIZE 3 > SYMBOL 'circle' > OUTLINECOLOR 0 0 255 > END > END > END > > if you're using AGG, it's even simpler > STYLE > COLOR 197 227 252 > > WIDTH 3 > OUTLINECOLOR 0 0 255 > END > > cheers, > tb It doesn't work. Instead of seeing an OUTLINE of width 3 pixel and that color, I see many circles inside the polygon... From thomas.bonfort at GMAIL.COM Mon Nov 5 05:05:15 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Mon, 5 Nov 2007 14:05:15 +0100 Subject: Polygon style with outline width In-Reply-To: Message-ID: you are using *OUTLINECOLOR* in your second style block ? tested here by copy pasting the code block i sent you and I'm getting expected result tb On 11/5/07, Luca Manganelli wrote: > On Nov 5, 2007 1:39 PM, thomas bonfort wrote: > > Luca: > > yes you can, you just have to specify two style blocks > > LAYER > > [...CUT...] > > TYPE POLYGON # FOR FILL COLOR > > CLASS > > STYLE > > COLOR 197 227 252 > > END > > STYLE > > SIZE 3 > > SYMBOL 'circle' > > OUTLINECOLOR 0 0 255 > > END > > END > > END > > > > if you're using AGG, it's even simpler > > STYLE > > COLOR 197 227 252 > > > > WIDTH 3 > > OUTLINECOLOR 0 0 255 > > END > > > > cheers, > > tb > > It doesn't work. > Instead of seeing an OUTLINE of width 3 pixel and that color, I see > many circles inside the polygon... > From luca76 at GMAIL.COM Mon Nov 5 05:09:53 2007 From: luca76 at GMAIL.COM (Luca Manganelli) Date: Mon, 5 Nov 2007 14:09:53 +0100 Subject: Polygon style with outline width In-Reply-To: Message-ID: On Nov 5, 2007 2:05 PM, thomas bonfort wrote: > you are using *OUTLINECOLOR* in your second style block ? > tested here by copy pasting the code block i sent you and I'm getting > expected result Now it works: i replaced SIZE with WIDTH. From andreas.albarello at TERRITORIUMONLINE.COM Mon Nov 5 05:14:44 2007 From: andreas.albarello at TERRITORIUMONLINE.COM (Andreas Albarello) Date: Mon, 5 Nov 2007 14:14:44 +0100 Subject: Polygon style with outline width In-Reply-To: Message-ID: Luca Manganelli wrote: > It doesn't work. > Instead of seeing an OUTLINE of width 3 pixel and that color, I see > many circles inside the polygon... Luca, this should really work, I just tested this myself: LAYER TYPE polygon ... CLASS STYLE COLOR 174 165 255 OUTLINECOLOR 220 200 255 WIDTH 3 END END END Make sure you are not referencing any SYMBOL in your STYLE definition. That way the default fill symbol for polygons is automatically used and you get the desired fill and outline. Best regards, -- -------------------------------------------------------------------- Andreas Albarello Analysis & SW Development Territorium Online srl/GmbH Via Buozzi/Buozzistra?e 12 - I 39100 Bolzano/Bozen email: andreas.albarello at territoriumonline.com web: www.territoriumonline.com -------------------------------------------------------------------- From andresch at IWAY.NA Mon Nov 5 06:32:10 2007 From: andresch at IWAY.NA (Andre Schoonbee) Date: Mon, 5 Nov 2007 16:32:10 +0200 Subject: Labeling roads In-Reply-To: <472F1744.70204@territoriumonline.com> Message-ID: How can I label a road by using the state symbol and putting the road no on top of it? Andre From andresch at IWAY.NA Mon Nov 5 06:34:19 2007 From: andresch at IWAY.NA (Andre Schoonbee) Date: Mon, 5 Nov 2007 16:34:19 +0200 Subject: Symbols In-Reply-To: <472F1744.70204@territoriumonline.com> Message-ID: I use png symbols but if where the background is not what I get the white border, which is part of my symbol. Is there a better way to get rid of this or making my symbol more transparent? Andre From correosig at GMAIL.COM Mon Nov 5 08:23:25 2007 From: correosig at GMAIL.COM (Ruben Pardo) Date: Mon, 5 Nov 2007 17:23:25 +0100 Subject: SLD not working on linux Fedora Core 5 In-Reply-To: <736d33ec0711050440g6e497f78ja8ea18730274b064@mail.gmail.com> Message-ID: Thanks to Tom, the problem was solved. I put in the httpd.conf Alias /tmp/ "/usr/local/apache2/apps/mosaico_sandbox/htdocs/tmp" having my tmp directory in "/usr/local/apache2/apps/mosaico_sandbox/htdocs/tmp" and in the mapfile IMAGEURL tmp/ IMAGEPATH "/tmp/" and also de OGR correctly installed in the linux. 2007/11/5, Ruben Pardo : > > Thanks Tom, > > when i do a GetCapabilities request on Linux i get > > RemoteWFS="0"/> > > on windows i get the same ... > > RemoteWFS="0"/> > > > I've got differents ports because i've got two servers, an oc4j that > generate SLD's, and > a apache with mapserver. The SLDs are visible from the mapserver machine. > I also test with a SLD in > the same server, but i doesn't work > > thanks > > > 2007/11/5, Kralidis,Tom [Burlington] < Tom.Kralidis at ec.gc.ca>: > > > > > > Hi, > > > > A couple of initial ideas: > > > > - when you do a GetCapabilities request on Windows, do you get the > > following within the XML: > > > RemoteWFS="0"/> > > > > - I notice that the SLD is on a host with a different port. Can the WMS > > box see the box of the SLD document (not sure if your example below is > > actual or has been modified for the list) > > > > ..Tom > > > > > > > > > > > > ________________________________ > > > > From: UMN MapServer Users List > > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Ruben Pardo > > Sent: 05 November, 2007 5:56 AM > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Subject: [UMN_MAPSERVER-USERS] SLD not working on linux Fedora > > Core 5 > > > > > > Hi everybody, > > > > I'm using mapserver attaching SLD to a mapserver request. On > > windows the same request, with the same mapfile, with the same SLD > > works perfectly but it doesn't with my linux configuration. > > I read that the only thing that i need to get working SLD is > > OGR. > > works with windows. > > > > > > what could id do? where can i see what it happens? > > > > > > The request is: > > > > http://localhost/cgi-bin/mapserv?map=/usr/local/apache2/apps/mosaico_san > > dbox/htdocs/prbmosaico.map&service=WMS&request=GetMap&Layers=Municipios& > > version=1.1.1&SLD=http://localhost:8989/mosaico/jspx/sig/tmp/prb.xml > > > ndbox/htdocs/prbmosaico.map&service=WMS&request=GetMap&Layers=Municipios > > > > &version=1.1.1&SLD=http://localhost:8989/mosaico/jspx/sig/tmp/prb.xml> > > > > My linux mapserver version is: > > MapServer version 4.10.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG > > OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE > > SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER > > SUPPORTS=FASTCGI SUPPORTS=THREADS INPUT=TIFF INPUT=EPPL7 INPUT=SDE > > INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG > > > > The linux os is: > > 2.6.15-1.2054_FC5 > > > > thanks a lot. > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yassefa at DMSOLUTIONS.CA Mon Nov 5 11:14:49 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Mon, 5 Nov 2007 14:14:49 -0500 Subject: SLD resquest issue with EXPRESSION parameter In-Reply-To: <200711011616.58854.yjacolin@free.fr> Message-ID: I was able to reproduce this and the fix is commited in MapServer svn. Ticket related to this is http://trac.osgeo.org/mapserver/ticket/2386. Please comment in ticket if that solved your problem and I will close the bug. Best Regards, Jacolin Yves wrote: > Hi list, > > I am using Mapserver as a OGC webserver. I am trying the GetStyles request and > find some issues. Someone asked about this issue in the mailing list in the > short last few monthes. > > I got some LAYER which contains about 12 CLASS objets, this CLASS contains > EXPRESSION parameter. Here an exemple : > CLASS > NAME "M1 : La D?fense - Ch?teau de Vincennes" > EXPRESSION ('[TYPE]' eq 'M' AND '[NUMERO]' eq '1' AND '[DATE_LIV]' > < '200712') > COLOR 255 255 0 > SIZE 3 > SYMBOL 1 > END > > There are 24 class like this one. > > If I try a GetStyles request on this kind of layer, nothing occurs (ie blank > page), if I remove most CLASS the XML response is displayed, If I remove only > the EXPRESSION parameter, again the XML response is displayed. So I think the > issue is not link to the number of CLASS object, but rather with EXPRESSION > parameter. > > BUT, in an other LAYER, I got only three CLASS object with EXPRESSION > parameter, and the xml response is displayed. > > Finally, it seems that if a LAYER got a lot of CLASS object with EXPRESSION > parameter inside, the XML response failed. And if a LAYER object got a lot of > CLASS object, the XML response failed as well. > > I am using Mapserver 4.10. Are someone aware of this issue and know a > workaround. > > Thanks, > > Y. -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From arndw at WTAL.DE Mon Nov 5 11:22:03 2007 From: arndw at WTAL.DE (Arnd Wippermann) Date: Mon, 5 Nov 2007 20:22:03 +0100 Subject: AW: [UMN_MAPSERVER-USERS] Update data In-Reply-To: <00a401c81f97$5bd704c0$6501a8c0@signo3> Message-ID: Hi, i have an example online, where you can test editing and saving WFS-data, based on Openlayers, MapServer, SQLite and php. I think for little datasets it's a way to hold and modify data (geometry and attributes) . http://gis.ibbeck.de/ginfo/apps/OLExamples/SphericalMercator/OL_900913_frame s.html Mit freundlichen Gr?ssen Arnd Wippermann http://gis.ibbeck.de/ginfo/ _____ Von: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Im Auftrag von Hans Castorp Gesendet: Montag, 5. November 2007 11:34 An: MAPSERVER-USERS at LISTS.UMN.EDU Betreff: [UMN_MAPSERVER-USERS] Update data HI to everyone, I?m developing a gis site using ka-map and mapserver, but my customer wants to go one step further He needs to update his data on-line, so I must to develop a module to: add points (and add alphanumeric data to these points), delete point, update alphanumeric data, etc. So, my question is: is it possible using shape files??? It?s better to change to post-gis?? Anyway, where can I find information about these questions?? Thanks in advance. Hans Castorp Hans Castorp No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.22/1111 - Release Date: 05/11/2007 4:36 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Lime at DNR.STATE.MN.US Mon Nov 5 15:23:36 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Mon, 5 Nov 2007 17:23:36 -0600 Subject: queryByAttributes returns 0 every time In-Reply-To: <20b31d4d0711032059v1aafba7bsee1d868f1046c2b7@mail.gmail.com> Message-ID: One big gotcha with attribute queries is that they use a map's extent as a pre-filter so they are not really purely attribute based. Make sure that the extent is set broad enough to ensure that you're searching the right features. Steve >>> On 11/3/2007 at 10:59 PM, in message <20b31d4d0711032059v1aafba7bsee1d868f1046c2b7 at mail.gmail.com>, Ryan Ollerenshaw wrote: > On 11/3/07, Ryan Ollerenshaw wrote: >> On 11/3/07, Stephen Woodbridge wrote: >> > Ryan Ollerenshaw wrote: >> > > I cant seem to get queryByAttributes to work correctly, I always get 0 >> > > results every time, here is the php code that i am using: >> > > >> > > $queryString = "(TEAM_ID > 1)"; >> > > $mroLayer->queryByAttributes('TEAM_ID',$queryString, MS_SINGLE); >> > > echo "RESULTS: ".$mroLayer->getNumResults() >> > > >> > > I have also tried: >> > > $queryString = "(TEAM_ID > '1')"; >> > > $queryString = "('TEAM_ID' > '1')"; >> > > $queryString = "('[TEAM_ID]' > 1)"; >> > > >> > > Nothing seems to work, I am using php 5.4.1 and mapserver 4.10.1 >> > >> > Try: $queryString = "([TEAM_ID] > 1)"; >> > >> > -Steve W >> > >> >> $queryString = "([TEAM_ID] > 1)"; >> $queryString = "[TEAM_ID] > 1"; >> $queryString = "('[TEAM_ID]' > 1)"; >> $queryString = "'[TEAM_ID]' > 1"; >> >> Still no good. >> > > I changed my filter back to: > > $mroLayer->set("filteritem","gid"); > $mroLayer->setFilter("gid =".$gid.""); > > This works file for integers but for some reason strings dont work. > But i can live with this solution for now. From vishu_73ns at YAHOO.COM Mon Nov 5 21:40:18 2007 From: vishu_73ns at YAHOO.COM (Vishal Nagpal) Date: Mon, 5 Nov 2007 23:40:18 -0600 Subject: Mapserver and MySQL Message-ID: Hello Everybody, I am trying to use MapServer to read MySQL spatial data but it is unable to open the database. I tried to use ogrinfo MySQL:test user=mysql tablename -so But it gave a message that unable to open with existing drivers, I am working pretty fine with POSTGRES, DGN and DT2 layers is it possible that i have missed out on some steps in installation of GDAL/OGR, Also I tried to use ovf files but there too I faced the same problem, Some of the examples of ovf file use ODBC while others use MySQL which one to follow, is it OK to use either, Help? Regards, Vishal From beyhan at DEPREM.GOV.TR Tue Nov 6 00:39:05 2007 From: beyhan at DEPREM.GOV.TR (Murat Beyhan) Date: Tue, 6 Nov 2007 10:39:05 +0200 Subject: Mapserver and MySQL In-Reply-To: Message-ID: Dear Vishal try to do following if you use LinuxOS in the console ogrinfo --formats Supported Formats: ESRI Shapefile MapInfo File UK .NTF SDTS TIGER S57 DGN VRT AVCBin REC Memory CSV GML OGDI MySQL you will see the list of the supported formats. If the MySql doesn't listed on the list you must reinstall ogr application by using MySql support I hope it will be help you. Regards Murat Vishal Nagpal wrote: > Hello Everybody, > I am trying to use MapServer to read MySQL spatial data but it is unable to > open the database. > I tried to use ogrinfo MySQL:test user=mysql tablename -so > But it gave a message that unable to open with existing drivers, > I am working pretty fine with POSTGRES, DGN and DT2 layers > is it possible that i have missed out on some steps in installation of GDAL/OGR, > > Also I tried to use ovf files but there too I faced the same problem, > Some of the examples of ovf file use > ODBC while others use MySQL > which one to follow, is it OK to use either, > Help? > Regards, > Vishal > > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From aberenyi at BURKEN.HU Tue Nov 6 01:29:41 2007 From: aberenyi at BURKEN.HU (Attila Berenyi) Date: Tue, 6 Nov 2007 03:29:41 -0600 Subject: MySQL MyGIS Message-ID: Hi there, I'm new to the list, so sorry if I ask a question that already have been asked, but I'm wondering if I found somewhere a working MySQL MyGIS example or a howto what describes the progress to activate it. I'm already using MySQL via OGR connection and it works great, I just want to empower my mapserver with spatial queries. Thanks in advance, Attila From aberenyi at BURKEN.HU Tue Nov 6 02:51:30 2007 From: aberenyi at BURKEN.HU (=?ISO-8859-2?Q?Ber=E9nyi_Attila?=) Date: Tue, 6 Nov 2007 11:51:30 +0100 Subject: 'Measure Distance' unit Message-ID: Hi there, How could I change the unit of the 'Measure Distance' tool? Now it's in 'mi' and shows something the couldn't be the true distance. I'm using PROJECTION init="epsg:23700" END This is the Hungarian Geodetic Date, and the master unit is meter. Any suggestion? Thanks in advance, Attila From carpio1 at GMAIL.COM Tue Nov 6 03:16:55 2007 From: carpio1 at GMAIL.COM (Antonio Fdez Carpio) Date: Tue, 6 Nov 2007 12:16:55 +0100 Subject: Query Layer Message-ID: Hi: I have to query in two layers at the same time. How can I do that? http://localhost:8085/cgi-bin/mapserv.exe?mode=itemquerymap&map=myMap.map&Layers=all&qlayer=layer1&qitem=id&qstring=1&qlayer=layer2&qitem=id&qstring=A -------------- next part -------------- An HTML attachment was scrubbed... URL: From taka_www at SINAMAN.COM Tue Nov 6 03:42:41 2007 From: taka_www at SINAMAN.COM (=?BIG5?Q?Taka_Wong?=) Date: Tue, 6 Nov 2007 05:42:41 -0600 Subject: Display multiple point with multiple attributes Message-ID: Dear All I would like to know, are there any method to show mutilple points with their own attributes on same xy? Sounds complicated. Here is my case: There are many ppl in same xy, each ppl carry 1-5 color ball(s). I would like to show these five ppl and also what color ball(s) they are carrying on the map in same time. Does anyone experiense similiar case? Is it possible? Since I have seen a disperse function in mapinfo. Thanks all Regards Taka Wong From szekerest at GMAIL.COM Tue Nov 6 04:13:48 2007 From: szekerest at GMAIL.COM (Tamas Szekeres) Date: Tue, 6 Nov 2007 13:13:48 +0100 Subject: 'Measure Distance' unit In-Reply-To: <47304732.5080603@burken.hu> Message-ID: Attila, Though I'm not aware of the 'Measure Distance' tool you've mentioned, your proj4 definition in the epsg file should be something like: +proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177777778 +alpha=90 +k=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +units=m +no_defs Best regards, Tamas 2007/11/6, Ber?nyi Attila : > Hi there, > > How could I change the unit of the 'Measure Distance' tool? Now it's in > 'mi' and shows something the couldn't be the true distance. I'm using > PROJECTION > init="epsg:23700" > END > > This is the Hungarian Geodetic Date, and the master unit is meter. > > Any suggestion? > > Thanks in advance, > > Attila > From mlinden at ZEELANDNET.NL Tue Nov 6 04:28:55 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Tue, 6 Nov 2007 13:28:55 +0100 Subject: enhancing Legend Message-ID: Hello list! I am currently using a GetLegendGraphic request to mapserver to return a legend that is presented in Google Earth in combination with a WMS layer, all to great satisfaction of the customer, what a power this WMS server capability has! The legend only contains the thematic symbols for my layer, but I would like to add a header to differentiate it in my Google Earth window. Is it possible to add static text and maybe draw a line in a legend? Does anyone has some sample mapfile snippet showing how to do this? Kind regards, Milo van der Linden From yjacolin at FREE.FR Tue Nov 6 04:50:29 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Tue, 6 Nov 2007 13:50:29 +0100 Subject: enhancing Legend In-Reply-To: <47305E07.5070809@zeelandnet.nl> Message-ID: Le Tuesday 06 November 2007 13:28:55 Milo van der Linden, vous avez ?crit?: > Hello list! > > I am currently using a GetLegendGraphic request to mapserver to return a > legend that is presented in Google Earth in combination with a WMS > layer, all to great satisfaction of the customer, what a power this WMS > server capability has! > > The legend only contains the thematic symbols for my layer, but I would > like to add a header to differentiate it in my Google Earth window. Is > it possible to add static text and maybe draw a line in a legend? Does > anyone has some sample mapfile snippet showing how to do this? > > Kind regards, > > Milo van der Linden Hi Milo, I don't think it is possible to add an header to the GetLegendGraphic request. You can watch the documentation for the LEGEND object mapfile but I don't think that the header will run for the WMS service. Note that I had the same problem about using this for my application. I choosed to use mapserv in CGI mode to get my legend, but this is not OGC compliant ;) The other way is to use a GetSTyles request, but you have to build the legend icon by yourself, not so difficult for plain polygon icone, more difficult if you use hached icons. But by this way you could manage the layout exactly as you want :) If you develop something to create icon from an SLD XML data, I will be really interesting for :) Anyway, if some developpers implyed in OGC standards could give their opinion about this "issue" :) My opinion is that all pictures have to be processed in the server side and the client side will just create the layout. That's imply that GetLegendGraphic "is not good" because it creates layout in the server side and GetStyles "is not good" because the icons have to be create on the client side. However, I develop my application using OGC standard and Mapserver and I am really happy of this two technologies. Best regards, Y. -- Yves Jacolin --- http://softlibre.gloobe.org From rdmailings at DUIF.NET Tue Nov 6 05:18:22 2007 From: rdmailings at DUIF.NET (Richard Duivenvoorde) Date: Tue, 6 Nov 2007 14:18:22 +0100 Subject: python mapscript layer.queryByPoint Message-ID: Hi List, I was trying to use python mapscript to write a small 'getid' cgi for some shapefile. Very nice to be able to open a shapefile etc in a few lines! But tring to get the layer.queryByPoint method failed. It returns 0 (aka success), but getResults() returns always 0. Same when I load this layer from within a mapserver-mapfile. But loading this same mapfile in mapserver, returns a hit on this point. Found this ticket: http://trac.osgeo.org/mapserver/ticket/1766 which is 1 year old. I'm using fwtools 1.4 on windows for this. My Question: - anybody a good working example of layer.queryByPoint? - is the python mapscript interface still being tested/developed? Or is it 'old stuff' not to be used anymore? (I'm not too much into C/swig/python, so debugging this myself is hardly an option :-( ) TIA Richard Duivenvoorde From mlinden at ZEELANDNET.NL Tue Nov 6 05:37:41 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Tue, 6 Nov 2007 14:37:41 +0100 Subject: enhancing Legend In-Reply-To: <200711061350.29887.yjacolin@free.fr> Message-ID: Hello list, First of all Jacolin, thanks for the response. I managed to "fake" a legend title by adding an empty class item as the topmost class for the layer I create the thematic legend for. This class item has no properties other then a name containing the text: "-- This is my legend --" Works good enough for me! Jacolin Yves schreef: > Le Tuesday 06 November 2007 13:28:55 Milo van der Linden, vous avez ?crit : > >> Hello list! >> >> I am currently using a GetLegendGraphic request to mapserver to return a >> legend that is presented in Google Earth in combination with a WMS >> layer, all to great satisfaction of the customer, what a power this WMS >> server capability has! >> >> The legend only contains the thematic symbols for my layer, but I would >> like to add a header to differentiate it in my Google Earth window. Is >> it possible to add static text and maybe draw a line in a legend? Does >> anyone has some sample mapfile snippet showing how to do this? >> >> Kind regards, >> >> Milo van der Linden >> > > Hi Milo, > > I don't think it is possible to add an header to the GetLegendGraphic request. > You can watch the documentation for the LEGEND object mapfile but I don't > think that the header will run for the WMS service. > > Note that I had the same problem about using this for my application. I > choosed to use mapserv in CGI mode to get my legend, but this is not OGC > compliant ;) The other way is to use a GetSTyles request, but you have to > build the legend icon by yourself, not so difficult for plain polygon icone, > more difficult if you use hached icons. But by this way you could manage the > layout exactly as you want :) > > If you develop something to create icon from an SLD XML data, I will be really > interesting for :) > > Anyway, if some developpers implyed in OGC standards could give their opinion > about this "issue" :) My opinion is that all pictures have to be processed in > the server side and the client side will just create the layout. That's imply > that GetLegendGraphic "is not good" because it creates layout in the server > side and GetStyles "is not good" because the icons have to be create on the > client side. > > However, I develop my application using OGC standard and Mapserver and I am > really happy of this two technologies. > > Best regards, > > Y. > -- Milo van der Linden skype: milovanderlinden mlinden at zeelandnet.nl milovanderlinden at gmail.com milo at 3dsite.nl http://www.3dsite.nl De informatie in dit bericht reflecteert mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bij het betreffende medium behorende voorwaarden. The information in this message reflects my personal opinion and not that of a company or public body. All rights reserved.If this message is contained in a mailing-list or community, the rights on the medium are automatically adapted. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at GMAIL.COM Tue Nov 6 06:00:46 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Tue, 6 Nov 2007 15:00:46 +0100 Subject: WRAP parameter in LABEL of LEGEND object In-Reply-To: <200711041526.19473.yjacolin@free.fr> Message-ID: Implementation of the wrap parameter for legend labels went into svn trunk today. please comment on any issues you may have with this once you get a chance to try it out. cheers, tb On 11/4/07, Yves Jacolin wrote: > Thanks Thomas, > > Y. > Le dimanche 4 novembre 2007 14:51, thomas bonfort a ?crit: > > Yves, > > this isn't currently supported. I'll be looking into this and another > > side effect which concerns vertical spacing between legend items and > > let you know when/if things change on this end. > > > > cheers, > > tb > > > > On 11/3/07, Jacolin Yves wrote: > > > Hi, > > > > > > Does the WRAP parameter is suppose to work in a LABEL object inside a > > > LEGEND object? > > > > > > Thanks, > > > > > > Y. > > > -- > > > Yves Jacolin > > > --- > > > http://softlibre.gloobe.org > > -- > Yves Jacolin > ------------- > http://yjacolin.gloobe.org > http://softlibre.gloobe.org > From yjacolin at FREE.FR Tue Nov 6 06:10:10 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Tue, 6 Nov 2007 15:10:10 +0100 Subject: WRAP parameter in LABEL of LEGEND object In-Reply-To: Message-ID: I am quiet busy until the end of the month, I will test it in december (as well as the bug corrected by Yewondwossen Assefa on the CLASS and EXPRESSION issue). Thanks, Y. Le Tuesday 06 November 2007 15:00:46 thomas bonfort, vous avez ?crit?: > Implementation of the wrap parameter for legend labels went into svn > trunk today. please comment on any issues you may have with this once > you get a chance to try it out. > > cheers, > tb > > On 11/4/07, Yves Jacolin wrote: > > Thanks Thomas, > > > > Y. > > > > Le dimanche 4 novembre 2007 14:51, thomas bonfort a ?crit: > > > Yves, > > > this isn't currently supported. I'll be looking into this and another > > > side effect which concerns vertical spacing between legend items and > > > let you know when/if things change on this end. > > > > > > cheers, > > > tb > > > > > > On 11/3/07, Jacolin Yves wrote: > > > > Hi, > > > > > > > > Does the WRAP parameter is suppose to work in a LABEL object inside a > > > > LEGEND object? > > > > > > > > Thanks, > > > > > > > > Y. > > > > -- > > > > Yves Jacolin > > > > --- > > > > http://softlibre.gloobe.org > > > > -- > > Yves Jacolin > > ------------- > > http://yjacolin.gloobe.org > > http://softlibre.gloobe.org -- Yves Jacolin --- http://softlibre.gloobe.org From warmerdam at POBOX.COM Tue Nov 6 06:16:29 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Tue, 6 Nov 2007 09:16:29 -0500 Subject: Mapserver and MySQL In-Reply-To: Message-ID: Vishal Nagpal wrote: > Hello Everybody, > I am trying to use MapServer to read MySQL spatial data but it is unable to > open the database. > I tried to use ogrinfo MySQL:test user=mysql tablename -so > But it gave a message that unable to open with existing drivers, > I am working pretty fine with POSTGRES, DGN and DT2 layers > is it possible that i have missed out on some steps in installation of GDAL/OGR, > > Also I tried to use ovf files but there too I faced the same problem, > Some of the examples of ovf file use > ODBC while others use MySQL > which one to follow, is it OK to use either, Vishal, The MySQL driver is not built into OGR by default. Did you build GDAL/OGR from source yourself? Did you explicitly configure in Mysql support? OVF (VRT) files are normally used when you use a mysql table through odbc that is not using spatial data types. The OVF file tells OGR which columns are x and y. 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 | President OSGeo, http://osgeo.org From Steve.Lime at DNR.STATE.MN.US Tue Nov 6 06:57:52 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Tue, 6 Nov 2007 08:57:52 -0600 Subject: Labeling roads Message-ID: Hi Andre: You use annotation layers. I think the demo shows this off. A layer would look like: LAYER NAME 'road_anno' TYPE ANNOTATION STATUS DEFAULT DATA 'roads' LABELITEM 'roadnum' CLASS STYLE SYMBOL 'shield.png' END LABEL COLOR 0 0 0 SIZE TINY END END END Steve >>> Andre Schoonbee 11/05/07 8:32 AM >>> How can I label a road by using the state symbol and putting the road no on top of it? Andre From Steve.Lime at DNR.STATE.MN.US Tue Nov 6 07:09:02 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Tue, 6 Nov 2007 09:09:02 -0600 Subject: Display multiple point with multiple attributes Message-ID: If you have an attribute to distinguish between the points consistently from place to place then this might be doable. For example, if you could attach a sequence number from 1 to 5 to each place then you could use classes and offsets. For example: seq name color 1 place1 red 2 place1 blue 3 place1 red 1 place2 white 1 place3 red 2 place3 blue then you could have a layer like: LAYER ... CLASSITEM 'seq' CLASS EXPRESSION '1' # no offset STYLE ... END END CLASS EXPRESSION '2' # ul STYLE OFFSET -10 -10 ... END END CLASS EXPRESSION '3' # lr STYLE OFFSET 10 10 ... END END ... END This would have the effect off ringing the center point with the other data. You could create other patterns (such as a line) with different offsets. Steve >>> Taka Wong 11/06/07 5:42 AM >>> Dear All I would like to know, are there any method to show mutilple points with their own attributes on same xy? Sounds complicated. Here is my case: There are many ppl in same xy, each ppl carry 1-5 color ball(s). I would like to show these five ppl and also what color ball(s) they are carrying on the map in same time. Does anyone experiense similiar case? Is it possible? Since I have seen a disperse function in mapinfo. Thanks all Regards Taka Wong From stephane.colzy at MAGELLIUM.FR Tue Nov 6 08:04:23 2007 From: stephane.colzy at MAGELLIUM.FR (=?iso-8859-1?Q?St=E9phane_COLZY?=) Date: Tue, 6 Nov 2007 17:04:23 +0100 Subject: mapscript, setSymbolSet and asp.net In-Reply-To: Message-ID: Hi, I?m using mapscript c# with asp.net I get this error when calling mapObj.setSymbolSet(filename) several times: loadSymbolSet(): Unknown Identifier. Parsing error near (S):(line 0) first call is ok and symbols are showing correctly, but when I try to load another map with the same symbolSet file it fails and I need to restart the asp.net process to make it work again. I?m not sure this is related to bug #339 which has been fixed a long time ago. I?ve seen several related posts, I know the workaround is to create symbols directly in the code but still this is really frustating ;) stephane -------------- next part -------------- An HTML attachment was scrubbed... URL: From trondmm-mapserver at CRUSADERS.NO Tue Nov 6 08:35:17 2007 From: trondmm-mapserver at CRUSADERS.NO (Trond Michelsen) Date: Tue, 6 Nov 2007 17:35:17 +0100 Subject: How do I propagate failures from upstream wms-servers? Message-ID: Hi. In my mapfile, I have several layers with connectiontype WMS. Once in a while, the WMS-servers that deliver these layers will fail, usually due to high load, and return an application/vnd.ogc.se_xml exception. In these cases, I'd like mapserver to return an exception as well, but instead, mapserver will just log the error message in MS_ERRORFILE, and continue drawing the rest of the layers. If there are no more layers, it will result in a blank image. (BTW: I've also noticed the same behaviour if the remote wms-server answers with an internal server error) Here's the layer definition that I use for testing. exception.cgi will always return a dummy XML exception. LAYER NAME "exception" TYPE RASTER STATUS ON CONNECTION "http://wms1.oslo.dnmi.no/cgi-bin/exception.cgi" CONNECTIONTYPE WMS OFFSITE 255 255 254 METADATA "wms_srs" "EPSG:4326" "wms_name" "exception" "wms_server_version" "1.1.1" "wms_formatlist" "image/png" "wms_format" "image/png" "wms_exceptions_format" "application/vnd.ogc.se_xml" END #metadata END #layer Is there something I can do to force mapserver to fail, and return an exception if it fails to draw any of the wms-layers? I'm using mapserver 4.10 $ cgi-bin/mapserv -v MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG -- Trond Michelsen From mlinden at ZEELANDNET.NL Tue Nov 6 08:01:11 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Tue, 6 Nov 2007 17:01:11 +0100 Subject: Mapserver and MySQL In-Reply-To: <4730773D.5010104@pobox.com> Message-ID: Let me say that an OVF works excellent in combination with msSqlSpatial containing WKB geometry. I am however not sure that mySQL is so OGC compliant.... Frank Warmerdam schreef: > Vishal Nagpal wrote: >> Hello Everybody, >> I am trying to use MapServer to read MySQL spatial data but it is >> unable to >> open the database. >> I tried to use ogrinfo MySQL:test user=mysql tablename -so >> But it gave a message that unable to open with existing drivers, I am >> working pretty fine with POSTGRES, DGN and DT2 layers is it possible >> that i have missed out on some steps in installation of GDAL/OGR, >> >> Also I tried to use ovf files but there too I faced the same problem, >> Some of the examples of ovf file use >> ODBC while others use MySQL which one to follow, is it OK to use either, > > Vishal, > > The MySQL driver is not built into OGR by default. Did you build > GDAL/OGR > from source yourself? Did you explicitly configure in Mysql support? > > OVF (VRT) files are normally used when you use a mysql table through odbc > that is not using spatial data types. The OVF file tells OGR which > columns > are x and y. > > Best regards, -- Milo van der Linden skype: milovanderlinden mlinden at zeelandnet.nl milovanderlinden at gmail.com milo at 3dsite.nl http://www.3dsite.nl De informatie in dit bericht reflecteert mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bij het betreffende medium behorende voorwaarden. The information in this message reflects my personal opinion and not that of a company or public body. All rights reserved.If this message is contained in a mailing-list or community, the rights on the medium are automatically adapted. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmorissette at MAPGEARS.COM Tue Nov 6 08:14:55 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Tue, 6 Nov 2007 11:14:55 -0500 Subject: mapscript, setSymbolSet and asp.net In-Reply-To: <001e01c8208e$b3193e40$8001a8c0@PC128> Message-ID: St?phane COLZY wrote: > > I?m using mapscript c# with asp.net > > I get this error when calling mapObj.setSymbolSet(filename) several times: > > /loadSymbolSet(): Unknown Identifier. Parsing error near (S):(line 0)/ > > first call is ok and symbols are showing correctly, but when I try to > load another map with the same symbolSet file it fails and I need to > restart the asp.net process to make it work again. > Which version of MapServer are you using? I'd suggest you try again with V5.0 if that's not the version you are using. There is at least ticket #2021 which has been fixed in 5.0 and that may (???) be related to the type of problem you have encountered: http://trac.osgeo.org/mapserver/ticket/2021 Daniel -- Daniel Morissette http://www.mapgears.com/ From yjacolin at FREE.FR Tue Nov 6 08:52:22 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Tue, 6 Nov 2007 17:52:22 +0100 Subject: How do I propagate failures from upstream wms-servers? In-Reply-To: <20071106163517.GB8457@crusaders.no> Message-ID: Hi, Why don't you use "wms_exceptions_format" "application/vnd.ogc.se_inimage" ? Regards, Y. Le Tuesday 06 November 2007 17:35:17 Trond Michelsen, vous avez ?crit?: > Hi. > > In my mapfile, I have several layers with connectiontype WMS. Once in > a while, the WMS-servers that deliver these layers will fail, usually > due to high load, and return an application/vnd.ogc.se_xml > exception. In these cases, I'd like mapserver to return an exception > as well, but instead, mapserver will just log the error message in > MS_ERRORFILE, and continue drawing the rest of the layers. If there > are no more layers, it will result in a blank image. > > (BTW: I've also noticed the same behaviour if the remote wms-server > answers with an internal server error) > > Here's the layer definition that I use for testing. exception.cgi will > always return a dummy XML exception. > > LAYER > NAME "exception" > TYPE RASTER > STATUS ON > CONNECTION "http://wms1.oslo.dnmi.no/cgi-bin/exception.cgi" > CONNECTIONTYPE WMS > OFFSITE 255 255 254 > METADATA > "wms_srs" "EPSG:4326" > "wms_name" "exception" > "wms_server_version" "1.1.1" > "wms_formatlist" "image/png" > "wms_format" "image/png" > "wms_exceptions_format" "application/vnd.ogc.se_xml" > END #metadata > END #layer > > Is there something I can do to force mapserver to fail, and return an > exception if it fails to draw any of the wms-layers? > > I'm using mapserver 4.10 > > $ cgi-bin/mapserv -v > MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP > OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER > SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT > SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 > INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG -- Yves Jacolin --- http://softlibre.gloobe.org From andresch at IWAY.NA Tue Nov 6 11:20:28 2007 From: andresch at IWAY.NA (Andre Schoonbee) Date: Tue, 6 Nov 2007 21:20:28 +0200 Subject: Labeling roads In-Reply-To: <47302C910200008F00011356@co5.dnr.state.mn.us> Message-ID: Thanks Steve, but may I be blond... In my layer definition, I have specified the line type as follows, - can I simply add the Style for the shield.png at the end of my 2 styles, or at what stage do I define the "Labeling symbol"? NAME "Roads" STATUS ON TYPE ANNOTATION STATUS DEFAULT # TYPE LINE CONNECTIONTYPE postgis CONNECTION "user=postgres password=postgres dbname=posgis_ascii host=localhost port=5432" DATA "the_geom from roads" CLASSITEM "type" # field used by EXPRESSION in class objects # Begin classes for Freeways CLASS EXPRESSION ('[type]' = 'Freeway') NAME "Freeways" MAXSCALE 1000000 MINSCALE 500001 STYLE # Draw the outline SYMBOL 'circle' COLOR 0 0 0 SIZE 6 END STYLE # Draw the center redline SYMBOL 'circle' COLOR 255 0 0 SIZE 4 END END Regards Andre -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Steve Lime Sent: Tuesday, November 06, 2007 4:58 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Labeling roads Hi Andre: You use annotation layers. I think the demo shows this off. A layer would look like: LAYER NAME 'road_anno' TYPE ANNOTATION STATUS DEFAULT DATA 'roads' LABELITEM 'roadnum' CLASS STYLE SYMBOL 'shield.png' END LABEL COLOR 0 0 0 SIZE TINY END END END Steve >>> Andre Schoonbee 11/05/07 8:32 AM >>> How can I label a road by using the state symbol and putting the road no on top of it? Andre From ltrevinoh at GMAIL.COM Tue Nov 6 11:31:24 2007 From: ltrevinoh at GMAIL.COM (=?ISO-8859-1?Q?Luis_Trevi=F1o?=) Date: Tue, 6 Nov 2007 13:31:24 -0600 Subject: mapserver for mobile devices Message-ID: Hi all, I need to build a mapserver app for mobile devices, so the user can "navegate" using his cell phone or mobile device, but I don?t know where to start. Any suggestions? or a hint to where to find information? Regards, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From frdcn at HOTMAIL.COM Tue Nov 6 12:01:15 2007 From: frdcn at HOTMAIL.COM (godofredo contreras) Date: Tue, 6 Nov 2007 20:01:15 +0000 Subject: mapserver for mobile devices In-Reply-To: Message-ID: Hi: You can configure wms service with mapserver and browse your data using this client for mobiles http://www.skylab-mobilesystems.com/en/products/j2me_wms_client.html this way you don't need to rebuild mapserver to use it in mobile devices just access to the web from mobile device. Regards Godofredo Contreras Date: Tue, 6 Nov 2007 13:31:24 -0600 From: ltrevinoh at GMAIL.COM Subject: [UMN_MAPSERVER-USERS] mapserver for mobile devices To: MAPSERVER-USERS at LISTS.UMN.EDU Hi all, I need to build a mapserver app for mobile devices, so the user can "navegate" using his cell phone or mobile device, but I don?t know where to start. Any suggestions? or a hint to where to find information? Regards, Luis _________________________________________________________________ Peek-a-boo FREE Tricks & Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us -------------- next part -------------- An HTML attachment was scrubbed... URL: From ltrevinoh at GMAIL.COM Tue Nov 6 12:12:54 2007 From: ltrevinoh at GMAIL.COM (=?ISO-8859-1?Q?Luis_Trevi=F1o?=) Date: Tue, 6 Nov 2007 14:12:54 -0600 Subject: mapserver for mobile devices In-Reply-To: Message-ID: thanks for the reply bobb. The mobile device will use internet to send and receive data. Luis 2007/11/6, Bob Basques : > > Luis, > > Do you need something standalone on the mobile device, or something that > uses a network to send the data , to the mobile device for example? > > bobb > > > > >>> Luis Trevi?o wrote: > > ------=_Part_14694_10222838.1194377484079 > Content-Type: text/plain; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable > Content-Disposition: inline > > Hi all, > > I need to build a mapserver app for mobile devices, so the user can > "navegate" using his cell phone or mobile device, but I don=B4t know where > = > to > start. > Any suggestions? or a hint to where to find information? > > Regards, > Luis > > ------=_Part_14694_10222838.1194377484079 > Content-Type: text/html; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable > Content-Disposition: inline > >
Hi all,
>
 
>
I need to build a mapserver app for mobile devices, so the user can > &q= > uot;navegate" using his cell phone or mobile device, but I don=B4t > kno= > w where to start.
>
Any suggestions? or a hint to where to find information?
>
 
>
Regards,
>
Luis
> > ------=_Part_14694_10222838.1194377484079-- > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From trondmm-mapserver at CRUSADERS.NO Tue Nov 6 13:32:22 2007 From: trondmm-mapserver at CRUSADERS.NO (Trond Michelsen) Date: Tue, 6 Nov 2007 22:32:22 +0100 Subject: How do I propagate failures from upstream wms-servers? In-Reply-To: <200711061752.22453.yjacolin@free.fr> Message-ID: On Tue, Nov 06, 2007 at 05:52:22PM +0100, Jacolin Yves wrote: > Why don't you use > "wms_exceptions_format" "application/vnd.ogc.se_inimage" ? This is because I have a webcache in front of mapserver, which will cache requests for about twelve hours, and I need a way to tell an errormessage apart from a successful response. The way it is now, blank images sneaks into the cache occasionally, and this is what I'm trying to avoid. I need the cache, because we regularly get over 300 requests per second (highest peak I've seen so far is 604 request in a single second), and our servers can't handle this load without caching. Over the last nine and a half days, we've had almost 110 million wms requests to our cache, and only 4 million went to the backend. So basically - I desperately need the cache, but it's extremely important that it doesn't cache blank images or other error messages embedded in an image, which is why I want mapserver to return an application/vnd.ogc.se_xml error whenever any sort of error happens. > Le Tuesday 06 November 2007 17:35:17 Trond Michelsen, vous avez ?crit?: >> Hi. >> >> In my mapfile, I have several layers with connectiontype WMS. Once in >> a while, the WMS-servers that deliver these layers will fail, usually >> due to high load, and return an application/vnd.ogc.se_xml >> exception. In these cases, I'd like mapserver to return an exception >> as well, but instead, mapserver will just log the error message in >> MS_ERRORFILE, and continue drawing the rest of the layers. If there >> are no more layers, it will result in a blank image. >> >> (BTW: I've also noticed the same behaviour if the remote wms-server >> answers with an internal server error) >> >> Here's the layer definition that I use for testing. exception.cgi will >> always return a dummy XML exception. >> >> LAYER >> NAME "exception" >> TYPE RASTER >> STATUS ON >> CONNECTION "http://wms1.oslo.dnmi.no/cgi-bin/exception.cgi" >> CONNECTIONTYPE WMS >> OFFSITE 255 255 254 >> METADATA >> "wms_srs" "EPSG:4326" >> "wms_name" "exception" >> "wms_server_version" "1.1.1" >> "wms_formatlist" "image/png" >> "wms_format" "image/png" >> "wms_exceptions_format" "application/vnd.ogc.se_xml" >> END #metadata >> END #layer >> >> Is there something I can do to force mapserver to fail, and return an >> exception if it fails to draw any of the wms-layers? >> >> I'm using mapserver 4.10 >> >> $ cgi-bin/mapserv -v >> MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP >> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER >> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT >> SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 >> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG -- Trond Michelsen From woodbri at SWOODBRIDGE.COM Tue Nov 6 13:00:07 2007 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Tue, 6 Nov 2007 16:00:07 -0500 Subject: Labeling roads In-Reply-To: <20071106192039.75CD5C26@mx1.iway.na> Message-ID: I create a separate ANNOTATION lay as Steve L suggests in his example to add the shields. You can also add a MINDISTANCE 200 to make sure no two shields with the same number are withing 200 pixels of one another. -Steve W Andre Schoonbee wrote: > Thanks Steve, but may I be blond... > > > In my layer definition, I have specified the line type as follows, - can I > simply add the Style for the shield.png at the end of my 2 styles, or at > what stage do I define the "Labeling symbol"? > > > NAME "Roads" > STATUS ON > TYPE ANNOTATION > STATUS DEFAULT > # TYPE LINE > CONNECTIONTYPE postgis > CONNECTION "user=postgres password=postgres dbname=posgis_ascii > host=localhost port=5432" > DATA "the_geom from roads" > > CLASSITEM "type" # field used by EXPRESSION in class objects > > # Begin classes for Freeways > CLASS > EXPRESSION ('[type]' = 'Freeway') > NAME "Freeways" > MAXSCALE 1000000 > MINSCALE 500001 > STYLE # Draw the outline > SYMBOL 'circle' > COLOR 0 0 0 > SIZE 6 > END > STYLE # Draw the center redline > SYMBOL 'circle' > COLOR 255 0 0 > SIZE 4 > END > END > > > Regards > > Andre > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On > Behalf Of Steve Lime > Sent: Tuesday, November 06, 2007 4:58 PM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Labeling roads > > Hi Andre: You use annotation layers. I think the demo shows this off. A > layer > would look like: > > LAYER > NAME 'road_anno' > TYPE ANNOTATION > STATUS DEFAULT > DATA 'roads' > LABELITEM 'roadnum' > CLASS > STYLE > SYMBOL 'shield.png' > END > LABEL > COLOR 0 0 0 > SIZE TINY > END > END > END > > Steve > >>>> Andre Schoonbee 11/05/07 8:32 AM >>> > How can I label a road by using the state symbol and putting the road no on > top of it? > > Andre From Steve.Lime at DNR.STATE.MN.US Tue Nov 6 13:29:55 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Tue, 6 Nov 2007 15:29:55 -0600 Subject: Labeling roads In-Reply-To: <20071106192039.75CD5C26@mx1.iway.na> Message-ID: You have to do this in two steps. One for to draw the roads themselves and another to draw the annotation. Generally roads with shields aren't that common so the performance hit for 2 passes isn't too bad. Steve >>> On 11/6/2007 at 1:20 PM, in message <20071106192039.75CD5C26 at mx1.iway.na>, Andre Schoonbee wrote: > Thanks Steve, but may I be blond... > > > In my layer definition, I have specified the line type as follows, - can I > simply add the Style for the shield.png at the end of my 2 styles, or at > what stage do I define the "Labeling symbol"? > > > NAME "Roads" > STATUS ON > TYPE ANNOTATION > STATUS DEFAULT > # TYPE LINE > CONNECTIONTYPE postgis > CONNECTION "user=postgres password=postgres dbname=posgis_ascii > host=localhost port=5432" > DATA "the_geom from roads" > > CLASSITEM "type" # field used by EXPRESSION in class objects > > # Begin classes for Freeways > CLASS > EXPRESSION ('[type]' = 'Freeway') > NAME "Freeways" > MAXSCALE 1000000 > MINSCALE 500001 > STYLE # Draw the outline > SYMBOL 'circle' > COLOR 0 0 0 > SIZE 6 > END > STYLE # Draw the center redline > SYMBOL 'circle' > COLOR 255 0 0 > SIZE 4 > END > END > > > Regards > > Andre > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On > Behalf Of Steve Lime > Sent: Tuesday, November 06, 2007 4:58 PM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Labeling roads > > Hi Andre: You use annotation layers. I think the demo shows this off. A > layer > would look like: > > LAYER > NAME 'road_anno' > TYPE ANNOTATION > STATUS DEFAULT > DATA 'roads' > LABELITEM 'roadnum' > CLASS > STYLE > SYMBOL 'shield.png' > END > LABEL > COLOR 0 0 0 > SIZE TINY > END > END > END > > Steve > >>>> Andre Schoonbee 11/05/07 8:32 AM >>> > How can I label a road by using the state symbol and putting the road no on > top of it? > > Andre From Kyle.Wilcox at NOAA.GOV Tue Nov 6 14:00:21 2007 From: Kyle.Wilcox at NOAA.GOV (Kyle Wilcox) Date: Tue, 6 Nov 2007 17:00:21 -0500 Subject: PostGIS Queries using FILTER Message-ID: Did the usual searching without finding anything relevant. The application I am referencing is at: http://155.206.18.162/mapping/map/map.phtml I have time series data in a PostGIS enabled database (current and wind fields from model output). I can display the point data without problems (try any of the current or wind layers). The problem is that when querying a point layer, the data that is always extracted from the first timestamp rather than the timestamp associated with the layer I am trying to query (specified as a FILTER). I understand what is happening.. the query by point functionality is querying the database at the specific POINT and displaying the first row that returns (the first timestamp). If I delete the first timestamp data, the second timestep data is displayed and so on. The only thing that changes between layers is the FILTER. Does the queryByPoint() function utilize the FILTER definition from the mapfile? It doesn't seem to be doing so. (Mapserver 5.0 and PHP/Mapscript) Here is a sample layer definition: LAYER TYPE POINT CONNECTIONTYPE postgis NAME 'NAME' CONNECTION 'host=HOST user=USER dbname=DATABASE' DATA "the_geom from (SELECT * from forecast left join grid on grid.gid=forecast.grid_id) as data USING UNIQUE gid USING SRID=4326" FILTER "time=TIMESTAMP'2007-11-06 00:00:00'" METADATA 'DESCRIPTION' '2007-11-06 00:00:00' 'RESULT_FIELDS' 'wind_speed,wind_from_direction,rotation' 'RESULT_HEADERS' 'Wind Speed (m/s), Wind Direction (from TN), Rotation of Image (from TN)' 'LAYER_ENCODING' 'UTF-8' END STATUS OFF PROJECTION 'init=epsg:4326' END TOLERANCE 10 TOLERANCEUNITS pixels LABELMAXSCALE 60000 TEMPLATE void CLASS NAME ">= 0.95 m/s" EXPRESSION ([wind_speed] >= 0.95) STYLE SYMBOL "arrow2" ANGLE [wind_from_direction] COLOR 118 0 0 OUTLINECOLOR 0 0 0 SIZE 10 END TEXT ([wind_speed] m/s - [wind_from_direction] TN) LABEL COLOR 118 0 0 OUTLINECOLOR 0 0 0 POSITION AUTO SIZE small PARTIALS TRUE END END ... END -- Kyle Wilcox NOAA Chesapeake Bay Office 410 Severn Avenue Suite 107A Annapolis, MD 21403 office: (410) 295-3151 Kyle.Wilcox at noaa.gov "It is from the wellspring of our despair and the places that we are broken that we come to repair the world." - Murray Waas From Steve.Lime at DNR.STATE.MN.US Tue Nov 6 14:43:54 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Tue, 6 Nov 2007 16:43:54 -0600 Subject: PostGIS Queries using FILTER In-Reply-To: <4730E3F5.2080000@Noaa.gov> Message-ID: Attribute queries use filters themselves so any predefined filter is set aside temporarily. That said, for other types of purely spatial queries the FILTER should remain intact. I just stepped through the point query code and couldn't any place where it was mucked with. What does the code that does that's doing the query look like? I notice in your sample layer that the layer name is 'NAME' which makes me wonder if somehow you're always querying the same layer. Not to say that there isn't something else going on as you suggest but I'll start with the obvious. Steve >>> On 11/6/2007 at 4:00 PM, in message <4730E3F5.2080000 at Noaa.gov>, Kyle Wilcox wrote: > Did the usual searching without finding anything relevant. > > The application I am referencing is at: > http://155.206.18.162/mapping/map/map.phtml > > I have time series data in a PostGIS enabled database (current and wind > fields from model output). I can display the point data without > problems (try any of the current or wind layers). > > The problem is that when querying a point layer, the data that is always > extracted from the first timestamp rather than the timestamp associated > with the layer I am trying to query (specified as a FILTER). I understand > what is happening.. the query by point functionality is querying the > database at the specific POINT and displaying the first row that returns > (the first timestamp). If I delete the first timestamp data, the second > timestep data is displayed and so on. The only thing that changes > between layers is the FILTER. > > Does the queryByPoint() function utilize the FILTER definition from the > mapfile? It doesn't seem to be doing so. > > (Mapserver 5.0 and PHP/Mapscript) > > > Here is a sample layer definition: > > LAYER > TYPE POINT > CONNECTIONTYPE postgis > NAME 'NAME' > CONNECTION 'host=HOST user=USER dbname=DATABASE' > DATA "the_geom from (SELECT * from forecast left join > grid on grid.gid=forecast.grid_id) as data USING UNIQUE gid USING > SRID=4326" > FILTER "time=TIMESTAMP'2007-11-06 00:00:00'" > METADATA > 'DESCRIPTION' '2007-11-06 00:00:00' > 'RESULT_FIELDS' > 'wind_speed,wind_from_direction,rotation' > 'RESULT_HEADERS' 'Wind Speed (m/s), Wind > Direction (from TN), Rotation of Image (from TN)' > 'LAYER_ENCODING' 'UTF-8' > END > STATUS OFF > PROJECTION > 'init=epsg:4326' > END > TOLERANCE 10 > TOLERANCEUNITS pixels > LABELMAXSCALE 60000 > TEMPLATE void > CLASS > NAME ">= 0.95 m/s" > EXPRESSION ([wind_speed] >= 0.95) > STYLE > SYMBOL "arrow2" > ANGLE [wind_from_direction] > COLOR 118 0 0 > OUTLINECOLOR 0 0 0 > SIZE 10 > END > TEXT ([wind_speed] m/s - [wind_from_direction] TN) > LABEL > COLOR 118 0 0 > OUTLINECOLOR 0 0 0 > POSITION AUTO > SIZE small > PARTIALS TRUE > END > END > ... > END > > -- > > Kyle Wilcox > NOAA Chesapeake Bay Office > 410 Severn Avenue > Suite 107A > Annapolis, MD 21403 > office: (410) 295-3151 > Kyle.Wilcox at noaa.gov > > "It is from the wellspring of our despair and the places > that we are broken that we come to repair the world." > - Murray Waas From vishu_73ns at YAHOO.COM Tue Nov 6 20:12:11 2007 From: vishu_73ns at YAHOO.COM (Vishal Nagpal) Date: Tue, 6 Nov 2007 22:12:11 -0600 Subject: Mapserver and MySQL Message-ID: Hi, Thanx a lot, for quick response, Yes I did install from the source, The ogrinfo --formats does not display MySQL Neither did I find any option of installing --with MySQL So do I install GDAL/OGR and Mapserver again ???? Yes I understand use of ovf file with x and y coord but I think my problem is the support of OGR for MySQL. Actually I have my application in MySQL and it will be difficult to shift over to PostgreSQL at this stage. So I wish to use MySQL. Thanks and Regards Vishal From sgp_dgtek at HOTMAIL.COM Tue Nov 6 21:18:14 2007 From: sgp_dgtek at HOTMAIL.COM (Suman Pradhan) Date: Wed, 7 Nov 2007 05:18:14 +0000 Subject: unsubscribe In-Reply-To: Message-ID: _________________________________________________________________ Peek-a-boo FREE Tricks & Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us -------------- next part -------------- An HTML attachment was scrubbed... URL: From todd.harris at LANDGATE.WA.GOV.AU Tue Nov 6 21:24:14 2007 From: todd.harris at LANDGATE.WA.GOV.AU (Todd Harris) Date: Tue, 6 Nov 2007 23:24:14 -0600 Subject: Mapfile classes Message-ID: Hi Bart, Unfortunately I'm using SDE [USAGE_CODE], I'll try ORDER BY USAGE_CODE ASC as suggested by a colleague. It could take a while to get this done - a quicker way would be preferrable if anyone has any other ideas? Regards Todd From vishu_73ns at YAHOO.COM Tue Nov 6 21:34:10 2007 From: vishu_73ns at YAHOO.COM (Vishal Nagpal) Date: Tue, 6 Nov 2007 23:34:10 -0600 Subject: Mapserver and MySQL Message-ID: I tried to install OGR with mysql support confiure was OK --with-mysql=/usr/lib/mysql/mysql_config but I got these errors during make. I had done make clean ogr_mysql.h:34:23: error: my_global.h: No such file or directory ogr_mysql.h:35:19: error: mysql.h: No such file or directory ogr_mysql.h:73: error: ISO C++ forbids declaration of 'MYSQL_RES' with no type ogr_mysql.h:73: error: expected ';' before '*' token ogr_mysql.h:169: error: 'MYSQL_RES' has not been declared ogr_mysql.h:194: error: ISO C++ forbids declaration of 'MYSQL' with no type ogr_mysql.h:194: error: expected ';' before '*' token ogr_mysql.h:210: error: ISO C++ forbids declaration of 'MYSQL' with no type ogr_mysql.h:210: error: expected ';' before '*' token ogr_mysql.h:213: error: expected `;' before 'int' mySQL is installed and running properly from command line, OS is Fedora 6.2 Regards, Vishal From hobu.inc at GMAIL.COM Tue Nov 6 22:30:04 2007 From: hobu.inc at GMAIL.COM (Howard Butler) Date: Wed, 7 Nov 2007 00:30:04 -0600 Subject: Mapfile classes In-Reply-To: Message-ID: Todd, By SDE, do you mean you are using the ArcSDE driver? If so, it doesn't support ORDER BY or any other reasonable SQL operations for that matter... Howard On Nov 6, 2007, at 11:24 PM, Todd Harris wrote: > Hi Bart, > > Unfortunately I'm using SDE [USAGE_CODE], I'll try ORDER BY USAGE_CODE > ASC as suggested by a colleague. > It could take a while to get this done - a quicker way would be > preferrable if > anyone has any other ideas? > > > Regards > Todd From hobu.inc at GMAIL.COM Tue Nov 6 22:30:54 2007 From: hobu.inc at GMAIL.COM (Howard Butler) Date: Wed, 7 Nov 2007 00:30:54 -0600 Subject: Mapserver and MySQL In-Reply-To: Message-ID: Vishal, You likely need to have the mysql-devel package installed on your system. It contains the header files need to compile libraries against the mysql API. Howard On Nov 6, 2007, at 11:34 PM, Vishal Nagpal wrote: > I tried to install OGR with mysql support > confiure was OK > --with-mysql=/usr/lib/mysql/mysql_config > but I got these errors during make. I had done make clean > > ogr_mysql.h:34:23: error: my_global.h: No such file or directory > ogr_mysql.h:35:19: error: mysql.h: No such file or directory > ogr_mysql.h:73: error: ISO C++ forbids declaration of 'MYSQL_RES' > with no type > ogr_mysql.h:73: error: expected ';' before '*' token > ogr_mysql.h:169: error: 'MYSQL_RES' has not been declared > ogr_mysql.h:194: error: ISO C++ forbids declaration of 'MYSQL' with > no type > ogr_mysql.h:194: error: expected ';' before '*' token > ogr_mysql.h:210: error: ISO C++ forbids declaration of 'MYSQL' with > no type > ogr_mysql.h:210: error: expected ';' before '*' token > ogr_mysql.h:213: error: expected `;' before 'int' > > mySQL is installed and running properly from command line, > OS is Fedora 6.2 > Regards, > Vishal From boily at BSW.ORG Tue Nov 6 22:41:41 2007 From: boily at BSW.ORG (Roger Boily) Date: Wed, 7 Nov 2007 07:41:41 +0100 Subject: Mapserver and MySQL In-Reply-To: Message-ID: Vishal, we use mySql since a couple of years with mapserver and it works perfectly with OGR. You have to compile ogr with mySql, so you'll have the MySQL format activated. First, compile mysql from source (or install the install the dev libraries: [debian : "apt-get install libmysqlclient15-dev"]) Then compile ogr with mysql: ./configure --with-mysql=/usr/bin/mysql_config You're done. in the mapfile add : CONNECTIONTYPE OGR CONNECTION "MySQL:dataBaseName,user=userName,password=yourPass, GeomTableName" DATA "SELECT * FROM GeomTableName" hope it helps, Roger Boily Vishal Nagpal ha scritto: > Hi, > Thanx a lot, for quick response, > Yes I did install from the source, > The ogrinfo --formats does not display MySQL > Neither did I find any option of installing --with MySQL > > So do I install GDAL/OGR and Mapserver again ???? > > Yes I understand use of ovf file with x and y coord but I think my problem > is the support of OGR for MySQL. > > Actually I have my application in MySQL and it will be difficult to shift > over to PostgreSQL at this stage. So I wish to use MySQL. > Thanks and Regards > Vishal > From Dejan.Gambin at PULA.HR Wed Nov 7 00:45:37 2007 From: Dejan.Gambin at PULA.HR (Gambin Dejan) Date: Wed, 7 Nov 2007 09:45:37 +0100 Subject: queryByAttributes qstring expression and Oracle Message-ID: Hi, I have to use queryByAttributes to make an external database jointo Oracle database. It works perfectly except when it needs to match an expression that includes a slash character ("/"), like: "[NAME]" =~ /214/2/ where the string "214/2" is the value it has to find. If I put "[NAME]" =~ /214/, it finds it, but my users will often use "214/2" in their query. I hav tried escaping the slash sign, like: "[NAME]" =~ /214\/2/ but it still doesn't find the value. If I put "[NAME]" =~ /214.2/ then the value is found. Any help? Regards, dejan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at SPACETEC.NO Wed Nov 7 01:50:41 2007 From: jorn at SPACETEC.NO (=?iso-8859-1?q?J=F8rn_Vegard_R=F8snes?=) Date: Wed, 7 Nov 2007 11:50:41 +0200 Subject: SOS eventtime and result Message-ID: Hi all, I'm running Mapserver v5.1-dev. Postgresql is running with debug level 5. When I send a request containing result and time filtering, it seems that only the result filtering is included in the generated SQL WHERE statement (from Postgresql log). The eventtime filtering seems to be omitted. URL (partly): eventtime=2007-11-05T08:00:00Z2007-11-05T08:30:00Z& result=mmsi_nb258069000 If I include only the eventtime in the SOS request, the SQL WHERE statement contains the time filtering. URL (partly): eventtime=2007-11-05T08:00:00Z2007-11-05T08:30:00Z Any ideas are appreciated. I can send more details off-list. cheers J?rn Vegard From andreas.albarello at TERRITORIUMONLINE.COM Wed Nov 7 02:16:08 2007 From: andreas.albarello at TERRITORIUMONLINE.COM (Andreas Albarello) Date: Wed, 7 Nov 2007 11:16:08 +0100 Subject: queryByAttributes qstring expression and Oracle In-Reply-To: Message-ID: Gambin Dejan wrote: > I have to use queryByAttributes to make an external database jointo > Oracle database. It works perfectly except when it needs to match an > expression that includes a slash character (?/?), like: > > "[NAME]" =~ /214/2/ > > where the string ?214/2? is the value it has to find. If I put "[NAME]" > =~ /214/, it finds it, but my users will often use ?214/2? in their > query. I hav tried escaping the slash sign, like: > > "[NAME]" =~ /214\/2/ > > but it still doesn't find the value. If I put "[NAME]" =~ /214.2/ then > the value is found. Dejan, there is currently no way to escape a slash inside a regular expression in MapServer. In addition, I don't think GNU regex supports any kind of octal or hex notation to specify a certain character like /214\x2f2/ where \x2f would be the slash character (ASCII #47 = 2f). Only thing that comes to mind would be to link MapServer against the PHP PCRE regex, if that still works (haven't tried it in a while). Perl-compatible regular expressions should then allow you to do the sort of hex-escape I mentioned above. Best regards, -- -------------------------------------------------------------------- Andreas Albarello Analysis & SW Development Territorium Online srl/GmbH Via Buozzi/Buozzistra?e 12 - I 39100 Bolzano/Bozen email: andreas.albarello at territoriumonline.com web: www.territoriumonline.com -------------------------------------------------------------------- From nmin at FREENET.DE Wed Nov 7 03:25:14 2007 From: nmin at FREENET.DE (Simon) Date: Wed, 7 Nov 2007 05:25:14 -0600 Subject: Update picture in browser Message-ID: Hi, im sorry for this stupid question, but I'm running out of ideas. I created a jsp Page using mapscript to generate a gif picture out of my GIS Data, and it works just fine. The jsp page receives the GIS Data via a webservice ... so the Data changes and the picture is newly-created each time the GIS Data has changed. The problem is, that my browser ignores the changes sometimes. So, the page is loaded again and the shown picture is still the old one, even though it doesn't exist anymore. The picture is shown in an tag, here is the code: page.jsp ======== ... <% mapObj map = new mapObj(mapfile); //mapfile is resolved out of a POST request imageObj image = map.draw(); image.save(this.tmpPath+"/picture.gif",map); %> out.println("
"); out.println("" ); out.println("
"); where picturePath is the URL to the created picture. The part with the random number is a solution for this problem from a php forum, but it doesn't work so far. My first idea was, that there is a problem with my IE cache. So I added meta tags to my jsp page ... but the problem seems to be somewhere else. A possible solution would be to give the picture an ID which changes every time the picture is created ... but this would be a bit sloppy I think. Well, maybe somebody of you had simliar experiences ... hopefully. thanks in advance. Simon From dovidio at PLANETEK.IT Wed Nov 7 03:29:38 2007 From: dovidio at PLANETEK.IT (Fabio D'Ovidio) Date: Wed, 7 Nov 2007 12:29:38 +0100 Subject: filled color transparency Message-ID: Hi list! I have configured a mapfile POLYGON layer (it is a buffer generated from a POINT shape) with a TRANSPARENCY 10, and it works fine on the map. There are some feature intersections in this layer and for each of them I have a different color style. I'd like to make transparent also the filled color in each feature, so my problem is to set also a filled color TRANSPARENCY. Is it possible? Thanks!! -- Ing. Fabio D'Ovidio Staff WebGIS Planetek Italia s.r.l. Via Massaua 12, I-70123 Bari Tel.: +39 080 9644200 Fax: +39 080 9644299 dovidio at planetek.it - http://www.planetek.it -- From m_anderson14 at HOTMAIL.COM Wed Nov 7 05:58:42 2007 From: m_anderson14 at HOTMAIL.COM (Mike Anderson) Date: Wed, 7 Nov 2007 07:58:42 -0600 Subject: WFS features not drawing Message-ID: I'm trying for the first time to use MapServer as a WFS client and can't get the features to draw. They are correctly being downloaded to a .gml file in the images folder along with a .gfs file. So I think the connection is set up right, but they don't draw on the map. I am trying to add the ssurgo layer from the Soil Data Mart. Here is my layer definition: LAYER NAME "ssurgof" TYPE Line TRANSPARENCY 100 DEBUG ON CONNECTIONTYPE WFS MAXSCALE 15000 MINSCALE 300 PROJECTION "init=EPSG:26918" END CONNECTION "http://sdmdataaccess.nrcs.usda.gov/SPATIAL/SDMNAD83UTM.w fs?SRSNAME=EPSG:26918" METADATA "wfs_typename" "MapunitPoly" "wfs_version" "1.0.0" "wfs_request_method" "GET" "wfs_connectiontimeout" "60" "wfs_maxfeatures" "15" END CLASS NAME "Soil Features" STYLE COLOR 200 255 0 SYMBOL "circle" OUTLINECOLOR 120 120 120 END END #CLASS # Name 'Soil Features' # TEMPLATE "querytemp.html" # SYMBOL "circle" # COLOR -1 -1 -1 # OUTLINECOLOR 255 0 0 # SIZE 2 #END # CLASS END # LAYER I thought maybe the features were drawing but the class was messed up and they weren't visible, so I tried two ways to define the class. Neither one works. Anyone have an idea what the problem is? Thanks. Mike Anderson From Kyle.Wilcox at NOAA.GOV Wed Nov 7 06:17:47 2007 From: Kyle.Wilcox at NOAA.GOV (Kyle Wilcox) Date: Wed, 7 Nov 2007 09:17:47 -0500 Subject: PostGIS Queries using FILTER In-Reply-To: <473099CA.5157.008F.0@dnr.state.mn.us> Message-ID: I just added that layer name into the mail code to avoid confusion, they are named by their timestamp's index For example: First layer: LAYER NAME 'One' FILTER "time=TIMESTAMP'2007-11-06 00:00:00'" METADATA 'DESCRIPTION' '2007-11-06 00:00:00' END ... END Second Layer: LAYER NAME 'Two' FILTER "time=TIMESTAMP'2007-11-06 03:00:00'" METADATA 'DESCRIPTION' '2007-11-06 00:00:00' END ... END Those are the only differences between layers. Could it be that the queryByPoint() function is querying on the specific point and applying the filter, which fails or returns all timesteps associated with that point, because the 'time' column is in a separate table than the geometry column? I assumed the queryByPoint() function would join my grid and data tables as specified in DATA. The grid geometry (POINTS) are in a separate table than the data (values I want returned from a query). The query code is coming from the pmapper framework. I'll set up a small test case using Mapserver 4.10 and a self made application to see if the same thing happens. Thanks for the response! Steve Lime wrote: > Attribute queries use filters themselves so any predefined filter is set aside temporarily. That said, for other > types of purely spatial queries the FILTER should remain intact. I just stepped through the point query code > and couldn't any place where it was mucked with. > > What does the code that does that's doing the query look like? I notice in your sample layer that the layer > name is 'NAME' which makes me wonder if somehow you're always querying the same layer. Not to say that > there isn't something else going on as you suggest but I'll start with the obvious. > > Steve > >>>> On 11/6/2007 at 4:00 PM, in message <4730E3F5.2080000 at Noaa.gov>, Kyle Wilcox > wrote: >> Did the usual searching without finding anything relevant. >> >> The application I am referencing is at: >> http://155.206.18.162/mapping/map/map.phtml >> >> I have time series data in a PostGIS enabled database (current and wind >> fields from model output). I can display the point data without >> problems (try any of the current or wind layers). >> >> The problem is that when querying a point layer, the data that is always >> extracted from the first timestamp rather than the timestamp associated >> with the layer I am trying to query (specified as a FILTER). I understand >> what is happening.. the query by point functionality is querying the >> database at the specific POINT and displaying the first row that returns >> (the first timestamp). If I delete the first timestamp data, the second >> timestep data is displayed and so on. The only thing that changes >> between layers is the FILTER. >> >> Does the queryByPoint() function utilize the FILTER definition from the >> mapfile? It doesn't seem to be doing so. >> >> (Mapserver 5.0 and PHP/Mapscript) >> >> >> Here is a sample layer definition: >> >> LAYER >> TYPE POINT >> CONNECTIONTYPE postgis >> NAME 'NAME' >> CONNECTION 'host=HOST user=USER dbname=DATABASE' >> DATA "the_geom from (SELECT * from forecast left join >> grid on grid.gid=forecast.grid_id) as data USING UNIQUE gid USING >> SRID=4326" >> FILTER "time=TIMESTAMP'2007-11-06 00:00:00'" >> METADATA >> 'DESCRIPTION' '2007-11-06 00:00:00' >> 'RESULT_FIELDS' >> 'wind_speed,wind_from_direction,rotation' >> 'RESULT_HEADERS' 'Wind Speed (m/s), Wind >> Direction (from TN), Rotation of Image (from TN)' >> 'LAYER_ENCODING' 'UTF-8' >> END >> STATUS OFF >> PROJECTION >> 'init=epsg:4326' >> END >> TOLERANCE 10 >> TOLERANCEUNITS pixels >> LABELMAXSCALE 60000 >> TEMPLATE void >> CLASS >> NAME ">= 0.95 m/s" >> EXPRESSION ([wind_speed] >= 0.95) >> STYLE >> SYMBOL "arrow2" >> ANGLE [wind_from_direction] >> COLOR 118 0 0 >> OUTLINECOLOR 0 0 0 >> SIZE 10 >> END >> TEXT ([wind_speed] m/s - [wind_from_direction] TN) >> LABEL >> COLOR 118 0 0 >> OUTLINECOLOR 0 0 0 >> POSITION AUTO >> SIZE small >> PARTIALS TRUE >> END >> END >> ... >> END >> >> -- >> >> Kyle Wilcox >> NOAA Chesapeake Bay Office >> 410 Severn Avenue >> Suite 107A >> Annapolis, MD 21403 >> office: (410) 295-3151 >> Kyle.Wilcox at noaa.gov >> >> "It is from the wellspring of our despair and the places >> that we are broken that we come to repair the world." >> - Murray Waas > -- Kyle Wilcox NOAA Chesapeake Bay Office 410 Severn Avenue Suite 107A Annapolis, MD 21403 office: (410) 295-3151 Kyle.Wilcox at noaa.gov "It is from the wellspring of our despair and the places that we are broken that we come to repair the world." - Murray Waas From marcos at BURKE.ATH.CX Wed Nov 7 07:02:25 2007 From: marcos at BURKE.ATH.CX (Marcos =?ISO-8859-1?Q?S=E1nchez?= Provencio) Date: Wed, 7 Nov 2007 16:02:25 +0100 Subject: Update picture in browser In-Reply-To: Message-ID: I would try setting response headers (not tested): <% response.setHeader("Pragma", "no-cache"); response.setHeader("Expires", "Mon, 01 Jan 2001 00:00:01 GMT"); response.setHeader("Cache-Control", "no-store"); response.setHeader("Cache-Control", "must-revalidate"); response.setHeader("Cache-Control", "no-cache"); %> El mi?, 07-11-2007 a las 05:25 -0600, Simon escribi?: > Hi, > > im sorry for this stupid question, but I'm running out of ideas. > > I created a jsp Page using mapscript to generate a gif picture out of my GIS > Data, and it works just fine. > > The jsp page receives the GIS Data via a webservice ... so the Data changes > and the picture is newly-created each time the GIS Data has changed. > > The problem is, that my browser ignores the changes sometimes. So, the page > is loaded again and the shown picture is still the old one, even though it > doesn't exist anymore. > > The picture is shown in an tag, here is the code: > > page.jsp > ======== > > > > > > ... > > <% > mapObj map = new mapObj(mapfile); //mapfile is resolved out of a POST request > imageObj image = map.draw(); > image.save(this.tmpPath+"/picture.gif",map); > > %> > > out.println("
"); > out.println(" src=\""+picturePath+"?id="+Math.round(Math.random()*100000)+"\" >" ); > out.println("
"); > > where picturePath is the URL to the created picture. > The part with the random number is a solution for this problem from a php > forum, but it doesn't work so far. > > My first idea was, that there is a problem with my IE cache. So I added meta > tags to my jsp page ... but the problem seems to be somewhere else. > > A possible solution would be to give the picture an ID which changes every > time the picture is created ... but this would be a bit sloppy I think. > > Well, maybe somebody of you had simliar experiences ... hopefully. > > thanks in advance. > > Simon From frederic.junod at CAMPTOCAMP.COM Wed Nov 7 07:18:56 2007 From: frederic.junod at CAMPTOCAMP.COM (=?UTF-8?B?RnLDqWTDqXJpYw==?= Junod) Date: Wed, 7 Nov 2007 16:18:56 +0100 Subject: AGG/GIF Message-ID: Hi all, Does the AGG renderer support gif ? I suspect no because [1] don't mention it. I've try with: OUTPUTFORMAT NAME gif DRIVER "AGG/GIF" MIMETYPE "image/gif" END But mapserv returns: "loadOutputFormat(): General error message. OUTPUTFORMAT clause references driver AGG/GIF, but this driver isn't configured." It works with: DRIVER "GD/GIF" mapserv -v: MapServer version 5.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Thanks, fredj [1] http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics -- Fr?d?ric Junod Camptocamp SA From David.Fawcett at STATE.MN.US Wed Nov 7 07:46:17 2007 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Wed, 7 Nov 2007 09:46:17 -0600 Subject: Update picture in browser In-Reply-To: A Message-ID: If you give the image a unique name each time that you draw it, browser caching shouldn't be an issue. -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Simon Sent: Wednesday, November 07, 2007 5:25 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Update picture in browser Hi, im sorry for this stupid question, but I'm running out of ideas. I created a jsp Page using mapscript to generate a gif picture out of my GIS Data, and it works just fine. The jsp page receives the GIS Data via a webservice ... so the Data changes and the picture is newly-created each time the GIS Data has changed. The problem is, that my browser ignores the changes sometimes. So, the page is loaded again and the shown picture is still the old one, even though it doesn't exist anymore. The picture is shown in an tag, here is the code: page.jsp ======== ... <% mapObj map = new mapObj(mapfile); //mapfile is resolved out of a POST request imageObj image = map.draw(); image.save(this.tmpPath+"/picture.gif",map); %> out.println("
"); out.println("" ); out.println("
"); where picturePath is the URL to the created picture. The part with the random number is a solution for this problem from a php forum, but it doesn't work so far. My first idea was, that there is a problem with my IE cache. So I added meta tags to my jsp page ... but the problem seems to be somewhere else. A possible solution would be to give the picture an ID which changes every time the picture is created ... but this would be a bit sloppy I think. Well, maybe somebody of you had simliar experiences ... hopefully. thanks in advance. Simon From warmerdam at POBOX.COM Wed Nov 7 07:56:03 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Wed, 7 Nov 2007 10:56:03 -0500 Subject: AGG/GIF In-Reply-To: <20071107161856.75661d81@camptocamp.com> Message-ID: Fr?d?ric Junod wrote: > Hi all, > > Does the AGG renderer support gif ? > > I suspect no because [1] don't mention it. > > I've try with: > > OUTPUTFORMAT > NAME gif > DRIVER "AGG/GIF" > MIMETYPE "image/gif" > END > > But mapserv returns: > "loadOutputFormat(): General error message. OUTPUTFORMAT clause references > driver AGG/GIF, but this driver isn't configured." Fr?d?ric, I think the issue is that AGG produces 24bit output images, not 8bit paletted as supported by GIF. So only 24bit image formats (PNG, JPEG) are available. In theory GIF could be supported by "crushing" the image down to 8bit paletted after rendering is complete, but I think the results would be very unsatisfactory in most cases. 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 | President OSGeo, http://osgeo.org From Jukka.Rahkonen at MMMTIKE.FI Wed Nov 7 08:22:01 2007 From: Jukka.Rahkonen at MMMTIKE.FI (Rahkonen Jukka) Date: Wed, 7 Nov 2007 18:22:01 +0200 Subject: WFS features not drawing In-Reply-To: A Message-ID: Hi, Have you tried adding some STATUS to layer definition? -Jukka- > -----Alkuper?inen viesti----- > L?hett?j?: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Puolesta Mike Anderson > L?hetetty: 7. marraskuuta 2007 15:59 > Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU > Aihe: [UMN_MAPSERVER-USERS] WFS features not drawing > > I'm trying for the first time to use MapServer as a WFS > client and can't get the features to draw. They are correctly > being downloaded to a .gml file in the images folder along > with a .gfs file. So I think the connection is set up right, > but they don't draw on the map. > > I am trying to add the ssurgo layer from the Soil Data Mart. > Here is my layer > definition: > > LAYER > NAME "ssurgof" > TYPE Line > TRANSPARENCY 100 > DEBUG ON > CONNECTIONTYPE WFS > MAXSCALE 15000 > MINSCALE 300 > PROJECTION > "init=EPSG:26918" > END > > CONNECTION "http://sdmdataaccess.nrcs.usda.gov/SPATIAL/SDMNAD83UTM.w > fs?SRSNAME=EPSG:26918" > > METADATA > "wfs_typename" "MapunitPoly" > "wfs_version" "1.0.0" > "wfs_request_method" "GET" > "wfs_connectiontimeout" "60" > "wfs_maxfeatures" "15" > END > > CLASS > NAME "Soil Features" > STYLE > COLOR 200 255 0 > SYMBOL "circle" > OUTLINECOLOR 120 120 120 > END > END > > #CLASS > # Name 'Soil Features' > # TEMPLATE "querytemp.html" > # SYMBOL "circle" > # COLOR -1 -1 -1 > # OUTLINECOLOR 255 0 0 > # SIZE 2 > #END # CLASS > > END # LAYER > > > I thought maybe the features were drawing but the class was > messed up and they weren't visible, so I tried two ways to > define the class. Neither one works. > > Anyone have an idea what the problem is? > > Thanks. > > Mike Anderson > From mlinden at ZEELANDNET.NL Wed Nov 7 08:12:26 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Wed, 7 Nov 2007 17:12:26 +0100 Subject: AGG/GIF In-Reply-To: <4731E013.9020906@pobox.com> Message-ID: Am I correct when I assume that in a single mapfile you can mix AGG and GD outputformats? Frank Warmerdam schreef: > Fr?d?ric Junod wrote: >> Hi all, >> >> Does the AGG renderer support gif ? >> >> I suspect no because [1] don't mention it. >> >> I've try with: >> >> OUTPUTFORMAT >> NAME gif >> DRIVER "AGG/GIF" >> MIMETYPE "image/gif" >> END >> >> But mapserv returns: >> "loadOutputFormat(): General error message. OUTPUTFORMAT clause >> references >> driver AGG/GIF, but this driver isn't configured." > > Fr?d?ric, > > I think the issue is that AGG produces 24bit output images, not 8bit > paletted > as supported by GIF. So only 24bit image formats (PNG, JPEG) are > available. > In theory GIF could be supported by "crushing" the image down to 8bit > paletted > after rendering is complete, but I think the results would be very > unsatisfactory in most cases. > > Best regards, -- Milo van der Linden skype: milovanderlinden mlinden at zeelandnet.nl milovanderlinden at gmail.com milo at 3dsite.nl http://www.3dsite.nl De informatie in dit bericht reflecteert mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bij het betreffende medium behorende voorwaarden. The information in this message reflects my personal opinion and not that of a company or public body. All rights reserved.If this message is contained in a mailing-list or community, the rights on the medium are automatically adapted. -------------- next part -------------- An HTML attachment was scrubbed... URL: From warmerdam at POBOX.COM Wed Nov 7 08:32:07 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Wed, 7 Nov 2007 11:32:07 -0500 Subject: AGG/GIF In-Reply-To: <4731E3EA.4070607@zeelandnet.nl> Message-ID: Milo van der Linden wrote: > Am I correct when I assume that in a single mapfile you can mix AGG and > GD outputformats? Milo, Yes, that is correct. You do need to give them distinct names, and for protocols like WMS where things are selected by mime type you need to engineer some sort of distinct mime type to make them selectable by FORMAT. 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 | President OSGeo, http://osgeo.org From thomas.bonfort at GMAIL.COM Wed Nov 7 08:52:45 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Wed, 7 Nov 2007 17:52:45 +0100 Subject: AGG/GIF In-Reply-To: <4731E3EA.4070607@zeelandnet.nl> Message-ID: you can mix outputformats in the mapfile, ie have multiple OUTPUTFORMAT...END blocks. but only one is used at a time when the actual drawing takes place, so you can't have different outpuformats for different layers. tb On 11/7/07, Milo van der Linden wrote: > > Am I correct when I assume that in a single mapfile you can mix AGG and > GD outputformats? > > Frank Warmerdam schreef: > > Fr?d?ric Junod wrote: > > Hi all, > > Does the AGG renderer support gif ? > > I suspect no because [1] don't mention it. > > I've try with: > > OUTPUTFORMAT > NAME gif > DRIVER "AGG/GIF" > MIMETYPE "image/gif" > END > > But mapserv returns: > "loadOutputFormat(): General error message. OUTPUTFORMAT clause references > > driver AGG/GIF, but this driver isn't configured." > > > Fr?d?ric, > > I think the issue is that AGG produces 24bit output images, not 8bit > paletted > as supported by GIF. So only 24bit image formats (PNG, JPEG) are > available. > In theory GIF could be supported by "crushing" the image down to 8bit > paletted > after rendering is complete, but I think the results would be very > unsatisfactory in most cases. > > Best regards, > > > > -- > > > Milo van der Linden > skype: milovanderlinden > mlinden at zeelandnet.nl > milovanderlinden at gmail.com > milo at 3dsite.nl > http://www.3dsite.nl > > > De informatie in dit bericht reflecteert mijn persoonlijke mening en niet > die van een bedrijf of instantie. Aan de informatie kunnen geen rechten > worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list > of community dan gelden automatisch de bij het betreffende medium behorende > voorwaarden. The information in this message reflects my personal opinion > and not that of a company or public body. All rights reserved.If this > message is contained in a mailing-list or community, the rights on the > medium are automatically adapted. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From BLC at JUB.COM Wed Nov 7 10:22:32 2007 From: BLC at JUB.COM (Bruce Cheney) Date: Wed, 7 Nov 2007 11:22:32 -0700 Subject: System Configuration Message-ID: Hello all. I am trying to find a typical system configuration for a mapserver website. I have looked without any luck (could be I haven't looked in the correct location). Can anyone recommend a typical configuration. In other words: do you recommend a load balance server, # of Application Servers, # of DB servers, etc. I realize this may be application specific but some general guidelines would be really helpful. For example, for an application server where MapServer is the predominant resource user how many concurrent users could it be expected to handle? Many thanks in advance for any input. Bruce Cheney Gateway Mapping, Inc www.gatewaymapping.com 801.221.7656 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_anderson14 at HOTMAIL.COM Wed Nov 7 10:55:25 2007 From: m_anderson14 at HOTMAIL.COM (Michael Anderson) Date: Wed, 7 Nov 2007 18:55:25 +0000 Subject: WFS features not drawing In-Reply-To: Message-ID: It doesn't help. Since the WFS response is appearing in the image folder, the layer must be getting turned on. And the scale thresholds seem to be working - the gml files only appear if I zoom in far enough for the layer to be drawn. So everything works, except rendering the WFS response. Mike > Subject: Re: [UMN_MAPSERVER-USERS] WFS features not drawing> Date: Wed, 7 Nov 2007 18:22:01 +0200> From: Jukka.Rahkonen at mmmtike.fi> To: m_anderson14 at HOTMAIL.COM; MAPSERVER-USERS at LISTS.UMN.EDU> > Hi,> > Have you tried adding some STATUS to layer definition? > > -Jukka- > > > -----Alkuper?inen viesti-----> > L?hett?j?: UMN MapServer Users List > > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Puolesta Mike Anderson> > L?hetetty: 7. marraskuuta 2007 15:59> > Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU> > Aihe: [UMN_MAPSERVER-USERS] WFS features not drawing> > > > I'm trying for the first time to use MapServer as a WFS > > client and can't get the features to draw. They are correctly > > being downloaded to a .gml file in the images folder along > > with a .gfs file. So I think the connection is set up right, > > but they don't draw on the map.> > > > I am trying to add the ssurgo layer from the Soil Data Mart. > > Here is my layer> > definition:> > > > LAYER> > NAME "ssurgof"> > TYPE Line> > TRANSPARENCY 100> > DEBUG ON> > CONNECTIONTYPE WFS> > MAXSCALE 15000> > MINSCALE 300> > PROJECTION> > "init=EPSG:26918"> > END> > > > CONNECTION "http://sdmdataaccess.nrcs.usda.gov/SPATIAL/SDMNAD83UTM.w> > fs?SRSNAME=EPSG:26918"> > > > METADATA> > "wfs_typename" "MapunitPoly"> > "wfs_version" "1.0.0"> > "wfs_request_method" "GET"> > "wfs_connectiontimeout" "60"> > "wfs_maxfeatures" "15"> > END> > > > CLASS> > NAME "Soil Features"> > STYLE> > COLOR 200 255 0> > SYMBOL "circle"> > OUTLINECOLOR 120 120 120> > END> > END> > > > #CLASS> > # Name 'Soil Features'> > # TEMPLATE "querytemp.html"> > # SYMBOL "circle"> > # COLOR -1 -1 -1> > # OUTLINECOLOR 255 0 0> > # SIZE 2> > #END # CLASS> > > > END # LAYER> > > > > > I thought maybe the features were drawing but the class was > > messed up and they weren't visible, so I tried two ways to > > define the class. Neither one works.> > > > Anyone have an idea what the problem is?> > > > Thanks.> > > > Mike Anderson> > _________________________________________________________________ Peek-a-boo FREE Tricks & Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlinden at ZEELANDNET.NL Wed Nov 7 11:01:58 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Wed, 7 Nov 2007 20:01:58 +0100 Subject: System Configuration In-Reply-To: Message-ID: Hello Bruce, There is no standard answer to your question. It all depends on personal or business favour, small issues in maintenance and so. I for instance tried to host a mapset at hostGIS, but due to a strange difference in installation with my test server, the datasets turned up corrupted on linux. I then decided to purchase dedicated windows 2003 hosting and set up a mapserver myself with IIS for future use in combination with sharpmap ans asp.net. Our mapserver related business is picking up. Our mapserver is currently serving about 1000 map requests per day. Expectation is that this will reach 5000 within the next month. The main thing we are currently investigating is setting up tile caching to speed up request/response. My guess is that 5 paying customers will turn a profit on the first dedicated server, currently we have 2. 10 customers may be the limit, but this is a wild guess. When we reach 5 paying customers, we will set up the next dedicated server. This is the approach we are going to take. Loadbalancing is a webserver related matter. This has nothing to do with mapserver directly. I have also contacted 52north to set up a secured service for mapserver. They have succesfull implementations of WSS and WAS on top of WMS. So the main question to ask is; - What do you need right now for the actual demand? I wouldn't worry too much about growing larger in the future, this issue will solve itself at that time, look for load balancing when it looks like it might become an issue. Manage your system(s) with care, watch the stats, watch the response times per request. And then decide what to do to keep on track to fullfill demand. This is an ongoing process. Bruce Cheney schreef: > Hello all. I am trying to find a typical system configuration for a > mapserver website. I have looked without any luck (could be I haven't > looked in the correct location). Can anyone recommend a typical > configuration. In other words: do you recommend a load balance > server, # of Application Servers, # of DB servers, etc. I realize > this may be application specific but some general guidelines would be > really helpful. For example, for an application server where > MapServer is the predominant resource user how many concurrent users > could it be expected to handle? > > Many thanks in advance for any input. > > Bruce Cheney > *Gateway Mapping, Inc* > www.gatewaymapping.com > /801.221.7656/ > -- Milo van der Linden skype: milovanderlinden mlinden at zeelandnet.nl milovanderlinden at gmail.com milo at 3dsite.nl http://www.3dsite.nl De informatie in dit bericht reflecteert mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bij het betreffende medium behorende voorwaarden. The information in this message reflects my personal opinion and not that of a company or public body. All rights reserved.If this message is contained in a mailing-list or community, the rights on the medium are automatically adapted. -------------- next part -------------- An HTML attachment was scrubbed... URL: From yassefa at DMSOLUTIONS.CA Wed Nov 7 11:46:57 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Wed, 7 Nov 2007 14:46:57 -0500 Subject: SOS eventtime and result In-Reply-To: <200711071050.41686.jorn@spacetec.no> Message-ID: Hi There, There is ticket on this issue : http://trac.osgeo.org/mapserver/ticket/2388. I have committed the fix in cvs. If you have a chance, please give it a try and update the bug. Best Regards J?rn Vegard R?snes wrote: > Hi all, > > I'm running Mapserver v5.1-dev. > Postgresql is running with debug level 5. > > When I send a request containing result and time filtering, it seems that only > the result filtering is included in the generated SQL WHERE statement (from > Postgresql log). The eventtime filtering seems to be omitted. > URL (partly): > eventtime=2007-11-05T08:00:00Z2007-11-05T08:30:00Z& > result=mmsi_nb258069000 > > > If I include only the eventtime in the SOS request, the SQL WHERE statement > contains the time filtering. > URL (partly): > eventtime=2007-11-05T08:00:00Z2007-11-05T08:30:00Z > > Any ideas are appreciated. > I can send more details off-list. > > cheers > J?rn Vegard > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From BLC at JUB.COM Wed Nov 7 16:32:36 2007 From: BLC at JUB.COM (Bruce Cheney) Date: Wed, 7 Nov 2007 17:32:36 -0700 Subject: System Configuration In-Reply-To: A<47320BA6.5030805@zeelandnet.nl> Message-ID: Milo, Thanks for the response. I understand that the requirements are the limit and the driving force. So here is what we are up against and maybe that will help. We have been given a requirement to support 5000 simultaneous users. What we are finding is that MapServer bogs down around 400 simultaneous users on a test machine. It looks like it is likely slowing because of the threading issue. We haven't tested on a production machine but are estimating that it should support double what are test machine could handle (double the processor and RAM). So at least 800 simultaneous users. Divide that out with the 5000 and we need a minimum of 6-7 web servers supporting MapServer. We will certainly scale this as is needed but I do need some idea going in as to what is going to be required. Does this sound like results that others expect or is this quantity above what others have tested? Also Does anyone know of a solution in the works to run make mapserver thread safe and/or up the overall speed? I am not complaining about the speed just wondering what is in the works. Thanks again. Bruce Cheney Gateway Mapping, Inc www.gatewaymapping.com 801.221.7656 ________________________________ From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Milo van der Linden Sent: Wednesday, November 07, 2007 12:02 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] System Configuration Hello Bruce, There is no standard answer to your question. It all depends on personal or business favour, small issues in maintenance and so. I for instance tried to host a mapset at hostGIS, but due to a strange difference in installation with my test server, the datasets turned up corrupted on linux. I then decided to purchase dedicated windows 2003 hosting and set up a mapserver myself with IIS for future use in combination with sharpmap ans asp.net. Our mapserver related business is picking up. Our mapserver is currently serving about 1000 map requests per day. Expectation is that this will reach 5000 within the next month. The main thing we are currently investigating is setting up tile caching to speed up request/response. My guess is that 5 paying customers will turn a profit on the first dedicated server, currently we have 2. 10 customers may be the limit, but this is a wild guess. When we reach 5 paying customers, we will set up the next dedicated server. This is the approach we are going to take. Loadbalancing is a webserver related matter. This has nothing to do with mapserver directly. I have also contacted 52north to set up a secured service for mapserver. They have succesfull implementations of WSS and WAS on top of WMS. So the main question to ask is; - What do you need right now for the actual demand? I wouldn't worry too much about growing larger in the future, this issue will solve itself at that time, look for load balancing when it looks like it might become an issue. Manage your system(s) with care, watch the stats, watch the response times per request. And then decide what to do to keep on track to fullfill demand. This is an ongoing process. Bruce Cheney schreef: Hello all. I am trying to find a typical system configuration for a mapserver website. I have looked without any luck (could be I haven't looked in the correct location). Can anyone recommend a typical configuration. In other words: do you recommend a load balance server, # of Application Servers, # of DB servers, etc. I realize this may be application specific but some general guidelines would be really helpful. For example, for an application server where MapServer is the predominant resource user how many concurrent users could it be expected to handle? Many thanks in advance for any input. Bruce Cheney Gateway Mapping, Inc www.gatewaymapping.com 801.221.7656 -- Milo van der Linden skype: milovanderlinden mlinden at zeelandnet.nl milovanderlinden at gmail.com milo at 3dsite.nl http://www.3dsite.nl De informatie in dit bericht reflecteert mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bij het betreffende medium behorende voorwaarden. The information in this message reflects my personal opinion and not that of a company or public body. All rights reserved.If this message is contained in a mailing-list or community, the rights on the medium are automatically adapted. -------------- next part -------------- An HTML attachment was scrubbed... URL: From warmerdam at POBOX.COM Wed Nov 7 17:26:00 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Wed, 7 Nov 2007 20:26:00 -0500 Subject: System Configuration In-Reply-To: Message-ID: Bruce Cheney wrote: > We have been given a requirement to support 5000 simultaneous users. > What we are finding is that MapServer bogs down around 400 simultaneous > users on a test machine. It looks like it is likely slowing because of > the threading issue. We haven't tested on a production machine but are > estimating that it should support double what are test machine could > handle (double the processor and RAM). So at least 800 simultaneous > users. Divide that out with the 5000 and we need a minimum of 6-7 web > servers supporting MapServer. We will certainly scale this as is needed > but I do need some idea going in as to what is going to be required. Bruce, I'm curious how many map requests per minute you expect 800 simultaneous users to generate. > Does this sound like results that others expect or is this quantity > above what others have tested? Also Does anyone know of a solution in > the works to run make mapserver thread safe and/or up the overall > speed? I am not complaining about the speed just wondering what is in > the works. In various aspects MapServer is already thread safe though there are also known "unsafe" components, and some components are wrapped by big locks that significantly reduce the value of multiple threads. Progress occurs by fits and starts, largely based on support from user organizations depending on multi-threading. For instance, in 5.0 I implement locking around OGR for a client of mine in Australia. (This is a subtle way of suggesting you hire someone to make this happen if it is what you want!) All this aside, by default MapServer is *massively multi-threaded*. I say this since the default operation is to start a new cgi instance for each request - each is essentially an independent thread. Of course, the downside of whole-process cgi style multithreading is that very little context is preserved from request to request. Map files, data file headers, etc all need to be reparsed for each request. My point here is that you need to think carefully about the application flow to take much advantage of multiple threading within a single process. Also, if I may channel Ed, if you wanted to squeeze more performance out of mapserver, you really need to start by figuring out what it is spending it's time doing. Where is it spending it's time? o waiting for disk? (perhaps you are reading more data than you need?) o rendering (perhaps your data is overdense, or you are using expensive rendering options?) o parsing mapfiles (perhaps you mapfile has too many unused layers?) etc. 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 | President OSGeo, http://osgeo.org From mlinden at ZEELANDNET.NL Wed Nov 7 18:06:08 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Thu, 8 Nov 2007 03:06:08 +0100 Subject: System Configuration In-Reply-To: <473265A8.2030101@pobox.com> Message-ID: Another option I am currently investigating for the static components of my maps is tilecache (google it). That should at least take away some of the load that mapserver rendering the image in memory will eat up. Another option is to combine mapserver with fastcgi. There should be documentation around. Good luck, and indeed as Frank suggests, consider hiring an expert. Frank will know one or more ;-) Frank Warmerdam schreef: > Bruce Cheney wrote: >> We have been given a requirement to support 5000 simultaneous >> users. What we are finding is that MapServer bogs down around 400 >> simultaneous users on a test machine. It looks like it is likely >> slowing because of the threading issue. We haven't tested on a >> production machine but are estimating that it should support double >> what are test machine could handle (double the processor and RAM). >> So at least 800 simultaneous users. Divide that out with the 5000 >> and we need a minimum of 6-7 web servers supporting MapServer. We >> will certainly scale this as is needed but I do need some idea going >> in as to what is going to be required. > > Bruce, > > I'm curious how many map requests per minute you expect 800 simultaneous > users to generate. > >> Does this sound like results that others expect or is this quantity >> above what others have tested? Also Does anyone know of a solution >> in the works to run make mapserver thread safe and/or up the overall >> speed? I am not complaining about the speed just wondering what is >> in the works. > > In various aspects MapServer is already thread safe though there are > also known "unsafe" components, and some components are wrapped by > big locks that significantly reduce the value of multiple threads. > Progress occurs by fits and starts, largely based on support from user > organizations depending on multi-threading. For instance, in 5.0 I > implement locking around OGR for a client of mine in Australia. > > (This is a subtle way of suggesting you hire someone to make this > happen if it is what you want!) > > All this aside, by default MapServer is *massively multi-threaded*. > I say this since the default operation is to start a new cgi instance > for each request - each is essentially an independent thread. > > Of course, the downside of whole-process cgi style multithreading is > that very little context is preserved from request to request. Map > files, data file headers, etc all need to be reparsed for each request. > My point here is that you need to think carefully about the application > flow to take much advantage of multiple threading within a single > process. > > Also, if I may channel Ed, if you wanted to squeeze more performance out > of mapserver, you really need to start by figuring out what it is > spending > it's time doing. Where is it spending it's time? > o waiting for disk? (perhaps you are reading more data than you need?) > o rendering (perhaps your data is overdense, or you are using expensive > rendering options?) > o parsing mapfiles (perhaps you mapfile has too many unused layers?) > etc. > > Best regards, -- Milo van der Linden skype: milovanderlinden mlinden at zeelandnet.nl milovanderlinden at gmail.com milo at 3dsite.nl http://www.3dsite.nl De informatie in dit bericht reflecteert mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bij het betreffende medium behorende voorwaarden. The information in this message reflects my personal opinion and not that of a company or public body. All rights reserved.If this message is contained in a mailing-list or community, the rights on the medium are automatically adapted. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ed at TOPOZONE.COM Wed Nov 7 20:34:20 2007 From: ed at TOPOZONE.COM (Ed McNierney) Date: Wed, 7 Nov 2007 23:34:20 -0500 Subject: System Configuration In-Reply-To: A<473265A8.2030101@pobox.com> Message-ID: Bruce - My channeling sensors went off when Frank rang . It is certainly true that a bit of experience and contemplation can help you discover optimization opportunities that aren't immediately self-evident. Can you describe the nature of your map application? Are you using raster data, vector data, or both? What size is your data, in numbers of features and/or files? What kind of disk subsystem is being used? Is there layer reprojection going on? Generalizations are rarely helpful (except for this one). It's like being told the average man is 5' 7" tall - it tells you nothing about how tall I am. MapServer performance depends on a number of factors, but the best place to start is a detailed understanding of what exactly you're trying to do with MapServer. It would be most helpful to us if you could post your map file and a sample URL request, preferably one that is externally (publicly) visible. And can you define what you mean by "simultaneous" users? Do you mean 5,000 map requests all being generated at exactly the same time? Or do you mean 5,000 human users asking for a new map every X seconds or so? And if the latter, what value are you using for X? - Ed Ed McNierney Chief Mapmaker Demand Media / TopoZone.com 73 Princeton Street, Suite 305 North Chelmsford, MA? 01863 Phone: 978-251-4242, Fax: 978-251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Warmerdam Sent: Wednesday, November 07, 2007 8:26 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] System Configuration Bruce Cheney wrote: > We have been given a requirement to support 5000 simultaneous users. > What we are finding is that MapServer bogs down around 400 simultaneous > users on a test machine. It looks like it is likely slowing because of > the threading issue. We haven't tested on a production machine but are > estimating that it should support double what are test machine could > handle (double the processor and RAM). So at least 800 simultaneous > users. Divide that out with the 5000 and we need a minimum of 6-7 web > servers supporting MapServer. We will certainly scale this as is needed > but I do need some idea going in as to what is going to be required. Bruce, I'm curious how many map requests per minute you expect 800 simultaneous users to generate. > Does this sound like results that others expect or is this quantity > above what others have tested? Also Does anyone know of a solution in > the works to run make mapserver thread safe and/or up the overall > speed? I am not complaining about the speed just wondering what is in > the works. In various aspects MapServer is already thread safe though there are also known "unsafe" components, and some components are wrapped by big locks that significantly reduce the value of multiple threads. Progress occurs by fits and starts, largely based on support from user organizations depending on multi-threading. For instance, in 5.0 I implement locking around OGR for a client of mine in Australia. (This is a subtle way of suggesting you hire someone to make this happen if it is what you want!) All this aside, by default MapServer is *massively multi-threaded*. I say this since the default operation is to start a new cgi instance for each request - each is essentially an independent thread. Of course, the downside of whole-process cgi style multithreading is that very little context is preserved from request to request. Map files, data file headers, etc all need to be reparsed for each request. My point here is that you need to think carefully about the application flow to take much advantage of multiple threading within a single process. Also, if I may channel Ed, if you wanted to squeeze more performance out of mapserver, you really need to start by figuring out what it is spending it's time doing. Where is it spending it's time? o waiting for disk? (perhaps you are reading more data than you need?) o rendering (perhaps your data is overdense, or you are using expensive rendering options?) o parsing mapfiles (perhaps you mapfile has too many unused layers?) etc. 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 | President OSGeo, http://osgeo.org From Jukka.Rahkonen at MMMTIKE.FI Wed Nov 7 23:49:44 2007 From: Jukka.Rahkonen at MMMTIKE.FI (Rahkonen Jukka) Date: Thu, 8 Nov 2007 09:49:44 +0200 Subject: WFS features not drawing Message-ID: Hi, Here is an excerpt of layer definition that works for me. Perhaps it is the missing "dump true" part that makes troubles for you? -Jukka- LAYER NAME "WFS-parcels" STATUS OFF TYPE POLYGON CONNECTIONTYPE WFS CONNECTION "http://localhost:8080/geoserver/wfs?" MAXSCALE 100000 PROJECTION "init=epsg:2393" END CLASS NAME "parcels" STYLE OUTLINECOLOR 0 255 0 END END METADATA "wfs_service" "WFS" "wfs_typename" "GIS_POLYGONS" "wfs_version" "1.0.0" "wfs_request_method" "GET" "wfs_connectiontimeout" "300" "wfs_maxfeatures" "100000" "gml_include_items" "all" END TEMPLATE "../data/query.html" dump true # DEBUG TRUE END ________________________________ L?hett?j?: UMN MapServer Users List puolesta: Michael Anderson L?hetetty: ke 7.11.2007 20:55 Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU Aihe: Re: [UMN_MAPSERVER-USERS] WFS features not drawing It doesn't help. Since the WFS response is appearing in the image folder, the layer must be getting turned on. And the scale thresholds seem to be working - the gml files only appear if I zoom in far enough for the layer to be drawn. So everything works, except rendering the WFS response. Mike > Subject: Re: [UMN_MAPSERVER-USERS] WFS features not drawing > Date: Wed, 7 Nov 2007 18:22:01 +0200 > From: Jukka.Rahkonen at mmmtike.fi > To: m_anderson14 at HOTMAIL.COM; MAPSERVER-USERS at LISTS.UMN.EDU > > Hi, > > Have you tried adding some STATUS to layer definition? > > -Jukka- > > > -----Alkuper?inen viesti----- > > L?hett?j?: UMN MapServer Users List > > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Puolesta Mike Anderson > > L?hetetty: 7. marraskuuta 2007 15:59 > > Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU > > Aihe: [UMN_MAPSERVER-USERS] WFS features not drawing > > > > I'm trying for the first time to use MapServer as a WFS > > client and can't get the features to draw. They are correctly > > being downloaded to a .gml file in the images folder along > > with a .gfs file. So I think the connection is set up right, > > but they don't draw on the map. > > > > I am trying to add the ssurgo layer from the Soil Data Mart. > > Here is my layer > > definition: > > > > LAYER > > NAME "ssurgof" > > TYPE Line > > TRANSPARENCY 100 > > DEBUG ON > > CONNECTIONTYPE WFS > > MAXSCALE 15000 > > MINSCALE 300 > > PROJECTION > > "init=EPSG:26918" > > END > > > > CONNECTION "http://sdmdataaccess.nrcs.usda.gov/SPATIAL/SDMNAD83UTM.w > > fs?SRSNAME=EPSG:26918" > > > > METADATA > > "wfs_typename" "MapunitPoly" > > "wfs_version" "1.0.0" > > "wfs_request_method" "GET" > > "wfs_connectiontimeout" "60" > > "wfs_maxfeatures" "15" > > END > > > > CLASS > > NAME "Soil Features" > > STYLE > > COLOR 200 255 0 > > SYMBOL "circle" > > OUTLINECOLOR 120 120 120 > > END > > END > > > > #CLASS > > # Name 'Soil Features' > > # TEMPLATE "querytemp.html" > > # SYMBOL "circle" > > # COLOR -1 -1 -1 > > # OUTLINECOLOR 255 0 0 > > # SIZE 2 > > #END # CLASS > > > > END # LAYER > > > > > > I thought maybe the features were drawing but the class was > > messed up and they weren't visible, so I tried two ways to > > define the class. Neither one works. > > > > Anyone have an idea what the problem is? > > > > Thanks. > > > > Mike Anderson > > ________________________________ Peek-a-boo FREE Tricks & Treats for You! Get 'em! From frederic.junod at CAMPTOCAMP.COM Thu Nov 8 00:07:15 2007 From: frederic.junod at CAMPTOCAMP.COM (=?UTF-8?B?RnLDqWTDqXJpYw==?= Junod) Date: Thu, 8 Nov 2007 09:07:15 +0100 Subject: AGG/GIF In-Reply-To: <4731E013.9020906@pobox.com> Message-ID: I want to display transparent layers (PNG 24bit) with OpenLayers and IE doesn't support it. I will use the OpenLayers's alpha hack: var layer = new OpenLayers.Layer.WMS("boucles", "/wms-lj2009-agg", {layers: 'boucles,m2_ligne,m2_arrets', format: 'image/png', transparent: true }, {alpha: true}); Thanks for your answers. fredj PS: from the Internet Explorer 4 (sic) white paper: "[...], Internet Explorer 4.0 provides native support for PNG [...]" http://web.archive.org/web/20001020135127/http://www.microsoft.com/Windows/ie/press/whitepaper/iwhite/WHITE004.HTM Le Wed, 7 Nov 2007 10:56:03 -0500, Frank Warmerdam a ?crit : > Fr?d?ric Junod wrote: > > Hi all, > > > > Does the AGG renderer support gif ? > > > > I suspect no because [1] don't mention it. > > > > I've try with: > > > > OUTPUTFORMAT > > NAME gif > > DRIVER "AGG/GIF" > > MIMETYPE "image/gif" > > END > > > > But mapserv returns: > > "loadOutputFormat(): General error message. OUTPUTFORMAT clause references > > driver AGG/GIF, but this driver isn't configured." > > Fr?d?ric, > > I think the issue is that AGG produces 24bit output images, not 8bit paletted > as supported by GIF. So only 24bit image formats (PNG, JPEG) are available. > In theory GIF could be supported by "crushing" the image down to 8bit paletted > after rendering is complete, but I think the results would be very > unsatisfactory in most cases. > > Best regards, -- Fr?d?ric Junod Camptocamp SA From Kyle.Wilcox at NOAA.GOV Thu Nov 8 06:40:21 2007 From: Kyle.Wilcox at NOAA.GOV (Kyle Wilcox) Date: Thu, 8 Nov 2007 09:40:21 -0500 Subject: PostGIS Queries using FILTER In-Reply-To: <4731C90B.3060405@Noaa.gov> Message-ID: Seems to be a bug in Mapserver. Thanks to Armin of pmapper for helping with the problem. To get it to work correctly, I just added the filter line into the query directly: DATA "the_geom from (SELECT * from forecast left join grid on grid.gid=forecast.grid_id where time=TIMESTAMP'2007-11-06 00:00:00') as data USING UNIQUE gid USING SRID=4326" Kyle Wilcox wrote: > I just added that layer name into the mail code to avoid confusion, they > are named by their timestamp's index For example: > > First layer: > LAYER > NAME 'One' > FILTER "time=TIMESTAMP'2007-11-06 00:00:00'" > METADATA 'DESCRIPTION' '2007-11-06 00:00:00' END > ... > END > > Second Layer: > LAYER > NAME 'Two' > FILTER "time=TIMESTAMP'2007-11-06 03:00:00'" > METADATA 'DESCRIPTION' '2007-11-06 00:00:00' END > ... > END > > Those are the only differences between layers. > > > Could it be that the queryByPoint() function is querying on the specific > point and applying the filter, which fails or returns all timesteps > associated with that point, because the 'time' column is in a separate > table than the geometry column? I assumed the queryByPoint() function > would join my grid and data tables as specified in DATA. The grid > geometry (POINTS) are in a separate table than the data (values I want > returned from a query). > > The query code is coming from the pmapper framework. I'll set up a > small test case using Mapserver 4.10 and a self made application to see > if the same thing happens. > > Thanks for the response! > > > > Steve Lime wrote: >> Attribute queries use filters themselves so any predefined filter is set aside temporarily. That said, for other >> types of purely spatial queries the FILTER should remain intact. I just stepped through the point query code >> and couldn't any place where it was mucked with. >> >> What does the code that does that's doing the query look like? I notice in your sample layer that the layer >> name is 'NAME' which makes me wonder if somehow you're always querying the same layer. Not to say that >> there isn't something else going on as you suggest but I'll start with the obvious. >> >> Steve >> >>>>> On 11/6/2007 at 4:00 PM, in message <4730E3F5.2080000 at Noaa.gov>, Kyle Wilcox >> wrote: >>> Did the usual searching without finding anything relevant. >>> >>> The application I am referencing is at: >>> http://155.206.18.162/mapping/map/map.phtml >>> >>> I have time series data in a PostGIS enabled database (current and wind >>> fields from model output). I can display the point data without >>> problems (try any of the current or wind layers). >>> >>> The problem is that when querying a point layer, the data that is always >>> extracted from the first timestamp rather than the timestamp associated >>> with the layer I am trying to query (specified as a FILTER). I understand >>> what is happening.. the query by point functionality is querying the >>> database at the specific POINT and displaying the first row that returns >>> (the first timestamp). If I delete the first timestamp data, the second >>> timestep data is displayed and so on. The only thing that changes >>> between layers is the FILTER. >>> >>> Does the queryByPoint() function utilize the FILTER definition from the >>> mapfile? It doesn't seem to be doing so. >>> >>> (Mapserver 5.0 and PHP/Mapscript) >>> >>> >>> Here is a sample layer definition: >>> >>> LAYER >>> TYPE POINT >>> CONNECTIONTYPE postgis >>> NAME 'NAME' >>> CONNECTION 'host=HOST user=USER dbname=DATABASE' >>> DATA "the_geom from (SELECT * from forecast left join >>> grid on grid.gid=forecast.grid_id) as data USING UNIQUE gid USING >>> SRID=4326" >>> FILTER "time=TIMESTAMP'2007-11-06 00:00:00'" >>> METADATA >>> 'DESCRIPTION' '2007-11-06 00:00:00' >>> 'RESULT_FIELDS' >>> 'wind_speed,wind_from_direction,rotation' >>> 'RESULT_HEADERS' 'Wind Speed (m/s), Wind >>> Direction (from TN), Rotation of Image (from TN)' >>> 'LAYER_ENCODING' 'UTF-8' >>> END >>> STATUS OFF >>> PROJECTION >>> 'init=epsg:4326' >>> END >>> TOLERANCE 10 >>> TOLERANCEUNITS pixels >>> LABELMAXSCALE 60000 >>> TEMPLATE void >>> CLASS >>> NAME ">= 0.95 m/s" >>> EXPRESSION ([wind_speed] >= 0.95) >>> STYLE >>> SYMBOL "arrow2" >>> ANGLE [wind_from_direction] >>> COLOR 118 0 0 >>> OUTLINECOLOR 0 0 0 >>> SIZE 10 >>> END >>> TEXT ([wind_speed] m/s - [wind_from_direction] TN) >>> LABEL >>> COLOR 118 0 0 >>> OUTLINECOLOR 0 0 0 >>> POSITION AUTO >>> SIZE small >>> PARTIALS TRUE >>> END >>> END >>> ... >>> END >>> >>> -- >>> >>> Kyle Wilcox >>> NOAA Chesapeake Bay Office >>> 410 Severn Avenue >>> Suite 107A >>> Annapolis, MD 21403 >>> office: (410) 295-3151 >>> Kyle.Wilcox at noaa.gov >>> >>> "It is from the wellspring of our despair and the places >>> that we are broken that we come to repair the world." >>> - Murray Waas > -- Kyle Wilcox NOAA Chesapeake Bay Office 410 Severn Avenue Suite 107A Annapolis, MD 21403 office: (410) 295-3151 Kyle.Wilcox at noaa.gov "It is from the wellspring of our despair and the places that we are broken that we come to repair the world." - Murray Waas From Frank.Steggink at BENTLEY.COM Thu Nov 8 06:39:59 2007 From: Frank.Steggink at BENTLEY.COM (Frank Steggink) Date: Thu, 8 Nov 2007 09:39:59 -0500 Subject: WFS POST requests: "No template provided" error Message-ID: Hello List, While developing a WFS client, I've encountered a problem with MapServer. I don't have a local setup of MapServer running, but use a few public available services at the web. Those are: * http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/config.map (MapServer 4.8.3) * http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp (MapServer 4.8.1) Our WFS client supports both GET and POST requests. It checks the Capabilities document which HTTP method to use. The document of the first service can be found here: http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/config.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities&. GetCapabilities is always done with GET, but other requests can vary. For testing purposes I made POST the default HTTP method for the requests. When I try to do a DescribeFeatureType or a GetFeature to these services with POST, I'm getting the following message: MapServer Message mapserv(): Web application error. No template provided.
The Capabilites document lists the online resource URL's for DescribeFeatureType and GetFeature, so POST should be allowed for these WFS requests. I'm sure that the WFS request is correct, since it works with other WFS servers, like Geoserver, and Oracle Spatial Web Services, and I can not find anything that might be wrong on my side. Here is the raw request (headers + post data): POST /envdat/map.aspx HTTP/1.1 Content-Type: text/xml Host: map.ns.ec.gc.ca Content-Length: 579 Expect: 100-continue Proxy-Connection: Close wfs:envirodat While searching the mailing list, I found replies of people suggesting that WFS might not be enabled (MapServer not compiled with WFS support), but since WFS requests with GET work fine, this is obviously not the case. I also found another suggestion here: http://lists.umn.edu/cgi-bin/wa?S2=MAPSERVER-USERS&q=wfs+post+template&s=&f=&a=&b=. It is suggested to add the parameters "service=WFS" and "version=1.0.0" to the URL for POST, but this doesn't work either. Maybe I would need to test with a more recent build, but I couldn't find one at the web. But this would mean that I have to change the online resource URL, but the correct URL cannot be predicted. The correct URL to post to should be mentioned in the Capabilities document. The second service (www.bsc-eoc.org) returned the same reply with the parameters, but the first service (at map.ns.ec.gc.ca) returned this: msWFSDispatch(): WFS server error. Incomplete WFS request: REQUEST parameter missing If I would add the Request parameter, then it would be WFS / GET again, and that's not what I want. (Well, I normally do, but this is for testing purposes.) I was getting similar responses with GetFeature, but since I changed my code, the WFS client doesn't come that far (because DescribeFeatureType doesn't work) anymore. Since there are no problems with GET requests, our client can successfully query data. But since POST is also available, I would expect it to work as well. I hope that someone can look into this. If POST really causes problems, it would be better to remove the associated online resource URL's from the Capabilities document. Regards, Frank Steggink Bentley Systems, Inc. Software Developer Geospatial 3645, boul. Ste-Anne Qu?bec, Qc. G1E 3L1 Canada Tel: +1 418 666 7691 ext. 289 E-mail: frank.steggink at bentley.com WWW: http://www.bentley.com From manfred.zerndl at BVV.BAYERN.DE Thu Nov 8 06:52:16 2007 From: manfred.zerndl at BVV.BAYERN.DE (Manfred Zerndl) Date: Thu, 8 Nov 2007 15:52:16 +0100 Subject: two colored output needed Message-ID: Hi List, i have some raster tiles in TIFF format. gdalinfo tells me the following: ------- begin -- gdalinfo ----- Driver: GTiff/GeoTIFF Size is 13000, 13000 Coordinate System is `' Origin = (4526459.127166650258005,5316969.772833350114524) Pixel Size = (0.211666700000000,-0.211666700000000) Metadata: TIFFTAG_DOCUMENTNAME=Standard Input TIFFTAG_IMAGEDESCRIPTION=converted PNM file TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) Image Structure Metadata: COMPRESSION=CCITTFAX4 Corner Coordinates: Upper Left ( 4526459.127, 5316969.773) Lower Left ( 4526459.127, 5314218.106) Upper Right ( 4529210.794, 5316969.773) Lower Right ( 4529210.794, 5314218.106) Center ( 4527834.961, 5315593.939) Band 1 Block=13000x1 Type=Byte, ColorInterp=Palette Metadata: NBITS=1 Color Table (RGB with 2 entries) 0: 255,255,255,255 1: 0,0,0,255 ---- end -- gdainfo ----- I have defined following outputformat in th mapfile: OUTPUTFORMAT NAME HLTIFF DRIVER "GDAL/GTiff" EXTENSION "tif" MIMETYPE "image/tif" IMAGEMODE PC256 FORMATOPTION "QUANTIZE_FORCE=ON" FORMATOPTION "QUANTIZE_DITHER=OFF" FORMATOPTION "QUANTIZE_COLORS=2" FORMATOPTION "COMPRESS=GROUP4" END When I create a tileindex for mapserver then the response tile has a color table with many colors entries, but only two colors are needed. So the file is bigger than necessary. Maybe I need some kind of "IMAGEMODE PC2" but this is not possible. How can i force mapserver to generate two-colored tiles? It is not important what format the genereted tile is (PNG or JPEG would be nice, but TIFF is also ok). Best Regards, Manfred Zerndl From jorn at SPACETEC.NO Thu Nov 8 06:53:42 2007 From: jorn at SPACETEC.NO (=?iso-8859-1?q?J=F8rn_Vegard_R=F8snes?=) Date: Thu, 8 Nov 2007 16:53:42 +0200 Subject: SOS eventtime and result In-Reply-To: <47321631.8070002@dmsolutions.ca> Message-ID: Hi, I get a compilation failure, any clues? make g++ -O2 -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCAT -DUSE_PROJ -DUSE_SOS_SVR -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DUSE_OGR -DUSE_ICONV -DUSE_ZLIB -I/usr/local/include -I/home/konserv/FWTools-1.4.2//include -I/include -I/usr/local/include/libxml2 mapserv.o cgiutil.o -L. -lmapserver -lgd -L/usr/local/lib -lgd -ljpeg -lfreetype -lpng -lz -ljpeg -lfreetype -lpng -lz -L/home/konserv/FWTools-1.4.2//lib -lproj -ljpeg -L/lib -lgdal -L/usr3/pkg4/OpenEV_FW_Tree/FWTools/lib -lgeos -lgeos_c -L/usr3/pkg4/OpenEV_FW_Tree/FWTools/lib -lexpat -L/usr3/pkg4/OpenEV_FW_Tree/xerces-c-src_2_6_0/lib -lxerces-c -lpthread -L/usr3/pkg4/OpenEV_FW_Tree/Geo_DSDK-6.0.7.1407/lib/Release -L/usr3/pkg4/OpenEV_FW_Tree/Geo_DSDK-6.0.7.1407/3rd-party/lib/Release -lpthread -L/usr3/pkg4/OpenEV_FW_Tree/FWTools/lib -lNCSEcw -lNCSCnet -lNCSUtil -L/usr3/pkg4/OpenEV_FW_Tree/HDF42_inst/lib -lmfhdf -ldf -logdi31 -ljpeg -L/usr3/pkg4/OpenEV_FW_Tree/FWTools/lib -L/usr3/pkg4/OpenEV_FW_Tree/FWTools/lib -lpng -lnetcdf -lgrass5 -L/usr3/local/pgsql/lib -lz -lpthread -lm -lrt -ldl -L/usr3/pkg4/OpenEV_FW_Tree/kakadu-5.1/lib -lkdu -L/usr3/pkg4/OpenEV_FW_Tree/FWTools/lib -ldap -L/usr/local/lib -lcurl -ldl -lz -L/usr/local/lib -lxml2 -lz -lpthread -lm -lpthread -L/usr3/pkg4/OpenEV_FW_Tree/FWTools/lib -lsqlite3 -L/usr/local/lib -lcurl -ldl -lz -L/usr/local/lib/mysql -lz -lcrypt -lnsl -lm -lc -lz -L/usr/local/lib -lxml2 -lz -lm -lm -lstdc++ -o mapserv ./libmapserver.a(mapfile.o)(.text+0x651d): In function `msUpdateQueryMapFromString': : undefined reference to `msyylex_destroy' ./libmapserver.a(mapfile.o)(.text+0x6ead): In function `msUpdateScalebarFromString': : undefined reference to `msyylex_destroy' ./libmapserver.a(mapfile.o)(.text+0x6f37): In function `msUpdateLabelFromString': : undefined reference to `msyylex_destroy' ./libmapserver.a(mapfile.o)(.text+0x7243): In function `msUpdateLegendFromString': : undefined reference to `msyylex_destroy' ./libmapserver.a(mapfile.o)(.text+0x75c0): In function `msUpdateReferenceMapFromString': : undefined reference to `msyylex_destroy' ./libmapserver.a(mapfile.o)(.text+0x7b1d): more undefined references to `msyylex_destroy' follow collect2: ld returned 1 exit status make: *** [mapserv] Error 1 kind regards J?rn Vegard On Wednesday 07 November 2007 20:46, Yewondwossen Assefa wrote: > Hi There, > > There is ticket on this issue : > http://trac.osgeo.org/mapserver/ticket/2388. > > I have committed the fix in cvs. If you have a chance, please give it > a try and update the bug. > > Best Regards > > J?rn Vegard R?snes wrote: > > Hi all, > > > > I'm running Mapserver v5.1-dev. > > Postgresql is running with debug level 5. > > > > When I send a request containing result and time filtering, it seems that > > only the result filtering is included in the generated SQL WHERE > > statement (from Postgresql log). The eventtime filtering seems to be > > omitted. > > URL (partly): > > eventtime=2007-11-05T08:00:00Z >ginPosition>2007-11-05T08:30:00Z >imePeriod>& > > result=mmsi_nb >ertyName>258069000 >ter> > > > > > > If I include only the eventtime in the SOS request, the SQL WHERE > > statement contains the time filtering. > > URL (partly): > > eventtime=2007-11-05T08:00:00Z >ginPosition>2007-11-05T08:30:00Z >imePeriod> > > > > Any ideas are appreciated. > > I can send more details off-list. > > > > cheers > > J?rn Vegard From sgillies at FRII.COM Thu Nov 8 07:04:44 2007 From: sgillies at FRII.COM (Sean Gillies) Date: Thu, 8 Nov 2007 08:04:44 -0700 Subject: WFS POST requests: "No template provided" error In-Reply-To: Message-ID: POST is for creating new resource states! Use GET! Oh, wait, wrong list :) That "No template provided" error usually means what it says. Is your mapfile configed properly? Are you able to render maps from it using the shp2img utility? Sean Frank Steggink wrote: > Hello List, > > While developing a WFS client, I've encountered a problem with = > MapServer. I don't have a local setup of MapServer running, but use a = > few public available services at the web. Those are: > * = > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D/mapserver/services/en= > vdat/config.map (MapServer 4.8.3) > * http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp (MapServer 4.8.1) > > Our WFS client supports both GET and POST requests. It checks the = > Capabilities document which HTTP method to use. The document of the = > first service can be found here: = > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D/mapserver/services/en= > vdat/config.map&SERVICE=3DWFS&VERSION=3D1.0.0&REQUEST=3DGetCapabilities&.= > GetCapabilities is always done with GET, but other requests can vary. = > For testing purposes I made POST the default HTTP method for the = > requests. When I try to do a DescribeFeatureType or a GetFeature to = > these services with POST, I'm getting the following message: > > > MapServer Message > > > mapserv(): Web application error. No template provided.
> > > The Capabilites document lists the online resource URL's for = > DescribeFeatureType and GetFeature, so POST should be allowed for these = > WFS requests. I'm sure that the WFS request is correct, since it works = > with other WFS servers, like Geoserver, and Oracle Spatial Web Services, = > and I can not find anything that might be wrong on my side. Here is the = > raw request (headers + post data): > > POST /envdat/map.aspx HTTP/1.1 > Content-Type: text/xml > Host: map.ns.ec.gc.ca > Content-Length: 579 > Expect: 100-continue > Proxy-Connection: Close > > > xsi:schemaLocation=3D"http://www.opengis.net/wfs = > http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd" = > xmlns=3D"http://www.opengis.net/wfs" = > xmlns:b=3D"http://www.bentley.com/schemas/x-Bentley.XMLTemplate.0.1" = > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" = > xmlns:ows=3D"http://www.opengis.net/ows" = > xmlns:xlink=3D"http://www.w3.org/1999/xlink" = > xmlns:ogc=3D"http://www.opengis.net/ogc" = > xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"> > wfs:envirodat > > > While searching the mailing list, I found replies of people suggesting = > that WFS might not be enabled (MapServer not compiled with WFS support), = > but since WFS requests with GET work fine, this is obviously not the = > case. I also found another suggestion here: = > http://lists.umn.edu/cgi-bin/wa?S2=3DMAPSERVER-USERS&q=3Dwfs+post+templat= > e&s=3D&f=3D&a=3D&b=3D. It is suggested to add the parameters = > "service=3DWFS" and "version=3D1.0.0" to the URL for POST, but this = > doesn't work either. Maybe I would need to test with a more recent = > build, but I couldn't find one at the web. But this would mean that I = > have to change the online resource URL, but the correct URL cannot be = > predicted. The correct URL to post to should be mentioned in the = > Capabilities document. The second service (www.bsc-eoc.org) returned the = > same reply with the parameters, but the first service (at = > map.ns.ec.gc.ca) returned this: > > xmlns=3D"http://www.opengis.net/ogc" = > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" = > xsi:schemaLocation=3D"http://www.opengis.net/ogc = > http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: REQUEST = > parameter missing > > > > If I would add the Request parameter, then it would be WFS / GET again, = > and that's not what I want. (Well, I normally do, but this is for = > testing purposes.) > I was getting similar responses with GetFeature, but since I changed my = > code, the WFS client doesn't come that far (because DescribeFeatureType = > doesn't work) anymore.=20 > > Since there are no problems with GET requests, our client can = > successfully query data. But since POST is also available, I would = > expect it to work as well. I hope that someone can look into this. If = > POST really causes problems, it would be better to remove the associated = > online resource URL's from the Capabilities document. > > Regards, > > Frank Steggink > =20 > Bentley Systems, Inc. > Software Developer Geospatial > =20 > 3645, boul. Ste-Anne > Qu=E9bec, Qc. G1E 3L1 > Canada > =20 > Tel: +1 418 666 7691 ext. 289 > E-mail: frank.steggink at bentley.com > WWW: http://www.bentley.com > =20 > From dmorissette at MAPGEARS.COM Thu Nov 8 07:20:10 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Thu, 8 Nov 2007 10:20:10 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: <234F456FBC8AF54BA08AB663CA86D36906D8A102@extonpo2.bentley.com> Message-ID: Try adding SERVICE=WFS to the URL of your POST request. MapServer needs at least something in the URL itself to be able to tell that it's a WFS request, otherwise it assumes by default that it is a traditional mapserv CGI request, hence the "no template provided" error. I am realizing just now that it may not be correct according to the WFS spec to require that WFS clients include the SERVICE=WFS GET parameter in the case of POST requests. If that's the case then perhaps you could file a ticket to have this fixed in future releases of Mapserver. The simple fix would be for MapServer to automatically include the SERVICE=WFS in the onlineresource advertized in GetCapabilities and hten clients would pick it up automatically. Daniel Frank Steggink wrote: > Hello List, > > While developing a WFS client, I've encountered a problem with MapServer. I don't have a local setup of MapServer running, but use a few public available services at the web. Those are: > * http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/config.map (MapServer 4.8.3) > * http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp (MapServer 4.8.1) > > Our WFS client supports both GET and POST requests. It checks the Capabilities document which HTTP method to use. The document of the first service can be found here: http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/config.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities&. GetCapabilities is always done with GET, but other requests can vary. For testing purposes I made POST the default HTTP method for the requests. When I try to do a DescribeFeatureType or a GetFeature to these services with POST, I'm getting the following message: > > > MapServer Message > > > mapserv(): Web application error. No template provided.
> > > The Capabilites document lists the online resource URL's for DescribeFeatureType and GetFeature, so POST should be allowed for these WFS requests. I'm sure that the WFS request is correct, since it works with other WFS servers, like Geoserver, and Oracle Spatial Web Services, and I can not find anything that might be wrong on my side. Here is the raw request (headers + post data): > > POST /envdat/map.aspx HTTP/1.1 > Content-Type: text/xml > Host: map.ns.ec.gc.ca > Content-Length: 579 > Expect: 100-continue > Proxy-Connection: Close > > > > wfs:envirodat > > > While searching the mailing list, I found replies of people suggesting that WFS might not be enabled (MapServer not compiled with WFS support), but since WFS requests with GET work fine, this is obviously not the case. I also found another suggestion here: http://lists.umn.edu/cgi-bin/wa?S2=MAPSERVER-USERS&q=wfs+post+template&s=&f=&a=&b=. It is suggested to add the parameters "service=WFS" and "version=1.0.0" to the URL for POST, but this doesn't work either. Maybe I would need to test with a more recent build, but I couldn't find one at the web. But this would mean that I have to change the online resource URL, but the correct URL cannot be predicted. The correct URL to post to should be mentioned in the Capabilities document. The second service (www.bsc-eoc.org) returned the same reply with the parameters, but the first service (at map.ns.ec.gc.ca) returned this: > > xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: REQUEST parameter missing > > > > If I would add the Request parameter, then it would be WFS / GET again, and that's not what I want. (Well, I normally do, but this is for testing purposes.) > I was getting similar responses with GetFeature, but since I changed my code, the WFS client doesn't come that far (because DescribeFeatureType doesn't work) anymore. > > Since there are no problems with GET requests, our client can successfully query data. But since POST is also available, I would expect it to work as well. I hope that someone can look into this. If POST really causes problems, it would be better to remove the associated online resource URL's from the Capabilities document. > > Regards, > > Frank Steggink > > Bentley Systems, Inc. > Software Developer Geospatial > > 3645, boul. Ste-Anne > Qu?bec, Qc. G1E 3L1 > Canada > > Tel: +1 418 666 7691 ext. 289 > E-mail: frank.steggink at bentley.com > WWW: http://www.bentley.com > -- Daniel Morissette http://www.mapgears.com/ From Frank.Steggink at BENTLEY.COM Thu Nov 8 07:36:21 2007 From: Frank.Steggink at BENTLEY.COM (Frank Steggink) Date: Thu, 8 Nov 2007 10:36:21 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: <4733258C.7090302@frii.com> Message-ID: Sean (and others), As I said, the servers are not mine. They are public servers on the internet. I'm just making a client, and care about interoperability, so that's why I posted. (Even with a protocol which is flawed, but this is what I'm paid for at this moment.) I could try to set up MapServer myself, but since I've no MapServer experience, it will take quite some time. That's why I was asking someone else to look at it. About this message, is there any difference in setting MapServer up to handle GET and POST requests? If the "WFS handler for POST" isn't set up correctly, why isn't this reflected in the Capabilities document? Frank -----Original Message----- From: Sean Gillies [mailto:sgillies at frii.com] Sent: Thursday, November 08, 2007 10:05 To: MAPSERVER-USERS at LISTS.UMN.EDU Cc: Frank Steggink Subject: Re: WFS POST requests: "No template provided" error POST is for creating new resource states! Use GET! Oh, wait, wrong list :) That "No template provided" error usually means what it says. Is your mapfile configed properly? Are you able to render maps from it using the shp2img utility? Sean Frank Steggink wrote: > Hello List, > > While developing a WFS client, I've encountered a problem with = > MapServer. I don't have a local setup of MapServer running, but use a > = few public available services at the web. Those are: > * = > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D/mapserver/services > /en= > vdat/config.map (MapServer 4.8.3) > * http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp (MapServer 4.8.1) > > Our WFS client supports both GET and POST requests. It checks the = > Capabilities document which HTTP method to use. The document of the = > first service can be found here: = > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D/mapserver/services > /en= > vdat/config.map&SERVICE=3DWFS&VERSION=3D1.0.0&REQUEST=3DGetCapabilitie > s&.= GetCapabilities is always done with GET, but other requests can > vary. = For testing purposes I made POST the default HTTP method for > the = requests. When I try to do a DescribeFeatureType or a GetFeature > to = these services with POST, I'm getting the following message: > > > MapServer Message > BGCOLOR=3D"#FFFFFF"> > mapserv(): Web application error. No template provided.
> > > The Capabilites document lists the online resource URL's for = > DescribeFeatureType and GetFeature, so POST should be allowed for > these = WFS requests. I'm sure that the WFS request is correct, since > it works = with other WFS servers, like Geoserver, and Oracle Spatial > Web Services, = and I can not find anything that might be wrong on my > side. Here is the = raw request (headers + post data): > > POST /envdat/map.aspx HTTP/1.1 > Content-Type: text/xml > Host: map.ns.ec.gc.ca > Content-Length: 579 > Expect: 100-continue > Proxy-Connection: Close > > version=3D"1.0.0" service=3D"WFS" = > xsi:schemaLocation=3D"http://www.opengis.net/wfs = > http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd" = > xmlns=3D"http://www.opengis.net/wfs" = > xmlns:b=3D"http://www.bentley.com/schemas/x-Bentley.XMLTemplate.0.1" = > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" = > xmlns:ows=3D"http://www.opengis.net/ows" = > xmlns:xlink=3D"http://www.w3.org/1999/xlink" = > xmlns:ogc=3D"http://www.opengis.net/ogc" = > xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"> > wfs:envirodat > > > While searching the mailing list, I found replies of people suggesting > = that WFS might not be enabled (MapServer not compiled with WFS > support), = but since WFS requests with GET work fine, this is > obviously not the = case. I also found another suggestion here: = > http://lists.umn.edu/cgi-bin/wa?S2=3DMAPSERVER-USERS&q=3Dwfs+post+temp > lat= e&s=3D&f=3D&a=3D&b=3D. It is suggested to add the parameters = > "service=3DWFS" and "version=3D1.0.0" to the URL for POST, but this = > doesn't work either. Maybe I would need to test with a more recent = > build, but I couldn't find one at the web. But this would mean that I > = have to change the online resource URL, but the correct URL cannot > be = predicted. The correct URL to post to should be mentioned in the > = Capabilities document. The second service (www.bsc-eoc.org) returned > the = same reply with the parameters, but the first service (at = > map.ns.ec.gc.ca) returned this: > > xmlns=3D"http://www.opengis.net/ogc" = > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" = > xsi:schemaLocation=3D"http://www.opengis.net/ogc = > http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: REQUEST = > parameter missing > > > > If I would add the Request parameter, then it would be WFS / GET > again, = and that's not what I want. (Well, I normally do, but this is > for = testing purposes.) I was getting similar responses with > GetFeature, but since I changed my = code, the WFS client doesn't come > that far (because DescribeFeatureType = doesn't work) anymore.=20 > > Since there are no problems with GET requests, our client can = > successfully query data. But since POST is also available, I would = > expect it to work as well. I hope that someone can look into this. If > = POST really causes problems, it would be better to remove the > associated = online resource URL's from the Capabilities document. > > Regards, > > Frank Steggink > =20 > Bentley Systems, Inc. > Software Developer Geospatial > =20 > 3645, boul. Ste-Anne > Qu=E9bec, Qc. G1E 3L1 > Canada > =20 > Tel: +1 418 666 7691 ext. 289 > E-mail: frank.steggink at bentley.com > WWW: http://www.bentley.com > =20 > From sgillies at FRII.COM Thu Nov 8 07:53:07 2007 From: sgillies at FRII.COM (Sean Gillies) Date: Thu, 8 Nov 2007 08:53:07 -0700 Subject: WFS POST requests: "No template provided" error In-Reply-To: Message-ID: Sorry, I got lost in the XML and HTTP weeds and forget you were using foreign services. Like Daniel said, MapServer has a problem caused by the way it overloads its single service endpoint. You might want to test against a server that gets it right: GeoServer, or MapServer proxied through another script. Sean Frank Steggink wrote: > Sean (and others), > > As I said, the servers are not mine. They are public servers on the > internet. I'm just making a client, and care about interoperability, so > that's why I posted. (Even with a protocol which is flawed, but this is > what I'm paid for at this moment.) > > I could try to set up MapServer myself, but since I've no MapServer > experience, it will take quite some time. That's why I was asking > someone else to look at it. > > About this message, is there any difference in setting MapServer up to > handle GET and POST requests? If the "WFS handler for POST" isn't set up > correctly, why isn't this reflected in the Capabilities document? > > Frank > > > -----Original Message----- > From: Sean Gillies [mailto:sgillies at frii.com]=20 > Sent: Thursday, November 08, 2007 10:05 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Cc: Frank Steggink > Subject: Re: WFS POST requests: "No template provided" error > > POST is for creating new resource states! Use GET! > > Oh, wait, wrong list :) > > That "No template provided" error usually means what it says. Is your > mapfile configed properly? Are you able to render maps from it using the > shp2img utility? > > Sean > > Frank Steggink wrote: >> Hello List, >> =20 >> While developing a WFS client, I've encountered a problem with =3D=20 >> MapServer. I don't have a local setup of MapServer running, but use a=20 >> =3D few public available services at the web. Those are: >> * =3D >> = > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D3D/mapserver/services >> /en=3D >> vdat/config.map (MapServer 4.8.3) >> * http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp (MapServer 4.8.1) >> =20 >> Our WFS client supports both GET and POST requests. It checks the =3D=20 >> Capabilities document which HTTP method to use. The document of the = > =3D=20 >> first service can be found here: =3D=20 >> = > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D3D/mapserver/services >> /en=3D=20 >> = > vdat/config.map&SERVICE=3D3DWFS&VERSION=3D3D1.0.0&REQUEST=3D3DGetCapabili= > tie >> s&.=3D GetCapabilities is always done with GET, but other requests = > can=20 >> vary. =3D For testing purposes I made POST the default HTTP method for = > >> the =3D requests. When I try to do a DescribeFeatureType or a = > GetFeature > >> to =3D these services with POST, I'm getting the following message: >> =20 >> >> MapServer Message >> = > > BGCOLOR=3D3D"#FFFFFF"> >> mapserv(): Web application error. No template provided.
=20 >> >> =20 >> The Capabilites document lists the online resource URL's for =3D=20 >> DescribeFeatureType and GetFeature, so POST should be allowed for=20 >> these =3D WFS requests. I'm sure that the WFS request is correct, = > since=20 >> it works =3D with other WFS servers, like Geoserver, and Oracle = > Spatial=20 >> Web Services, =3D and I can not find anything that might be wrong on = > my=20 >> side. Here is the =3D raw request (headers + post data): >> =20 >> POST /envdat/map.aspx HTTP/1.1 >> Content-Type: text/xml >> Host: map.ns.ec.gc.ca >> Content-Length: 579 >> Expect: 100-continue >> Proxy-Connection: Close >> =20 >> = > > version=3D3D"1.0.0" service=3D3D"WFS" =3D=20 >> xsi:schemaLocation=3D3D"http://www.opengis.net/wfs =3D=20 >> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd" =3D=20 >> xmlns=3D3D"http://www.opengis.net/wfs" =3D=20 >> xmlns:b=3D3D"http://www.bentley.com/schemas/x-Bentley.XMLTemplate.0.1" = > =3D > >> xmlns:xsi=3D3D"http://www.w3.org/2001/XMLSchema-instance" =3D=20 >> xmlns:ows=3D3D"http://www.opengis.net/ows" =3D=20 >> xmlns:xlink=3D3D"http://www.w3.org/1999/xlink" =3D=20 >> xmlns:ogc=3D3D"http://www.opengis.net/ogc" =3D=20 >> xmlns:xsd=3D3D"http://www.w3.org/2001/XMLSchema"> >> wfs:envirodat >> >> =20 >> While searching the mailing list, I found replies of people suggesting > >> =3D that WFS might not be enabled (MapServer not compiled with WFS=20 >> support), =3D but since WFS requests with GET work fine, this is=20 >> obviously not the =3D case. I also found another suggestion here: =3D=20 >> = > http://lists.umn.edu/cgi-bin/wa?S2=3D3DMAPSERVER-USERS&q=3D3Dwfs+post+tem= > p >> lat=3D e&s=3D3D&f=3D3D&a=3D3D&b=3D3D. It is suggested to add the = > parameters =3D=20 >> "service=3D3DWFS" and "version=3D3D1.0.0" to the URL for POST, but = > this =3D=20 >> doesn't work either. Maybe I would need to test with a more recent =3D = > >> build, but I couldn't find one at the web. But this would mean that I=20 >> =3D have to change the online resource URL, but the correct URL cannot = > >> be =3D predicted. The correct URL to post to should be mentioned in = > the=20 >> =3D Capabilities document. The second service (www.bsc-eoc.org) = > returned > >> the =3D same reply with the parameters, but the first service (at =3D >> map.ns.ec.gc.ca) returned this: >> =20 >> > xmlns=3D3D"http://www.opengis.net/ogc" =3D=20 >> xmlns:xsi=3D3D"http://www.w3.org/2001/XMLSchema-instance" =3D=20 >> xsi:schemaLocation=3D3D"http://www.opengis.net/ogc =3D=20 >> http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> >> >> msWFSDispatch(): WFS server error. Incomplete WFS request: REQUEST =3D = > >> parameter missing >> >> >> =20 >> If I would add the Request parameter, then it would be WFS / GET=20 >> again, =3D and that's not what I want. (Well, I normally do, but this = > is > >> for =3D testing purposes.) I was getting similar responses with=20 >> GetFeature, but since I changed my =3D code, the WFS client doesn't = > come > >> that far (because DescribeFeatureType =3D doesn't work) anymore.=3D20 >> =20 >> Since there are no problems with GET requests, our client can =3D=20 >> successfully query data. But since POST is also available, I would =3D = > >> expect it to work as well. I hope that someone can look into this. If=20 >> =3D POST really causes problems, it would be better to remove the=20 >> associated =3D online resource URL's from the Capabilities document. >> =20 >> Regards, >> =20 >> Frank Steggink >> =3D20 >> Bentley Systems, Inc. >> Software Developer Geospatial >> =3D20 >> 3645, boul. Ste-Anne >> Qu=3DE9bec, Qc. G1E 3L1 >> Canada >> =3D20 >> Tel: +1 418 666 7691 ext. 289 >> E-mail: frank.steggink at bentley.com >> WWW: http://www.bentley.com >> =3D20 >> =20 > From frank.steggink at BENTLEY.COM Thu Nov 8 08:18:17 2007 From: frank.steggink at BENTLEY.COM (Frank Steggink) Date: Thu, 8 Nov 2007 10:18:17 -0600 Subject: WFS POST requests: "No template provided" error Message-ID: Hello Daniel, Thanks for the reply. I've tried your suggestion, but unfortunately it didn't work. I'm getting the following ServiceException: msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION parameter missing The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the post data is the same as in the original message. It really looks like MapServer only accepts GET request for WFS. So, the simple fix you suggested will probably not be enough. I'm going to file a ticket. In case something needs to be tested, please let me know. Frank From Tim.Nolte at IPCSWIRELESSINC.COM Thu Nov 8 08:30:18 2007 From: Tim.Nolte at IPCSWIRELESSINC.COM (Nolte, Tim) Date: Thu, 8 Nov 2007 11:30:18 -0500 Subject: Layer Order and Labels Message-ID: I have a feature on m MapServer where someone can geocode and address and plot that on the map. The problem I have is that most often the street name label covers up the point(symbol). How can I force the point to be over top the street layers label. I've already got the point set as the top most layer in my mapfile. Any help would be greatly appreciated. Thanks. - Tim ---- Timothy J Nolte - tnolte at ilpcs.com Associate Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com From jayzee.smith at GMAIL.COM Thu Nov 8 08:37:09 2007 From: jayzee.smith at GMAIL.COM (John Smith) Date: Thu, 8 Nov 2007 11:37:09 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: <473330E3.2030803@frii.com> Message-ID: frank, i simply ignore whinners like sean who just have 1 song to sing (actually 2, the other being how python is somehow not an interpreted language). back to mapserver... cheers, jzs On Nov 8, 2007 10:53 AM, Sean Gillies wrote: > Sorry, I got lost in the XML and HTTP weeds and forget you were using > foreign services. Like Daniel said, MapServer has a problem caused by > the way it overloads its single service endpoint. You might want to test > against a server that gets it right: GeoServer, or MapServer proxied > through another script. > > Sean > > Frank Steggink wrote: > > Sean (and others), > > > > As I said, the servers are not mine. They are public servers on the > > internet. I'm just making a client, and care about interoperability, so > > that's why I posted. (Even with a protocol which is flawed, but this is > > what I'm paid for at this moment.) > > > > I could try to set up MapServer myself, but since I've no MapServer > > experience, it will take quite some time. That's why I was asking > > someone else to look at it. > > > > About this message, is there any difference in setting MapServer up to > > handle GET and POST requests? If the "WFS handler for POST" isn't set up > > correctly, why isn't this reflected in the Capabilities document? > > > > Frank > > > > > > -----Original Message----- > > From: Sean Gillies [mailto:sgillies at frii.com]=20 > > Sent: Thursday, November 08, 2007 10:05 > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Cc: Frank Steggink > > Subject: Re: WFS POST requests: "No template provided" error > > > > POST is for creating new resource states! Use GET! > > > > Oh, wait, wrong list :) > > > > That "No template provided" error usually means what it says. Is your > > mapfile configed properly? Are you able to render maps from it using the > > shp2img utility? > > > > Sean > > > > Frank Steggink wrote: > >> Hello List, > >> =20 > >> While developing a WFS client, I've encountered a problem with =3D=20 > >> MapServer. I don't have a local setup of MapServer running, but use a=20 > >> =3D few public available services at the web. Those are: > >> * =3D > >> = > > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D3D/mapserver/services > >> /en=3D > >> vdat/config.map (MapServer 4.8.3) > >> * http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp (MapServer 4.8.1) > >> =20 > >> Our WFS client supports both GET and POST requests. It checks the =3D=20 > >> Capabilities document which HTTP method to use. The document of the = > > =3D=20 > >> first service can be found here: =3D=20 > >> = > > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D3D/mapserver/services > >> /en=3D=20 > >> = > > vdat/config.map&SERVICE=3D3DWFS&VERSION=3D3D1.0.0&REQUEST=3D3DGetCapabili= > > tie > >> s&.=3D GetCapabilities is always done with GET, but other requests = > > can=20 > >> vary. =3D For testing purposes I made POST the default HTTP method for = > > > >> the =3D requests. When I try to do a DescribeFeatureType or a = > > GetFeature > > > >> to =3D these services with POST, I'm getting the following message: > >> =20 > >> > >> MapServer Message > >> = > > >> BGCOLOR=3D3D"#FFFFFF"> > >> mapserv(): Web application error. No template provided.
=20 > >> > >> =20 > >> The Capabilites document lists the online resource URL's for =3D=20 > >> DescribeFeatureType and GetFeature, so POST should be allowed for=20 > >> these =3D WFS requests. I'm sure that the WFS request is correct, = > > since=20 > >> it works =3D with other WFS servers, like Geoserver, and Oracle = > > Spatial=20 > >> Web Services, =3D and I can not find anything that might be wrong on = > > my=20 > >> side. Here is the =3D raw request (headers + post data): > >> =20 > >> POST /envdat/map.aspx HTTP/1.1 > >> Content-Type: text/xml > >> Host: map.ns.ec.gc.ca > >> Content-Length: 579 > >> Expect: 100-continue > >> Proxy-Connection: Close > >> =20 > >> = > > >> version=3D3D"1.0.0" service=3D3D"WFS" =3D=20 > >> xsi:schemaLocation=3D3D"http://www.opengis.net/wfs =3D=20 > >> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd" =3D=20 > >> xmlns=3D3D"http://www.opengis.net/wfs" =3D=20 > >> xmlns:b=3D3D"http://www.bentley.com/schemas/x-Bentley.XMLTemplate.0.1" = > > =3D > > > >> xmlns:xsi=3D3D"http://www.w3.org/2001/XMLSchema-instance" =3D=20 > >> xmlns:ows=3D3D"http://www.opengis.net/ows" =3D=20 > >> xmlns:xlink=3D3D"http://www.w3.org/1999/xlink" =3D=20 > >> xmlns:ogc=3D3D"http://www.opengis.net/ogc" =3D=20 > >> xmlns:xsd=3D3D"http://www.w3.org/2001/XMLSchema"> > >> wfs:envirodat > >> > >> =20 > >> While searching the mailing list, I found replies of people suggesting > > > >> =3D that WFS might not be enabled (MapServer not compiled with WFS=20 > >> support), =3D but since WFS requests with GET work fine, this is=20 > >> obviously not the =3D case. I also found another suggestion here: =3D=20 > >> = > > http://lists.umn.edu/cgi-bin/wa?S2=3D3DMAPSERVER-USERS&q=3D3Dwfs+post+tem= > > p > >> lat=3D e&s=3D3D&f=3D3D&a=3D3D&b=3D3D. It is suggested to add the = > > parameters =3D=20 > >> "service=3D3DWFS" and "version=3D3D1.0.0" to the URL for POST, but = > > this =3D=20 > >> doesn't work either. Maybe I would need to test with a more recent =3D = > > > >> build, but I couldn't find one at the web. But this would mean that I=20 > >> =3D have to change the online resource URL, but the correct URL cannot = > > > >> be =3D predicted. The correct URL to post to should be mentioned in = > > the=20 > >> =3D Capabilities document. The second service (www.bsc-eoc.org) = > > returned > > > >> the =3D same reply with the parameters, but the first service (at =3D > >> map.ns.ec.gc.ca) returned this: > >> =20 > >> >> xmlns=3D3D"http://www.opengis.net/ogc" =3D=20 > >> xmlns:xsi=3D3D"http://www.w3.org/2001/XMLSchema-instance" =3D=20 > >> xsi:schemaLocation=3D3D"http://www.opengis.net/ogc =3D=20 > >> http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > >> > >> msWFSDispatch(): WFS server error. Incomplete WFS request: REQUEST =3D = > > > >> parameter missing > >> > >> > >> =20 > >> If I would add the Request parameter, then it would be WFS / GET=20 > >> again, =3D and that's not what I want. (Well, I normally do, but this = > > is > > > >> for =3D testing purposes.) I was getting similar responses with=20 > >> GetFeature, but since I changed my =3D code, the WFS client doesn't = > > come > > > >> that far (because DescribeFeatureType =3D doesn't work) anymore.=3D20 > >> =20 > >> Since there are no problems with GET requests, our client can =3D=20 > >> successfully query data. But since POST is also available, I would =3D = > > > >> expect it to work as well. I hope that someone can look into this. If=20 > >> =3D POST really causes problems, it would be better to remove the=20 > >> associated =3D online resource URL's from the Capabilities document. > >> =20 > >> Regards, > >> =20 > >> Frank Steggink > >> =3D20 > >> Bentley Systems, Inc. > >> Software Developer Geospatial > >> =3D20 > >> 3645, boul. Ste-Anne > >> Qu=3DE9bec, Qc. G1E 3L1 > >> Canada > >> =3D20 > >> Tel: +1 418 666 7691 ext. 289 > >> E-mail: frank.steggink at bentley.com > >> WWW: http://www.bentley.com > >> =3D20 > >> =20 From mlinden at ZEELANDNET.NL Thu Nov 8 08:35:21 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Thu, 8 Nov 2007 17:35:21 +0100 Subject: WFS POST requests: "No template provided" error In-Reply-To: Message-ID: Almost there! Add VERSION=1.1.0 to your requeststring Frank Steggink schreef: > Hello Daniel, > > Thanks for the reply. I've tried your suggestion, but unfortunately it > didn't work. I'm getting the following ServiceException: > > xmlns="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/ogc > http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION parameter > missing > > > > The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the post > data is the same as in the original message. > > It really looks like MapServer only accepts GET request for WFS. So, the simple > fix you suggested will probably not be enough. I'm going to file a ticket. > In case > something needs to be tested, please let me know. > > Frank > > -- Milo van der Linden skype: milovanderlinden mlinden at zeelandnet.nl milovanderlinden at gmail.com milo at 3dsite.nl http://www.3dsite.nl De informatie in dit bericht reflecteert mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bij het betreffende medium behorende voorwaarden. The information in this message reflects my personal opinion and not that of a company or public body. All rights reserved.If this message is contained in a mailing-list or community, the rights on the medium are automatically adapted. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlinden at ZEELANDNET.NL Thu Nov 8 08:36:05 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Thu, 8 Nov 2007 17:36:05 +0100 Subject: WFS POST requests: "No template provided" error In-Reply-To: Message-ID: http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetCapabilities Gives a valid xml result Frank Steggink schreef: > Hello Daniel, > > Thanks for the reply. I've tried your suggestion, but unfortunately it > didn't work. I'm getting the following ServiceException: > > xmlns="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/ogc > http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION parameter > missing > > > > The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the post > data is the same as in the original message. > > It really looks like MapServer only accepts GET request for WFS. So, the simple > fix you suggested will probably not be enough. I'm going to file a ticket. > In case > something needs to be tested, please let me know. > > Frank > > -- Milo van der Linden skype: milovanderlinden mlinden at zeelandnet.nl milovanderlinden at gmail.com milo at 3dsite.nl http://www.3dsite.nl De informatie in dit bericht reflecteert mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bij het betreffende medium behorende voorwaarden. The information in this message reflects my personal opinion and not that of a company or public body. All rights reserved.If this message is contained in a mailing-list or community, the rights on the medium are automatically adapted. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgillies at FRII.COM Thu Nov 8 08:58:55 2007 From: sgillies at FRII.COM (Sean Gillies) Date: Thu, 8 Nov 2007 09:58:55 -0700 Subject: WFS POST requests: "No template provided" error In-Reply-To: Message-ID: Sir, my honor can be restored only by a duel. We each get one pistol only for every mythical man-year we have spent on MapServer: http://www.ohloh.net/projects/3692/contributors?page=1 Denial of a project's technical issues (and MapServer has fewer all the time) is not sound software engineering. Punk. Sean John Smith wrote: > frank, > i simply ignore whinners like sean who just have 1 song to sing > (actually 2, the other being how python is somehow not an interpreted > language). back to mapserver... > cheers, jzs > > On Nov 8, 2007 10:53 AM, Sean Gillies wrote: >> Sorry, I got lost in the XML and HTTP weeds and forget you were using >> foreign services. Like Daniel said, MapServer has a problem caused by >> the way it overloads its single service endpoint. You might want to test >> against a server that gets it right: GeoServer, or MapServer proxied >> through another script. >> >> Sean >> >> Frank Steggink wrote: >>> Sean (and others), >>> >>> As I said, the servers are not mine. They are public servers on the >>> internet. I'm just making a client, and care about interoperability, so >>> that's why I posted. (Even with a protocol which is flawed, but this is >>> what I'm paid for at this moment.) >>> >>> I could try to set up MapServer myself, but since I've no MapServer >>> experience, it will take quite some time. That's why I was asking >>> someone else to look at it. >>> >>> About this message, is there any difference in setting MapServer up to >>> handle GET and POST requests? If the "WFS handler for POST" isn't set up >>> correctly, why isn't this reflected in the Capabilities document? >>> >>> Frank >>> >>> >>> -----Original Message----- >>> From: Sean Gillies [mailto:sgillies at frii.com]=20 >>> Sent: Thursday, November 08, 2007 10:05 >>> To: MAPSERVER-USERS at LISTS.UMN.EDU >>> Cc: Frank Steggink >>> Subject: Re: WFS POST requests: "No template provided" error >>> >>> POST is for creating new resource states! Use GET! >>> >>> Oh, wait, wrong list :) >>> >>> That "No template provided" error usually means what it says. Is your >>> mapfile configed properly? Are you able to render maps from it using the >>> shp2img utility? >>> >>> Sean >>> >>> Frank Steggink wrote: >>>> Hello List, >>>> =20 >>>> While developing a WFS client, I've encountered a problem with =3D=20 >>>> MapServer. I don't have a local setup of MapServer running, but use a=20 >>>> =3D few public available services at the web. Those are: >>>> * =3D >>>> = >>> http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D3D/mapserver/services >>>> /en=3D >>>> vdat/config.map (MapServer 4.8.3) >>>> * http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp (MapServer 4.8.1) >>>> =20 >>>> Our WFS client supports both GET and POST requests. It checks the =3D=20 >>>> Capabilities document which HTTP method to use. The document of the = >>> =3D=20 >>>> first service can be found here: =3D=20 >>>> = >>> http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D3D/mapserver/services >>>> /en=3D=20 >>>> = >>> vdat/config.map&SERVICE=3D3DWFS&VERSION=3D3D1.0.0&REQUEST=3D3DGetCapabili= >>> tie >>>> s&.=3D GetCapabilities is always done with GET, but other requests = >>> can=20 >>>> vary. =3D For testing purposes I made POST the default HTTP method for = >>>> the =3D requests. When I try to do a DescribeFeatureType or a = >>> GetFeature >>> >>>> to =3D these services with POST, I'm getting the following message: >>>> =20 >>>> >>>> MapServer Message >>>> = >>> >>> BGCOLOR=3D3D"#FFFFFF"> >>>> mapserv(): Web application error. No template provided.
=20 >>>> >>>> =20 >>>> The Capabilites document lists the online resource URL's for =3D=20 >>>> DescribeFeatureType and GetFeature, so POST should be allowed for=20 >>>> these =3D WFS requests. I'm sure that the WFS request is correct, = >>> since=20 >>>> it works =3D with other WFS servers, like Geoserver, and Oracle = >>> Spatial=20 >>>> Web Services, =3D and I can not find anything that might be wrong on = >>> my=20 >>>> side. Here is the =3D raw request (headers + post data): >>>> =20 >>>> POST /envdat/map.aspx HTTP/1.1 >>>> Content-Type: text/xml >>>> Host: map.ns.ec.gc.ca >>>> Content-Length: 579 >>>> Expect: 100-continue >>>> Proxy-Connection: Close >>>> =20 >>>> = >>> >>> version=3D3D"1.0.0" service=3D3D"WFS" =3D=20 >>>> xsi:schemaLocation=3D3D"http://www.opengis.net/wfs =3D=20 >>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd" =3D=20 >>>> xmlns=3D3D"http://www.opengis.net/wfs" =3D=20 >>>> xmlns:b=3D3D"http://www.bentley.com/schemas/x-Bentley.XMLTemplate.0.1" = >>> =3D >>> >>>> xmlns:xsi=3D3D"http://www.w3.org/2001/XMLSchema-instance" =3D=20 >>>> xmlns:ows=3D3D"http://www.opengis.net/ows" =3D=20 >>>> xmlns:xlink=3D3D"http://www.w3.org/1999/xlink" =3D=20 >>>> xmlns:ogc=3D3D"http://www.opengis.net/ogc" =3D=20 >>>> xmlns:xsd=3D3D"http://www.w3.org/2001/XMLSchema"> >>>> wfs:envirodat >>>> >>>> =20 >>>> While searching the mailing list, I found replies of people suggesting >>>> =3D that WFS might not be enabled (MapServer not compiled with WFS=20 >>>> support), =3D but since WFS requests with GET work fine, this is=20 >>>> obviously not the =3D case. I also found another suggestion here: =3D=20 >>>> = >>> http://lists.umn.edu/cgi-bin/wa?S2=3D3DMAPSERVER-USERS&q=3D3Dwfs+post+tem= >>> p >>>> lat=3D e&s=3D3D&f=3D3D&a=3D3D&b=3D3D. It is suggested to add the = >>> parameters =3D=20 >>>> "service=3D3DWFS" and "version=3D3D1.0.0" to the URL for POST, but = >>> this =3D=20 >>>> doesn't work either. Maybe I would need to test with a more recent =3D = >>>> build, but I couldn't find one at the web. But this would mean that I=20 >>>> =3D have to change the online resource URL, but the correct URL cannot = >>>> be =3D predicted. The correct URL to post to should be mentioned in = >>> the=20 >>>> =3D Capabilities document. The second service (www.bsc-eoc.org) = >>> returned >>> >>>> the =3D same reply with the parameters, but the first service (at =3D >>>> map.ns.ec.gc.ca) returned this: >>>> =20 >>>> >>> xmlns=3D3D"http://www.opengis.net/ogc" =3D=20 >>>> xmlns:xsi=3D3D"http://www.w3.org/2001/XMLSchema-instance" =3D=20 >>>> xsi:schemaLocation=3D3D"http://www.opengis.net/ogc =3D=20 >>>> http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> >>>> >>>> msWFSDispatch(): WFS server error. Incomplete WFS request: REQUEST =3D = >>>> parameter missing >>>> >>>> >>>> =20 >>>> If I would add the Request parameter, then it would be WFS / GET=20 >>>> again, =3D and that's not what I want. (Well, I normally do, but this = >>> is >>> >>>> for =3D testing purposes.) I was getting similar responses with=20 >>>> GetFeature, but since I changed my =3D code, the WFS client doesn't = >>> come >>> >>>> that far (because DescribeFeatureType =3D doesn't work) anymore.=3D20 >>>> =20 >>>> Since there are no problems with GET requests, our client can =3D=20 >>>> successfully query data. But since POST is also available, I would =3D = >>>> expect it to work as well. I hope that someone can look into this. If=20 >>>> =3D POST really causes problems, it would be better to remove the=20 >>>> associated =3D online resource URL's from the Capabilities document. >>>> =20 >>>> Regards, >>>> =20 >>>> Frank Steggink >>>> =3D20 >>>> Bentley Systems, Inc. >>>> Software Developer Geospatial >>>> =3D20 >>>> 3645, boul. Ste-Anne >>>> Qu=3DE9bec, Qc. G1E 3L1 >>>> Canada >>>> =3D20 >>>> Tel: +1 418 666 7691 ext. 289 >>>> E-mail: frank.steggink at bentley.com >>>> WWW: http://www.bentley.com >>>> =3D20 >>>> =20 > From thomas.bonfort at GMAIL.COM Thu Nov 8 09:06:33 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Thu, 8 Nov 2007 18:06:33 +0100 Subject: Layer Order and Labels In-Reply-To: <1532456BD081F146A176FB6929E6B0D1AF64B7@KTWMAIL.ilpcs.com> Message-ID: Tim, you can add POSTLABELCACHE TRUE to the layers you want drawn after the labels cheers, tb On Nov 8, 2007 5:30 PM, Nolte, Tim wrote: > I have a feature on m MapServer where someone can geocode and address > and plot that on the map. The problem I have is that most often the > street name label covers up the point(symbol). How can I force the point > to be over top the street layers label. I've already got the point set > as the top most layer in my mapfile. Any help would be greatly > appreciated. Thanks. > > - Tim > > ---- > Timothy J Nolte - tnolte at ilpcs.com > Associate Network Planning Engineer > > iPCS Wireless, Inc. > 4717 Broadmoor Ave, Suite G > Kentwood, MI 49512 > > Office: 616-656-5163 > PCS: 616-706-2438 > Fax: 616-554-6484 > Web: www.ipcswirelessinc.com > From Jukka.Rahkonen at MMMTIKE.FI Thu Nov 8 09:09:05 2007 From: Jukka.Rahkonen at MMMTIKE.FI (Rahkonen Jukka) Date: Thu, 8 Nov 2007 19:09:05 +0200 Subject: WFS POST requests: "No template provided" error Message-ID: Hi, I have believed MapServer supports only WFS version 1.0.0. Have things changed lately? -Jukka Rahkonen- -----Original Message----- From: UMN MapServer Users List on behalf of Milo van der Linden Sent: Thu 8.11.2007 18:35 To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Almost there! Add VERSION=1.1.0 to your requeststring Frank Steggink schreef: > Hello Daniel, > > Thanks for the reply. I've tried your suggestion, but unfortunately it > didn't work. I'm getting the following ServiceException: > > xmlns="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/ogc > http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION parameter > missing > > > > The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the post > data is the same as in the original message. > > It really looks like MapServer only accepts GET request for WFS. So, the simple > fix you suggested will probably not be enough. I'm going to file a ticket. > In case > something needs to be tested, please let me know. > > Frank > > -- Milo van der Linden skype: milovanderlinden mlinden at zeelandnet.nl milovanderlinden at gmail.com milo at 3dsite.nl http://www.3dsite.nl De informatie in dit bericht reflecteert mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bij het betreffende medium behorende voorwaarden. The information in this message reflects my personal opinion and not that of a company or public body. All rights reserved.If this message is contained in a mailing-list or community, the rights on the medium are automatically adapted. From Frank.Steggink at BENTLEY.COM Thu Nov 8 09:16:22 2007 From: Frank.Steggink at BENTLEY.COM (Frank Steggink) Date: Thu, 8 Nov 2007 12:16:22 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: Message-ID: John, I should probably not respond, but your contribution doesn't seem to be very helpful either. (At least he made an effort to help.) I'm not interested in your personal grudges, and that's probably also true for the rest of the list. I understood very well what Sean was talking about, and FYI, I basically agree with his song #1. ( I don't know Python well enough to have an opinion on that matter, but that's way OT.) Frank -----Original Message----- From: John Smith [mailto:jayzee.smith at gmail.com] Sent: Thursday, November 08, 2007 11:37 To: Frank Steggink Cc: MAPSERVER-USERS at lists.umn.edu Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error frank, i simply ignore whinners like sean who just have 1 song to sing (actually 2, the other being how python is somehow not an interpreted language). back to mapserver... cheers, jzs On Nov 8, 2007 10:53 AM, Sean Gillies wrote: > Sorry, I got lost in the XML and HTTP weeds and forget you were using > foreign services. Like Daniel said, MapServer has a problem caused by > the way it overloads its single service endpoint. You might want to > test against a server that gets it right: GeoServer, or MapServer > proxied through another script. > > Sean > > Frank Steggink wrote: > > Sean (and others), > > > > As I said, the servers are not mine. They are public servers on the > > internet. I'm just making a client, and care about interoperability, > > so that's why I posted. (Even with a protocol which is flawed, but > > this is what I'm paid for at this moment.) > > > > I could try to set up MapServer myself, but since I've no MapServer > > experience, it will take quite some time. That's why I was asking > > someone else to look at it. > > > > About this message, is there any difference in setting MapServer up > > to handle GET and POST requests? If the "WFS handler for POST" isn't > > set up correctly, why isn't this reflected in the Capabilities document? > > > > Frank > > > > > > -----Original Message----- > > From: Sean Gillies [mailto:sgillies at frii.com]=20 > > Sent: Thursday, November 08, 2007 10:05 > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Cc: Frank Steggink > > Subject: Re: WFS POST requests: "No template provided" error > > > > POST is for creating new resource states! Use GET! > > > > Oh, wait, wrong list :) > > > > That "No template provided" error usually means what it says. Is > > your mapfile configed properly? Are you able to render maps from it > > using the shp2img utility? > > > > Sean > > > > Frank Steggink wrote: > >> Hello List, > >> =20 > >> While developing a WFS client, I've encountered a problem with > >> =3D=20 MapServer. I don't have a local setup of MapServer running, > >> but use a=20 =3D few public available services at the web. Those are: > >> * =3D > >> = > > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D3D/mapserver/serv > > ices > >> /en=3D > >> vdat/config.map (MapServer 4.8.3) > >> * http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp (MapServer 4.8.1) > >> =20 > >> Our WFS client supports both GET and POST requests. It checks the > >> =3D=20 Capabilities document which HTTP method to use. The document > >> of the = > > =3D=20 > >> first service can be found here: =3D=20 = > > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=3D3D/mapserver/serv > > ices > >> /en=3D=20 > >> = > > vdat/config.map&SERVICE=3D3DWFS&VERSION=3D3D1.0.0&REQUEST=3D3DGetCap > > abili= > > tie > >> s&.=3D GetCapabilities is always done with GET, but other requests > >> = > > can=20 > >> vary. =3D For testing purposes I made POST the default HTTP method > >> for = > > > >> the =3D requests. When I try to do a DescribeFeatureType or a = > > GetFeature > > > >> to =3D these services with POST, I'm getting the following message: > >> =20 > >> > >> MapServer Message > >> = > > >> BGCOLOR=3D3D"#FFFFFF"> > >> mapserv(): Web application error. No template provided.
=20 > >> =20 The Capabilites document lists the online > >> resource URL's for =3D=20 DescribeFeatureType and GetFeature, so > >> POST should be allowed for=20 these =3D WFS requests. I'm sure that > >> the WFS request is correct, = > > since=20 > >> it works =3D with other WFS servers, like Geoserver, and Oracle = > > Spatial=20 > >> Web Services, =3D and I can not find anything that might be wrong > >> on = > > my=20 > >> side. Here is the =3D raw request (headers + post data): > >> =20 > >> POST /envdat/map.aspx HTTP/1.1 > >> Content-Type: text/xml > >> Host: map.ns.ec.gc.ca > >> Content-Length: 579 > >> Expect: 100-continue > >> Proxy-Connection: Close > >> =20 > >> = > > >> version=3D3D"1.0.0" service=3D3D"WFS" =3D=20 > >> xsi:schemaLocation=3D3D"http://www.opengis.net/wfs =3D=20 > >> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd" =3D=20 > >> xmlns=3D3D"http://www.opengis.net/wfs" =3D=20 > >> xmlns:b=3D3D"http://www.bentley.com/schemas/x-Bentley.XMLTemplate.0 > >> .1" = > > =3D > > > >> xmlns:xsi=3D3D"http://www.w3.org/2001/XMLSchema-instance" =3D=20 > >> xmlns:ows=3D3D"http://www.opengis.net/ows" =3D=20 > >> xmlns:xlink=3D3D"http://www.w3.org/1999/xlink" =3D=20 > >> xmlns:ogc=3D3D"http://www.opengis.net/ogc" =3D=20 > >> xmlns:xsd=3D3D"http://www.w3.org/2001/XMLSchema"> > >> wfs:envirodat > >> > >> =20 > >> While searching the mailing list, I found replies of people > >> suggesting > > > >> =3D that WFS might not be enabled (MapServer not compiled with > >> WFS=20 support), =3D but since WFS requests with GET work fine, > >> this is=20 obviously not the =3D case. I also found another > >> suggestion here: =3D=20 = > > http://lists.umn.edu/cgi-bin/wa?S2=3D3DMAPSERVER-USERS&q=3D3Dwfs+pos > > t+tem= > > p > >> lat=3D e&s=3D3D&f=3D3D&a=3D3D&b=3D3D. It is suggested to add the = > > parameters =3D=20 > >> "service=3D3DWFS" and "version=3D3D1.0.0" to the URL for POST, but > >> = > > this =3D=20 > >> doesn't work either. Maybe I would need to test with a more recent > >> =3D = > > > >> build, but I couldn't find one at the web. But this would mean that > >> I=20 =3D have to change the online resource URL, but the correct > >> URL cannot = > > > >> be =3D predicted. The correct URL to post to should be mentioned in > >> = > > the=20 > >> =3D Capabilities document. The second service (www.bsc-eoc.org) = > > returned > > > >> the =3D same reply with the parameters, but the first service (at > >> =3D > >> map.ns.ec.gc.ca) returned this: > >> =20 > >> >> xmlns=3D3D"http://www.opengis.net/ogc" =3D=20 > >> xmlns:xsi=3D3D"http://www.w3.org/2001/XMLSchema-instance" =3D=20 > >> xsi:schemaLocation=3D3D"http://www.opengis.net/ogc =3D=20 > >> http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > >> > >> msWFSDispatch(): WFS server error. Incomplete WFS request: REQUEST > >> =3D = > > > >> parameter missing > >> > >> > >> =20 > >> If I would add the Request parameter, then it would be WFS / GET=20 > >> again, =3D and that's not what I want. (Well, I normally do, but > >> this = > > is > > > >> for =3D testing purposes.) I was getting similar responses with=20 > >> GetFeature, but since I changed my =3D code, the WFS client doesn't > >> = > > come > > > >> that far (because DescribeFeatureType =3D doesn't work) > >> anymore.=3D20 =20 Since there are no problems with GET requests, > >> our client can =3D=20 successfully query data. But since POST is > >> also available, I would =3D = > > > >> expect it to work as well. I hope that someone can look into this. > >> If=20 =3D POST really causes problems, it would be better to remove > >> the=20 associated =3D online resource URL's from the Capabilities document. > >> =20 > >> Regards, > >> =20 > >> Frank Steggink > >> =3D20 > >> Bentley Systems, Inc. > >> Software Developer Geospatial > >> =3D20 > >> 3645, boul. Ste-Anne > >> Qu=3DE9bec, Qc. G1E 3L1 > >> Canada > >> =3D20 > >> Tel: +1 418 666 7691 ext. 289 > >> E-mail: frank.steggink at bentley.com > >> WWW: http://www.bentley.com > >> =3D20 > >> =20 From BLC at JUB.COM Thu Nov 8 09:17:07 2007 From: BLC at JUB.COM (Bruce Cheney) Date: Thu, 8 Nov 2007 10:17:07 -0700 Subject: System Configuration In-Reply-To: A<4BF377919225F449BB097CB76FFE9BC8019885BB@ptolemy.topozone.com> Message-ID: Many good questions. I will see if I can catch them all. A bit on the nature of the application. * We are only using vector data (we assumed that the raster would slow it down). * We are serving many different maps stored separately with the same composition of layers. Each map has 6 layers (4 polygon and 2 point layers for labeling). * Each of the different map sets has differing quantities of features. For the most significant layers they average around 10,000 features but may be as high as 100,000. * A majority of the requests are to display a small area of one of the maps so the rendering focuses in to a few features. The user will query a database which will allow for viewing the map that is zoomed to the area of interest. * No layer reprojecting (we assumed this would also slow it down). * The output map is PNG with dimensions 419 X 403. * We are using PHP_mapscript to generate the requests. The parameters for the map generation come from a database and the user requested location. So there are a few lines of code to find the location on the map and generate the images. * The mapfile contains about 12 layers. Several layers to display the primary polygon layer thematically and a couple extra to show the polygons with outlines. * Data is stored in Shapefiles I made attempts to stream-line the use of extra features to ensure the speed. I certainly may be using items that hurt instead of help. Here is the mapfile. Now that I look at the mapfile there may be a couple items that I originally had intended to use but are now just relics and time wasters. <> Now as for the users. We are assuming 5000 simultaneous - all at the same instant. This would assume a substantially larger group of users accessing the site at the same time. We assume this to be the peak stress for Stage 1 of the app. Bruce - My channeling sensors went off when Frank rang . It is certainly true that a bit of experience and contemplation can help you discover optimization opportunities that aren't immediately self-evident. Can you describe the nature of your map application? Are you using raster data, vector data, or both? What size is your data, in numbers of features and/or files? What kind of disk subsystem is being used? Is there layer reprojection going on? Generalizations are rarely helpful (except for this one). It's like being told the average man is 5' 7" tall - it tells you nothing about how tall I am. MapServer performance depends on a number of factors, but the best place to start is a detailed understanding of what exactly you're trying to do with MapServer. It would be most helpful to us if you could post your map file and a sample URL request, preferably one that is externally (publicly) visible. And can you define what you mean by "simultaneous" users? Do you mean 5,000 map requests all being generated at exactly the same time? Or do you mean 5,000 human users asking for a new map every X seconds or so? And if the latter, what value are you using for X? - Ed Ed McNierney Chief Mapmaker Demand Media / TopoZone.com 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: 978-251-4242, Fax: 978-251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Warmerdam Sent: Wednesday, November 07, 2007 8:26 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] System Configuration Bruce Cheney wrote: > We have been given a requirement to support 5000 simultaneous users. > What we are finding is that MapServer bogs down around 400 > simultaneous users on a test machine. It looks like it is likely > slowing because of the threading issue. We haven't tested on a > production machine but are estimating that it should support double > what are test machine could handle (double the processor and RAM). So > at least 800 simultaneous users. Divide that out with the 5000 and we > need a minimum of 6-7 web servers supporting MapServer. We will > certainly scale this as is needed but I do need some idea going in as to what is going to be required. Bruce, I'm curious how many map requests per minute you expect 800 simultaneous users to generate. > Does this sound like results that others expect or is this quantity > above what others have tested? Also Does anyone know of a solution in > the works to run make mapserver thread safe and/or up the overall > speed? I am not complaining about the speed just wondering what is in > the works. In various aspects MapServer is already thread safe though there are also known "unsafe" components, and some components are wrapped by big locks that significantly reduce the value of multiple threads. Progress occurs by fits and starts, largely based on support from user organizations depending on multi-threading. For instance, in 5.0 I implement locking around OGR for a client of mine in Australia. (This is a subtle way of suggesting you hire someone to make this happen if it is what you want!) All this aside, by default MapServer is *massively multi-threaded*. I say this since the default operation is to start a new cgi instance for each request - each is essentially an independent thread. Of course, the downside of whole-process cgi style multithreading is that very little context is preserved from request to request. Map files, data file headers, etc all need to be reparsed for each request. My point here is that you need to think carefully about the application flow to take much advantage of multiple threading within a single process. Also, if I may channel Ed, if you wanted to squeeze more performance out of mapserver, you really need to start by figuring out what it is spending it's time doing. Where is it spending it's time? o waiting for disk? (perhaps you are reading more data than you need?) o rendering (perhaps your data is overdense, or you are using expensive rendering options?) o parsing mapfiles (perhaps you mapfile has too many unused layers?) etc. 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 | President OSGeo, http://osgeo.org -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: postforwebforum.map Type: application/octet-stream Size: 10179 bytes Desc: postforwebforum.map URL: From yassefa at DMSOLUTIONS.CA Thu Nov 8 09:20:49 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Thu, 8 Nov 2007 12:20:49 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: Message-ID: Rahkonen Jukka wrote: > Hi, > > I have believed MapServer supports only WFS version 1.0.0. Have things changed lately? > This is correct. Next release (MapServer 5.2) will have support for 1.1. > -Jukka Rahkonen- > > > -----Original Message----- > From: UMN MapServer Users List on behalf of Milo van der Linden > Sent: Thu 8.11.2007 18:35 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error > > Almost there! Add VERSION=1.1.0 to your requeststring > > Frank Steggink schreef: >> Hello Daniel, >> >> Thanks for the reply. I've tried your suggestion, but unfortunately it >> didn't work. I'm getting the following ServiceException: >> >> > xmlns="http://www.opengis.net/ogc" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://www.opengis.net/ogc >> http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> >> >> msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION parameter >> missing >> >> >> >> The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the post >> data is the same as in the original message. >> >> It really looks like MapServer only accepts GET request for WFS. So, the simple >> fix you suggested will probably not be enough. I'm going to file a ticket. >> In case >> something needs to be tested, please let me know. >> >> Frank >> >> > > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From Tim.Nolte at IPCSWIRELESSINC.COM Thu Nov 8 09:40:40 2007 From: Tim.Nolte at IPCSWIRELESSINC.COM (Nolte, Tim) Date: Thu, 8 Nov 2007 12:40:40 -0500 Subject: Layer Order and Labels In-Reply-To: A Message-ID: Thomas, Thanks a million, that's exactly what I needed. I guess it looks like I need to do a lot more studying of the mapfile spec. :-) - Tim ---- Timothy J Nolte - tnolte at ilpcs.com Associate Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com > -----Original Message----- > From: UMN MapServer Users List > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of thomas bonfort > Sent: Thursday, November 08, 2007 12:07 PM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] Layer Order and Labels > > Tim, > you can add POSTLABELCACHE TRUE to the layers you want drawn > after the labels > > cheers, > tb > > On Nov 8, 2007 5:30 PM, Nolte, Tim > wrote: > > I have a feature on m MapServer where someone can geocode > and address > > and plot that on the map. The problem I have is that most often the > > street name label covers up the point(symbol). How can I > force the point > > to be over top the street layers label. I've already got > the point set > > as the top most layer in my mapfile. Any help would be greatly > > appreciated. Thanks. > > > > - Tim > > > > ---- > > Timothy J Nolte - tnolte at ilpcs.com > > Associate Network Planning Engineer > > > > iPCS Wireless, Inc. > > 4717 Broadmoor Ave, Suite G > > Kentwood, MI 49512 > > > > Office: 616-656-5163 > > PCS: 616-706-2438 > > Fax: 616-554-6484 > > Web: www.ipcswirelessinc.com > > > > From Tim.Nolte at IPCSWIRELESSINC.COM Thu Nov 8 09:47:43 2007 From: Tim.Nolte at IPCSWIRELESSINC.COM (Nolte, Tim) Date: Thu, 8 Nov 2007 12:47:43 -0500 Subject: Pushpin Vector Symbol... Message-ID: Yep, it's me again. Another round of my constant questions. I'm wondering if anyone has a nice pushpin vector symbol. I'd really like something that is designed with transparency and has the pin-point-tip at the point center. The other alternative here is some guides on how to go about design vector symbols. It'd be nice to have some type of gui app for designing symbols. Thanks in advance. - Tim ---- Timothy J Nolte - tnolte at ilpcs.com Associate Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com From jay at ALASKA.EDU Thu Nov 8 10:13:42 2007 From: jay at ALASKA.EDU (Jay Cable) Date: Thu, 8 Nov 2007 09:13:42 -0900 Subject: Problems with WFS and ARCGIS Message-ID: Hello List, I have a question in regards to serving up data via WFS from mapserver to desktop gis clients like Arcmap. I have wfs server (the url is http://wfs.alaskamapped.org//inventory? ). It appears to work, but a number of things that folks normally do in arcgis/arcmap/arcwhatever with other data sources do not work and generate a "This operation failed because the database table does not have a numeric index" error message. I am somewhat baffled by this, as this error message is generated when you use the "Select Feature" tool or try to view the WFS as a table - pretty basic stuff that users will want to do. I am not sure if this is a problem with my mapfile, a problem with arcgis, or just a limit of using (or my understanding of) WFS. Any advice would be greatly appreciated. Thanks, -Jay Here is my mapfile (hopefully posting something is long is not bad form for this list - if so let me know off line and i will not do it again) NAME SDMI_Inventory STATUS ON SIZE 400 300 EXTENT -180 0 180 90 UNITS METERS IMAGECOLOR 255 255 255 DEBUG ON WEB METADATA "wfs_title" "SDMI Inventory" ## REQUIRED "wfs_onlineresource" "http://wfs.alaskamapped.org/inventory?" ## Recommended "wfs_srs" "EPSG:4326" ## Recommended END END PROJECTION "init=epsg:102006" END LAYER NAME SDMI_Inventory METADATA "wfs_title" "SDMI Inventory" ## REQUIRED "wfs_abstract" "This WFS service provides information about the data in the SDMI holdings. For more information, please see http://www.alaskamapped.org or email wms at alaskamapped.org." "wfs_accessconstraints" "None." "wfs_extent" "-180 0 180 90" "wfs_srs" "EPSG:4326" ## Recommended "gml_featureid" "id" ## REQUIRED "gml_include_items" "all" ## Optional (serves all attributes for layer) "gml_geometries" "footprints" "gml_footprints_type" "polygon" "gml_objectid_type" "integer" "gml_id_type" "integer" END TYPE POLYGON STATUS ON PROJECTION "init=epsg:4326" END CONNECTIONTYPE POSTGIS CONNECTION "host=XXXX dbname=XXXX user=XXXXX" DATA "llgeom from (select llgeom,footprints.id as objectid, footprints.id as id, scene_gid as scene_id, scraps.downloadable as downloadable,start_time,end_time,source_res, sources.name as contact, licenses.web_label as license_type, 'http://browse.alaskamapped.org/footprint/download/'||footprints.id as url FROM footprints, licenses, scraps, sources where footprints.scrap_id=scraps.id and licenses.id=scraps.license_id and scraps.source_id = sources.id ) as foo using unique id using SRID=4326" PROCESSING "CLOSE_CONNECTION=DEFER" DEBUG ON DUMP TRUE ## REQUIRED END # Layer END # Map File From Dominic.Lemay at MTQ.GOUV.QC.CA Thu Nov 8 11:03:41 2007 From: Dominic.Lemay at MTQ.GOUV.QC.CA (Lemay, Dominic) Date: Thu, 8 Nov 2007 14:03:41 -0500 Subject: Publish an ArcSDE annotation Message-ID: Hi, I would like to publish an ArcSDE annotation feature class as a MapServer layer. I have already succeeded to publish a point feature class, but I can not publish this annotation feature class. Is MapServer support ArcSDE annotation feature class? How I should do that? Thank you ______________________________________________________ Dominic Lemay Service des syst?mes de mission Direction des technologies de l'information Minist?re des Transports du Qu?bec 5833, boul. Pierre-Bertrand, 2i?me ?tage Qu?bec (Qu?bec) G2K 1K7 T?l?phone: (418) 380-2005 poste 232 T?l?copieur: (418) 644-6653 dominic.lemay at mtq.gouv.qc.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: From hobu.inc at GMAIL.COM Thu Nov 8 11:52:24 2007 From: hobu.inc at GMAIL.COM (Howard Butler) Date: Thu, 8 Nov 2007 13:52:24 -0600 Subject: Publish an ArcSDE annotation In-Reply-To: <2F86ED212F3E164EB9FBB2E68C67858E0516223F@SINFRA0-EXC003.MTQ.MIN.INTRA> Message-ID: The MapServer ArcSDE driver does not currently support annotation layers. Howard On Nov 8, 2007, at 1:03 PM, Lemay, Dominic wrote: > Hi, > > I would like to publish an ArcSDE annotation feature class as a > MapServer layer. > > I have already succeeded to publish a point feature class, but I can > not publish this annotation feature class. > > Is MapServer support ArcSDE annotation feature class? > How I should do that? > > Thank you > ______________________________________________________ > > Dominic Lemay > Service des syst?mes de mission > Direction des technologies de l'information > Minist?re des Transports du Qu?bec > > 5833, boul. Pierre-Bertrand, 2i?me ?tage > Qu?bec (Qu?bec) G2K 1K7 > T?l?phone: (418) 380-2005 poste 232 > T?l?copieur: (418) 644-6653 > dominic.lemay at mtq.gouv.qc.ca > > From drkmattr at HOTMAIL.COM Thu Nov 8 12:39:23 2007 From: drkmattr at HOTMAIL.COM (drk mattr) Date: Thu, 8 Nov 2007 12:39:23 -0800 Subject: MapServer Beginner Stuck Message-ID: I've been following MapServer from afar on James Fee's blog and I've finally decided to take the plunge. I'm a long time ArcIMS developer so these concepts in MapServer aren't that far off from what I'm used to doing, but I have to admit I'm at a loss at getting my first WMS service up and running. I installed MS4W and have that running. The Demo runs perfectly, but when I try and create my own .map file, I seem to have hit a wall. This is the contents of my mapfile. MAP NAME Installation SIZE 800 500 IMAGECOLOR 240 240 240 EXTENT 582919.88200 4182989.235900 610195.822000 4207241.321900 UNITS METERS PROJECTION "init=EPSG:32616" END WEB IMAGEPATH "/ms4w/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" END LAYER NAME "Installation" TYPE POLYGON STATUS ON DATA "Installation_Area.shp" CLASS NAME 'Installation' OUTLINECOLOR 60 60 60 COLOR 255 255 0 SYMBOL 0 END END ENDNow when I test it, I get a blank grey background. http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/test.map&mode=map I'm sure there is something here I'm overlooking, but I just can't seem to debug it. Any direction would be wonderful. Thanks, David _________________________________________________________________ Boo!?Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Fawcett at STATE.MN.US Thu Nov 8 12:56:39 2007 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Thu, 8 Nov 2007 14:56:39 -0600 Subject: MapServer Beginner Stuck In-Reply-To: A Message-ID: David, Either change your layer to say STATUS DEFAULT or add the layer to your URL. e.g. http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/t est.map&mode=map&layer=Installation The status thing catches a lot of people. David. -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of drk mattr Sent: Thursday, November 08, 2007 2:39 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] MapServer Beginner Stuck I've been following MapServer from afar on James Fee's blog and I've finally decided to take the plunge. I'm a long time ArcIMS developer so these concepts in MapServer aren't that far off from what I'm used to doing, but I have to admit I'm at a loss at getting my first WMS service up and running. I installed MS4W and have that running. The Demo runs perfectly, but when I try and create my own .map file, I seem to have hit a wall. This is the contents of my mapfile. MAP NAME Installation SIZE 800 500 IMAGECOLOR 240 240 240 EXTENT 582919.88200 4182989.235900 610195.822000 4207241.321900 UNITS METERS PROJECTION "init=EPSG:32616" END WEB IMAGEPATH "/ms4w/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" END LAYER NAME "Installation" TYPE POLYGON STATUS ON DATA "Installation_Area.shp" CLASS NAME 'Installation' OUTLINECOLOR 60 60 60 COLOR 255 255 0 SYMBOL 0 END END END Now when I test it, I get a blank grey background. http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/t est.map&mode=map I'm sure there is something here I'm overlooking, but I just can't seem to debug it. Any direction would be wonderful. Thanks, David ________________________________ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! Try now! -------------- next part -------------- An HTML attachment was scrubbed... URL: From drkmattr at HOTMAIL.COM Thu Nov 8 12:59:29 2007 From: drkmattr at HOTMAIL.COM (drk mattr) Date: Thu, 8 Nov 2007 12:59:29 -0800 Subject: MapServer Beginner Stuck In-Reply-To: <6246727221874A4FB8D3F9BBC37D9BD5021FB85A@s-sp22.pca.state.mn.us> Message-ID: Bingo, that did it. Thanks! Date: Thu, 8 Nov 2007 14:56:39 -0600From: David.Fawcett at STATE.MN.USSubject: Re: [UMN_MAPSERVER-USERS] MapServer Beginner StuckTo: MAPSERVER-USERS at LISTS.UMN.EDU David, Either change your layer to say STATUS DEFAULT or add the layer to your URL. e.g. http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/test.map&mode=map&layer=Installation The status thing catches a lot of people. David. -----Original Message-----From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of drk mattrSent: Thursday, November 08, 2007 2:39 PMTo: MAPSERVER-USERS at LISTS.UMN.EDUSubject: [UMN_MAPSERVER-USERS] MapServer Beginner StuckI've been following MapServer from afar on James Fee's blog and I've finally decided to take the plunge. I'm a long time ArcIMS developer so these concepts in MapServer aren't that far off from what I'm used to doing, but I have to admit I'm at a loss at getting my first WMS service up and running. I installed MS4W and have that running. The Demo runs perfectly, but when I try and create my own .map file, I seem to have hit a wall. This is the contents of my mapfile. MAP NAME Installation SIZE 800 500 IMAGECOLOR 240 240 240 EXTENT 582919.88200 4182989.235900 610195.822000 4207241.321900 UNITS METERS PROJECTION "init=EPSG:32616" END WEB IMAGEPATH "/ms4w/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" END LAYER NAME "Installation" TYPE POLYGON STATUS ON DATA "Installation_Area.shp" CLASS NAME 'Installation' OUTLINECOLOR 60 60 60 COLOR 255 255 0 SYMBOL 0 END END ENDNow when I test it, I get a blank grey background. http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/test.map&mode=map I'm sure there is something here I'm overlooking, but I just can't seem to debug it. Any direction would be wonderful. Thanks, David Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! Try now! _________________________________________________________________ Boo!?Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews -------------- next part -------------- An HTML attachment was scrubbed... URL: From Dominic.Lemay at MTQ.GOUV.QC.CA Thu Nov 8 13:38:12 2007 From: Dominic.Lemay at MTQ.GOUV.QC.CA (Lemay, Dominic) Date: Thu, 8 Nov 2007 16:38:12 -0500 Subject: Publish an ArcSDE annotation In-Reply-To: A Message-ID: Hi Howard, The labelling engine of MapServer for line layers is not sufficient for our project. Is MapServer support generated annotations for any driver: DGN, DXF, etc ? Maybe, we will be able to export our annotations to one of these drivers. Thank you. -----Message d'origine----- De?: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la part de Howard Butler Envoy??: 8 novembre 2007 14:52 ??: MAPSERVER-USERS at LISTS.UMN.EDU Objet?: Re: [UMN_MAPSERVER-USERS] Publish an ArcSDE annotation The MapServer ArcSDE driver does not currently support annotation layers. Howard On Nov 8, 2007, at 1:03 PM, Lemay, Dominic wrote: > Hi, > > I would like to publish an ArcSDE annotation feature class as a > MapServer layer. > > I have already succeeded to publish a point feature class, but I can > not publish this annotation feature class. > > Is MapServer support ArcSDE annotation feature class? > How I should do that? > > Thank you > ______________________________________________________ > > Dominic Lemay > Service des syst?mes de mission > Direction des technologies de l'information > Minist?re des Transports du Qu?bec > > 5833, boul. Pierre-Bertrand, 2i?me ?tage > Qu?bec (Qu?bec) G2K 1K7 > T?l?phone: (418) 380-2005 poste 232 > T?l?copieur: (418) 644-6653 > dominic.lemay at mtq.gouv.qc.ca > > From ed at TOPOZONE.COM Thu Nov 8 13:58:56 2007 From: ed at TOPOZONE.COM (Ed McNierney) Date: Thu, 8 Nov 2007 16:58:56 -0500 Subject: System Configuration In-Reply-To: A Message-ID: Bruce - Thanks; that's a good start. 5,000 requests at a time is a lot. If your estimate the average user will look at a map for 10 seconds before requesting another one, you're talking about 50,000 simultaneous human users. Thanks for posting the map file - that helps. There is one huge thing you should be aware of and think about right away - the difference between mode=browse and mode=map. If you are using browse mode with an HTML template (as it appears you are) you should reconsider that decision. When you use MapServer in browse mode, it needs to generate the map image, legend image, etc. and then write them all to a local disk before returning an HTML template to the client with the URLs of those images embedded in it. Writing to disk is the slowest thing you can do on your server. Having 5,000 simultaneous disk writes, with simultaneous reads to the same disk, is very nearly pure evil. That is a huge drag on performance. You really can't sustain nearly as many users on a given machine in browse mode as you could in map mode. What kind of disk subsystem is being used for the temp files? Map mode (mode=map) is a simple HTTP request for an image, and the image, after being built, is sent directly to the client with no disk I/O involved. Much nicer. Much faster. If you must use browse mode, then I'd suggest you create a RAM disk to hold the temp images, with appropriate monitoring to clean out old files promptly. But can you pre-build a set of legends, etc. so you can just embed those and not crank them out every time? You can also get some benefit from storing our input shapefiles on a RAM disk, but don't devote any RAM to that purpose if you're still writing temp files to hard disk. Let me first toss off a few generic suggestions that probably won't help much but are worth doing: 1. Get rid of unused fonts in your font file. MapServer will reach out and touch each one for each map request. 2. If your shapefiles don't change often, preprocess them to create a separate shapefile for each CLASS, so you don't have to filter as much. 3. If you must use CLASSes, organize them so the most commonly-used class comes first in each LAYER. 4. If you have a certain number of combinations of shapefiles used in a given request, create multiple map files with only those layers. For example, if your 12 layers are one set of 4 base layers that are always used, and then 8 more layers only one of which is displayed at a time, create 8 map files, each with only 5 layers instead of 12 - the four base layers and one specific overlay layer. Then use your application code to figure out which map file to select. And make sure you're using shptree to generate spatial indexes for all your shapefiles! This looks like it should be an application capable of running pretty darn quickly. - Ed Ed McNierney Chief Mapmaker Demand Media / TopoZone.com 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed at topozone.com Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Bruce Cheney Sent: Thursday, November 08, 2007 12:17 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] System Configuration Many good questions. I will see if I can catch them all. A bit on the nature of the application. * We are only using vector data (we assumed that the raster would slow it down). * We are serving many different maps stored separately with the same composition of layers. Each map has 6 layers (4 polygon and 2 point layers for labeling). * Each of the different map sets has differing quantities of features. For the most significant layers they average around 10,000 features but may be as high as 100,000. * A majority of the requests are to display a small area of one of the maps so the rendering focuses in to a few features. The user will query a database which will allow for viewing the map that is zoomed to the area of interest. * No layer reprojecting (we assumed this would also slow it down). * The output map is PNG with dimensions 419 X 403. * We are using PHP_mapscript to generate the requests. The parameters for the map generation come from a database and the user requested location. So there are a few lines of code to find the location on the map and generate the images. * The mapfile contains about 12 layers. Several layers to display the primary polygon layer thematically and a couple extra to show the polygons with outlines. * Data is stored in Shapefiles I made attempts to stream-line the use of extra features to ensure the speed. I certainly may be using items that hurt instead of help. Here is the mapfile. Now that I look at the mapfile there may be a couple items that I originally had intended to use but are now just relics and time wasters. <> Now as for the users. We are assuming 5000 simultaneous - all at the same instant. This would assume a substantially larger group of users accessing the site at the same time. We assume this to be the peak stress for Stage 1 of the app. Bruce - My channeling sensors went off when Frank rang . It is certainly true that a bit of experience and contemplation can help you discover optimization opportunities that aren't immediately self-evident. Can you describe the nature of your map application? Are you using raster data, vector data, or both? What size is your data, in numbers of features and/or files? What kind of disk subsystem is being used? Is there layer reprojection going on? Generalizations are rarely helpful (except for this one). It's like being told the average man is 5' 7" tall - it tells you nothing about how tall I am. MapServer performance depends on a number of factors, but the best place to start is a detailed understanding of what exactly you're trying to do with MapServer. It would be most helpful to us if you could post your map file and a sample URL request, preferably one that is externally (publicly) visible. And can you define what you mean by "simultaneous" users? Do you mean 5,000 map requests all being generated at exactly the same time? Or do you mean 5,000 human users asking for a new map every X seconds or so? And if the latter, what value are you using for X? - Ed Ed McNierney Chief Mapmaker Demand Media / TopoZone.com 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: 978-251-4242, Fax: 978-251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU ] On Behalf Of Frank Warmerdam Sent: Wednesday, November 07, 2007 8:26 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] System Configuration Bruce Cheney wrote: > We have been given a requirement to support 5000 simultaneous users. > What we are finding is that MapServer bogs down around 400 > simultaneous users on a test machine. It looks like it is likely > slowing because of the threading issue. We haven't tested on a > production machine but are estimating that it should support double > what are test machine could handle (double the processor and RAM). So > at least 800 simultaneous users. Divide that out with the 5000 and we > need a minimum of 6-7 web servers supporting MapServer. We will > certainly scale this as is needed but I do need some idea going in as to what is going to be required. Bruce, I'm curious how many map requests per minute you expect 800 simultaneous users to generate. > Does this sound like results that others expect or is this quantity > above what others have tested? Also Does anyone know of a solution in > the works to run make mapserver thread safe and/or up the overall > speed? I am not complaining about the speed just wondering what is in > the works. In various aspects MapServer is already thread safe though there are also known "unsafe" components, and some components are wrapped by big locks that significantly reduce the value of multiple threads. Progress occurs by fits and starts, largely based on support from user organizations depending on multi-threading. For instance, in 5.0 I implement locking around OGR for a client of mine in Australia. (This is a subtle way of suggesting you hire someone to make this happen if it is what you want!) All this aside, by default MapServer is *massively multi-threaded*. I say this since the default operation is to start a new cgi instance for each request - each is essentially an independent thread. Of course, the downside of whole-process cgi style multithreading is that very little context is preserved from request to request. Map files, data file headers, etc all need to be reparsed for each request. My point here is that you need to think carefully about the application flow to take much advantage of multiple threading within a single process. Also, if I may channel Ed, if you wanted to squeeze more performance out of mapserver, you really need to start by figuring out what it is spending it's time doing. Where is it spending it's time? o waiting for disk? (perhaps you are reading more data than you need?) o rendering (perhaps your data is overdense, or you are using expensive rendering options?) o parsing mapfiles (perhaps you mapfile has too many unused layers?) etc. 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 | President OSGeo, http://osgeo.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From yassefa at DMSOLUTIONS.CA Thu Nov 8 14:29:50 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Thu, 8 Nov 2007 17:29:50 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: Message-ID: Hi There, WFS POST is supported by MapServer. Looking into this thread, you mentioned a couple of URLS and I have tried the follwing one : "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/config.map" I have tried WFS post requests describefeature and getfeature with this service and It responds correctly. It is a Mapserve 4.8.3. I am guessing that there is something 'wrong" with the service accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx where the post requests are not maybe transfered properly to Mapserver. Hopefully this helps. Best Regards, Frank Steggink wrote: > Hello Daniel, > > Thanks for the reply. I've tried your suggestion, but unfortunately it > didn't work. I'm getting the following ServiceException: > > xmlns="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/ogc > http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION parameter > missing > > > > The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the post > data is the same as in the original message. > > It really looks like MapServer only accepts GET request for WFS. So, the simple > fix you suggested will probably not be enough. I'm going to file a ticket. > In case > something needs to be tested, please let me know. > > Frank > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From BLC at JUB.COM Thu Nov 8 15:30:46 2007 From: BLC at JUB.COM (Bruce Cheney) Date: Thu, 8 Nov 2007 16:30:46 -0700 Subject: System Configuration - [SPAM] Email found in subject In-Reply-To: <4BF377919225F449BB097CB76FFE9BC8019885C8@ptolemy.topozone.com> Message-ID: Ed, I very much appreciate your help. Very insightful. Yes expectations are 50,000 users at least at the same time. Disk subsystem RAID 10 and NTFS. Changing the mode sounds like a very good idea and I am guilty as charged - I am writing to temporary files on the server. I have a gut feel that this is the big slowdown in our application. I could not find where to change the mode that you talk about. Somehow slipping through the fingers . . . I must have to alter this process that I am using: 1. Image generated using PHP with calls $map->draw() and $image->saveWebImage() 2. Definition of storage location in the mapfile by properties ImagePath and ImageURL 3. The image name and path are substituted in my HTML code generation by referencing the name generated in 1 above. What part am I missing? Can I somehow have the image generated and saved on the users machine directly and reference that instead? Now I am showing some lack of understanding for sure. All your suggestions are great. Makes perfect sense, anything that can use direct access instead of having to filter and process improves the speed. Thanks again. Bruce Cheney Gateway Mapping, Inc www.gatewaymapping.com 801.221.7656 ________________________________ From: Ed McNierney [mailto:ed at topozone.com] Sent: Thursday, November 08, 2007 2:59 PM To: Bruce Cheney; MAPSERVER-USERS at LISTS.UMN.EDU Subject: RE: [UMN_MAPSERVER-USERS] System Configuration - [SPAM] Email found in subject Bruce - Thanks; that's a good start. 5,000 requests at a time is a lot. If your estimate the average user will look at a map for 10 seconds before requesting another one, you're talking about 50,000 simultaneous human users. Thanks for posting the map file - that helps. There is one huge thing you should be aware of and think about right away - the difference between mode=browse and mode=map. If you are using browse mode with an HTML template (as it appears you are) you should reconsider that decision. When you use MapServer in browse mode, it needs to generate the map image, legend image, etc. and then write them all to a local disk before returning an HTML template to the client with the URLs of those images embedded in it. Writing to disk is the slowest thing you can do on your server. Having 5,000 simultaneous disk writes, with simultaneous reads to the same disk, is very nearly pure evil. That is a huge drag on performance. You really can't sustain nearly as many users on a given machine in browse mode as you could in map mode. What kind of disk subsystem is being used for the temp files? Map mode (mode=map) is a simple HTTP request for an image, and the image, after being built, is sent directly to the client with no disk I/O involved. Much nicer. Much faster. If you must use browse mode, then I'd suggest you create a RAM disk to hold the temp images, with appropriate monitoring to clean out old files promptly. But can you pre-build a set of legends, etc. so you can just embed those and not crank them out every time? You can also get some benefit from storing our input shapefiles on a RAM disk, but don't devote any RAM to that purpose if you're still writing temp files to hard disk. Let me first toss off a few generic suggestions that probably won't help much but are worth doing: 1. Get rid of unused fonts in your font file. MapServer will reach out and touch each one for each map request. 2. If your shapefiles don't change often, preprocess them to create a separate shapefile for each CLASS, so you don't have to filter as much. 3. If you must use CLASSes, organize them so the most commonly-used class comes first in each LAYER. 4. If you have a certain number of combinations of shapefiles used in a given request, create multiple map files with only those layers. For example, if your 12 layers are one set of 4 base layers that are always used, and then 8 more layers only one of which is displayed at a time, create 8 map files, each with only 5 layers instead of 12 - the four base layers and one specific overlay layer. Then use your application code to figure out which map file to select. And make sure you're using shptree to generate spatial indexes for all your shapefiles! This looks like it should be an application capable of running pretty darn quickly. - Ed Ed McNierney Chief Mapmaker Demand Media / TopoZone.com 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed at topozone.com Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Bruce Cheney Sent: Thursday, November 08, 2007 12:17 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] System Configuration Many good questions. I will see if I can catch them all. A bit on the nature of the application. * We are only using vector data (we assumed that the raster would slow it down). * We are serving many different maps stored separately with the same composition of layers. Each map has 6 layers (4 polygon and 2 point layers for labeling). * Each of the different map sets has differing quantities of features. For the most significant layers they average around 10,000 features but may be as high as 100,000. * A majority of the requests are to display a small area of one of the maps so the rendering focuses in to a few features. The user will query a database which will allow for viewing the map that is zoomed to the area of interest. * No layer reprojecting (we assumed this would also slow it down). * The output map is PNG with dimensions 419 X 403. * We are using PHP_mapscript to generate the requests. The parameters for the map generation come from a database and the user requested location. So there are a few lines of code to find the location on the map and generate the images. * The mapfile contains about 12 layers. Several layers to display the primary polygon layer thematically and a couple extra to show the polygons with outlines. * Data is stored in Shapefiles I made attempts to stream-line the use of extra features to ensure the speed. I certainly may be using items that hurt instead of help. Here is the mapfile. Now that I look at the mapfile there may be a couple items that I originally had intended to use but are now just relics and time wasters. <> Now as for the users. We are assuming 5000 simultaneous - all at the same instant. This would assume a substantially larger group of users accessing the site at the same time. We assume this to be the peak stress for Stage 1 of the app. Bruce - My channeling sensors went off when Frank rang . It is certainly true that a bit of experience and contemplation can help you discover optimization opportunities that aren't immediately self-evident. Can you describe the nature of your map application? Are you using raster data, vector data, or both? What size is your data, in numbers of features and/or files? What kind of disk subsystem is being used? Is there layer reprojection going on? Generalizations are rarely helpful (except for this one). It's like being told the average man is 5' 7" tall - it tells you nothing about how tall I am. MapServer performance depends on a number of factors, but the best place to start is a detailed understanding of what exactly you're trying to do with MapServer. It would be most helpful to us if you could post your map file and a sample URL request, preferably one that is externally (publicly) visible. And can you define what you mean by "simultaneous" users? Do you mean 5,000 map requests all being generated at exactly the same time? Or do you mean 5,000 human users asking for a new map every X seconds or so? And if the latter, what value are you using for X? - Ed Ed McNierney Chief Mapmaker Demand Media / TopoZone.com 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: 978-251-4242, Fax: 978-251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU ] On Behalf Of Frank Warmerdam Sent: Wednesday, November 07, 2007 8:26 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] System Configuration Bruce Cheney wrote: > We have been given a requirement to support 5000 simultaneous users. > What we are finding is that MapServer bogs down around 400 > simultaneous users on a test machine. It looks like it is likely > slowing because of the threading issue. We haven't tested on a > production machine but are estimating that it should support double > what are test machine could handle (double the processor and RAM). So > at least 800 simultaneous users. Divide that out with the 5000 and we > need a minimum of 6-7 web servers supporting MapServer. We will > certainly scale this as is needed but I do need some idea going in as to what is going to be required. Bruce, I'm curious how many map requests per minute you expect 800 simultaneous users to generate. > Does this sound like results that others expect or is this quantity > above what others have tested? Also Does anyone know of a solution in > the works to run make mapserver thread safe and/or up the overall > speed? I am not complaining about the speed just wondering what is in > the works. In various aspects MapServer is already thread safe though there are also known "unsafe" components, and some components are wrapped by big locks that significantly reduce the value of multiple threads. Progress occurs by fits and starts, largely based on support from user organizations depending on multi-threading. For instance, in 5.0 I implement locking around OGR for a client of mine in Australia. (This is a subtle way of suggesting you hire someone to make this happen if it is what you want!) All this aside, by default MapServer is *massively multi-threaded*. I say this since the default operation is to start a new cgi instance for each request - each is essentially an independent thread. Of course, the downside of whole-process cgi style multithreading is that very little context is preserved from request to request. Map files, data file headers, etc all need to be reparsed for each request. My point here is that you need to think carefully about the application flow to take much advantage of multiple threading within a single process. Also, if I may channel Ed, if you wanted to squeeze more performance out of mapserver, you really need to start by figuring out what it is spending it's time doing. Where is it spending it's time? o waiting for disk? (perhaps you are reading more data than you need?) o rendering (perhaps your data is overdense, or you are using expensive rendering options?) o parsing mapfiles (perhaps you mapfile has too many unused layers?) etc. 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 | President OSGeo, http://osgeo.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From BLC at JUB.COM Thu Nov 8 16:09:26 2007 From: BLC at JUB.COM (Bruce Cheney) Date: Thu, 8 Nov 2007 17:09:26 -0700 Subject: System Configuration - [SPAM] Email found in subject - [SPAM] Email found in subject In-Reply-To: <20071108235726.GA31983@metacarta.com> Message-ID: Christopher, Thanks for your suggestions. >How often does your data change? We will be serving up live datasets that change constantly. But to begin with we are expecting to do an update once a week or once a month for each dataset. I will look at your suggestions regardless to see how they might fit the process. Bruce Cheney Gateway Mapping, Inc www.gatewaymapping.com 801.221.7656 -----Original Message----- From: Christopher Schmidt [mailto:crschmidt at metacarta.com] Sent: Thursday, November 08, 2007 4:57 PM To: Bruce Cheney Cc: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] System Configuration - [SPAM] Email found in subject - [SPAM] Email found in subject On Thu, Nov 08, 2007 at 04:30:46PM -0700, Bruce Cheney wrote: > Ed, > > I very much appreciate your help. Very insightful. Yes expectations > are 50,000 users at least at the same time. How often does your data change? You might think about using a tiling client and a tile caching solution on the server if it changes infrequently... TileCache has been known to serve up to a couple hundred requests a second, but that won't provide anywhere near the level of performance you're looking for, I suppose: I've never served more than a steady stream of ~200-300 requests a second with Apache, and that was a pretty unusual circumstance. I recommend you sit down with a single user, have them browse around your site, and track their requests a second. In doing this at MetaCarta, we found that our users using a specific application only generated 1-2 actions every minute -- meaning that with 50,000 users you might be getting down to something sustainable ... I'd personally use OpenLayers and TileCache -- serving up pre-rendered tiles from disk is going to be significantly easier to scale than serving up rendeered data from shapefiles, I think -- but this may just be my lack of experience with serving data fast. Regards, -- Christopher Schmidt MetaCarta From crschmidt at METACARTA.COM Thu Nov 8 15:57:26 2007 From: crschmidt at METACARTA.COM (Christopher Schmidt) Date: Thu, 8 Nov 2007 18:57:26 -0500 Subject: System Configuration - [SPAM] Email found in subject In-Reply-To: Message-ID: On Thu, Nov 08, 2007 at 04:30:46PM -0700, Bruce Cheney wrote: > Ed, > > I very much appreciate your help. Very insightful. Yes expectations are > 50,000 users at least at the same time. How often does your data change? You might think about using a tiling client and a tile caching solution on the server if it changes infrequently... TileCache has been known to serve up to a couple hundred requests a second, but that won't provide anywhere near the level of performance you're looking for, I suppose: I've never served more than a steady stream of ~200-300 requests a second with Apache, and that was a pretty unusual circumstance. I recommend you sit down with a single user, have them browse around your site, and track their requests a second. In doing this at MetaCarta, we found that our users using a specific application only generated 1-2 actions every minute -- meaning that with 50,000 users you might be getting down to something sustainable ... I'd personally use OpenLayers and TileCache -- serving up pre-rendered tiles from disk is going to be significantly easier to scale than serving up rendeered data from shapefiles, I think -- but this may just be my lack of experience with serving data fast. Regards, -- Christopher Schmidt MetaCarta From Dejan.Gambin at PULA.HR Thu Nov 8 23:30:59 2007 From: Dejan.Gambin at PULA.HR (Gambin Dejan) Date: Fri, 9 Nov 2007 08:30:59 +0100 Subject: aaigrid display problem Message-ID: Hi, Unfortunatelly, I know almost nothing about the Arc/Info ASCII Grid format, but I need to display it correctly if possible. I have a sample .asc file. I am trying to display it and it works but it gets displayed in grayscale, no color present and it should since I have a jpeg example that is different. gdalinfo says: Driver: AAIGrid/Arc/Info ASCII Grid Files: LDAY.asc Size is 223, 223 Coordinate System is `' Origin = (5406655.000000000000000,4970785.000000000000000) Pixel Size = (10.000000000000000,-10.000000000000000) Corner Coordinates: Upper Left ( 5406655.000, 4970785.000) Lower Left ( 5406655.000, 4968555.000) Upper Right ( 5408885.000, 4970785.000) Lower Right ( 5408885.000, 4968555.000) Center ( 5407770.000, 4969670.000) Band 1 Block=223x1 Type=Float32, ColorInterp=Undefined NoData Value=-999 I see the "ColorInterp =Undefined" but since I have no knowledge on this format I don't know if this is the reason. Any help would be greatly appreciated Regards, dejan -------------- next part -------------- An HTML attachment was scrubbed... URL: From taka_www at SINAMAN.COM Thu Nov 8 23:37:22 2007 From: taka_www at SINAMAN.COM (=?BIG5?Q?Taka_Wong?=) Date: Fri, 9 Nov 2007 01:37:22 -0600 Subject: Display point with multiple attributes Message-ID: Dear All I have a question about the attribute display on each pt. It may be a little bit complicated. Now, there are 3 men, man 1 : red blue man 2 : red man 3 : blue According to my layer definition: LAYER NAME MAN TYPE POINT .... CLASS .... EXPRESSION ('[LAYER1]' = 'R,B') SYMBOL 'symbols/label1.gif' .... END CLASS .... EXPRESSION ('[LAYER1]' = 'R') SYMBOL 'symbols/label2.gif' .... END CLASS .... EXPRESSION ('[LAYER1]' = 'B') SYMBOL 'symbols/label3.gif' .... END .... END If I search for men carrying red ball, it results Man 1's symbol is label1.gif Man 2's symbol is label2.gif However, I suppose that if I only search for red ball, all points' symbol would be label2.gif i.e. Man 1's symbol is label2.gif Man 2's symbol is label2.gif Similarly, if I search for men carrying blue ball, it is supposed to results Man 1's symbol is label3.gif Man 3's symbol is label3.gif And, if I search for men carrying blue ball or red, it is supposed to results Man 1's symbol is label1.gif Man 2's symbol is label2.gif Man 3's symbol is label3.gif are there any person has experiensed such case before? Please advice me. Thanks a lot. Regards Taka Wong From Markus.Weissmann at LGN.NIEDERSACHSEN.DE Fri Nov 9 00:14:50 2007 From: Markus.Weissmann at LGN.NIEDERSACHSEN.DE (=?iso-8859-1?Q?=22Wei=DFmann=2C_Markus=22?=) Date: Fri, 9 Nov 2007 09:14:50 +0100 Subject: color palettes Message-ID: Hello, i noticed that mapserver generate a fix color palette for raster data requests whatever the color palette from the original raster datas says. So i want to influence the color palette of the response picture. I try to instruct the GDAL reader to apply a custom LUT (lookup table). I have read (http://mapserver.gis.umn.edu/docs/howto/raster_data/#special-processing-dir ectives ) that one can achieve this with following entry: = :[,:]* I tried it (inline specified): LAYER NAME test PROCESSING "LUT=2:74" TYPE RASTER ... END #layer Another trying was this: OUTPUTFORMAT NAME png DRIVER "GD/PNG" EXTENSION "png" FORMATOPTION "LUT=2:74" END But there is not any effect. What am i doing wrong? Regards Markus Wei?mann -------------- next part -------------- An HTML attachment was scrubbed... URL: From Frank.Steggink at BENTLEY.COM Fri Nov 9 05:43:42 2007 From: Frank.Steggink at BENTLEY.COM (Frank Steggink) Date: Fri, 9 Nov 2007 08:43:42 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: <47338DDE.9070300@dmsolutions.ca> Message-ID: Hello Yewondwossen, Sorry, no improvement here. I'm not getting an error, but I got a time out, while posting (DescribeFeatureType) to the original server URL (http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en vdat/config.map). Also, the other service I mentioned, http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp, uses this same URL as online resources, which already gave the template error. I'm a bit out of options right now. As already mentioned, when I'm using GET, then everything works fine, so our client will be able to access MapServer. I'll try a few other MapServer WFS's, and see what they do. (Using POST, and the online resource URL's.) There are quite a lot of them online. If they all give the same result, then I'm going to file a bug in Trac. It is no coincidence if several servers, which are set up independently, all have the same problem. Frank -----Original Message----- From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] Sent: Thursday, November 08, 2007 17:30 To: Frank Steggink Cc: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Hi There, WFS POST is supported by MapServer. Looking into this thread, you mentioned a couple of URLS and I have tried the follwing one : "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en vdat/config.map" I have tried WFS post requests describefeature and getfeature with this service and It responds correctly. It is a Mapserve 4.8.3. I am guessing that there is something 'wrong" with the service accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx where the post requests are not maybe transfered properly to Mapserver. Hopefully this helps. Best Regards, Frank Steggink wrote: > Hello Daniel, > > Thanks for the reply. I've tried your suggestion, but unfortunately it > didn't work. I'm getting the following ServiceException: > > xmlns="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/ogc > http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION > parameter missing > > > > The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the > post data is the same as in the original message. > > It really looks like MapServer only accepts GET request for WFS. So, > the simple fix you suggested will probably not be enough. I'm going to file a ticket. > In case > something needs to be tested, please let me know. > > Frank > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From yassefa at DMSOLUTIONS.CA Fri Nov 9 06:13:27 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Fri, 9 Nov 2007 09:13:27 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: <234F456FBC8AF54BA08AB663CA86D36906DDD082@extonpo2.bentley.com> Message-ID: Frank.Steggink at bentley.com wrote: > Hello Yewondwossen, > > Sorry, no improvement here. I'm not getting an error, but I got a time > out, while posting (DescribeFeatureType) to the original server URL > (http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en > vdat/config.map). > Also, the other service I mentioned, > http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp, uses this same URL as online > resources, which already gave the template error. > Not sure why would that be. I just retried it (my client is php script using curl to send a post request), and both DescribeFeature and GetFeature return properly. If necessary I can provide the test script. > I'm a bit out of options right now. As already mentioned, when I'm using > GET, then everything works fine, so our client will be able to access > MapServer. I'll try a few other MapServer WFS's, and see what they do. > (Using POST, and the online resource URL's.) There are quite a lot of > them online. If they all give the same result, then I'm going to file a > bug in Trac. It is no coincidence if several servers, which are set up > independently, all have the same problem. > Ok that works. Best Regards, > Frank > > -----Original Message----- > From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] > Sent: Thursday, November 08, 2007 17:30 > To: Frank Steggink > Cc: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template > provided" error > > Hi There, > > WFS POST is supported by MapServer. Looking into this thread, you > mentioned a couple of URLS and I have tried the follwing one : > "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en > vdat/config.map" > > I have tried WFS post requests describefeature and getfeature with > this service and It responds correctly. It is a Mapserve 4.8.3. > > I am guessing that there is something 'wrong" with the service > accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx > where the post requests are not maybe transfered properly to Mapserver. > > Hopefully this helps. > > Best Regards, > > > Frank Steggink wrote: >> Hello Daniel, >> >> Thanks for the reply. I've tried your suggestion, but unfortunately it > >> didn't work. I'm getting the following ServiceException: >> >> > xmlns="http://www.opengis.net/ogc" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://www.opengis.net/ogc >> http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> >> >> msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION >> parameter missing >> >> >> >> The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the > >> post data is the same as in the original message. >> >> It really looks like MapServer only accepts GET request for WFS. So, >> the simple fix you suggested will probably not be enough. I'm going to > file a ticket. >> In case >> something needs to be tested, please let me know. >> >> Frank >> > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- > > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From fsozzi at INTERCAD.CH Fri Nov 9 06:18:21 2007 From: fsozzi at INTERCAD.CH (Francesco Sozzi) Date: Fri, 9 Nov 2007 15:18:21 +0100 Subject: labels: bad positioning Message-ID: Hi all, I have a point layer with text on several lines (from Oracle where each line is separated with CHR(10) || CHR(13)). In my layer definition I use POSITION LR, so I expect to have the first line just below insertion point. The problem is that more lines I have more space mapserver puts between insertion point and the first line of the string. FIeld strings are all trimmed. Any suggestions? Bets regards Francesco -------------- next part -------------- An HTML attachment was scrubbed... URL: From Frank.Steggink at BENTLEY.COM Fri Nov 9 06:22:38 2007 From: Frank.Steggink at BENTLEY.COM (Frank Steggink) Date: Fri, 9 Nov 2007 09:22:38 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: A<234F456FBC8AF54BA08AB663CA86D36906DDD082@extonpo2.bentley.com> Message-ID: Follow up. I've found and tested a few services: 1. http://wfs.alaskamapped.org/inventory?SERVICE=WFS&VERSION=1.0.0&REQUEST= GetCapabilities& (from a post yesterday, MapServer 5.0 RC 2): I got an internal server error (500) with DescribeFeatureType/POST. The online resource URL is the same. 2. http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap?SERVICE=WFS&VERSION=1.0.0& REQUEST=GetCapabilities& (MapServer 4.6.0): DescribeFeatureType/POST and GetFeature/POST work here. As I mentioned before, I'm using the online resource URL's, which are different than the base URL. 3. http://excise.pyr.ec.gc.ca/cgi-bin/mapserv.exe?map=/LocalApps/Mapsurfer/ PYRWQMP.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities& (MapServer 4.8.1): The client timed out at DescribeFeatureType/POST. (GET, which I did in the browser, responded pretty quick.) After 5 minutes I finally got a response from the server, a 502 error (Bad Gateway), with a CGI application timeout. This is probably a configuration error, since the online resource is different. It looks indeed that this is more due to configuration errors, than that it is actually an error by MapServer. Since I have no experience with Mapserver itself, it is hard to tell. Maybe it is coincident or not, but the oldest Mapserver version seems to work best. Yewondwossen, replying to the mail you just sent, can you send the test script? Then I can see what are the actual differences. I have logged my requests with Fiddler, and saved the sessions. In case you're interested, I can send it to you as well. Frank -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Steggink Sent: Friday, November 09, 2007 08:44 To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Hello Yewondwossen, Sorry, no improvement here. I'm not getting an error, but I got a time out, while posting (DescribeFeatureType) to the original server URL (http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en vdat/config.map). Also, the other service I mentioned, http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp, uses this same URL as online resources, which already gave the template error. I'm a bit out of options right now. As already mentioned, when I'm using GET, then everything works fine, so our client will be able to access MapServer. I'll try a few other MapServer WFS's, and see what they do. (Using POST, and the online resource URL's.) There are quite a lot of them online. If they all give the same result, then I'm going to file a bug in Trac. It is no coincidence if several servers, which are set up independently, all have the same problem. Frank -----Original Message----- From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] Sent: Thursday, November 08, 2007 17:30 To: Frank Steggink Cc: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Hi There, WFS POST is supported by MapServer. Looking into this thread, you mentioned a couple of URLS and I have tried the follwing one : "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en vdat/config.map" I have tried WFS post requests describefeature and getfeature with this service and It responds correctly. It is a Mapserve 4.8.3. I am guessing that there is something 'wrong" with the service accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx where the post requests are not maybe transfered properly to Mapserver. Hopefully this helps. Best Regards, Frank Steggink wrote: > Hello Daniel, > > Thanks for the reply. I've tried your suggestion, but unfortunately it > didn't work. I'm getting the following ServiceException: > > xmlns="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/ogc > http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION > parameter missing > > > > The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the > post data is the same as in the original message. > > It really looks like MapServer only accepts GET request for WFS. So, > the simple fix you suggested will probably not be enough. I'm going to file a ticket. > In case > something needs to be tested, please let me know. > > Frank > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From ed at TOPOZONE.COM Fri Nov 9 06:25:13 2007 From: ed at TOPOZONE.COM (Ed McNierney) Date: Fri, 9 Nov 2007 09:25:13 -0500 Subject: System Configuration - [SPAM] Email found in subject In-Reply-To: A Message-ID: Bruce - I am not a MapScript user, so we can hope someone else will help you with that step. A RAID 10 array is about your best choice for this kind of situation (the more disks the better), but you're fundamentally limited in that only so many simultaneous reads/writes can be handled by one disk. And since disk seeks are the slowest thing you can do, that's going to hang you up. If you have a disk with a 10ms random seek time, and you're jumping around doing random, small, reads and writes to satisfy many users, then even if the reads and writes themselves are free you're not going to be able to do more than 100 10ms seeks a second. Switching from mode=browse to mode=map (I'm using the CGI querystring parameter syntax) will make a huge difference - although it may well expose something else entirely as your new bottleneck! - Ed Ed McNierney Chief Mapmaker Demand Media / TopoZone.com 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed at topozone.com Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Bruce Cheney Sent: Thursday, November 08, 2007 6:31 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] System Configuration - [SPAM] Email found in subject Ed, I very much appreciate your help. Very insightful. Yes expectations are 50,000 users at least at the same time. Disk subsystem RAID 10 and NTFS. Changing the mode sounds like a very good idea and I am guilty as charged - I am writing to temporary files on the server. I have a gut feel that this is the big slowdown in our application. I could not find where to change the mode that you talk about. Somehow slipping through the fingers . . . I must have to alter this process that I am using: 1. Image generated using PHP with calls $map->draw() and $image->saveWebImage() 2. Definition of storage location in the mapfile by properties ImagePath and ImageURL 3. The image name and path are substituted in my HTML code generation by referencing the name generated in 1 above. What part am I missing? Can I somehow have the image generated and saved on the users machine directly and reference that instead? Now I am showing some lack of understanding for sure. All your suggestions are great. Makes perfect sense, anything that can use direct access instead of having to filter and process improves the speed. Thanks again. Bruce Cheney Gateway Mapping, Inc www.gatewaymapping.com 801.221.7656 ________________________________ From: Ed McNierney [mailto:ed at topozone.com] Sent: Thursday, November 08, 2007 2:59 PM To: Bruce Cheney; MAPSERVER-USERS at LISTS.UMN.EDU Subject: RE: [UMN_MAPSERVER-USERS] System Configuration - [SPAM] Email found in subject Bruce - Thanks; that's a good start. 5,000 requests at a time is a lot. If your estimate the average user will look at a map for 10 seconds before requesting another one, you're talking about 50,000 simultaneous human users. Thanks for posting the map file - that helps. There is one huge thing you should be aware of and think about right away - the difference between mode=browse and mode=map. If you are using browse mode with an HTML template (as it appears you are) you should reconsider that decision. When you use MapServer in browse mode, it needs to generate the map image, legend image, etc. and then write them all to a local disk before returning an HTML template to the client with the URLs of those images embedded in it. Writing to disk is the slowest thing you can do on your server. Having 5,000 simultaneous disk writes, with simultaneous reads to the same disk, is very nearly pure evil. That is a huge drag on performance. You really can't sustain nearly as many users on a given machine in browse mode as you could in map mode. What kind of disk subsystem is being used for the temp files? Map mode (mode=map) is a simple HTTP request for an image, and the image, after being built, is sent directly to the client with no disk I/O involved. Much nicer. Much faster. If you must use browse mode, then I'd suggest you create a RAM disk to hold the temp images, with appropriate monitoring to clean out old files promptly. But can you pre-build a set of legends, etc. so you can just embed those and not crank them out every time? You can also get some benefit from storing our input shapefiles on a RAM disk, but don't devote any RAM to that purpose if you're still writing temp files to hard disk. Let me first toss off a few generic suggestions that probably won't help much but are worth doing: 1. Get rid of unused fonts in your font file. MapServer will reach out and touch each one for each map request. 2. If your shapefiles don't change often, preprocess them to create a separate shapefile for each CLASS, so you don't have to filter as much. 3. If you must use CLASSes, organize them so the most commonly-used class comes first in each LAYER. 4. If you have a certain number of combinations of shapefiles used in a given request, create multiple map files with only those layers. For example, if your 12 layers are one set of 4 base layers that are always used, and then 8 more layers only one of which is displayed at a time, create 8 map files, each with only 5 layers instead of 12 - the four base layers and one specific overlay layer. Then use your application code to figure out which map file to select. And make sure you're using shptree to generate spatial indexes for all your shapefiles! This looks like it should be an application capable of running pretty darn quickly. - Ed Ed McNierney Chief Mapmaker Demand Media / TopoZone.com 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed at topozone.com Phone: +1 (978) 251-4242 Fax: +1 (978) 251-1396 From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Bruce Cheney Sent: Thursday, November 08, 2007 12:17 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] System Configuration Many good questions. I will see if I can catch them all. A bit on the nature of the application. * We are only using vector data (we assumed that the raster would slow it down). * We are serving many different maps stored separately with the same composition of layers. Each map has 6 layers (4 polygon and 2 point layers for labeling). * Each of the different map sets has differing quantities of features. For the most significant layers they average around 10,000 features but may be as high as 100,000. * A majority of the requests are to display a small area of one of the maps so the rendering focuses in to a few features. The user will query a database which will allow for viewing the map that is zoomed to the area of interest. * No layer reprojecting (we assumed this would also slow it down). * The output map is PNG with dimensions 419 X 403. * We are using PHP_mapscript to generate the requests. The parameters for the map generation come from a database and the user requested location. So there are a few lines of code to find the location on the map and generate the images. * The mapfile contains about 12 layers. Several layers to display the primary polygon layer thematically and a couple extra to show the polygons with outlines. * Data is stored in Shapefiles I made attempts to stream-line the use of extra features to ensure the speed. I certainly may be using items that hurt instead of help. Here is the mapfile. Now that I look at the mapfile there may be a couple items that I originally had intended to use but are now just relics and time wasters. <> Now as for the users. We are assuming 5000 simultaneous - all at the same instant. This would assume a substantially larger group of users accessing the site at the same time. We assume this to be the peak stress for Stage 1 of the app. Bruce - My channeling sensors went off when Frank rang . It is certainly true that a bit of experience and contemplation can help you discover optimization opportunities that aren't immediately self-evident. Can you describe the nature of your map application? Are you using raster data, vector data, or both? What size is your data, in numbers of features and/or files? What kind of disk subsystem is being used? Is there layer reprojection going on? Generalizations are rarely helpful (except for this one). It's like being told the average man is 5' 7" tall - it tells you nothing about how tall I am. MapServer performance depends on a number of factors, but the best place to start is a detailed understanding of what exactly you're trying to do with MapServer. It would be most helpful to us if you could post your map file and a sample URL request, preferably one that is externally (publicly) visible. And can you define what you mean by "simultaneous" users? Do you mean 5,000 map requests all being generated at exactly the same time? Or do you mean 5,000 human users asking for a new map every X seconds or so? And if the latter, what value are you using for X? - Ed Ed McNierney Chief Mapmaker Demand Media / TopoZone.com 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: 978-251-4242, Fax: 978-251-1396 ed at topozone.com -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU ] On Behalf Of Frank Warmerdam Sent: Wednesday, November 07, 2007 8:26 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] System Configuration Bruce Cheney wrote: > We have been given a requirement to support 5000 simultaneous users. > What we are finding is that MapServer bogs down around 400 > simultaneous users on a test machine. It looks like it is likely > slowing because of the threading issue. We haven't tested on a > production machine but are estimating that it should support double > what are test machine could handle (double the processor and RAM). So > at least 800 simultaneous users. Divide that out with the 5000 and we > need a minimum of 6-7 web servers supporting MapServer. We will > certainly scale this as is needed but I do need some idea going in as to what is going to be required. Bruce, I'm curious how many map requests per minute you expect 800 simultaneous users to generate. > Does this sound like results that others expect or is this quantity > above what others have tested? Also Does anyone know of a solution in > the works to run make mapserver thread safe and/or up the overall > speed? I am not complaining about the speed just wondering what is in > the works. In various aspects MapServer is already thread safe though there are also known "unsafe" components, and some components are wrapped by big locks that significantly reduce the value of multiple threads. Progress occurs by fits and starts, largely based on support from user organizations depending on multi-threading. For instance, in 5.0 I implement locking around OGR for a client of mine in Australia. (This is a subtle way of suggesting you hire someone to make this happen if it is what you want!) All this aside, by default MapServer is *massively multi-threaded*. I say this since the default operation is to start a new cgi instance for each request - each is essentially an independent thread. Of course, the downside of whole-process cgi style multithreading is that very little context is preserved from request to request. Map files, data file headers, etc all need to be reparsed for each request. My point here is that you need to think carefully about the application flow to take much advantage of multiple threading within a single process. Also, if I may channel Ed, if you wanted to squeeze more performance out of mapserver, you really need to start by figuring out what it is spending it's time doing. Where is it spending it's time? o waiting for disk? (perhaps you are reading more data than you need?) o rendering (perhaps your data is overdense, or you are using expensive rendering options?) o parsing mapfiles (perhaps you mapfile has too many unused layers?) etc. 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 | President OSGeo, http://osgeo.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at MMMTIKE.FI Fri Nov 9 06:36:49 2007 From: Jukka.Rahkonen at MMMTIKE.FI (Rahkonen Jukka) Date: Fri, 9 Nov 2007 16:36:49 +0200 Subject: WFS POST requests: "No template provided" error Message-ID: Hi, I made a test with OpenJUMP WFS plugin (http://openjump.org) that is using only POST method. For the first link GetCapabilities goes OK, but the plugin cannot parse the response correctly. Because of that I cannot send DescribeFeatureType, but when I tried GetFeature I got also "No template provided" error. This is the request that OpenJUMP plugin is generating: And this is the response: MapServer Messagemapserv(): Web application error. No template provided.
The result is the same with the other URL. OpenJUMP plugin was developed against GeoServer version 1.5, and with that it works rather well, despite sometimes parsing errors with certain data types (time, decimal). However, is has always had problems with all MapServer based WFS services, including my own ones. As its best I can get GetCapabilities and even GetFeature through, but there has always been some problems with parsing the capabilities right, and with DescribeFeatureType. The plugin has some tools for debugging so if someone sends me URLs I may try those and see what happens. -Jukka Rahkonen- ________________________________ L?hett?j?: UMN MapServer Users List puolesta: Frank Steggink L?hetetty: pe 9.11.2007 15:43 Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU Aihe: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Hello Yewondwossen, Sorry, no improvement here. I'm not getting an error, but I got a time out, while posting (DescribeFeatureType) to the original server URL (http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en vdat/config.map). Also, the other service I mentioned, http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp, uses this same URL as online resources, which already gave the template error. I'm a bit out of options right now. As already mentioned, when I'm using GET, then everything works fine, so our client will be able to access MapServer. I'll try a few other MapServer WFS's, and see what they do. (Using POST, and the online resource URL's.) There are quite a lot of them online. If they all give the same result, then I'm going to file a bug in Trac. It is no coincidence if several servers, which are set up independently, all have the same problem. Frank -----Original Message----- From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] Sent: Thursday, November 08, 2007 17:30 To: Frank Steggink Cc: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Hi There, WFS POST is supported by MapServer. Looking into this thread, you mentioned a couple of URLS and I have tried the follwing one : "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en vdat/config.map" I have tried WFS post requests describefeature and getfeature with this service and It responds correctly. It is a Mapserve 4.8.3. I am guessing that there is something 'wrong" with the service accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx where the post requests are not maybe transfered properly to Mapserver. Hopefully this helps. Best Regards, Frank Steggink wrote: > Hello Daniel, > > Thanks for the reply. I've tried your suggestion, but unfortunately it > didn't work. I'm getting the following ServiceException: > > xmlns="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/ogc > http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION > parameter missing > > > > The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the > post data is the same as in the original message. > > It really looks like MapServer only accepts GET request for WFS. So, > the simple fix you suggested will probably not be enough. I'm going to file a ticket. > In case > something needs to be tested, please let me know. > > Frank > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From Frank.Steggink at BENTLEY.COM Fri Nov 9 06:37:06 2007 From: Frank.Steggink at BENTLEY.COM (Frank Steggink) Date: Fri, 9 Nov 2007 09:37:06 -0500 Subject: Problems with WFS and ARCGIS In-Reply-To: A Message-ID: Hello Jay, I've tested your WFS service with our client, and I can import the data just fine. There were 609 features, mostly rectangles, spread over all Alaska. The responses of your server, and the GML, look good to me. I would guess it is an ArcGIS/ArcMap problem, and not a problem with your Mapserver configuration. The feature ID's in the GML are alphanumeric, like "SDMI_Inventory.174". From the error message which is generated, it seems that this might be the problem, but alphanumeric ID's are perfectly valid for GML. Note that I don't know much about MapServer, let alone ArcGIS/ArcMap, so I can't help you with any problems related to the software. Frank -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jay Cable Sent: Thursday, November 08, 2007 13:14 To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Problems with WFS and ARCGIS Hello List, I have a question in regards to serving up data via WFS from mapserver to desktop gis clients like Arcmap. I have wfs server (the url is http://wfs.alaskamapped.org//inventory? ). It appears to work, but a number of things that folks normally do in arcgis/arcmap/arcwhatever with other data sources do not work and generate a "This operation failed because the database table does not have a numeric index" error message. I am somewhat baffled by this, as this error message is generated when you use the "Select Feature" tool or try to view the WFS as a table - pretty basic stuff that users will want to do. I am not sure if this is a problem with my mapfile, a problem with arcgis, or just a limit of using (or my understanding of) WFS. Any advice would be greatly appreciated. Thanks, -Jay Here is my mapfile (hopefully posting something is long is not bad form for this list - if so let me know off line and i will not do it again) NAME SDMI_Inventory STATUS ON SIZE 400 300 EXTENT -180 0 180 90 UNITS METERS IMAGECOLOR 255 255 255 DEBUG ON WEB METADATA "wfs_title" "SDMI Inventory" ## REQUIRED "wfs_onlineresource" "http://wfs.alaskamapped.org/inventory?" ## Recommended "wfs_srs" "EPSG:4326" ## Recommended END END PROJECTION "init=epsg:102006" END LAYER NAME SDMI_Inventory METADATA "wfs_title" "SDMI Inventory" ## REQUIRED "wfs_abstract" "This WFS service provides information about the data in the SDMI holdings. For more information, please see http://www.alaskamapped.org or email wms at alaskamapped.org." "wfs_accessconstraints" "None." "wfs_extent" "-180 0 180 90" "wfs_srs" "EPSG:4326" ## Recommended "gml_featureid" "id" ## REQUIRED "gml_include_items" "all" ## Optional (serves all attributes for layer) "gml_geometries" "footprints" "gml_footprints_type" "polygon" "gml_objectid_type" "integer" "gml_id_type" "integer" END TYPE POLYGON STATUS ON PROJECTION "init=epsg:4326" END CONNECTIONTYPE POSTGIS CONNECTION "host=XXXX dbname=XXXX user=XXXXX" DATA "llgeom from (select llgeom,footprints.id as objectid, footprints.id as id, scene_gid as scene_id, scraps.downloadable as downloadable,start_time,end_time,source_res, sources.name as contact, licenses.web_label as license_type, 'http://browse.alaskamapped.org/footprint/download/'||footprints.id as url FROM footprints, licenses, scraps, sources where footprints.scrap_id=scraps.id and licenses.id=scraps.license_id and scraps.source_id = sources.id ) as foo using unique id using SRID=4326" PROCESSING "CLOSE_CONNECTION=DEFER" DEBUG ON DUMP TRUE ## REQUIRED END # Layer END # Map File From warmerdam at POBOX.COM Fri Nov 9 06:39:04 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Fri, 9 Nov 2007 09:39:04 -0500 Subject: aaigrid display problem In-Reply-To: Message-ID: Gambin Dejan wrote: > Hi, > > > > Unfortunatelly, I know almost nothing about the Arc/Info ASCII Grid > format, but I need to display it correctly if possible. I have a sample > .asc file. I am trying to display it and it works but it gets displayed > in grayscale, no color present and it should since I have a jpeg example > that is different. ... > I see the ?ColorInterp =Undefined? but since I have no knowledge on this > format I don't know if this is the reason. > > Any help would be greatly appreciated Dejan, An ascii grid file has one band and no color table which is why it is drawn in greyscale. If you want it colored you will need to use classes. Read up on classification in the Raster Data Access HOWTO. 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 | President OSGeo, http://osgeo.org From Frank.Steggink at BENTLEY.COM Fri Nov 9 06:40:10 2007 From: Frank.Steggink at BENTLEY.COM (Frank Steggink) Date: Fri, 9 Nov 2007 09:40:10 -0500 Subject: FW: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Message-ID: -----Original Message----- From: Frank Steggink Sent: Friday, November 09, 2007 09:40 To: 'Rahkonen Jukka' Subject: RE: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Jukka, Can you try the URL's from my follow up post? Especially the one at DMSolutions, since it works fine with POST for me. Frank -----Original Message----- From: Rahkonen Jukka [mailto:Jukka.Rahkonen at mmmtike.fi] Sent: Friday, November 09, 2007 09:37 To: Frank Steggink; MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Hi, I made a test with OpenJUMP WFS plugin (http://openjump.org) that is using only POST method. For the first link GetCapabilities goes OK, but the plugin cannot parse the response correctly. Because of that I cannot send DescribeFeatureType, but when I tried GetFeature I got also "No template provided" error. This is the request that OpenJUMP plugin is generating: And this is the response: MapServer Messagemapserv(): Web application error. No template provided.
The result is the same with the other URL. OpenJUMP plugin was developed against GeoServer version 1.5, and with that it works rather well, despite sometimes parsing errors with certain data types (time, decimal). However, is has always had problems with all MapServer based WFS services, including my own ones. As its best I can get GetCapabilities and even GetFeature through, but there has always been some problems with parsing the capabilities right, and with DescribeFeatureType. The plugin has some tools for debugging so if someone sends me URLs I may try those and see what happens. -Jukka Rahkonen- ________________________________ L?hett?j?: UMN MapServer Users List puolesta: Frank Steggink L?hetetty: pe 9.11.2007 15:43 Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU Aihe: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Hello Yewondwossen, Sorry, no improvement here. I'm not getting an error, but I got a time out, while posting (DescribeFeatureType) to the original server URL (http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en vdat/config.map). Also, the other service I mentioned, http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp, uses this same URL as online resources, which already gave the template error. I'm a bit out of options right now. As already mentioned, when I'm using GET, then everything works fine, so our client will be able to access MapServer. I'll try a few other MapServer WFS's, and see what they do. (Using POST, and the online resource URL's.) There are quite a lot of them online. If they all give the same result, then I'm going to file a bug in Trac. It is no coincidence if several servers, which are set up independently, all have the same problem. Frank -----Original Message----- From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] Sent: Thursday, November 08, 2007 17:30 To: Frank Steggink Cc: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Hi There, WFS POST is supported by MapServer. Looking into this thread, you mentioned a couple of URLS and I have tried the follwing one : "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en vdat/config.map" I have tried WFS post requests describefeature and getfeature with this service and It responds correctly. It is a Mapserve 4.8.3. I am guessing that there is something 'wrong" with the service accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx where the post requests are not maybe transfered properly to Mapserver. Hopefully this helps. Best Regards, Frank Steggink wrote: > Hello Daniel, > > Thanks for the reply. I've tried your suggestion, but unfortunately it > didn't work. I'm getting the following ServiceException: > > xmlns="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/ogc > http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION > parameter missing > > > > The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the > post data is the same as in the original message. > > It really looks like MapServer only accepts GET request for WFS. So, > the simple fix you suggested will probably not be enough. I'm going to file a ticket. > In case > something needs to be tested, please let me know. > > Frank > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From Jukka.Rahkonen at MMMTIKE.FI Fri Nov 9 06:54:22 2007 From: Jukka.Rahkonen at MMMTIKE.FI (Rahkonen Jukka) Date: Fri, 9 Nov 2007 16:54:22 +0200 Subject: FW: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Message-ID: Hi, Results from this weeks last test: No, it does not work for me. The generated request is: and response: 500 Internal Server Error

Internal Server Error

The server encountered an internal error ormisconfiguration and was unable to completeyour request.

Please contact the server administrator, root at dmsolutions.ca and inform them of the time the error occurred,and anything you might have done that may havecaused the error.

More information about this error may be availablein the server error log.


Apache/2.0.47 (Fedora) Server at dev1.dmsolutions.ca Port 80
I made another trial with CadCorp SIS browser, which often gives some information about what is going wrong. This time it does not help a bit, because both GET and POST requests are going through. With the OpenJUMP plugin development most often we had problems with namespaces etc. Plugin was first done for deegree WFS, and Geoserver folks were doing some WFS things in another way. Plus MapServer in third, frustrating. And all more difficult it seems to be with WFS 1.1.0 version. I do not know why client is generating wfs:Query xmlns:null="null" but perhaps there is something wrong. -Jukka- ________________________________ L?hett?j?: UMN MapServer Users List puolesta: Frank Steggink L?hetetty: pe 9.11.2007 16:40 Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU Aihe: [UMN_MAPSERVER-USERS] FW: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error -----Original Message----- From: Frank Steggink Sent: Friday, November 09, 2007 09:40 To: 'Rahkonen Jukka' Subject: RE: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Jukka, Can you try the URL's from my follow up post? Especially the one at DMSolutions, since it works fine with POST for me. Frank -----Original Message----- From: Rahkonen Jukka [mailto:Jukka.Rahkonen at mmmtike.fi] Sent: Friday, November 09, 2007 09:37 To: Frank Steggink; MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Hi, I made a test with OpenJUMP WFS plugin (http://openjump.org ) that is using only POST method. For the first link GetCapabilities goes OK, but the plugin cannot parse the response correctly. Because of that I cannot send DescribeFeatureType, but when I tried GetFeature I got also "No template provided" error. This is the request that OpenJUMP plugin is generating: And this is the response: MapServer Messagemapserv(): Web application error. No template provided.
The result is the same with the other URL. OpenJUMP plugin was developed against GeoServer version 1.5, and with that it works rather well, despite sometimes parsing errors with certain data types (time, decimal). However, is has always had problems with all MapServer based WFS services, including my own ones. As its best I can get GetCapabilities and even GetFeature through, but there has always been some problems with parsing the capabilities right, and with DescribeFeatureType. The plugin has some tools for debugging so if someone sends me URLs I may try those and see what happens. -Jukka Rahkonen- ________________________________ L?hett?j?: UMN MapServer Users List puolesta: Frank Steggink L?hetetty: pe 9.11.2007 15:43 Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU Aihe: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Hello Yewondwossen, Sorry, no improvement here. I'm not getting an error, but I got a time out, while posting (DescribeFeatureType) to the original server URL (http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en vdat/config.map). Also, the other service I mentioned, http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp, uses this same URL as online resources, which already gave the template error. I'm a bit out of options right now. As already mentioned, when I'm using GET, then everything works fine, so our client will be able to access MapServer. I'll try a few other MapServer WFS's, and see what they do. (Using POST, and the online resource URL's.) There are quite a lot of them online. If they all give the same result, then I'm going to file a bug in Trac. It is no coincidence if several servers, which are set up independently, all have the same problem. Frank -----Original Message----- From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] Sent: Thursday, November 08, 2007 17:30 To: Frank Steggink Cc: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Hi There, WFS POST is supported by MapServer. Looking into this thread, you mentioned a couple of URLS and I have tried the follwing one : "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en vdat/config.map" I have tried WFS post requests describefeature and getfeature with this service and It responds correctly. It is a Mapserve 4.8.3. I am guessing that there is something 'wrong" with the service accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx where the post requests are not maybe transfered properly to Mapserver. Hopefully this helps. Best Regards, Frank Steggink wrote: > Hello Daniel, > > Thanks for the reply. I've tried your suggestion, but unfortunately it > didn't work. I'm getting the following ServiceException: > > xmlns="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/ogc > http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> > > msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION > parameter missing > > > > The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the > post data is the same as in the original message. > > It really looks like MapServer only accepts GET request for WFS. So, > the simple fix you suggested will probably not be enough. I'm going to file a ticket. > In case > something needs to be tested, please let me know. > > Frank > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From yassefa at DMSOLUTIONS.CA Fri Nov 9 06:59:12 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Fri, 9 Nov 2007 09:59:12 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: Message-ID: Jukka, What server did you use : http://map.ns.ec.gc.ca/envdat/map.aspx or http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/config.map Best Regards, Rahkonen Jukka wrote: > Hi, > > I made a test with OpenJUMP WFS plugin (http://openjump.org) that is using only POST method. > For the first link GetCapabilities goes OK, but the plugin cannot parse the response correctly. Because of that I cannot send DescribeFeatureType, but when I tried GetFeature I got also "No template provided" error. > > This is the request that OpenJUMP plugin is generating: > > > > > > > And this is the response: > MapServer Messagemapserv(): Web application error. No template provided.
> > The result is the same with the other URL. > > OpenJUMP plugin was developed against GeoServer version 1.5, and with that it works rather well, despite sometimes parsing errors with certain data types (time, decimal). However, is has always had problems with all MapServer based WFS services, including my own ones. As its best I can get GetCapabilities and even GetFeature through, but there has always been some problems with parsing the capabilities right, and with DescribeFeatureType. The plugin has some tools for debugging so if someone sends me URLs I may try those and see what happens. > > -Jukka Rahkonen- > > > > > > ________________________________ > > L?hett?j?: UMN MapServer Users List puolesta: Frank Steggink > L?hetetty: pe 9.11.2007 15:43 > Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU > Aihe: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error > > > > Hello Yewondwossen, > > Sorry, no improvement here. I'm not getting an error, but I got a time > out, while posting (DescribeFeatureType) to the original server URL > (http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en > vdat/config.map). > Also, the other service I mentioned, > http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp, uses this same URL as online > resources, which already gave the template error. > > I'm a bit out of options right now. As already mentioned, when I'm using > GET, then everything works fine, so our client will be able to access > MapServer. I'll try a few other MapServer WFS's, and see what they do. > (Using POST, and the online resource URL's.) There are quite a lot of > them online. If they all give the same result, then I'm going to file a > bug in Trac. It is no coincidence if several servers, which are set up > independently, all have the same problem. > > Frank > > -----Original Message----- > From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] > Sent: Thursday, November 08, 2007 17:30 > To: Frank Steggink > Cc: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template > provided" error > > Hi There, > > WFS POST is supported by MapServer. Looking into this thread, you > mentioned a couple of URLS and I have tried the follwing one : > "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en > vdat/config.map" > > I have tried WFS post requests describefeature and getfeature with > this service and It responds correctly. It is a Mapserve 4.8.3. > > I am guessing that there is something 'wrong" with the service > accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx > where the post requests are not maybe transfered properly to Mapserver. > > Hopefully this helps. > > Best Regards, > > > Frank Steggink wrote: >> Hello Daniel, >> >> Thanks for the reply. I've tried your suggestion, but unfortunately it > >> didn't work. I'm getting the following ServiceException: >> >> > xmlns="http://www.opengis.net/ogc" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://www.opengis.net/ogc >> http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> >> >> msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION >> parameter missing >> >> >> >> The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the > >> post data is the same as in the original message. >> >> It really looks like MapServer only accepts GET request for WFS. So, >> the simple fix you suggested will probably not be enough. I'm going to > file a ticket. >> In case >> something needs to be tested, please let me know. >> >> Frank >> > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From Jukka.Rahkonen at MMMTIKE.FI Fri Nov 9 07:06:06 2007 From: Jukka.Rahkonen at MMMTIKE.FI (Rahkonen Jukka) Date: Fri, 9 Nov 2007 17:06:06 +0200 Subject: WFS POST requests: "No template provided" error Message-ID: Hi, I tried both of them with the same result. Trial with CadCorp WFS client was successful wit GET but not with POST but the error message does not tell too much. It says just "Unexpected element name: HTML" -Jukka- ________________________________ L?hett?j?: UMN MapServer Users List puolesta: Yewondwossen Assefa L?hetetty: pe 9.11.2007 16:59 Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU Aihe: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Jukka, What server did you use : http://map.ns.ec.gc.ca/envdat/map.aspx or http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/config.map Best Regards, Rahkonen Jukka wrote: > Hi, > > I made a test with OpenJUMP WFS plugin (http://openjump.org ) that is using only POST method. > For the first link GetCapabilities goes OK, but the plugin cannot parse the response correctly. Because of that I cannot send DescribeFeatureType, but when I tried GetFeature I got also "No template provided" error. > > This is the request that OpenJUMP plugin is generating: > > > > > > > And this is the response: > MapServer Messagemapserv(): Web application error. No template provided.
> > The result is the same with the other URL. > > OpenJUMP plugin was developed against GeoServer version 1.5, and with that it works rather well, despite sometimes parsing errors with certain data types (time, decimal). However, is has always had problems with all MapServer based WFS services, including my own ones. As its best I can get GetCapabilities and even GetFeature through, but there has always been some problems with parsing the capabilities right, and with DescribeFeatureType. The plugin has some tools for debugging so if someone sends me URLs I may try those and see what happens. > > -Jukka Rahkonen- > > > > > > ________________________________ > > L?hett?j?: UMN MapServer Users List puolesta: Frank Steggink > L?hetetty: pe 9.11.2007 15:43 > Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU > Aihe: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error > > > > Hello Yewondwossen, > > Sorry, no improvement here. I'm not getting an error, but I got a time > out, while posting (DescribeFeatureType) to the original server URL > (http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en > vdat/config.map). > Also, the other service I mentioned, > http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp, uses this same URL as online > resources, which already gave the template error. > > I'm a bit out of options right now. As already mentioned, when I'm using > GET, then everything works fine, so our client will be able to access > MapServer. I'll try a few other MapServer WFS's, and see what they do. > (Using POST, and the online resource URL's.) There are quite a lot of > them online. If they all give the same result, then I'm going to file a > bug in Trac. It is no coincidence if several servers, which are set up > independently, all have the same problem. > > Frank > > -----Original Message----- > From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] > Sent: Thursday, November 08, 2007 17:30 > To: Frank Steggink > Cc: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template > provided" error > > Hi There, > > WFS POST is supported by MapServer. Looking into this thread, you > mentioned a couple of URLS and I have tried the follwing one : > "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en > vdat/config.map" > > I have tried WFS post requests describefeature and getfeature with > this service and It responds correctly. It is a Mapserve 4.8.3. > > I am guessing that there is something 'wrong" with the service > accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx > where the post requests are not maybe transfered properly to Mapserver. > > Hopefully this helps. > > Best Regards, > > > Frank Steggink wrote: >> Hello Daniel, >> >> Thanks for the reply. I've tried your suggestion, but unfortunately it > >> didn't work. I'm getting the following ServiceException: >> >> > xmlns="http://www.opengis.net/ogc" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://www.opengis.net/ogc >> http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> >> >> msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION >> parameter missing >> >> >> >> The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the > >> post data is the same as in the original message. >> >> It really looks like MapServer only accepts GET request for WFS. So, >> the simple fix you suggested will probably not be enough. I'm going to > file a ticket. >> In case >> something needs to be tested, please let me know. >> >> Frank >> > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From dmorissette at MAPGEARS.COM Fri Nov 9 07:39:37 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Fri, 9 Nov 2007 10:39:37 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: Message-ID: Jukka, GetCapabilities on both http://map.ns.ec.gc.ca/envdat/map.aspx and http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/config.map return the same onlineresource for POST requests: I suspect that when you point JUMP and Cadcorp to http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/config.map they read the capabilities and end up using map.aspx in the end. This map.aspx apparently fails to forward POST information properly. This is NOT a MapServer problem, it is a configuration problem specific to this server. Just wanted to clear things up so that those reporting test results know what they are testing against. Daniel Rahkonen Jukka wrote: > Hi, > > I tried both of them with the same result. Trial with CadCorp WFS client was successful wit GET but not with POST but the error message does not tell too much. It says just "Unexpected element name: HTML" > > -Jukka- > > ________________________________ > > L?hett?j?: UMN MapServer Users List puolesta: Yewondwossen Assefa > L?hetetty: pe 9.11.2007 16:59 > Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU > Aihe: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error > > > > Jukka, > > What server did you use : http://map.ns.ec.gc.ca/envdat/map.aspx or > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/config.map > > Best Regards, > > Rahkonen Jukka wrote: >> Hi, >> >> I made a test with OpenJUMP WFS plugin (http://openjump.org ) that is using only POST method. >> For the first link GetCapabilities goes OK, but the plugin cannot parse the response correctly. Because of that I cannot send DescribeFeatureType, but when I tried GetFeature I got also "No template provided" error. >> >> This is the request that OpenJUMP plugin is generating: >> >> >> >> >> >> >> And this is the response: >> MapServer Messagemapserv(): Web application error. No template provided.
>> >> The result is the same with the other URL. >> >> OpenJUMP plugin was developed against GeoServer version 1.5, and with that it works rather well, despite sometimes parsing errors with certain data types (time, decimal). However, is has always had problems with all MapServer based WFS services, including my own ones. As its best I can get GetCapabilities and even GetFeature through, but there has always been some problems with parsing the capabilities right, and with DescribeFeatureType. The plugin has some tools for debugging so if someone sends me URLs I may try those and see what happens. >> >> -Jukka Rahkonen- >> >> >> >> >> >> ________________________________ >> >> L?hett?j?: UMN MapServer Users List puolesta: Frank Steggink >> L?hetetty: pe 9.11.2007 15:43 >> Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU >> Aihe: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error >> >> >> >> Hello Yewondwossen, >> >> Sorry, no improvement here. I'm not getting an error, but I got a time >> out, while posting (DescribeFeatureType) to the original server URL >> (http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en >> vdat/config.map). >> Also, the other service I mentioned, >> http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp, uses this same URL as online >> resources, which already gave the template error. >> >> I'm a bit out of options right now. As already mentioned, when I'm using >> GET, then everything works fine, so our client will be able to access >> MapServer. I'll try a few other MapServer WFS's, and see what they do. >> (Using POST, and the online resource URL's.) There are quite a lot of >> them online. If they all give the same result, then I'm going to file a >> bug in Trac. It is no coincidence if several servers, which are set up >> independently, all have the same problem. >> >> Frank >> >> -----Original Message----- >> From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] >> Sent: Thursday, November 08, 2007 17:30 >> To: Frank Steggink >> Cc: MAPSERVER-USERS at LISTS.UMN.EDU >> Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template >> provided" error >> >> Hi There, >> >> WFS POST is supported by MapServer. Looking into this thread, you >> mentioned a couple of URLS and I have tried the follwing one : >> "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/en >> vdat/config.map" >> >> I have tried WFS post requests describefeature and getfeature with >> this service and It responds correctly. It is a Mapserve 4.8.3. >> >> I am guessing that there is something 'wrong" with the service >> accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx >> where the post requests are not maybe transfered properly to Mapserver. >> >> Hopefully this helps. >> >> Best Regards, >> >> >> Frank Steggink wrote: >>> Hello Daniel, >>> >>> Thanks for the reply. I've tried your suggestion, but unfortunately it >>> didn't work. I'm getting the following ServiceException: >>> >>> >> xmlns="http://www.opengis.net/ogc" >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> xsi:schemaLocation="http://www.opengis.net/ogc >>> http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> >>> >>> msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION >>> parameter missing >>> >>> >>> >>> The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and the >>> post data is the same as in the original message. >>> >>> It really looks like MapServer only accepts GET request for WFS. So, >>> the simple fix you suggested will probably not be enough. I'm going to >> file a ticket. >>> In case >>> something needs to be tested, please let me know. >>> >>> Frank >>> >> >> -- >> ---------------------------------------------------------------- >> Assefa Yewondwossen >> Software Analyst >> >> Email: assefa at dmsolutions.ca >> http://www.dmsolutions.ca/ >> >> Phone: (613) 565-5056 (ext 14) >> Fax: (613) 565-0925 >> ---------------------------------------------------------------- >> > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- -- Daniel Morissette http://www.mapgears.com/ From Frank.Steggink at BENTLEY.COM Fri Nov 9 07:53:08 2007 From: Frank.Steggink at BENTLEY.COM (Frank Steggink) Date: Fri, 9 Nov 2007 10:53:08 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: <4734752B.9090908@dmsolutions.ca> Message-ID: Yewondwossen, I've tested it with curl on the command line, with the post data in a file, and it works. However, it doesn't work if I put the post data on the command line. So it is probably a client issue after all. Since curl's documentation mentions that the data should be URL escaped, that is likely the problem. I'm not doing that for the WFS client, since it gave too much problems with other servers. It will be a tough and bumpy ride to get this working for all servers. I guess this is also Jukka's problem. Yet another server quirk to deal with... Frank -----Original Message----- From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] Sent: Friday, November 09, 2007 09:57 To: Frank Steggink Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Attached is the script. Frank Steggink wrote: > Follow up. I've found and tested a few services: > > 1. > http://wfs.alaskamapped.org/inventory?SERVICE=WFS&VERSION=1.0.0&REQUES > T= GetCapabilities& (from a post yesterday, MapServer 5.0 RC 2): I got > an internal server error (500) with DescribeFeatureType/POST. The > online resource URL is the same. > 2. > http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap?SERVICE=WFS&VERSION=1.0. > 0& REQUEST=GetCapabilities& (MapServer 4.6.0): > DescribeFeatureType/POST and GetFeature/POST work here. As I mentioned > before, I'm using the online resource URL's, which are different than > the base URL. > 3. > http://excise.pyr.ec.gc.ca/cgi-bin/mapserv.exe?map=/LocalApps/Mapsurfe > r/ PYRWQMP.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities& > (MapServer 4.8.1): The client timed out at DescribeFeatureType/POST. > (GET, which I did in the browser, responded pretty quick.) After 5 > minutes I finally got a response from the server, a 502 error (Bad > Gateway), with a CGI application timeout. This is probably a > configuration error, since the online resource is different. > > It looks indeed that this is more due to configuration errors, than > that it is actually an error by MapServer. Since I have no experience > with Mapserver itself, it is hard to tell. Maybe it is coincident or > not, but the oldest Mapserver version seems to work best. > > Yewondwossen, replying to the mail you just sent, can you send the > test script? Then I can see what are the actual differences. I have > logged my requests with Fiddler, and saved the sessions. In case > you're interested, I can send it to you as well. > > Frank > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] > On Behalf Of Frank Steggink > Sent: Friday, November 09, 2007 08:44 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template > provided" error > > Hello Yewondwossen, > > Sorry, no improvement here. I'm not getting an error, but I got a time > out, while posting (DescribeFeatureType) to the original server URL > (http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/ > en > vdat/config.map). > Also, the other service I mentioned, > http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp, uses this same URL as > online resources, which already gave the template error. > > I'm a bit out of options right now. As already mentioned, when I'm > using GET, then everything works fine, so our client will be able to > access MapServer. I'll try a few other MapServer WFS's, and see what they do. > (Using POST, and the online resource URL's.) There are quite a lot of > them online. If they all give the same result, then I'm going to file > a bug in Trac. It is no coincidence if several servers, which are set > up independently, all have the same problem. > > Frank > > -----Original Message----- > From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] > Sent: Thursday, November 08, 2007 17:30 > To: Frank Steggink > Cc: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template > provided" error > > Hi There, > > WFS POST is supported by MapServer. Looking into this thread, you > mentioned a couple of URLS and I have tried the follwing one : > "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/ > en > vdat/config.map" > > I have tried WFS post requests describefeature and getfeature with > this service and It responds correctly. It is a Mapserve 4.8.3. > > I am guessing that there is something 'wrong" with the service > accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx > where the post requests are not maybe transfered properly to Mapserver. > > Hopefully this helps. > > Best Regards, > > > Frank Steggink wrote: >> Hello Daniel, >> >> Thanks for the reply. I've tried your suggestion, but unfortunately >> it > >> didn't work. I'm getting the following ServiceException: >> >> > xmlns="http://www.opengis.net/ogc" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://www.opengis.net/ogc >> http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> >> >> msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION >> parameter missing >> >> >> >> The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and >> the > >> post data is the same as in the original message. >> >> It really looks like MapServer only accepts GET request for WFS. So, >> the simple fix you suggested will probably not be enough. I'm going >> to > file a ticket. >> In case >> something needs to be tested, please let me know. >> >> Frank >> > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From Frank.Steggink at BENTLEY.COM Fri Nov 9 08:42:51 2007 From: Frank.Steggink at BENTLEY.COM (Frank Steggink) Date: Fri, 9 Nov 2007 11:42:51 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: A<234F456FBC8AF54BA08AB663CA86D36906DDD51E@extonpo2.bentley.com> Message-ID: Or maybe it is no URL encoding. This morning I mentioned I got a timeout (and later a 502 error) when I was posting to http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/env dat/config.map. Well, it turned out that it depends on the presence of carriage returns in the post data if it will succeed or not. Posting this will succeed (all on one line): wfs: envirodat Posting this will not: wfs:envirodat The post data is not URL encoded. And posting the successful post body to http://map.ns.ec.gc.ca/envdat/map.aspx gives the infamous "no template provided" error. Frank -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Steggink Sent: Friday, November 09, 2007 10:53 To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Yewondwossen, I've tested it with curl on the command line, with the post data in a file, and it works. However, it doesn't work if I put the post data on the command line. So it is probably a client issue after all. Since curl's documentation mentions that the data should be URL escaped, that is likely the problem. I'm not doing that for the WFS client, since it gave too much problems with other servers. It will be a tough and bumpy ride to get this working for all servers. I guess this is also Jukka's problem. Yet another server quirk to deal with... Frank -----Original Message----- From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] Sent: Friday, November 09, 2007 09:57 To: Frank Steggink Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template provided" error Attached is the script. Frank Steggink wrote: > Follow up. I've found and tested a few services: > > 1. > http://wfs.alaskamapped.org/inventory?SERVICE=WFS&VERSION=1.0.0&REQUES > T= GetCapabilities& (from a post yesterday, MapServer 5.0 RC 2): I got > an internal server error (500) with DescribeFeatureType/POST. The > online resource URL is the same. > 2. > http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap?SERVICE=WFS&VERSION=1.0. > 0& REQUEST=GetCapabilities& (MapServer 4.6.0): > DescribeFeatureType/POST and GetFeature/POST work here. As I mentioned > before, I'm using the online resource URL's, which are different than > the base URL. > 3. > http://excise.pyr.ec.gc.ca/cgi-bin/mapserv.exe?map=/LocalApps/Mapsurfe > r/ PYRWQMP.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities& > (MapServer 4.8.1): The client timed out at DescribeFeatureType/POST. > (GET, which I did in the browser, responded pretty quick.) After 5 > minutes I finally got a response from the server, a 502 error (Bad > Gateway), with a CGI application timeout. This is probably a > configuration error, since the online resource is different. > > It looks indeed that this is more due to configuration errors, than > that it is actually an error by MapServer. Since I have no experience > with Mapserver itself, it is hard to tell. Maybe it is coincident or > not, but the oldest Mapserver version seems to work best. > > Yewondwossen, replying to the mail you just sent, can you send the > test script? Then I can see what are the actual differences. I have > logged my requests with Fiddler, and saved the sessions. In case > you're interested, I can send it to you as well. > > Frank > > -----Original Message----- > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] > On Behalf Of Frank Steggink > Sent: Friday, November 09, 2007 08:44 > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template > provided" error > > Hello Yewondwossen, > > Sorry, no improvement here. I'm not getting an error, but I got a time > out, while posting (DescribeFeatureType) to the original server URL > (http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/ > en > vdat/config.map). > Also, the other service I mentioned, > http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp, uses this same URL as > online resources, which already gave the template error. > > I'm a bit out of options right now. As already mentioned, when I'm > using GET, then everything works fine, so our client will be able to > access MapServer. I'll try a few other MapServer WFS's, and see what they do. > (Using POST, and the online resource URL's.) There are quite a lot of > them online. If they all give the same result, then I'm going to file > a bug in Trac. It is no coincidence if several servers, which are set > up independently, all have the same problem. > > Frank > > -----Original Message----- > From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] > Sent: Thursday, November 08, 2007 17:30 > To: Frank Steggink > Cc: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-USERS] WFS POST requests: "No template > provided" error > > Hi There, > > WFS POST is supported by MapServer. Looking into this thread, you > mentioned a couple of URLS and I have tried the follwing one : > "http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/ > en > vdat/config.map" > > I have tried WFS post requests describefeature and getfeature with > this service and It responds correctly. It is a Mapserve 4.8.3. > > I am guessing that there is something 'wrong" with the service > accessed though the script at http://map.ns.ec.gc.ca/envdat/map.aspx > where the post requests are not maybe transfered properly to Mapserver. > > Hopefully this helps. > > Best Regards, > > > Frank Steggink wrote: >> Hello Daniel, >> >> Thanks for the reply. I've tried your suggestion, but unfortunately >> it > >> didn't work. I'm getting the following ServiceException: >> >> > xmlns="http://www.opengis.net/ogc" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://www.opengis.net/ogc >> http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd"> >> >> msWFSDispatch(): WFS server error. Incomplete WFS request: VERSION >> parameter missing >> >> >> >> The URL is http://map.ns.ec.gc.ca/envdat/map.aspx?SERVICE=WFS& and >> the > >> post data is the same as in the original message. >> >> It really looks like MapServer only accepts GET request for WFS. So, >> the simple fix you suggested will probably not be enough. I'm going >> to > file a ticket. >> In case >> something needs to be tested, please let me know. >> >> Frank >> > > > -- > ---------------------------------------------------------------- > Assefa Yewondwossen > Software Analyst > > Email: assefa at dmsolutions.ca > http://www.dmsolutions.ca/ > > Phone: (613) 565-5056 (ext 14) > Fax: (613) 565-0925 > ---------------------------------------------------------------- > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From yjacolin at FREE.FR Fri Nov 9 10:14:16 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Fri, 9 Nov 2007 19:14:16 +0100 Subject: WMS Layer with SLD config in mapfile Message-ID: Hi, I am setting a WMS LAYER in my mapfile with a SLD xml file in the METADATA but it seems that my remote WMS mapserver does not use the SLD xml file, here is my Layer objet definition in my mapfile : LAYER NAME "fond_wms" TYPE RASTER STATUS ON CONNECTION "http://www2.myhost.com/cgi-restricted-bin/mapserv?" CONNECTIONTYPE WMS METADATA "wms_srs" "EPSG:27582" "wms_name" "cadastre,orthophoto,zae,zac" "wms_server_version" "1.0.0" "wms_format" "image/jpeg" "wms_exceptions_format" "application-vnd.ogc.se_inimage" "wms_transparent" "false" "wms_style" "default" "wms_default_sld" "http://www2.myhost.com/LPdI/test.xml" END END If I try to use directly the WMS resquest in the navigator, the final map is correct : http://www2.myhost.com/cgi-restricted-bin/mapserv_wms? LAYERS=geosignal,orthophoto,zae,zac& BBOX=601145.6388854936,2424122.2621656144,604743.970275728,2426768.094070199& REQUEST=GetMap&VERSION=1.0.0&SERVICE=WMS&WIDTH=680&HEIGHT=500& SRS=EPSG:27582&EXCEPTIONS=application-vnd.ogc.se_inimage&FORMAT=jpeg& TRANSPARENT=false&SLD=http://www2.myhost/LPdI/test.xml Any idea ? Regards, Y. -- Yves Jacolin --- http://softlibre.gloobe.org From dmorissette at MAPGEARS.COM Fri Nov 9 10:27:42 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Fri, 9 Nov 2007 13:27:42 -0500 Subject: WFS POST requests: "No template provided" error In-Reply-To: <234F456FBC8AF54BA08AB663CA86D36906DDD66B@extonpo2.bentley.com> Message-ID: Frank Steggink wrote: > Or maybe it is no URL encoding. This morning I mentioned I got a timeout > (and later a 502 error) when I was posting to > http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/env > dat/config.map. > Well, it turned out that it depends on the presence of carriage returns > in the post data if it will succeed or not. > This issue with carriage returns was found and fixed in MapServer 4.8.4 and 4.10.0 http://trac.osgeo.org/mapserver/ticket/1768 Unfortunately this server is running 4.8.3. :( Daniel -- Daniel Morissette http://www.mapgears.com/ From yjacolin at FREE.FR Fri Nov 9 10:37:53 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Fri, 9 Nov 2007 19:37:53 +0100 Subject: WMS Layer with SLD config in mapfile In-Reply-To: <200711091914.16462.yjacolin@free.fr> Message-ID: Hi list, Please, if anyone could change the doc [1], section 3.2.2 : "wms_mystyle_sld" doesn't exist, we have to use "wms_style_mystyle_sld" ! Half a day looking for why it doesn't work, at least I could spend a nice week end now :) Best regard, Y. [1] http://mapserver.gis.umn.edu/docs/howto/wms_client Le Friday 09 November 2007 19:14:16 Jacolin Yves, vous avez ?crit?: > Hi, > > I am setting a WMS LAYER in my mapfile with a SLD xml file in the METADATA > but it seems that my remote WMS mapserver does not use the SLD xml file, > here is my Layer objet definition in my mapfile : > LAYER > NAME "fond_wms" > TYPE RASTER > STATUS ON > CONNECTION "http://www2.myhost.com/cgi-restricted-bin/mapserv?" > CONNECTIONTYPE WMS > METADATA > "wms_srs" "EPSG:27582" > "wms_name" "cadastre,orthophoto,zae,zac" > "wms_server_version" "1.0.0" > "wms_format" "image/jpeg" > "wms_exceptions_format" "application-vnd.ogc.se_inimage" > "wms_transparent" "false" > "wms_style" "default" > "wms_default_sld" "http://www2.myhost.com/LPdI/test.xml" > END > END > > If I try to use directly the WMS resquest in the navigator, the final map > is correct : > http://www2.myhost.com/cgi-restricted-bin/mapserv_wms? > LAYERS=geosignal,orthophoto,zae,zac& > BBOX=601145.6388854936,2424122.2621656144,604743.970275728,2426768.09407019 >9& REQUEST=GetMap&VERSION=1.0.0&SERVICE=WMS&WIDTH=680&HEIGHT=500& > SRS=EPSG:27582&EXCEPTIONS=application-vnd.ogc.se_inimage&FORMAT=jpeg& > TRANSPARENT=false&SLD=http://www2.myhost/LPdI/test.xml > > Any idea ? > > Regards, > > Y. -- Yves Jacolin --- http://softlibre.gloobe.org From dmorissette at MAPGEARS.COM Fri Nov 9 10:56:23 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Fri, 9 Nov 2007 13:56:23 -0500 Subject: WMS Layer with SLD config in mapfile In-Reply-To: <200711091937.54009.yjacolin@free.fr> Message-ID: Jacolin Yves wrote: > Hi list, > > Please, if anyone could change the doc [1], section 3.2.2 : > > "wms_mystyle_sld" doesn't exist, we have to use "wms_style_mystyle_sld" ! > > Half a day looking for why it doesn't work, at least I could spend a nice week > end now :) > Yves, You can add a comment suggesting the correction yourself at the bottom of the document and it should be picked up on the next round of docs updates. Daniel -- Daniel Morissette http://www.mapgears.com/ From yjacolin at FREE.FR Fri Nov 9 11:12:05 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Fri, 9 Nov 2007 20:12:05 +0100 Subject: WMS Layer with SLD config in mapfile In-Reply-To: <4734AD57.4080203@mapgears.com> Message-ID: Le Friday 09 November 2007 19:56:23 Daniel Morissette, vous avez ?crit?: > Jacolin Yves wrote: > > Hi list, > > > > Please, if anyone could change the doc [1], section 3.2.2 : > > > > "wms_mystyle_sld" doesn't exist, we have to use "wms_style_mystyle_sld" ! > > > > Half a day looking for why it doesn't work, at least I could spend a nice > > week end now :) > > Yves, > > You can add a comment suggesting the correction yourself at the bottom > of the document and it should be picked up on the next round of docs > updates. > > Daniel Hi, Yes, I think about this just after sending my mail, but it seems that mapserver dev changed the doc more rapidly than I create an account ;) Thanks :) and have a nice week end ! Y. -- Yves Jacolin --- http://softlibre.gloobe.org From m_anderson14 at HOTMAIL.COM Fri Nov 9 13:48:04 2007 From: m_anderson14 at HOTMAIL.COM (Michael Anderson) Date: Fri, 9 Nov 2007 21:48:04 +0000 Subject: WFS features not drawing - The Cause In-Reply-To: Message-ID: Found the problem. The server is returning an empty extent in the .gfs file. So I am guessing MapServer doesn't think there are any features in the gml file to draw. There is another feature service I can use and it is working fine. If anyone has a similiar problem, open the .gfs file and look for this tag: 7 0.00000 0.00000 0.00000 0.00000 If the extent coordinates are 0, that is why the features aren't drawing. Mike _________________________________________________________________ Climb to the top of the charts!? Play Star Shuffle:? the word scramble challenge with star power. http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct -------------- next part -------------- An HTML attachment was scrubbed... URL: From nthiya at ORIONGIS.COM Fri Nov 9 15:01:32 2007 From: nthiya at ORIONGIS.COM (Nathan Thiya) Date: Fri, 9 Nov 2007 18:01:32 -0500 Subject: Looking for a Map Server Consultant... Anyone Interested... Message-ID: Hi, We are interested in receiving submissions from candidates to actively work with us on a web-GIS project implementing Map Server technology. The successful candidate will work on-site (our preference) with us (at our Markham, Ontario offices) for the entire length of the engagement. The project is to be implemented using .Net C# technology. The required functionality of the application is: * Basic Navigation (Zoom In / Zoom Out / Pan) * Search capability: o Attributes from layer and joined tables o Overlay using polygon & buffered search * Thematic Mapping: o Using attributes from layer and joined tables o Using search results * Printing to PDF and TIF * Map server integrated with WCS / WFS / WMS * Spatial data will to be imported from Oracle or Shape files If you have the required skills for the above project, please contact us, with the following: * Resume * References (similar projects would be ideal) * Availability * Estimate of effort and cost Note: Please let me know, if I should not be posting these type of messages on this list. Thank you, Nathan.Thiya Chief Product Architect Orion Technology Inc. E-mail: nthiya at oriongis.com Phone: 416-721-7242 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlinden at ZEELANDNET.NL Sat Nov 10 02:44:19 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Sat, 10 Nov 2007 11:44:19 +0100 Subject: Looking for a Map Server Consultant... Anyone Interested... In-Reply-To: Message-ID: Hello Nathan, Being an open source addict and a C# programmer with good mapserver experience, I strongly suggest you to join the sharpmap project on codeplex.com. We are currently implementing a combination of mapserver, sharpmap and openlayers for a asp.net system and despite the fact that some enhancements to the sharpmap core have to be made we have a strong feeling this will be the solution to our wish; getting a framework up where maps are integrated in .net. Another solution you might give a try is mapwindow, it is also completely .net. I hope that one of these .net open source initiatives can benefit from the fact that your project is able to put effort in it(time and/or money). You of course can benefit from the fact that a lot of the core work has already been done. I would regret it if you would reinvent the wheel without looking at these projects. My personal opinion is that in the end, everyone can benefit from one or two strong opensource projects for GIS in .net, providing stability and continuity. On Fri, 2007-11-09 at 18:01 -0500, Nathan Thiya wrote: > Hi, > > > > We are interested in receiving submissions from candidates to actively > work with us on a web-GIS project implementing Map Server technology. > The successful candidate will work on-site (our preference) with us > (at our Markham, Ontario offices) for the entire length of the > engagement. The project is to be implemented using .Net C# technology. > > > > The required functionality of the application is: > > ? Basic Navigation (Zoom In / Zoom Out / Pan) > > ? Search capability: > > o Attributes from layer and joined tables > > o Overlay using polygon & buffered search > > ? Thematic Mapping: > > o Using attributes from layer and joined tables > > o Using search results > > ? Printing to PDF and TIF > > ? Map server integrated with WCS / WFS / WMS > > ? Spatial data will to be imported from Oracle or Shape files > > > > If you have the required skills for the above project, please contact > us, with the following: > > ? Resume > > ? References (similar projects would be ideal) > > ? Availability > > ? Estimate of effort and cost > > Note: Please let me know, if I should not be posting these type of > messages on this list. > > > > Thank you, > > Nathan.Thiya > > Chief Product Architect > > Orion Technology Inc. > > E-mail: nthiya at oriongis.com > > Phone: 416-721-7242 > > > > From dejan.gambin at PULA.HR Sat Nov 10 05:08:02 2007 From: dejan.gambin at PULA.HR (Dejan Gambin) Date: Sat, 10 Nov 2007 14:08:02 +0100 Subject: aaigrid display problem Message-ID: Hi Frank, I think I understand. I'll take a look in Raster Data Access HOWTO. Thanks very much Regards, dejan -------------- next part -------------- An HTML attachment was scrubbed... URL: From aberenyi at BURKEN.HU Sun Nov 11 02:13:17 2007 From: aberenyi at BURKEN.HU (=?ISO-8859-2?Q?Ber=E9nyi_Attila?=) Date: Sun, 11 Nov 2007 11:13:17 +0100 Subject: 3D data Message-ID: Dear All, I'm wondering if Mapserver is able to display 3D data (through OGR or something)? If not, are there any signs that shows it might be able in the future? Thanks in advance, Attila From maurosa at IOL.IT Sun Nov 11 17:31:25 2007 From: maurosa at IOL.IT (maurosa@iol.it) Date: Mon, 12 Nov 2007 02:31:25 +0100 Subject: label offset binding Message-ID: Hi, I would like to set the position of single labels on a map. A solution could be that of binding the label offset x and y parameters to one or two fields of the layer, so that each label has its own offset. Looking in the mapserver docs, I did not find a way to bind the label offset. Is it possible or/and of interest to add in a future release this binding or is it incompatible with the label managment? Thanks for any hint. Mauro Sartori From vishu_73ns at YAHOO.COM Sun Nov 11 20:40:42 2007 From: vishu_73ns at YAHOO.COM (Vishal Nagpal) Date: Sun, 11 Nov 2007 22:40:42 -0600 Subject: Mapserver and MySQL Message-ID: Thanks Everybody, Its working, I installed the developer's version of MySql and then reconfigured GDAL/OGR and Mapserver. Sorry for delayed reply, Getting hold of correct copy of Mysql and handling the path took some time other than the Diwali festival at home. Thanks again, Regards, From arthan at DSL.TTNET.NET.TR Sun Nov 11 21:56:54 2007 From: arthan at DSL.TTNET.NET.TR (Volkan Ulukut) Date: Mon, 12 Nov 2007 07:56:54 +0200 Subject: Georeferencing Mrsid raster file with a world file Message-ID: Greetings list, I've encountered a problem while trying to publish a sid file. The sid file does not show in the extent I'm trying to show instead it has a fixed extent and shows there. I got 3 files with the same prefix kayseri_lokal.sid kayseri_lokal.sdw kayseri_lokal.aux I've added this to my mapfile LAYER NAME "kay_uydu7" STATUS ON TYPE RASTER MAXSCALE 24999 DATA "uydu/kayseri_lokal.sid" GROUP "kay_uydu7" METADATA "queryable" "true" "imageformat" "alpha" END TRANSPARENCY alpha CLASS END END The extent of my mapfile is: EXTENT 440773 4282202 467369 4295904 This is the contents of my sdw file which should put the raster on the right extent: 1.000000000000000 0.000000000000000 0.000000000000000 -1.000000000000000 440773.000000000000000 467369.000000000000000 I've also tried making this a wld file in case gdal does not recognize sdw file. When I type gdalinfo on sid file I get: Driver: MrSID/Multi-resolution Seamless Image Database (MrSID) Size is 55564, 66276 Coordinate System is `' Origin = (75393.500000000000000,137653.500000000000000) Pixel Size = (1.000000000000000,-1.000000000000000) Metadata: IMAGE__INPUT_NAME=j:/kayseri_ik_lokal_v5/mrsid_lokal.img IMAGE__INPUT_FILE_SIZE=11047678992.000000 GEOTIFF_NUM__1024__GTModelTypeGeoKey=0 GEOTIFF_CHAR__GTModelTypeGeoKey=Undefined GEOTIFF_NUM__1025__GTRasterTypeGeoKey=1 GEOTIFF_CHAR__GTRasterTypeGeoKey=RasterPixelIsArea IMAGE__DYNAMIC_RANGE_LEVEL=127.500000 GEOTIFF_NUM__3076__ProjLinearUnitsGeoKey=9014 GEOTIFF_CHAR__ProjLinearUnitsGeoKey=Linear_Fathom IMAGE__DYNAMIC_RANGE_WINDOW=255.000000 GEO__ModelTypeGeoKey=0 IMG__HORIZONTAL_UNITS=other IMAGE__COMPRESSION_VERSION=1,6,-3 IMAGE__TARGET_COMPRESSION_RATIO=20.000000 IMAGE__COMPRESSION_NLEV=8 IMAGE__COMPRESSION_WEIGHT=4.000000 IMAGE__COMPRESSION_GAMMA=2.000000 IMAGE__COMPRESSION_BLOCK_SIZE=512 IMAGE__CREATION_DATE=Fri Aug 03 13:21:10 2007 IMAGE__WIDTH=55564 IMAGE__HEIGHT=66276 IMAGE__COLOR_SCHEME=0 IMAGE__DATA_TYPE=0 IMAGE__BITS_PER_SAMPLE=8 IMAGE__XY_ORIGIN=75394.000000,137653.000000 IMAGE__X_RESOLUTION=1.000000 IMAGE__Y_RESOLUTION=1.000000 Corner Coordinates: Upper Left ( 75393.500, 137653.500) Lower Left ( 75393.500, 71377.500) Upper Right ( 130957.500, 137653.500) Lower Right ( 130957.500, 71377.500) Center ( 103175.500, 104515.500) Band 1 Block=1024x128 Type=Byte, ColorInterp=Red Overviews: 27782x33138, 13891x16569, 6946x8285, 3473x4143, 1737x2072, 869x1036, 435x518, 218x259 Band 2 Block=1024x128 Type=Byte, ColorInterp=Green Overviews: 27782x33138, 13891x16569, 6946x8285, 3473x4143, 1737x2072, 869x1036, 435x518, 218x259 Band 3 Block=1024x128 Type=Byte, ColorInterp=Blue Overviews: 27782x33138, 13891x16569, 6946x8285, 3473x4143, 1737x2072, 869x1036, 435x518, 218x259 When I change the mapfile extent to: EXTENT 75393 71377 137653 130957 I can see the raster layer normally.But I need to move it to my initial mapfile extent (since all the other data is there) Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at MMMTIKE.FI Sun Nov 11 23:56:19 2007 From: Jukka.Rahkonen at MMMTIKE.FI (Rahkonen Jukka) Date: Mon, 12 Nov 2007 09:56:19 +0200 Subject: Georeferencing Mrsid raster file with a world file In-Reply-To: A<20071112055646.CVPA1948.fep04.ttnet.net.tr@volkan> Message-ID: Hi, I do not know anything about MrSID, but I believe you have some conflict between MrSID native georeference data and world file and MapServer (or DGAL) gives priority for the native data. To check this you could rename the world file to .BAK or whatever and see if the situation remains the same. If this is the case three alternatives comes into my mind: - ask if there is some hidden switch to tell GDAL to give priority for the world file by sending a question to GDAL-dev mailing list - try to find some MrSID tool that could be used for changing the embedded metadata - try to convert your image to some other format and drop the georeferencing information totally; then you can use your world file with the new image. I know that it is possible to tell GDAL to write clean tiff files without Geotiff tags so tiff could be used with the last approach, but unfortunately your image is far too big to be uncompressed to tiff. And probably you would prefer keeping the image compressen anyway. Are you sure that the world file extensions and your default projection are correct for the MrSID image, and not the embedded data? -Jukka Rahkonen- ________________________________ L?hett?j?: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Puolesta Volkan Ulukut L?hetetty: 12. marraskuuta 2007 7:57 Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU Aihe: [UMN_MAPSERVER-USERS] Georeferencing Mrsid raster file with a world file Greetings list, I've encountered a problem while trying to publish a sid file. The sid file does not show in the extent I'm trying to show instead it has a fixed extent and shows there. I got 3 files with the same prefix kayseri_lokal.sid kayseri_lokal.sdw kayseri_lokal.aux I've added this to my mapfile LAYER NAME "kay_uydu7" STATUS ON TYPE RASTER MAXSCALE 24999 DATA "uydu/kayseri_lokal.sid" GROUP "kay_uydu7" METADATA "queryable" "true" "imageformat" "alpha" END TRANSPARENCY alpha CLASS END END The extent of my mapfile is: EXTENT 440773 4282202 467369 4295904 This is the contents of my sdw file which should put the raster on the right extent: 1.000000000000000 0.000000000000000 0.000000000000000 -1.000000000000000 440773.000000000000000 467369.000000000000000 I've also tried making this a wld file in case gdal does not recognize sdw file. When I type gdalinfo on sid file I get: Driver: MrSID/Multi-resolution Seamless Image Database (MrSID) Size is 55564, 66276 Coordinate System is `' Origin = (75393.500000000000000,137653.500000000000000) Pixel Size = (1.000000000000000,-1.000000000000000) Metadata: IMAGE__INPUT_NAME=j:/kayseri_ik_lokal_v5/mrsid_lokal.img IMAGE__INPUT_FILE_SIZE=11047678992.000000 GEOTIFF_NUM__1024__GTModelTypeGeoKey=0 GEOTIFF_CHAR__GTModelTypeGeoKey=Undefined GEOTIFF_NUM__1025__GTRasterTypeGeoKey=1 GEOTIFF_CHAR__GTRasterTypeGeoKey=RasterPixelIsArea IMAGE__DYNAMIC_RANGE_LEVEL=127.500000 GEOTIFF_NUM__3076__ProjLinearUnitsGeoKey=9014 GEOTIFF_CHAR__ProjLinearUnitsGeoKey=Linear_Fathom IMAGE__DYNAMIC_RANGE_WINDOW=255.000000 GEO__ModelTypeGeoKey=0 IMG__HORIZONTAL_UNITS=other IMAGE__COMPRESSION_VERSION=1,6,-3 IMAGE__TARGET_COMPRESSION_RATIO=20.000000 IMAGE__COMPRESSION_NLEV=8 IMAGE__COMPRESSION_WEIGHT=4.000000 IMAGE__COMPRESSION_GAMMA=2.000000 IMAGE__COMPRESSION_BLOCK_SIZE=512 IMAGE__CREATION_DATE=Fri Aug 03 13:21:10 2007 IMAGE__WIDTH=55564 IMAGE__HEIGHT=66276 IMAGE__COLOR_SCHEME=0 IMAGE__DATA_TYPE=0 IMAGE__BITS_PER_SAMPLE=8 IMAGE__XY_ORIGIN=75394.000000,137653.000000 IMAGE__X_RESOLUTION=1.000000 IMAGE__Y_RESOLUTION=1.000000 Corner Coordinates: Upper Left ( 75393.500, 137653.500) Lower Left ( 75393.500, 71377.500) Upper Right ( 130957.500, 137653.500) Lower Right ( 130957.500, 71377.500) Center ( 103175.500, 104515.500) Band 1 Block=1024x128 Type=Byte, ColorInterp=Red Overviews: 27782x33138, 13891x16569, 6946x8285, 3473x4143, 1737x2072, 869x1036, 435x518, 218x259 Band 2 Block=1024x128 Type=Byte, ColorInterp=Green Overviews: 27782x33138, 13891x16569, 6946x8285, 3473x4143, 1737x2072, 869x1036, 435x518, 218x259 Band 3 Block=1024x128 Type=Byte, ColorInterp=Blue Overviews: 27782x33138, 13891x16569, 6946x8285, 3473x4143, 1737x2072, 869x1036, 435x518, 218x259 When I change the mapfile extent to: EXTENT 75393 71377 137653 130957 I can see the raster layer normally.But I need to move it to my initial mapfile extent (since all the other data is there) Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From dejan.gambin at PULA.HR Sun Nov 11 23:56:33 2007 From: dejan.gambin at PULA.HR (Dejan Gambin) Date: Mon, 12 Nov 2007 08:56:33 +0100 Subject: aaigrid display problem Message-ID: Hi, I have successfully clasified the dana in .asc file and it is looking good. I am just seeing some lack in performance so I would just like to know if there are some performance tips I can use, similar to other raster performance techniques (tiling, tileindexes, overviews)? Thanks very much Regards, dejan -------------- next part -------------- An HTML attachment was scrubbed... URL: From arthan at DSL.TTNET.NET.TR Mon Nov 12 01:04:07 2007 From: arthan at DSL.TTNET.NET.TR (Volkan Ulukut) Date: Mon, 12 Nov 2007 11:04:07 +0200 Subject: Georeferencing Mrsid raster file with a world file In-Reply-To: Message-ID: I've renamed world file and the extent is stil the same. So I assume there is a native georeferencing data as you call. But the thing is the dataset already has sdw file so there shouldn't be any conflict with gdal. I've googled a little and find out that sdw world files are recognized by gdal and wld files are recognized by mapserver so i tried both and failed to change the extent. MrSID tools change the sdw file not the embedded data I'm afraid. I cannot change the format because of the performance issues. The file that big might cause some problems. I'm not a GIS expert but these layers work fine with GIS software which means their projection and registries match. But GIS software take sdw file into account. Mapserver should do that too. This is either a bug on mapserver - gdal side or I don't have a correctly configured gdal - mapserver which I doubt because I can see the raster image when I set my mapfile to its extent. Layer configuration in mapfile might also be wrong since there are 3 files and 2 different methods to open them ( I believe i tried all the combinations though) _____ From: Rahkonen Jukka [mailto:Jukka.Rahkonen at mmmtike.fi] Sent: Monday, November 12, 2007 9:56 AM To: Volkan Ulukut; MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Georeferencing Mrsid raster file with a world file Hi, I do not know anything about MrSID, but I believe you have some conflict between MrSID native georeference data and world file and MapServer (or DGAL) gives priority for the native data. To check this you could rename the world file to .BAK or whatever and see if the situation remains the same. If this is the case three alternatives comes into my mind: - ask if there is some hidden switch to tell GDAL to give priority for the world file by sending a question to GDAL-dev mailing list - try to find some MrSID tool that could be used for changing the embedded metadata - try to convert your image to some other format and drop the georeferencing information totally; then you can use your world file with the new image. I know that it is possible to tell GDAL to write clean tiff files without Geotiff tags so tiff could be used with the last approach, but unfortunately your image is far too big to be uncompressed to tiff. And probably you would prefer keeping the image compressen anyway. Are you sure that the world file extensions and your default projection are correct for the MrSID image, and not the embedded data? -Jukka Rahkonen- _____ L?hett?j?: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Puolesta Volkan Ulukut L?hetetty: 12. marraskuuta 2007 7:57 Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU Aihe: [UMN_MAPSERVER-USERS] Georeferencing Mrsid raster file with a world file Greetings list, I've encountered a problem while trying to publish a sid file. The sid file does not show in the extent I'm trying to show instead it has a fixed extent and shows there. I got 3 files with the same prefix kayseri_lokal.sid kayseri_lokal.sdw kayseri_lokal.aux I've added this to my mapfile LAYER NAME "kay_uydu7" STATUS ON TYPE RASTER MAXSCALE 24999 DATA "uydu/kayseri_lokal.sid" GROUP "kay_uydu7" METADATA "queryable" "true" "imageformat" "alpha" END TRANSPARENCY alpha CLASS END END The extent of my mapfile is: EXTENT 440773 4282202 467369 4295904 This is the contents of my sdw file which should put the raster on the right extent: 1.000000000000000 0.000000000000000 0.000000000000000 -1.000000000000000 440773.000000000000000 467369.000000000000000 I've also tried making this a wld file in case gdal does not recognize sdw file. When I type gdalinfo on sid file I get: Driver: MrSID/Multi-resolution Seamless Image Database (MrSID) Size is 55564, 66276 Coordinate System is `' Origin = (75393.500000000000000,137653.500000000000000) Pixel Size = (1.000000000000000,-1.000000000000000) Metadata: IMAGE__INPUT_NAME=j:/kayseri_ik_lokal_v5/mrsid_lokal.img IMAGE__INPUT_FILE_SIZE=11047678992.000000 GEOTIFF_NUM__1024__GTModelTypeGeoKey=0 GEOTIFF_CHAR__GTModelTypeGeoKey=Undefined GEOTIFF_NUM__1025__GTRasterTypeGeoKey=1 GEOTIFF_CHAR__GTRasterTypeGeoKey=RasterPixelIsArea IMAGE__DYNAMIC_RANGE_LEVEL=127.500000 GEOTIFF_NUM__3076__ProjLinearUnitsGeoKey=9014 GEOTIFF_CHAR__ProjLinearUnitsGeoKey=Linear_Fathom IMAGE__DYNAMIC_RANGE_WINDOW=255.000000 GEO__ModelTypeGeoKey=0 IMG__HORIZONTAL_UNITS=other IMAGE__COMPRESSION_VERSION=1,6,-3 IMAGE__TARGET_COMPRESSION_RATIO=20.000000 IMAGE__COMPRESSION_NLEV=8 IMAGE__COMPRESSION_WEIGHT=4.000000 IMAGE__COMPRESSION_GAMMA=2.000000 IMAGE__COMPRESSION_BLOCK_SIZE=512 IMAGE__CREATION_DATE=Fri Aug 03 13:21:10 2007 IMAGE__WIDTH=55564 IMAGE__HEIGHT=66276 IMAGE__COLOR_SCHEME=0 IMAGE__DATA_TYPE=0 IMAGE__BITS_PER_SAMPLE=8 IMAGE__XY_ORIGIN=75394.000000,137653.000000 IMAGE__X_RESOLUTION=1.000000 IMAGE__Y_RESOLUTION=1.000000 Corner Coordinates: Upper Left ( 75393.500, 137653.500) Lower Left ( 75393.500, 71377.500) Upper Right ( 130957.500, 137653.500) Lower Right ( 130957.500, 71377.500) Center ( 103175.500, 104515.500) Band 1 Block=1024x128 Type=Byte, ColorInterp=Red Overviews: 27782x33138, 13891x16569, 6946x8285, 3473x4143, 1737x2072, 869x1036, 435x518, 218x259 Band 2 Block=1024x128 Type=Byte, ColorInterp=Green Overviews: 27782x33138, 13891x16569, 6946x8285, 3473x4143, 1737x2072, 869x1036, 435x518, 218x259 Band 3 Block=1024x128 Type=Byte, ColorInterp=Blue Overviews: 27782x33138, 13891x16569, 6946x8285, 3473x4143, 1737x2072, 869x1036, 435x518, 218x259 When I change the mapfile extent to: EXTENT 75393 71377 137653 130957 I can see the raster layer normally.But I need to move it to my initial mapfile extent (since all the other data is there) Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From aberenyi at BURKEN.HU Mon Nov 12 01:48:26 2007 From: aberenyi at BURKEN.HU (=?ISO-8859-2?Q?Ber=E9nyi_Attila?=) Date: Mon, 12 Nov 2007 10:48:26 +0100 Subject: mysql ogr connection Message-ID: Dear All, I'm using some data from a MySQL database through OGR connection (in chameleon). But the map displays only if I log in to the appropriate database (thorough phpmyadmin for example). There's nothing in the mysql log. Any idea? Thanks in advance, Attila -- Ber?nyi Attila Attila Ber?nyi t?rinformatikus GIS engineer Burken Kft. Burken Ltd. -------------------------------------- H-1155 Budapest, Obsitos t?r 2. Tel.: +36-1-415-0219 +36-1-415-0220 Fax: +36-1-410-1314 E-mail: aberenyi at burken.hu From ml.dje at GEOCONTENT.DE Mon Nov 12 02:19:33 2007 From: ml.dje at GEOCONTENT.DE (Dirk Jesko) Date: Mon, 12 Nov 2007 11:19:33 +0100 Subject: WFS-Server delivers no features Message-ID: Hello, I am trying to setup a WFS- and WMS-Server on the same data. See the map file below. If I query server via WMS, several points are displayed, but if I query the same area via WFS (without any filter), the returned GML contains only a element, but no features. I already checked the query sent to the Postgres database. It has a non-empty result. Therefore, I assume that the problem must be on the mapserver side, but I have no idea. Is there anything wrong with the mapfile? The results of the GetCapabilities and DescribeFeaturetype queries are correct. Thanks for any help, Dirk Jesko We use the following mapserver version: MapServer version 4.10.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG The mapfile looks like this: MAP NAME "GCO" STATUS ON IMAGETYPE jpeg IMAGECOLOR 255 255 255 EXTENT 11.66 52.14 11.68 52.16 SIZE 500 500 SHAPEPATH "." SYMBOLSET "symbols.sym" PROJECTION "init=epsg:4326" END WEB METADATA "wfs_title" "GCO (WFS)" "wfs_onlineresource" "http://.../cgi-bin/wfs_gco.exe?" "wfs_srs" "EPSG:4326" "wms_title" "GCO (WMS)" "wms_abstract" "..." "wms_onlineresource" "http://.../cgi-bin/wfs_gco.exe?" "wms_srs" "EPSG:4326 EPSG:31466 EPSG:31467 EPSG:31468 EPSG:31469 EPSG:32632 EPSG:32633 EPSG:80000" "wms_encoding" "UTF-8" "wms_feature_info_mime_type" "application/vnd.ogc.gml" END MAXSCALE 100000 MINSCALE 1 IMAGEPATH "D:/www/htdocs/mstmp/" IMAGEURL "/mstmp/" END OUTPUTFORMAT NAME png DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE RGB EXTENSION "png" FORMATOPTION "INTERLACE=ON" END OUTPUTFORMAT NAME png DRIVER "GD/GIF" MIMETYPE "image/gif" IMAGEMODE PC256 EXTENSION "" FORMATOPTION "INTERLACE=ON" TRANSPARENT ON END LAYER NAME "gco" GROUP "gco" CONNECTIONTYPE postgis CONNECTION "user=... password=... dbname=... host=... port=..." DATA "the_geom from geoobj.gco using unique id using SRID=4326" STATUS ON TYPE POINT DUMP TRUE PROJECTION "init=epsg:4326" END MAXSCALE 100000 MINSCALE 1 METADATA "wfs_title" "gco" "wfs_extent" "11.66 52.14 11.68 52.16" "gml_featureid" "id" "gml_include_items" "all" "gml_exclude_items" "quellen" "wms_title" "gco" "wms_group_title" "gco" END CLASS STYLE SYMBOL "circle" OUTLINECOLOR -1 -1 -1 COLOR 0 0 255 SIZE 3 END END END END From mpulis at GMAIL.COM Mon Nov 12 02:52:56 2007 From: mpulis at GMAIL.COM (Matthew Pulis) Date: Mon, 12 Nov 2007 04:52:56 -0600 Subject: Installation Problem when Configuring Message-ID: Hi, I am trying to configure the installation of Mapserver, and this is the line I am using for configure : yancho at Ubuntu:~/mapserver-5.0.0$ ./configure --with-postgis=/usr/lib/ postgresql/8.1/bin/pg_config --with-jpeg --with-xml2-config=/usr/bin/xml2- config --with-sos with-threads --with-httpd=/etc/apache2 --with-ogr=/usr/ bin/gdal-config --with-ogr=/usr/bin/gdal-config --with-wcs --with-wfsclient -- with-wmsclient --with-geos=/usr/bin/geos-config and this is the error I am getting : checking if GEOS support requested... yes user supplied geos-config (/usr/bin/geos-config) checking for GEOS version >= 2.2.2... no configure: error: geos-config reports version 2.1.4, need at least 2.2.2 or configure --without-geos yancho at Ubuntu:~/mapserver-5.0.0$ I tried to check on Ubuntu packages from where to upgrade geos-config but found nowhere .. any idea what I can do please? Thanks beforehand :) From mpulis at GMAIL.COM Mon Nov 12 04:35:40 2007 From: mpulis at GMAIL.COM (Matthew Pulis) Date: Mon, 12 Nov 2007 06:35:40 -0600 Subject: Installation Problem when Configuring Message-ID: Hi, I fixed the problem of the OSGeo, basically I upgraded and it is fine now, however the problem I am having is in the make process : g++ -O2 -fPIC -Wall -DNEED_NONBLOCKING_STDERR -DHAVE_VSNPRINTF - DNEED_STRLCAT -DUSE_EPPL -DUSE_JPEG -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW - DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DUSE_OGR - DUSE_GEOS -DUSE_ICONV -DUSE_POSTGIS -DUSE_ZLIB -I/usr/ include -I/usr/include -I/usr/include/postgresql -I/usr/local/include shp2img.o -L. -lmapserver -lgd -L/usr/lib -lgd -ljpeg -lfreetype -lpng -lz -lXpm -lX11 -ljpeg -lfreetype -lpng -lz -lXpm -lX11 -ljpeg -L/usr/lib -lgdal -L/usr/ lib -lgeos -lodbc -L/usr/lib -lxerces-c -lpthread -ljasper -lmfhdf -ldf -lgif -ljpeg - ltiff -lpng -lnetcdf -lcfitsio -lz -lpthread -lm -ldl -L/usr/lib -lpq -L/usr/lib -lpq -L/usr/local/lib -lgeos_c -lc -lz -lm -lstdc++ -o shp2img /usr/bin/ld: cannot find -lxerces-c collect2: ld returned 1 exit status make: *** [shp2img] Error 1 yancho at Ubuntu:~/mapserver-5.0.0$ any idea what I need? any help will be much appreciated. Thanks From yjacolin at FREE.FR Mon Nov 12 05:30:28 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Mon, 12 Nov 2007 14:30:28 +0100 Subject: fill opacity in SLD Message-ID: Hi, I am trying to set up a fill-opacity via an SLD url for a polygonal layer. I thought succeed to realize this last week but I failed to do it after changing some code in my application. I read this bug (4 years old): http://trac.osgeo.org/mapserver/ticket/1155 and think it is impossible to do it. My question: is it possible to change the opacity of a layer using an SLD url? I am afraid to had dream last week :( Y. -- Yves Jacolin --- http://softlibre.gloobe.org From yassefa at DMSOLUTIONS.CA Mon Nov 12 06:15:33 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Mon, 12 Nov 2007 09:15:33 -0500 Subject: fill opacity in SLD In-Reply-To: <200711121430.28113.yjacolin@free.fr> Message-ID: Jacolin Yves wrote: > Hi, > > I am trying to set up a fill-opacity via an SLD url for a polygonal layer. I > thought succeed to realize this last week but I failed to do it after > changing some code in my application. I read this bug (4 years old): > http://trac.osgeo.org/mapserver/ticket/1155 and think it is impossible to do > it. > > My question: is it possible to change the opacity of a layer using an SLD url? > SLD 1.0 does not support the opacity parameter at a layer level except for the raster symbolizer. SLD supports opacity setting at "CLASS" level but MapServer does not have the capacity for now to specify opacity per class/style. > I am afraid to had dream last week :( > > Y. -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From warmerdam at POBOX.COM Mon Nov 12 06:17:14 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Mon, 12 Nov 2007 09:17:14 -0500 Subject: Georeferencing Mrsid raster file with a world file In-Reply-To: <20071112090400.DGFB1193.fep03.ttnet.net.tr@volkan> Message-ID: Volkan Ulukut wrote: > I've renamed world file and the extent is stil the same. So I assume > there is a native georeferencing data as you call. But the thing is the > dataset already has sdw file so there shouldn't be any conflict with > gdal. I've googled a little and find out that sdw world files are > recognized by gdal and wld files are recognized by mapserver so i tried > both and failed to change the extent. > > MrSID tools change the sdw file not the embedded data I'm afraid. > > I cannot change the format because of the performance issues. The file > that big might cause some problems. > > I'm not a GIS expert but these layers work fine with GIS software which > means their projection and registries match. But GIS software take sdw > file into account. Mapserver should do that too. This is either a bug on > mapserver -- gdal side or I don't have a correctly configured gdal -- > mapserver which I doubt because I can see the raster image when I set my > mapfile to its extent. Volkan, I take exception to the statements "Mapserver should do that too." and "This is either a bug on mapserver -- gdal side...". The decision whether to use the internal mrsid georeferencing or the .sdw file can be reasonably decided either way. Using the internal information cannot be properly deemed a bug - just a different behavior then you would like. I'm also curious what "GIS software" is. MapServer and GDAL can be considered GIS software, and any GIS software built on GDAL will exhibit the the same behavior (GRASS, QGIS ...). Perhaps you are using some particular other GIS software and find that it's behavior is different? Perhaps you should name it instead of assuming all other GIS software in the world has the behavior you like. Assuming you do not have mrsid compression software (and so you cannot just regenerate the file) another option is to use a VRT wrapper. This is an XML file that makes it easy to modify various metadata, and other supporting information. The steps would be: 1) Create the .vrt file: gdal_translate -of VRT your.sid your.vrt 2) Edit the VRT and modify the elements to match your .sdw file. Hopefully the correspondance between the six numbers in the geotransform and the worldfile will be obvious. 3) Modify your map file to refer to the .vrt file instead of the .sid file. 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 | President OSGeo, http://osgeo.org From yjacolin at FREE.FR Mon Nov 12 06:19:59 2007 From: yjacolin at FREE.FR (Jacolin Yves) Date: Mon, 12 Nov 2007 15:19:59 +0100 Subject: fill opacity in SLD In-Reply-To: <47386005.5090507@dmsolutions.ca> Message-ID: Le Monday 12 November 2007 15:15:33 Yewondwossen Assefa, vous avez ?crit?: > Jacolin Yves wrote: > >[..] > > My question: is it possible to change the opacity of a layer using an SLD > > url? > > SLD 1.0 does not support the opacity parameter at a layer level except > for the raster symbolizer. SLD supports opacity setting at "CLASS" level > but MapServer does not have the capacity for now to specify opacity per > class/style. Thanks :) Y. -- Yves Jacolin --- http://softlibre.gloobe.org From warmerdam at POBOX.COM Mon Nov 12 06:34:18 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Mon, 12 Nov 2007 09:34:18 -0500 Subject: aaigrid display problem In-Reply-To: <003001c82501$8af13e00$0201000a@gradpula.local> Message-ID: Dejan Gambin wrote: > Hi, > > > > I have successfully clasified the dana in .asc file and it is looking > good. I am just seeing some lack in performance so I would just like to > know if there are some performance tips I can use, similar to other > raster performance techniques (tiling, tileindexes, overviews)? Dejan, Convert it to GeoTIFF! Seriously, ascii grid files are an interchange format, not a working format. It is surprisingly expensive (from a performance point of view) to parse big ascii files and convert all those numbers into internal binary form. gdal_translate your.asc your.tif If the dataset is large, tiling and overviews (as normal) may be helpful. 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 | President OSGeo, http://osgeo.org From dejan.gambin at PULA.HR Mon Nov 12 06:43:46 2007 From: dejan.gambin at PULA.HR (Dejan Gambin) Date: Mon, 12 Nov 2007 08:43:46 -0600 Subject: aaigrid display problem Message-ID: Great idea, And I can still query and classify my data, right? Since the current example data I have is pretty small and I saw the performance leak while reading the data, I suppose this is because of work on classifying the data. And this won't change with tif right? Is it better to convert the asc file to esri shape(s)? regards, dejan From aberenyi at BURKEN.HU Mon Nov 12 07:06:53 2007 From: aberenyi at BURKEN.HU (=?ISO-8859-1?Q?Ber=E9nyi_Attila?=) Date: Mon, 12 Nov 2007 16:06:53 +0100 Subject: mysql ogr connection In-Reply-To: <18232.8960.265258.184531@mathind.csd.auth.gr> Message-ID: Yeap, MYSQL:data,user=root,password=*****,host=localhost,port=3306,tables=data SELECT .... wkbPoint Any other idea? Attila Anakreon Mentis ?rta: > Does the url contains the usr and pswd? > > For me it works and the ovf file is: > > > MYSQL:db_test,user=root,password=,host=localhost,port=3306,tables=site > > query > > wkbPoint > > > > > > > -- Ber?nyi Attila Attila Ber?nyi t?rinformatikus GIS engineer Burken Kft. Burken Ltd. -------------------------------------- H-1155 Budapest, Obsitos t?r 2. Tel.: +36-1-415-0219 +36-1-415-0220 Fax: +36-1-410-1314 E-mail: aberenyi at burken.hu From warmerdam at POBOX.COM Mon Nov 12 07:27:59 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Mon, 12 Nov 2007 10:27:59 -0500 Subject: aaigrid display problem In-Reply-To: Message-ID: Dejan Gambin wrote: > Great idea, > > And I can still query and classify my data, right? Dejan, Yes > Since the current example > data I have is pretty small and I saw the performance leak while reading the > data, I suppose this is because of work on classifying the data. And this > won't change with tif right? Is it better to convert the asc file to esri > shape(s)? Ah, indeed geotiff will suffer just as much from the classification cost. One issue is the "number of bins" selected. By default the classification is pre-computed for 65536 possible values which is often overkill. As discussed in (see 2.1.1 in particular): http://mapserver.gis.umn.edu/docs/howto/raster_data/#classifying-rasters you may find it helpful to reduce the SCALE_BUCKETS value and perhaps even set your own min/max. eg. PROCESSING "SCALE_BUCKETS=1000" 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 | President OSGeo, http://osgeo.org From vishu_73ns at YAHOO.COM Mon Nov 12 08:08:21 2007 From: vishu_73ns at YAHOO.COM (vishal nagpal) Date: Mon, 12 Nov 2007 08:08:21 -0800 Subject: mysql ogr connection Message-ID: Hi, you may like to read the discussion Mapserver and MySQL in the same list few days back, Check with ogrinfo --fomats It helped me. All the best. Vishal ----- Original Message ---- From: Ber?nyi Attila To: MAPSERVER-USERS at LISTS.UMN.EDU Sent: Monday, November 12, 2007 8:36:53 PM Subject: Re: [UMN_MAPSERVER-USERS] mysql ogr connection Yeap, MYSQL:data,user=root,password=*****,host=localhost,port=3306,tables=data SELECT .... wkbPoint Any other idea? Attila Anakreon Mentis ?rta: > Does the url contains the usr and pswd? > > For me it works and the ovf file is: > > > MYSQL:db_test,user=root,password=,host=localhost,port=3306,tables=site > > query > > wkbPoint > > > > > > > -- Ber?nyi Attila Attila Ber?nyi t?rinformatikus GIS engineer Burken Kft. Burken Ltd. -------------------------------------- H-1155 Budapest, Obsitos t?r 2. Tel.: +36-1-415-0219 +36-1-415-0220 Fax: +36-1-410-1314 E-mail: aberenyi at burken.hu __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From mpulis at GMAIL.COM Mon Nov 12 08:11:25 2007 From: mpulis at GMAIL.COM (Matthew Pulis) Date: Mon, 12 Nov 2007 10:11:25 -0600 Subject: Problem with loading Demo Data Message-ID: An HTML attachment was scrubbed... URL: From jmckenna at DMSOLUTIONS.CA Mon Nov 12 09:07:09 2007 From: jmckenna at DMSOLUTIONS.CA (Jeff McKenna) Date: Mon, 12 Nov 2007 12:07:09 -0500 Subject: Problem with loading Demo Data In-Reply-To: Message-ID: Yes that looks like you are using the 4.x demo...make sure you download the 'MapServer 5.x Demo Application', this will solve your 'parse error on line 1' problem. -jeff Matthew Pulis wrote: > Hi, After I managed to setup mapserver, and get the normal error of bad > request, which shows the installation is fine, when I installed the demo > page, after fixing some errors, like on line 44, now I have this error : > loadWeb(): Unknown identifier. Parsing error near > (/usr/local/apache/htdocs/tmp/):(line 1) Any idea how I can fix it > please? This is the string I am passign to the mapserv : > http://10.0.0.2/~yancho/cgi- bin/ > mapserv?map=%2Fhome%2Fyancho%2Fpublic_html%2Fitasca%2Fdemo.map&layer=lakespy2&layer=dlgstln2&zoomsize=2&program=%2F%7Eyancho%2Fcgi- > bin%2Fmapserv&map_web_imagepath=%2Fusr%2Flocal%2Fapache%2Fhtdocs%2Ftmp%2F&map_web_imageurl=%2Ftmp%2F > Any help would be extremely appreciated -- Jeff McKenna DM Solutions Group Inc. http://www.dmsolutions.ca From mpulis at GMAIL.COM Mon Nov 12 09:32:03 2007 From: mpulis at GMAIL.COM (Matthew Pulis) Date: Mon, 12 Nov 2007 11:32:03 -0600 Subject: Problem with loading Demo Data Message-ID: I am seeing only this link : http://mapserver.gis.umn.edu/new_users/ index_html#get-demo-running any other options from where I can get the demo for version 5 pls? From thomas.bonfort at GMAIL.COM Mon Nov 12 09:37:22 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Mon, 12 Nov 2007 18:37:22 +0100 Subject: Problem with loading Demo Data In-Reply-To: Message-ID: http://maps.dnr.state.mn.us/mapserver_demos/workshop-5.0.zip -- tb On Nov 12, 2007 6:32 PM, Matthew Pulis wrote: > I am seeing only this link : http://mapserver.gis.umn.edu/new_users/ > index_html#get-demo-running any other options from where I can get the > demo for version 5 pls? > From mpulis at GMAIL.COM Mon Nov 12 11:08:39 2007 From: mpulis at GMAIL.COM (Matthew Pulis) Date: Mon, 12 Nov 2007 13:08:39 -0600 Subject: Problem with loading Demo Data Message-ID: Thanks for the link :) I put up the new folder, however I am getting this error : msSaveImageGD(): Unable to access file. Unable to open file /home/yancho/ pulic_html/tmp/ITASCA119489432912044.png for writing These are the lines I edited : var snippet = "IMAGEPATH '/home/yancho/pulic_html/tmp/'"; snippet += " IMAGEURL '/~yancho/tmp/'"; And I gave access 755 to the folder /tmp There is no error in apache error.log. Any idea what I can fix please? Thanks beforehand From dmorissette at MAPGEARS.COM Mon Nov 12 11:24:56 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Mon, 12 Nov 2007 14:24:56 -0500 Subject: Problem with loading Demo Data In-Reply-To: Message-ID: Matthew Pulis wrote: > > msSaveImageGD(): Unable to access file. Unable to open file /home/yancho/ > pulic_html/tmp/ITASCA119489432912044.png for writing > > These are the lines I edited : > > var snippet = "IMAGEPATH '/home/yancho/pulic_html/tmp/'"; > snippet += " IMAGEURL '/~yancho/tmp/'"; > > > And I gave access 755 to the folder /tmp > Make sure /home/yancho/pulic_html/tmp/ is writable by the user running Apache (usually one of 'apache' or 'nobody'). Access mode 755 gives only read/execute access to those users, but write access is also needed for the tmp directory. You need to either make the web user the owner of the tmp directory, or use access 775 or 777 (depending on the group setting of the directory). Also make sure that all directories in the path leading to "tmp" are also accessible to the web user. It is common for home directories on Linux to be protected (700) by default, so it's possible that you also need to 'chmod 755 /home/yancho/' to make contents of your home account accessible to the web user. Daniel -- Daniel Morissette http://www.mapgears.com/ From mpulis at GMAIL.COM Mon Nov 12 11:52:40 2007 From: mpulis at GMAIL.COM (Matthew Pulis) Date: Mon, 12 Nov 2007 13:52:40 -0600 Subject: Problem with loading Demo Data Message-ID: Hi, the folder /tmp is 700 and is owned by www-data (Apache user). yancho at Ubuntu:~/public_html$ sudo chown www-data -R tmp yancho at Ubuntu:~/public_html$ ls -al tmp/ total 8 drwxrwxrwx 2 www-data yancho 4096 2007-11-12 19:39 . drwxr-xr-x 7 yancho yancho 4096 2007-11-12 19:39 .. I gave 755 to /home/yancho/public_html .. every folder now has 755. Really no idea what else does this script want more as regards to access :| Any ideas will be very helpful please :) Thanks From dmorissette at MAPGEARS.COM Mon Nov 12 12:30:33 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Mon, 12 Nov 2007 15:30:33 -0500 Subject: Problem with loading Demo Data In-Reply-To: Message-ID: Matthew Pulis wrote: > > I gave 755 to /home/yancho/public_html .. every folder now has 755. > Did you also 'chmod 755 /home/yancho'? > Really no idea what else does this script want more as regards to access :| > All it needs really is the permission to reach that directory (hence the 755 on /home/yancho as well) and to write to it. Daniel -- Daniel Morissette http://www.mapgears.com/ From atulai at ENGMAIL.UWATERLOO.CA Mon Nov 12 13:56:02 2007 From: atulai at ENGMAIL.UWATERLOO.CA (atulai) Date: Mon, 12 Nov 2007 13:56:02 -0800 Subject: Mapserver & GMap75 Projection and units origin issue In-Reply-To: <13342383.post@talk.nabble.com> Message-ID: I don't suppose anyone could help me on this? Try #2: Is there any way to reproject Gmap75 from it's default projection, to a stereographic projection in a way that I could display data that uses the mercator projection? atulai wrote: > > I've been trying to get this to work properly for a few weeks now. I'm > trying to get GMap 75 to project using this projection: > > PROJECTION > "proj=lcc" > "lat_1=50" > "lat_2=70" > "lat_0=40" > "lon_0=-96" > "x_0=0" > "y_0=0" > "ellps=GRS80" > "datum=NAD83" > "units=m" > "no_defs" > END > > and to display coordinates in latlon. From what I can see it's working > allright now. I also have a set of data that uses the projection above. > The problem is, Gmap's origin is just below Canada, which causes all of my > data to be located far to the north-west away from Canada which is > incorrect. Is there any way I can somehow force the origin to be located > where it's actually supposed to be (latlon (0,0))? > > Changing > "lat_0=40" > "lon_0=-96" > to > "lat_0=0" > "lon_0=0" > doesn't seem to do anything. > > Is this possible or is it just a Gmap restriction? > > Any help or guidance is much appreciated. > > Thanks! > -- View this message in context: http://www.nabble.com/Mapserver---GMap75-Projection-and-units-origin-issue-tf4670577.html#a13715142 Sent from the Mapserver - User mailing list archive at Nabble.com. From arthan at DSL.TTNET.NET.TR Mon Nov 12 14:47:26 2007 From: arthan at DSL.TTNET.NET.TR (Volkan Ulukut) Date: Tue, 13 Nov 2007 00:47:26 +0200 Subject: Georeferencing Mrsid raster file with a world file In-Reply-To: <4738606A.2050705@pobox.com> Message-ID: Frank Thanks for your help. I was able to change extent of the raster with vrt file. About my statements, I'm not a GIS expert and the only thing I did about sid files are getting them from business partners. That's why I spoke a little foggy I don't know with which software they did work all I know is they were absolutly sure the extents were correctly set. Why I said what mapserver should do? Because I read that mapserver supports mrsid files and world files that's why I assumed this should work. Sorry if I sounded a little offensive. Thanks again vrt method works. Regards -----Original Message----- From: Frank Warmerdam [mailto:warmerdam at pobox.com] Sent: Monday, November 12, 2007 4:17 PM To: Volkan Ulukut Cc: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Georeferencing Mrsid raster file with a world file Volkan Ulukut wrote: > I've renamed world file and the extent is stil the same. So I assume > there is a native georeferencing data as you call. But the thing is the > dataset already has sdw file so there shouldn't be any conflict with > gdal. I've googled a little and find out that sdw world files are > recognized by gdal and wld files are recognized by mapserver so i tried > both and failed to change the extent. > > MrSID tools change the sdw file not the embedded data I'm afraid. > > I cannot change the format because of the performance issues. The file > that big might cause some problems. > > I'm not a GIS expert but these layers work fine with GIS software which > means their projection and registries match. But GIS software take sdw > file into account. Mapserver should do that too. This is either a bug on > mapserver -- gdal side or I don't have a correctly configured gdal -- > mapserver which I doubt because I can see the raster image when I set my > mapfile to its extent. Volkan, I take exception to the statements "Mapserver should do that too." and "This is either a bug on mapserver -- gdal side...". The decision whether to use the internal mrsid georeferencing or the .sdw file can be reasonably decided either way. Using the internal information cannot be properly deemed a bug - just a different behavior then you would like. I'm also curious what "GIS software" is. MapServer and GDAL can be considered GIS software, and any GIS software built on GDAL will exhibit the the same behavior (GRASS, QGIS ...). Perhaps you are using some particular other GIS software and find that it's behavior is different? Perhaps you should name it instead of assuming all other GIS software in the world has the behavior you like. Assuming you do not have mrsid compression software (and so you cannot just regenerate the file) another option is to use a VRT wrapper. This is an XML file that makes it easy to modify various metadata, and other supporting information. The steps would be: 1) Create the .vrt file: gdal_translate -of VRT your.sid your.vrt 2) Edit the VRT and modify the elements to match your .sdw file. Hopefully the correspondance between the six numbers in the geotransform and the worldfile will be obvious. 3) Modify your map file to refer to the .vrt file instead of the .sid file. 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 | President OSGeo, http://osgeo.org From mpulis at GMAIL.COM Tue Nov 13 01:09:39 2007 From: mpulis at GMAIL.COM (Matthew Pulis) Date: Tue, 13 Nov 2007 03:09:39 -0600 Subject: Problem with loading Demo Data Message-ID: Yes every folder from /home up to /tmp is 755. Its quite strange ey :S Do you have any other suggestions please? BTW I am using Ubuntu Dapper (6.06) as my OS. From thomas.bonfort at GMAIL.COM Tue Nov 13 01:25:03 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Tue, 13 Nov 2007 10:25:03 +0100 Subject: Problem with loading Demo Data In-Reply-To: Message-ID: On Nov 13, 2007 10:09 AM, Matthew Pulis wrote: > Yes every folder from /home up to /tmp is 755. Its quite strange ey :S we're not talking about /tmp here but /home/yancho/public_html/tmp type these commands, just to make sure: sudo chmod 755 /home/yancho chmod 755 /home/yancho/public_html chmod 777 /home/yancho/public_html/tmp > > Do you have any other suggestions please? > > BTW I am using Ubuntu Dapper (6.06) as my OS. > From mpulis at GMAIL.COM Tue Nov 13 01:35:18 2007 From: mpulis at GMAIL.COM (Matthew Pulis) Date: Tue, 13 Nov 2007 03:35:18 -0600 Subject: Problem with loading Demo Data Message-ID: Hi, I deleted (rm) the folder tmp and recreated it (mkdir). I copied all of the commands that you gave me but still this error : msSaveImageGD(): Unable to access file. Unable to open file /home/yancho/ pulic_html/tmp/ITASCA11949461793929.png for writing Thanks again for the help From porath at WEB.DE Tue Nov 13 01:39:35 2007 From: porath at WEB.DE (H. Porath) Date: Tue, 13 Nov 2007 03:39:35 -0600 Subject: Georeferencing Mrsid raster file with a world file Message-ID: Volkan, we had the same problem with our mrsid files. We solved it by patching mrsiddataset.cpp in gdal. gdal first looks for internal georeferences and only looks for worldfiles if the internal georeferencing failes. We just changed this behaviour by exchanging two blocks of code. Now, gdal first looks for world files and then uses internal georeferences. In detail: before: if ( !poImageReader->isGeoCoordImplicit() ) { ... block a .... } else if( iZoom == 0 ) { ... block b ... } after: if( iZoom == 0 ) { ... block b ... } else if( !poImageReader->isGeoCoordImplicit() ) { ... block a ... } Hope this helps, Holger From mpulis at GMAIL.COM Tue Nov 13 01:52:43 2007 From: mpulis at GMAIL.COM (Matthew Pulis) Date: Tue, 13 Nov 2007 03:52:43 -0600 Subject: Problem with loading Demo Data Message-ID: Thanks to thomas, he just realised that I was using pulic_html instead of puBlic_html .. grr .. a typo and wasted so many time :( Thanks to thomas and to who else tried to fix this problem :) From aberenyi at BURKEN.HU Tue Nov 13 04:46:56 2007 From: aberenyi at BURKEN.HU (=?ISO-8859-2?Q?Ber=E9nyi_Attila?=) Date: Tue, 13 Nov 2007 13:46:56 +0100 Subject: scalebar and rulerresults Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dear All, It's me again... I'm having trouble with the rulerresult and scalebar widgets. 1. The scalebar is totally unreadable until i click the recenter button below the keymap. After that tha scalebar is OK. 2. The map units are in degree and the RulerResults widget's results are false until I click 'Zoom to full extents'. After that everything is working fine. .map file: MAP EXTENT 400000 28254 950000 371746 .... REFERENCE EXTENT 400000 28254 950000 371746 ... WEB METADATA "original_projection" "init=epsg:23700" "original_extents" "400000,28254,950000,371746" .... I think something is not correlating with my extents, but I cannot find what is it? Any idea? Thanks in advance, Attila -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHOZzA76iTSmN9z2ARAjCWAJ0d6O3z+pe/lnH8ZzMZ5++JywoyZgCePNEz UYiMsEdNLEvzjtNvXDQ5nYw= =Rf4c -----END PGP SIGNATURE----- From steven.ottens at GEODAN.NL Tue Nov 13 05:16:40 2007 From: steven.ottens at GEODAN.NL (Steven M. Ottens) Date: Tue, 13 Nov 2007 14:16:40 +0100 Subject: getCapabilities not valid XML (MSXML) Message-ID: Hi all, My mapbuilder/openlayers application wasn't working on IE7, it complained that the WMS getCapabilities doc generated by Mapserver wasn't valid XML. I've finally tracked it down to the doctype declaration: Mapserver produces ]> The parser removes both the tag and the tag from the XML before parsing. So normally the to-be-parsed XML text starts with: Which is a valid piece of XML However MSXML apparently thinks that the closing > after EMPTY belongs to the opening < before !DOCTYPE. So instead now the XML text starts with: ]> Which obviously isn't valid XML and MSXML fails. So my questions: -Anyone else noticed this problem? -Why is there an (empty!) ELEMENT declaration within the DOCTYPE? -How can I remove this ELEMENT? Regards, Steven From g2c.martel at ORANGE.FR Tue Nov 13 05:40:43 2007 From: g2c.martel at ORANGE.FR (Julien) Date: Tue, 13 Nov 2007 14:40:43 +0100 Subject: Upgrading Mapscript from 4.10.1 to 5.0 causes an Apache crash Message-ID: Hi all (sorry if double posted), Upgrading Mapserver/Mapscript from 4.10.1 to 5.0 causes an apache crash on our server, with all our projects (with more or less complex mapfiles). I have no error during mapscript compilation. When PHP is installed as an apache DSO the error log reports the following errors : *** glibc detected *** /www/bin/httpd: free(): invalid next size (fast): 0x0867db38 *** [Wed Nov 7 13:54:06 2007] [notice] child pid 23219 exit signal Segmentation fault (11) When PHP is installed as a CGI executable, the error log reports the following : [Thu Nov 8 14:56:46 2007] [error] [client xxx.xxx.xxx.52] Premature end of script headers: /www/cgi-bin/php Downgrading to 4.10.1 makes everything working back again. I didn't succeeded in replicating the problem on a test machine using the same software environnement. Here's my software environnement (everything built from source) : Ubuntu 6.10 Server Apache 1.3.39 with OpenSSL 0.9 PHP 4.4.4 (I tried to build php as an Apache DSO as well as CGI, both are crashing) Curl and LibCurl 7.15.5 Freetype 2.3.4 GD 2.0.35 Gdal 1.4.3 GEOS 2.2.3 GeoTiff 1.2.3 Tiff 3.7.1 Zlib 1.2.3 Any help would be greatly appreciated. G2C informatique *Julien MARTEL* Technicien Informatique et R?seaux 2 Avenue Madeleine Bonnaud Parc d'Activit?s, Point Rencontre 13770 Venelles - FRANCE Tel : +33 (0) 4 42 54 00 68 Fax : +33 (0) 4 42 54 06 78 e-mail : j.martel at g2c.fr web : www.g2c.fr Lire les conditions l?gales d'utilisation de cet e-mail *Venez nous retrouver sur les prochains salons* * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 4554 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 16412 bytes Desc: not available URL: From dmorissette at MAPGEARS.COM Tue Nov 13 05:54:02 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Tue, 13 Nov 2007 08:54:02 -0500 Subject: getCapabilities not valid XML (MSXML) In-Reply-To: <4739A3B8.9010407@geodan.nl> Message-ID: Steven, The EMPTY element declaration in the DOCTYPE was simply inspired from the example found in the spec itself (in Annex A.2 of WMS 1.1.1 and also present in most/all previous revisions). I'm no XML guru so I'm not sure what the best fix is, but once you find out I'd invite you to file a ticket documenting the original problem and the new format that makes MSXML and other parsers happy. Daniel Steven M. Ottens wrote: > Hi all, > > My mapbuilder/openlayers application wasn't working on IE7, it > complained that the WMS getCapabilities doc generated by Mapserver > wasn't valid XML. I've finally tracked it down to the doctype declaration: > Mapserver produces > > "http://schemas.opengeospatial.net/wms/1.1.1/capabilities_1_1_1.dtd" > [ > > ]> > > The parser removes both the tag and the tag from > the XML before parsing. So normally the to-be-parsed XML text starts with: > > Which is a valid piece of XML > However MSXML apparently thinks that the closing > after EMPTY belongs > to the opening < before !DOCTYPE. So instead now the XML text starts with: > ]> > Which obviously isn't valid XML and MSXML fails. > > So my questions: > -Anyone else noticed this problem? > -Why is there an (empty!) ELEMENT declaration within the DOCTYPE? > -How can I remove this ELEMENT? > > Regards, > Steven -- Daniel Morissette http://www.mapgears.com/ From trondmm-mapserver at CRUSADERS.NO Tue Nov 13 07:50:07 2007 From: trondmm-mapserver at CRUSADERS.NO (Trond Michelsen) Date: Tue, 13 Nov 2007 16:50:07 +0100 Subject: How do I propagate failures from upstream wms-servers? In-Reply-To: <20071106163517.GB8457@crusaders.no> Message-ID: No takers? I feel like I'm being Warnocked here :) I really hope the silence isn't an indication that the question is too stupid. Getting blank images instead of an error message is actually a big problem with my server configuration, as I'm caching all responses with an image/* content-type. On Tue, Nov 06, 2007 at 05:35:17PM +0100, Trond Michelsen wrote: > In my mapfile, I have several layers with connectiontype WMS. Once in > a while, the WMS-servers that deliver these layers will fail, usually > due to high load, and return an application/vnd.ogc.se_xml > exception. In these cases, I'd like mapserver to return an exception > as well, but instead, mapserver will just log the error message in > MS_ERRORFILE, and continue drawing the rest of the layers. If there > are no more layers, it will result in a blank image. > > (BTW: I've also noticed the same behaviour if the remote wms-server > answers with an internal server error) > > Here's the layer definition that I use for testing. exception.cgi will > always return a dummy XML exception. > > LAYER > NAME "exception" > TYPE RASTER > STATUS ON > CONNECTION "http://wms1.oslo.dnmi.no/cgi-bin/exception.cgi" > CONNECTIONTYPE WMS > OFFSITE 255 255 254 > METADATA > "wms_srs" "EPSG:4326" > "wms_name" "exception" > "wms_server_version" "1.1.1" > "wms_formatlist" "image/png" > "wms_format" "image/png" > "wms_exceptions_format" "application/vnd.ogc.se_xml" > END #metadata > END #layer > > Is there something I can do to force mapserver to fail, and return an > exception if it fails to draw any of the wms-layers? > > I'm using mapserver 4.10 > > $ cgi-bin/mapserv -v > MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG > > > -- > Trond Michelsen > -- Trond Michelsen From trondmm-mapserver at CRUSADERS.NO Tue Nov 13 08:21:29 2007 From: trondmm-mapserver at CRUSADERS.NO (Trond Michelsen) Date: Tue, 13 Nov 2007 17:21:29 +0100 Subject: Why does mapserver shave off a pixel from the bounding box? Message-ID: Hi. I'm using mapserver 4.10.0 and I've noticed that mapserver changes the bbox of incoming WMS-requests. At first I thought there was some inconsistencies with my proj-definitions that caused a small correction when mapserver fetched external WMS-layers. But now I've noticed that mapserver always reduces the width and height of the bounding box with the equivialent of a single pixel, then recenters it. e.g. a BBOX of 950,7975,1450,8725 becomes 950.625,7975.625,1449.375,8724.375 when the imagesize is 400x600. What is the reason for this? Won't this be a problem when generating tiled images, as there will be a 1 pixel wide strip of the map "between" the tiles that aren't plotted? If mapserver needs to use the smaller bbox internally, shouldn't it at least use the original bbox when fetching layers from external WMS- servers? If a layer happens to be cascaded through, say, ten levels of WMS-servers, all running mapserver, then the final bbox could get significantly smaller than the original. Here's a test-script in perl that demonstrates the behaviour: --8<-- #!/usr/bin/perl use strict; use warnings; use mapscript; my $mapfile = "test.map"; my $map = mapscript::mapObj->new( $mapfile ); my $req = mapscript::OWSRequest->new(); $req->setParameter(SERVICE => "WMS"); $req->setParameter(VERSION => "1.1.1"); $req->setParameter(REQUEST => "GetMap"); $req->setParameter(LAYERS => "dummy"); $req->setParameter(STYLES => "default"); $req->setParameter(SRS => "EPSG:32632"); $req->setParameter(BBOX => "950,7975,1450,8725"); $req->setParameter(WIDTH => "400"); $req->setParameter(HEIGHT => "600"); $req->setParameter(EXCEPTIONS => "application/vnd.ogc.se_xml"); $req->setParameter(FORMAT => "image/png"); $map->loadOWSParameters($req); print $map->{extent}->toString(), "\n"; --8<-- and a dummy map-file: --8<-- MAP PROJECTION "init=epsg:32632" END LAYER name "dummy" type polygon END END --8<-- -- Trond Michelsen From trondmm-mapserver at CRUSADERS.NO Tue Nov 13 08:46:58 2007 From: trondmm-mapserver at CRUSADERS.NO (Trond Michelsen) Date: Tue, 13 Nov 2007 17:46:58 +0100 Subject: Why does mapserver shave off a pixel from the bounding box? In-Reply-To: <20071113162129.GE16013@crusaders.no> Message-ID: On Tue, Nov 13, 2007 at 05:21:29PM +0100, Trond Michelsen wrote: > I'm using mapserver 4.10.0 and I've noticed that mapserver changes the > bbox of incoming WMS-requests. At first I thought there was some > inconsistencies with my proj-definitions that caused a small > correction when mapserver fetched external WMS-layers. But now I've > noticed that mapserver always reduces the width and height of the > bounding box with the equivialent of a single pixel, then recenters > it. Hang on... I should probably have looked harder at the source before posting. I just found this in mapwms.c: /* ** WMS extents are edge to edge while MapServer extents are center of ** pixel to center of pixel. Here we try to adjust the WMS extents ** in by half a pixel. We wait till here because we want to ensure we ** are doing this in terms of the correct WIDTH and HEIGHT. */ So, I assume mapserver actually plots everything to the edge of the original BBOX. In that case, I still think it's a bug that the adjusted BBOX is used when fetching layers from remote WMS-servers. I haven't tested with mapserver 5.0 yet, though, but I've looked at the source, and there doesn't seem to be any changes in how mapserver adjusts the extents. -- Trond Michelsen From dmorissette at MAPGEARS.COM Tue Nov 13 08:25:31 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Tue, 13 Nov 2007 11:25:31 -0500 Subject: Why does mapserver shave off a pixel from the bounding box? In-Reply-To: <20071113164658.GF16013@crusaders.no> Message-ID: Trond Michelsen wrote: > > I haven't tested with mapserver 5.0 yet, though, but I've looked at > the source, and there doesn't seem to be any changes in how mapserver > adjusts the extents. > There was some discussions around this issue in the 5.0 development days: http://trac.osgeo.org/mapserver/ticket/2175 I'd suggest that you try 5.0 and see if the issue is indeed fixed in that version. Daniel -- Daniel Morissette http://www.mapgears.com/ From dmorissette at MAPGEARS.COM Tue Nov 13 08:27:55 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Tue, 13 Nov 2007 11:27:55 -0500 Subject: How do I propagate failures from upstream wms-servers? In-Reply-To: <20071113155007.GD16013@crusaders.no> Message-ID: Trond Michelsen wrote: > No takers? I feel like I'm being Warnocked here :) > > I really hope the silence isn't an indication that the question is too > stupid. Getting blank images instead of an error message is actually a > big problem with my server configuration, as I'm caching all responses > with an image/* content-type. > I think the silence is an indication that there is no way to ask MapServer to produce an exception in this case at the moment. I'd suggest you file a ticket proposing that as an enhancement. Daniel -- Daniel Morissette http://www.mapgears.com/ From trondmm-mapserver at CRUSADERS.NO Tue Nov 13 09:24:36 2007 From: trondmm-mapserver at CRUSADERS.NO (Trond Michelsen) Date: Tue, 13 Nov 2007 18:24:36 +0100 Subject: Why does mapserver shave off a pixel from the bounding box? In-Reply-To: <4739CFFB.1030604@mapgears.com> Message-ID: On Tue, Nov 13, 2007 at 11:25:31AM -0500, Daniel Morissette wrote: > Trond Michelsen wrote: >> I haven't tested with mapserver 5.0 yet, though, but I've looked at >> the source, and there doesn't seem to be any changes in how mapserver >> adjusts the extents. > There was some discussions around this issue in the 5.0 development days: > http://trac.osgeo.org/mapserver/ticket/2175 > > I'd suggest that you try 5.0 and see if the issue is indeed fixed in > that version. Thank you. I'll try to install 5.0 on a test server and see how it behaves. -- Trond Michelsen From funkbucket at GMAIL.COM Tue Nov 13 09:16:38 2007 From: funkbucket at GMAIL.COM (Ben Tuttle) Date: Tue, 13 Nov 2007 10:16:38 -0700 Subject: How do I propagate failures from upstream wms-servers? In-Reply-To: <4739D08B.6060809@mapgears.com> Message-ID: > > I think the silence is an indication that there is no way to ask > MapServer to produce an exception in this case at the moment. > > I'd suggest you file a ticket proposing that as an enhancement. > > Daniel > -- > Daniel Morissette > http://www.mapgears.com/ > Given that mapserver can't do this at the moment have you considered other options? While it probably not as efficient you might be able to set up a cron to watch your cache for new images and do a "gdalinfo -mm" on each new tile in the cache and delete tiles with only one value (ie blank tiles). From ryanollerenshaw at GMAIL.COM Tue Nov 13 10:50:04 2007 From: ryanollerenshaw at GMAIL.COM (Ryan Ollerenshaw) Date: Tue, 13 Nov 2007 10:50:04 -0800 Subject: WFS request no longer returns any results after updating to Mapserver v4.10 Message-ID: I have updated my Mapserver to version 4.10 and now when i make a WFS request no results are returned. I am using the same mapfile and database i was using with 4.8. Has anyone else come across this? WFS request http://povmars2/cgi-bin/mapserv?map=../html/html_mars/wfs_service.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=mro& Results (notice no featureMember> are displayed): gml:Box srsName="EPSG:4326"> -177.727811,-89.261382 360.000000,89.486305 Mapfile: MAP IMAGETYPE PNG EXTENT -180 -90 180 90 SIZE 600 500 SHAPEPATH "../mars_data/" IMAGECOLOR 255 255 255 WEB IMAGEPATH "/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" METADATA "wfs_title" "msCross WFS Server" ## REQUIRED "wfs_onlineresource" "http://127.0.0.1/cgi-bin/mapserv?" ## Recommended "wfs_srs" "EPSG:4326" ## Recommended END END PROJECTION "init=epsg:4326" END LAYER NAME "mro" STATUS off TYPE POLYGON PROJECTION "init=epsg:4326" END DUMP TRUE METADATA wfs_title "MRO Coverage" ## REQUIRED wfs_srs "EPSG:4326" wfs_featureid "gid" wfs_onlineresource "http://povmars2/cgi-bin/mapserv?map=../html/html_mars/wfs_service.map&" #when using mscross layers with no values can not be used or the entire layer will not display gml_include_items "team_id,minlat,minlon" ## Optional (serves all attributes for layer) END CONNECTIONTYPE POSTGIS CONNECTION "host=localhost dbname=mars user=postgres" DATA "the_geom FROM mro_hirise" #FILTER "team_id = 'PSP_001876_1850_RED'" CLASS NAME "mro" STYLE COLOR 200 255 0 OUTLINECOLOR 120 120 120 END END END # layer END # of map file From dmorissette at MAPGEARS.COM Tue Nov 13 10:56:36 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Tue, 13 Nov 2007 13:56:36 -0500 Subject: How do I propagate failures from upstream wms-servers? In-Reply-To: <259e26270711130916s660fec86xf6d559c233eef62a@mail.gmail.com> Message-ID: Ben Tuttle wrote: > > Given that mapserver can't do this at the moment have you considered > other options? While it probably not as efficient you might be able to > set up a cron to watch your cache for new images and do a "gdalinfo > -mm" on each new tile in the cache and delete tiles with only one > value (ie blank tiles). Blank tiles, or tiles with a single color are a valid case in areas with no data or in the middle of very large polygons, so I don't think that would work. Daniel -- Daniel Morissette http://www.mapgears.com/ From fred.warnock at GMAIL.COM Tue Nov 13 10:53:41 2007 From: fred.warnock at GMAIL.COM (Fred warnock) Date: Tue, 13 Nov 2007 13:53:41 -0500 Subject: How do I propagate failures from upstream wms-servers? In-Reply-To: <20071113155007.GD16013@crusaders.no> Message-ID: Trond Man I had hoped that if my name was going to be used for something it'd be for good. That hope has been shattered. I had to educate myself as to what "Warnocked" means to ensure that I was not in some means being implicated here. *sigh* I'm now an innocent pariah. ;) Fred [Warnock!] Trond Michelsen wrote: > No takers? I feel like I'm being Warnocked here :) > > I really hope the silence isn't an indication that the question is too > stupid. Getting blank images instead of an error message is actually a > big problem with my server configuration, as I'm caching all responses > with an image/* content-type. > > On Tue, Nov 06, 2007 at 05:35:17PM +0100, Trond Michelsen wrote: >> In my mapfile, I have several layers with connectiontype WMS. Once in >> a while, the WMS-servers that deliver these layers will fail, usually >> due to high load, and return an application/vnd.ogc.se_xml >> exception. In these cases, I'd like mapserver to return an exception >> as well, but instead, mapserver will just log the error message in >> MS_ERRORFILE, and continue drawing the rest of the layers. If there >> are no more layers, it will result in a blank image. >> >> (BTW: I've also noticed the same behaviour if the remote wms-server >> answers with an internal server error) >> >> Here's the layer definition that I use for testing. exception.cgi will >> always return a dummy XML exception. >> >> LAYER >> NAME "exception" >> TYPE RASTER >> STATUS ON >> CONNECTION "http://wms1.oslo.dnmi.no/cgi-bin/exception.cgi" >> CONNECTIONTYPE WMS >> OFFSITE 255 255 254 >> METADATA >> "wms_srs" "EPSG:4326" >> "wms_name" "exception" >> "wms_server_version" "1.1.1" >> "wms_formatlist" "image/png" >> "wms_format" "image/png" >> "wms_exceptions_format" "application/vnd.ogc.se_xml" >> END #metadata >> END #layer >> >> Is there something I can do to force mapserver to fail, and return an >> exception if it fails to draw any of the wms-layers? >> >> I'm using mapserver 4.10 >> >> $ cgi-bin/mapserv -v >> MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG >> >> >> -- >> Trond Michelsen >> > From info at JERESIN.CO.ZA Tue Nov 13 11:46:45 2007 From: info at JERESIN.CO.ZA (Jeresin) Date: Tue, 13 Nov 2007 11:46:45 -0800 Subject: Java Mapserver app - queryLayerByPoint. How? Message-ID: Hello all (insert usual sorry-I'm-a-newbie-I-don't-know-what-I'm-doing drivel here) OK, with that out the way, on to business. Notwithstanding the vast non-existence of useful Java tutorials on the web, I was able to slap together a rather nice desktop app with most of the bells and whistles one would expect...except for the fact that I don't know where or how to obtain the information (metadata?) associated with shapes. I can query my layers by point, but the TEMPLATE throws me...that works well with the web-based maps but not with a stand-alone desktop app. The info I want, for instance the names and populations of towns, are all in a similarly named dbf file as the shp file. I don't want to distribute the data into a database, nor do I want to fetch an index from the layer and use a non-proprietary java library to break open the dbf to match the data contained therein with my index. So, my question, how would I interrogate shapes (using queryLayerByPoint) in a desktop app? Thanks in advance for your assistance in this regard. -- View this message in context: http://www.nabble.com/Java-Mapserver-app---queryLayerByPoint.-How--tf4800141.html#a13733184 Sent from the Mapserver - User mailing list archive at Nabble.com. From trondmm-mapserver at CRUSADERS.NO Tue Nov 13 13:04:14 2007 From: trondmm-mapserver at CRUSADERS.NO (Trond Michelsen) Date: Tue, 13 Nov 2007 22:04:14 +0100 Subject: How do I propagate failures from upstream wms-servers? In-Reply-To: <4739D08B.6060809@mapgears.com> Message-ID: On Tue, Nov 13, 2007 at 11:27:55AM -0500, Daniel Morissette wrote: >> No takers? I feel like I'm being Warnocked here :) >> I really hope the silence isn't an indication that the question is too >> stupid. Getting blank images instead of an error message is actually a >> big problem with my server configuration, as I'm caching all responses >> with an image/* content-type. > I think the silence is an indication that there is no way to ask > MapServer to produce an exception in this case at the moment. Ah. I was afraid of that. > I'd suggest you file a ticket proposing that as an enhancement. Thanks. I'll do that. -- Trond Michelsen From trondmm-mapserver at CRUSADERS.NO Tue Nov 13 13:53:32 2007 From: trondmm-mapserver at CRUSADERS.NO (Trond Michelsen) Date: Tue, 13 Nov 2007 22:53:32 +0100 Subject: How do I propagate failures from upstream wms-servers? In-Reply-To: <259e26270711130916s660fec86xf6d559c233eef62a@mail.gmail.com> Message-ID: On Tue, Nov 13, 2007 at 10:16:38AM -0700, Ben Tuttle wrote: >> I think the silence is an indication that there is no way to ask >> MapServer to produce an exception in this case at the moment. >> I'd suggest you file a ticket proposing that as an enhancement. > Given that mapserver can't do this at the moment have you considered > other options? Yes, I have, and I do have options. One of the things I've noticed is that I can actually get mapserver to generate an error. I just have to get the remote WMS server to generate a broken reply. If the remote WMS returns anything other than application/vnd.ogc.se_xml, mapserver will try to load it as an image. If it isn't an image, mapserver will fail, and return a proper exception. This will actually take care of most of the situations. But mapserver will still generate blank images if it's unable to contact the remote WMS or if it returns any other HTTP status than 200. > While it probably not as efficient you might be able to set up a > cron to watch your cache for new images and do a "gdalinfo -mm" on > each new tile in the cache and delete tiles with only one value (ie > blank tiles). As Daniel said, this won't work, since blank images can be valid as well. In this particular case, the remote WMS-server serves weather data. Precipitation, to be exact. So, if there's no rain or snow in an area, the response will be a blank image. Right now, the simplest solution seems to be to not fetch the weather data through mapserver. Just get the client to fetch the data directly from the other WMS-server. The only problem is that this server doesn't generate transparent images, so I'll need to hack on it a bit to add this functionality. -- Trond Michelsen From porath at WEB.DE Tue Nov 13 23:34:21 2007 From: porath at WEB.DE (H. Porath) Date: Wed, 14 Nov 2007 01:34:21 -0600 Subject: WFS request no longer returns any results after updating to Mapserver v4.10 Message-ID: Hi, we had a similiar problem when we upgraded from 4.6 to 4.10. Our solution was to upgrade directly to 5.0. Regards, Holger From umberto.nicoletti at GMAIL.COM Tue Nov 13 23:37:09 2007 From: umberto.nicoletti at GMAIL.COM (Umberto Nicoletti) Date: Wed, 14 Nov 2007 08:37:09 +0100 Subject: Java Mapserver app - queryLayerByPoint. How? In-Reply-To: <13733184.post@talk.nabble.com> Message-ID: There is a queryByPoint code example here (before last paragraph): http://mapserver.gis.umn.edu/docs/howto/javamapscript HTH, Umberto On Nov 13, 2007 8:46 PM, Jeresin wrote: > Hello all > > (insert usual sorry-I'm-a-newbie-I-don't-know-what-I'm-doing drivel here) > > OK, with that out the way, on to business. Notwithstanding the vast > non-existence of useful Java tutorials on the web, I was able to slap > together a rather nice desktop app with most of the bells and whistles one > would expect...except for the fact that I don't know where or how to obtain > the information (metadata?) associated with shapes. I can query my layers by > point, but the TEMPLATE throws me...that works well with the web-based maps > but not with a stand-alone desktop app. > > The info I want, for instance the names and populations of towns, are all in > a similarly named dbf file as the shp file. I don't want to distribute the > data into a database, nor do I want to fetch an index from the layer and use > a non-proprietary java library to break open the dbf to match the data > contained therein with my index. > > So, my question, how would I interrogate shapes (using queryLayerByPoint) in > a desktop app? > > Thanks in advance for your assistance in this regard. > -- > View this message in context: http://www.nabble.com/Java-Mapserver-app---queryLayerByPoint.-How--tf4800141.html#a13733184 > Sent from the Mapserver - User mailing list archive at Nabble.com. > From umberto.nicoletti at GMAIL.COM Wed Nov 14 00:02:31 2007 From: umberto.nicoletti at GMAIL.COM (Umberto Nicoletti) Date: Wed, 14 Nov 2007 09:02:31 +0100 Subject: Upgrading Mapscript from 4.10.1 to 5.0 causes an Apache crash In-Reply-To: <4739A95B.7070205@orange.fr> Message-ID: Could you document *precisely* how you built php mapscript (configure flags, etc)? Also try to run the shp2img utility on one of the crashing map files to see if you can reproduce the error. Umberto On Nov 13, 2007 2:40 PM, Julien wrote: > > Hi all (sorry if double posted), > > Upgrading Mapserver/Mapscript from 4.10.1 to 5.0 causes an apache crash on > our server, with all our projects (with more or less complex mapfiles). I > have no error during mapscript compilation. When PHP is installed as an > apache DSO the error log reports the following errors : > > *** glibc detected *** /www/bin/httpd: free(): invalid next size (fast): > 0x0867db38 *** > [Wed Nov 7 13:54:06 2007] [notice] child pid 23219 exit signal Segmentation > fault (11) > > When PHP is installed as a CGI executable, the error log reports the > following : > > [Thu Nov 8 14:56:46 2007] [error] [client xxx.xxx.xxx.52] Premature end of > script headers: /www/cgi-bin/php > > Downgrading to 4.10.1 makes everything working back again. I didn't > succeeded in replicating the problem on a test machine using > the same software environnement. > > > Here's my software environnement (everything built from source) : > > Ubuntu 6.10 Server > Apache 1.3.39 with OpenSSL 0.9 > PHP 4.4.4 (I tried to build php as an Apache DSO as well as CGI, both are > crashing) > Curl and LibCurl 7.15.5 > Freetype 2.3.4 > GD 2.0.35 > Gdal 1.4.3 > GEOS 2.2.3 > GeoTiff 1.2.3 > Tiff 3.7.1 > Zlib 1.2.3 > > Any help would be greatly appreciated. > > > Julien MARTEL > Technicien Informatique et R?seaux > 2 Avenue Madeleine Bonnaud > Parc d'Activit?s, Point Rencontre > 13770 Venelles - FRANCE > Tel : +33 (0) 4 42 54 00 68 Fax : +33 (0) 4 42 54 06 78 > e-mail : j.martel at g2c.fr web : www.g2c.fr > > Lire les conditions l?gales d'utilisation de cet e-mail > > Venez nous retrouver sur les prochains salons > > From umberto.nicoletti at GMAIL.COM Wed Nov 14 02:24:43 2007 From: umberto.nicoletti at GMAIL.COM (Umberto Nicoletti) Date: Wed, 14 Nov 2007 11:24:43 +0100 Subject: Upgrading Mapscript from 4.10.1 to 5.0 causes an Apache crash In-Reply-To: <473AAF1B.8050904@orange.fr> Message-ID: Please keep the list in cc or to. Does the crash happen with every request or only once in a while, say after 10 minutes? Which gd are you using and/or have you got another gd lying around in your system path? Umberto On Nov 14, 2007 9:17 AM, Julien wrote: > > shp2img works perfectly. here are my configure options : > > ./configure --with-proj --with-wmsclient --with-ogr --with-libwww > --with-gdal --enable-runpath --enable-debug --without-tiff > --with-gd=/usr/local --with-freetype=/usr/local --with-threads > --with-curl-config=/usr/bin/curl-config --with-wfs --with-wcs > --with-wmsclient -with-wfsclient --with-php=/usr/src/php-4.4.4/ > --with-httpd=/www/bin/httpd --with-geos=/usr/local/bin/geos-config > --with-mapscript > > Above path are correct and libraries are detected the right way... > > > Umberto Nicoletti a ?crit : > > Could you document *precisely* how you built php mapscript (configure > flags, etc)? > Also try to run the shp2img utility on one of the crashing map files > to see if you can reproduce the error. > > Umberto > > On Nov 13, 2007 2:40 PM, Julien wrote: > > > > Hi all (sorry if double posted), > > Upgrading Mapserver/Mapscript from 4.10.1 to 5.0 causes an apache crash on > our server, with all our projects (with more or less complex mapfiles). I > have no error during mapscript compilation. When PHP is installed as an > apache DSO the error log reports the following errors : > > *** glibc detected *** /www/bin/httpd: free(): invalid next size (fast): > 0x0867db38 *** > [Wed Nov 7 13:54:06 2007] [notice] child pid 23219 exit signal Segmentation > fault (11) > > When PHP is installed as a CGI executable, the error log reports the > following : > > [Thu Nov 8 14:56:46 2007] [error] [client xxx.xxx.xxx.52] Premature end of > script headers: /www/cgi-bin/php > > Downgrading to 4.10.1 makes everything working back again. I didn't > succeeded in replicating the problem on a test machine using > the same software environnement. > > > Here's my software environnement (everything built from source) : > > Ubuntu 6.10 Server > Apache 1.3.39 with OpenSSL 0.9 > PHP 4.4.4 (I tried to build php as an Apache DSO as well as CGI, both are > crashing) > Curl and LibCurl 7.15.5 > Freetype 2.3.4 > GD 2.0.35 > Gdal 1.4.3 > GEOS 2.2.3 > GeoTiff 1.2.3 > Tiff 3.7.1 > Zlib 1.2.3 > > Any help would be greatly appreciated. > > > Julien MARTEL > Technicien Informatique et R?seaux > 2 Avenue Madeleine Bonnaud > Parc d'Activit?s, Point Rencontre > 13770 Venelles - FRANCE > Tel : +33 (0) 4 42 54 00 68 Fax : +33 (0) 4 42 54 06 78 > e-mail : j.martel at g2c.fr web : www.g2c.fr > > Lire les conditions l?gales d'utilisation de cet e-mail > > Venez nous retrouver sur les prochains salons > > > > > --------------------------------------------------------------------------------------- > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > > > > From g2c.martel at ORANGE.FR Wed Nov 14 02:39:58 2007 From: g2c.martel at ORANGE.FR (Julien) Date: Wed, 14 Nov 2007 11:39:58 +0100 Subject: Upgrading Mapscript from 4.10.1 to 5.0 causes an Apache crash In-Reply-To: <75b4b93e0711140224uea394d9yca402d6360c50358@mail.gmail.com> Message-ID: Sorry for the wrong reply adress. The crash happens with every request. In fact it is just impossible to display the map. I am using GD 2.0.35, built from source, no other version existing on the system... Umberto Nicoletti a ?crit : > Please keep the list in cc or to. > > Does the crash happen with every request or only once in a while, say > after 10 minutes? > Which gd are you using and/or have you got another gd lying around in > your system path? > > Umberto > > On Nov 14, 2007 9:17 AM, Julien wrote: > >> shp2img works perfectly. here are my configure options : >> >> ./configure --with-proj --with-wmsclient --with-ogr --with-libwww >> --with-gdal --enable-runpath --enable-debug --without-tiff >> --with-gd=/usr/local --with-freetype=/usr/local --with-threads >> --with-curl-config=/usr/bin/curl-config --with-wfs --with-wcs >> --with-wmsclient -with-wfsclient --with-php=/usr/src/php-4.4.4/ >> --with-httpd=/www/bin/httpd --with-geos=/usr/local/bin/geos-config >> --with-mapscript >> >> Above path are correct and libraries are detected the right way... >> >> >> Umberto Nicoletti a ?crit : >> >> Could you document *precisely* how you built php mapscript (configure >> flags, etc)? >> Also try to run the shp2img utility on one of the crashing map files >> to see if you can reproduce the error. >> >> Umberto >> >> On Nov 13, 2007 2:40 PM, Julien wrote: >> >> >> >> Hi all (sorry if double posted), >> >> Upgrading Mapserver/Mapscript from 4.10.1 to 5.0 causes an apache crash on >> our server, with all our projects (with more or less complex mapfiles). I >> have no error during mapscript compilation. When PHP is installed as an >> apache DSO the error log reports the following errors : >> >> *** glibc detected *** /www/bin/httpd: free(): invalid next size (fast): >> 0x0867db38 *** >> [Wed Nov 7 13:54:06 2007] [notice] child pid 23219 exit signal Segmentation >> fault (11) >> >> When PHP is installed as a CGI executable, the error log reports the >> following : >> >> [Thu Nov 8 14:56:46 2007] [error] [client xxx.xxx.xxx.52] Premature end of >> script headers: /www/cgi-bin/php >> >> Downgrading to 4.10.1 makes everything working back again. I didn't >> succeeded in replicating the problem on a test machine using >> the same software environnement. >> >> >> Here's my software environnement (everything built from source) : >> >> Ubuntu 6.10 Server >> Apache 1.3.39 with OpenSSL 0.9 >> PHP 4.4.4 (I tried to build php as an Apache DSO as well as CGI, both are >> crashing) >> Curl and LibCurl 7.15.5 >> Freetype 2.3.4 >> GD 2.0.35 >> Gdal 1.4.3 >> GEOS 2.2.3 >> GeoTiff 1.2.3 >> Tiff 3.7.1 >> Zlib 1.2.3 >> >> Any help would be greatly appreciated. >> >> >> Julien MARTEL >> Technicien Informatique et R?seaux >> 2 Avenue Madeleine Bonnaud >> Parc d'Activit?s, Point Rencontre >> 13770 Venelles - FRANCE >> Tel : +33 (0) 4 42 54 00 68 Fax : +33 (0) 4 42 54 06 78 >> e-mail : j.martel at g2c.fr web : www.g2c.fr >> >> Lire les conditions l?gales d'utilisation de cet e-mail >> >> Venez nous retrouver sur les prochains salons >> >> >> >> >> --------------------------------------------------------------------------------------- >> Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. >> Aucun virus connu a ce jour par nos services n'a ete detecte. >> >> >> >> >> >> >> > --------------------------------------------------------------------------------------- > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From umberto.nicoletti at GMAIL.COM Wed Nov 14 03:11:43 2007 From: umberto.nicoletti at GMAIL.COM (Umberto Nicoletti) Date: Wed, 14 Nov 2007 12:11:43 +0100 Subject: Upgrading Mapscript from 4.10.1 to 5.0 causes an Apache crash In-Reply-To: <473AD07E.4050603@orange.fr> Message-ID: If you can run php on the cli and try to debug it with gd. Example: suppose the crashing page is mapserver.php just run: shell > gd php gd > start mapserver.php and post the otuput. Umberto On Nov 14, 2007 11:39 AM, Julien wrote: > > Sorry for the wrong reply adress. > > The crash happens with every request. In fact it is just impossible to > display the map. I am using GD 2.0.35, built from source, no other version > existing on the system... > > Umberto Nicoletti a ?crit : > > Please keep the list in cc or to. > > Does the crash happen with every request or only once in a while, say > after 10 minutes? > Which gd are you using and/or have you got another gd lying around in > your system path? > > Umberto > > On Nov 14, 2007 9:17 AM, Julien wrote: > > > shp2img works perfectly. here are my configure options : > > ./configure --with-proj --with-wmsclient --with-ogr --with-libwww > --with-gdal --enable-runpath --enable-debug --without-tiff > --with-gd=/usr/local --with-freetype=/usr/local --with-threads > --with-curl-config=/usr/bin/curl-config --with-wfs --with-wcs > --with-wmsclient -with-wfsclient --with-php=/usr/src/php-4.4.4/ > --with-httpd=/www/bin/httpd --with-geos=/usr/local/bin/geos-config > --with-mapscript > > Above path are correct and libraries are detected the right way... > > > Umberto Nicoletti a ?crit : > > Could you document *precisely* how you built php mapscript (configure > flags, etc)? > Also try to run the shp2img utility on one of the crashing map files > to see if you can reproduce the error. > > Umberto > > On Nov 13, 2007 2:40 PM, Julien wrote: > > > > Hi all (sorry if double posted), > > Upgrading Mapserver/Mapscript from 4.10.1 to 5.0 causes an apache crash on > our server, with all our projects (with more or less complex mapfiles). I > have no error during mapscript compilation. When PHP is installed as an > apache DSO the error log reports the following errors : > > *** glibc detected *** /www/bin/httpd: free(): invalid next size (fast): > 0x0867db38 *** > [Wed Nov 7 13:54:06 2007] [notice] child pid 23219 exit signal Segmentation > fault (11) > > When PHP is installed as a CGI executable, the error log reports the > following : > > [Thu Nov 8 14:56:46 2007] [error] [client xxx.xxx.xxx.52] Premature end of > script headers: /www/cgi-bin/php > > Downgrading to 4.10.1 makes everything working back again. I didn't > succeeded in replicating the problem on a test machine using > the same software environnement. > > > Here's my software environnement (everything built from source) : > > Ubuntu 6.10 Server > Apache 1.3.39 with OpenSSL 0.9 > PHP 4.4.4 (I tried to build php as an Apache DSO as well as CGI, both are > crashing) > Curl and LibCurl 7.15.5 > Freetype 2.3.4 > GD 2.0.35 > Gdal 1.4.3 > GEOS 2.2.3 > GeoTiff 1.2.3 > Tiff 3.7.1 > Zlib 1.2.3 > > Any help would be greatly appreciated. > > > Julien MARTEL > Technicien Informatique et R?seaux > 2 Avenue Madeleine Bonnaud > Parc d'Activit?s, Point Rencontre > 13770 Venelles - FRANCE > Tel : +33 (0) 4 42 54 00 68 Fax : +33 (0) 4 42 54 06 78 > e-mail : j.martel at g2c.fr web : www.g2c.fr > > Lire les conditions l?gales d'utilisation de cet e-mail > > Venez nous retrouver sur les prochains salons > > > > > --------------------------------------------------------------------------------------- > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > > > > > > > --------------------------------------------------------------------------------------- > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > > > > From info at JERESIN.CO.ZA Wed Nov 14 03:36:15 2007 From: info at JERESIN.CO.ZA (Jeresin) Date: Wed, 14 Nov 2007 03:36:15 -0800 Subject: Java Mapserver app - queryLayerByPoint. How? In-Reply-To: <75b4b93e0711132337w4bea5849m242dcb8d53664530@mail.gmail.com> Message-ID: Umberto Nicoletti wrote: > > There is a queryByPoint code example here (before last paragraph): > > http://mapserver.gis.umn.edu/docs/howto/javamapscript > > HTH, > Umberto > > Hi Umberto, thanks for the reply Yes, I'm using code very similar to that to query my layers...and I'm getting results back from the layers. What I'd like to know if is there a way of obtaining the data associated with the returned results? Let me give you a clear example: On a layer called "TOWNS" there are points (towns) as appearing in a .map file. The TOWNS.shp file provides me with the actual points. However, there is a TOWNS.dbf file which contains the town name, the population, the addresses of certain facilities, and so on. It's *that* data that I want to access and display. Currently, when I query the layer, I do get the shape (town) and I can get the coordinates of the point, the shape index, and so on. That's no problem. However, I would like to get hold of that *other* data, contained in the .dbf file. Obviously the data is accessible, hence the fact that I can display labels as text from the dbf, but I don't see a clear link between a point query on the map and that data...perhaps by CLASSITEMs but that seems an expensive work-around. As you see by my guessing, I clearly have no idea ;) The one solution - one that has been working but which I'd prefer /not/ to use - is by getting the shape index from the layer query and then, using a 3rd party Java library, obtaining the data from the dbf file and matching data sets with map entities. I'd actually prefer not to use the additional library at all, it just feels so wrong. Hope you understand my dilemma now, hope you can help... -- View this message in context: http://www.nabble.com/Java-Mapserver-app---queryLayerByPoint.-How--tf4800141.html#a13745007 Sent from the Mapserver - User mailing list archive at Nabble.com. From umberto.nicoletti at GMAIL.COM Wed Nov 14 04:02:07 2007 From: umberto.nicoletti at GMAIL.COM (Umberto Nicoletti) Date: Wed, 14 Nov 2007 13:02:07 +0100 Subject: Java Mapserver app - queryLayerByPoint. How? In-Reply-To: <13745007.post@talk.nabble.com> Message-ID: The code snippet is actually missing the code for this function which does the trick of fetching a shape's value and putting them into a map for later use: protected Map getResult(shapeObj shape, layerObj layer) { Map aResult = new HashMap(); for (int z = 0; z < shape.getNumvalues(); z++) { aResult.put(layer.getItem(z), shape.getValue(z)); } return aResult; } Regards, Umberto On Nov 14, 2007 12:36 PM, Jeresin wrote: > Umberto Nicoletti wrote: > > > > There is a queryByPoint code example here (before last paragraph): > > > > http://mapserver.gis.umn.edu/docs/howto/javamapscript > > > > HTH, > > Umberto > > > > > > > Hi Umberto, thanks for the reply > > Yes, I'm using code very similar to that to query my layers...and I'm > getting results back from the layers. What I'd like to know if is there a > way of obtaining the data associated with the returned results? Let me give > you a clear example: > > On a layer called "TOWNS" there are points (towns) as appearing in a .map > file. The TOWNS.shp file provides me with the actual points. However, there > is a TOWNS.dbf file which contains the town name, the population, the > addresses of certain facilities, and so on. It's *that* data that I want to > access and display. > > Currently, when I query the layer, I do get the shape (town) and I can get > the coordinates of the point, the shape index, and so on. That's no problem. > However, I would like to get hold of that *other* data, contained in the > .dbf file. Obviously the data is accessible, hence the fact that I can > display labels as text from the dbf, but I don't see a clear link between a > point query on the map and that data...perhaps by CLASSITEMs but that seems > an expensive work-around. As you see by my guessing, I clearly have no idea > ;) The one solution - one that has been working but which I'd prefer /not/ > to use - is by getting the shape index from the layer query and then, using > a 3rd party Java library, obtaining the data from the dbf file and matching > data sets with map entities. I'd actually prefer not to use the additional > library at all, it just feels so wrong. > > Hope you understand my dilemma now, hope you can help... > -- > View this message in context: http://www.nabble.com/Java-Mapserver-app---queryLayerByPoint.-How--tf4800141.html#a13745007 > > Sent from the Mapserver - User mailing list archive at Nabble.com. > From g2c.martel at ORANGE.FR Wed Nov 14 04:29:46 2007 From: g2c.martel at ORANGE.FR (Julien) Date: Wed, 14 Nov 2007 13:29:46 +0100 Subject: Upgrading Mapscript from 4.10.1 to 5.0 causes an Apache crash In-Reply-To: <75b4b93e0711140311k73bd3869vdbd83ec9458a2921@mail.gmail.com> Message-ID: # gd php -bash: gd: command not found Unfortunately, I have no "gd" binary on my system. gd2copypal gdcmpgif gd2togif dlib-config gd2topng gdparttopng gdtopng Are the only binaries related to GD I can use... Where did you find that "gd" executable ? Is is a compilation flag ? Umberto Nicoletti a ?crit : > If you can run php on the cli and try to debug it with gd. > Example: > > suppose the crashing page is mapserver.php > > just run: > > shell > gd php > gd > start mapserver.php > > and post the otuput. > Umberto > > On Nov 14, 2007 11:39 AM, Julien wrote: > >> Sorry for the wrong reply adress. >> >> The crash happens with every request. In fact it is just impossible to >> display the map. I am using GD 2.0.35, built from source, no other version >> existing on the system... >> >> Umberto Nicoletti a ?crit : >> >> Please keep the list in cc or to. >> >> Does the crash happen with every request or only once in a while, say >> after 10 minutes? >> Which gd are you using and/or have you got another gd lying around in >> your system path? >> >> Umberto >> >> On Nov 14, 2007 9:17 AM, Julien wrote: >> >> >> shp2img works perfectly. here are my configure options : >> >> ./configure --with-proj --with-wmsclient --with-ogr --with-libwww >> --with-gdal --enable-runpath --enable-debug --without-tiff >> --with-gd=/usr/local --with-freetype=/usr/local --with-threads >> --with-curl-config=/usr/bin/curl-config --with-wfs --with-wcs >> --with-wmsclient -with-wfsclient --with-php=/usr/src/php-4.4.4/ >> --with-httpd=/www/bin/httpd --with-geos=/usr/local/bin/geos-config >> --with-mapscript >> >> Above path are correct and libraries are detected the right way... >> >> >> Umberto Nicoletti a ?crit : >> >> Could you document *precisely* how you built php mapscript (configure >> flags, etc)? >> Also try to run the shp2img utility on one of the crashing map files >> to see if you can reproduce the error. >> >> Umberto >> >> On Nov 13, 2007 2:40 PM, Julien wrote: >> >> >> >> Hi all (sorry if double posted), >> >> Upgrading Mapserver/Mapscript from 4.10.1 to 5.0 causes an apache crash on >> our server, with all our projects (with more or less complex mapfiles). I >> have no error during mapscript compilation. When PHP is installed as an >> apache DSO the error log reports the following errors : >> >> *** glibc detected *** /www/bin/httpd: free(): invalid next size (fast): >> 0x0867db38 *** >> [Wed Nov 7 13:54:06 2007] [notice] child pid 23219 exit signal Segmentation >> fault (11) >> >> When PHP is installed as a CGI executable, the error log reports the >> following : >> >> [Thu Nov 8 14:56:46 2007] [error] [client xxx.xxx.xxx.52] Premature end of >> script headers: /www/cgi-bin/php >> >> Downgrading to 4.10.1 makes everything working back again. I didn't >> succeeded in replicating the problem on a test machine using >> the same software environnement. >> >> >> Here's my software environnement (everything built from source) : >> >> Ubuntu 6.10 Server >> Apache 1.3.39 with OpenSSL 0.9 >> PHP 4.4.4 (I tried to build php as an Apache DSO as well as CGI, both are >> crashing) >> Curl and LibCurl 7.15.5 >> Freetype 2.3.4 >> GD 2.0.35 >> Gdal 1.4.3 >> GEOS 2.2.3 >> GeoTiff 1.2.3 >> Tiff 3.7.1 >> Zlib 1.2.3 >> >> Any help would be greatly appreciated. >> >> >> Julien MARTEL >> Technicien Informatique et R?seaux >> 2 Avenue Madeleine Bonnaud >> Parc d'Activit?s, Point Rencontre >> 13770 Venelles - FRANCE >> Tel : +33 (0) 4 42 54 00 68 Fax : +33 (0) 4 42 54 06 78 >> e-mail : j.martel at g2c.fr web : www.g2c.fr >> >> Lire les conditions l?gales d'utilisation de cet e-mail >> >> Venez nous retrouver sur les prochains salons >> >> >> >> >> --------------------------------------------------------------------------------------- >> Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. >> Aucun virus connu a ce jour par nos services n'a ete detecte. >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------------------------- >> Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. >> Aucun virus connu a ce jour par nos services n'a ete detecte. >> >> >> >> >> >> >> > --------------------------------------------------------------------------------------- > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From umberto.nicoletti at GMAIL.COM Wed Nov 14 05:28:58 2007 From: umberto.nicoletti at GMAIL.COM (Umberto Nicoletti) Date: Wed, 14 Nov 2007 14:28:58 +0100 Subject: Upgrading Mapscript from 4.10.1 to 5.0 causes an Apache crash In-Reply-To: <473AEA3A.8050707@orange.fr> Message-ID: sorry, a typo, I meant gdb (gnu debugger) Umberto On Nov 14, 2007 1:29 PM, Julien wrote: > > # gd php > -bash: gd: command not found > > Unfortunately, I have no "gd" binary on my system. > > gd2copypal > gdcmpgif > gd2togif > dlib-config > gd2topng > gdparttopng > gdtopng > > Are the only binaries related to GD I can use... Where did you find that > "gd" executable ? Is is a compilation flag ? > > > > > Umberto Nicoletti a ?crit : > > If you can run php on the cli and try to debug it with gd. > Example: > > suppose the crashing page is mapserver.php > > just run: > > shell > gd php > gd > start mapserver.php > > and post the otuput. > Umberto > > On Nov 14, 2007 11:39 AM, Julien wrote: > > > Sorry for the wrong reply adress. > > The crash happens with every request. In fact it is just impossible to > display the map. I am using GD 2.0.35, built from source, no other version > existing on the system... > > Umberto Nicoletti a ?crit : > > Please keep the list in cc or to. > > Does the crash happen with every request or only once in a while, say > after 10 minutes? > Which gd are you using and/or have you got another gd lying around in > your system path? > > Umberto > > On Nov 14, 2007 9:17 AM, Julien wrote: > > > shp2img works perfectly. here are my configure options : > > ./configure --with-proj --with-wmsclient --with-ogr --with-libwww > --with-gdal --enable-runpath --enable-debug --without-tiff > --with-gd=/usr/local --with-freetype=/usr/local --with-threads > --with-curl-config=/usr/bin/curl-config --with-wfs --with-wcs > --with-wmsclient -with-wfsclient --with-php=/usr/src/php-4.4.4/ > --with-httpd=/www/bin/httpd --with-geos=/usr/local/bin/geos-config > --with-mapscript > > Above path are correct and libraries are detected the right way... > > > Umberto Nicoletti a ?crit : > > Could you document *precisely* how you built php mapscript (configure > flags, etc)? > Also try to run the shp2img utility on one of the crashing map files > to see if you can reproduce the error. > > Umberto > > On Nov 13, 2007 2:40 PM, Julien wrote: > > > > Hi all (sorry if double posted), > > Upgrading Mapserver/Mapscript from 4.10.1 to 5.0 causes an apache crash on > our server, with all our projects (with more or less complex mapfiles). I > have no error during mapscript compilation. When PHP is installed as an > apache DSO the error log reports the following errors : > > *** glibc detected *** /www/bin/httpd: free(): invalid next size (fast): > 0x0867db38 *** > [Wed Nov 7 13:54:06 2007] [notice] child pid 23219 exit signal Segmentation > fault (11) > > When PHP is installed as a CGI executable, the error log reports the > following : > > [Thu Nov 8 14:56:46 2007] [error] [client xxx.xxx.xxx.52] Premature end of > script headers: /www/cgi-bin/php > > Downgrading to 4.10.1 makes everything working back again. I didn't > succeeded in replicating the problem on a test machine using > the same software environnement. > > > Here's my software environnement (everything built from source) : > > Ubuntu 6.10 Server > Apache 1.3.39 with OpenSSL 0.9 > PHP 4.4.4 (I tried to build php as an Apache DSO as well as CGI, both are > crashing) > Curl and LibCurl 7.15.5 > Freetype 2.3.4 > GD 2.0.35 > Gdal 1.4.3 > GEOS 2.2.3 > GeoTiff 1.2.3 > Tiff 3.7.1 > Zlib 1.2.3 > > Any help would be greatly appreciated. > > > Julien MARTEL > Technicien Informatique et R?seaux > 2 Avenue Madeleine Bonnaud > Parc d'Activit?s, Point Rencontre > 13770 Venelles - FRANCE > Tel : +33 (0) 4 42 54 00 68 Fax : +33 (0) 4 42 54 06 78 > e-mail : j.martel at g2c.fr web : www.g2c.fr > > Lire les conditions l?gales d'utilisation de cet e-mail > > Venez nous retrouver sur les prochains salons > > > > > --------------------------------------------------------------------------------------- > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > > > > > > > --------------------------------------------------------------------------------------- > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > > > > > > > --------------------------------------------------------------------------------------- > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > > > > From gisaalter at GMAIL.COM Wed Nov 14 06:24:39 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Wed, 14 Nov 2007 15:24:39 +0100 Subject: Migrating from Windows to Linux: trouble with mapfiles Message-ID: Hi list, I'm migrating from windows to linux (ubuntu) but I have some trouble getting a map-file to work. I want to be able to access my server as wms but I'm not sure what to look out for when making a map-file. I'm having trouble with path-names etc... Can someone give me an example of a working mapfile for Linux ? That would be great ! Thanks ! Steven -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kyle.Wilcox at NOAA.GOV Wed Nov 14 06:44:32 2007 From: Kyle.Wilcox at NOAA.GOV (Kyle Wilcox) Date: Wed, 14 Nov 2007 09:44:32 -0500 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <8d2ea9d70711140624u55fe9402o73ad5836d4d8669b@mail.gmail.com> Message-ID: The only thing that needs to change in your mapfile from windows to linux are the paths. Are you familiar with linux? With a recent version of mapserver you can use both relative and absolute paths in a mapfile. Here is a simple example that shows both. The mapfile sits at /work/CPC/Mapping/mapfiles/. One note when using includes; if you nest them, the path is relative to the FIRST mapfile. MAP NAME "Coastal_Prediction_Center_WMS" # Chesapeake Bay EXTENT -78.5 36.020210 -73.8 39.974250 UNITS dd SIZE 500 300 SHAPEPATH "/work/CPC/Mapping/data" #OR #SHAPEPATH "../data" SYMBOLSET "/work/CPC/Mapping/data/symbols/symbols35.sym" #OR #SYMBOLSET "../data/symbols/symbols35.sym" RESOLUTION 96 IMAGETYPE agg_pnga INTERLACE ON PROJECTION "init=epsg:4326" END INCLUDE "output_formats.map" # OR # INCLUDE "/work/CPC/Mapping/mapfiles/output_formats.map" WEB TEMPLATE void IMAGEPATH "/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" METADATA "MAPFILE_ENCODING" "UTF-8" "wms_title" "Coastal Prediction Center Mapping" "wms_onlineresource" "http://155.206.18.162/cgi-bin/wms" "wms_srs" "EPSG:4326" END END ... # Layers END Steven De Vriendt wrote: > Hi list, > > I'm migrating from windows to linux (ubuntu) but I have some trouble getting > a map-file to work. > I want to be able to access my server as wms but I'm not sure what to look > out for when > making a map-file. I'm having trouble with path-names etc... > > Can someone give me an example of a working mapfile for Linux ? > > That would be great ! > > Thanks ! > > Steven > -- Kyle Wilcox NOAA Chesapeake Bay Office 410 Severn Avenue Suite 107A Annapolis, MD 21403 office: (410) 295-3151 Kyle.Wilcox at noaa.gov "It is from the wellspring of our despair and the places that we are broken that we come to repair the world." - Murray Waas From Tim.Nolte at IPCSWIRELESSINC.COM Wed Nov 14 06:50:41 2007 From: Tim.Nolte at IPCSWIRELESSINC.COM (Nolte, Tim) Date: Wed, 14 Nov 2007 09:50:41 -0500 Subject: [Chameleon] Chameleon & TileCache...(MapServer Performance) In-Reply-To: <473B05C4.10002@mapgears.com> Message-ID: Here is quick test I ran on the performance of my current setup. If anyone can see some things I need to do I'd appreciate it. A couple things that we're kicking around is breaking the layers (Outdoor Rural/In-Vehicle Rural Hwy/In-Building Suburban/In-Building Urban/In-Building Dense Urban) down to county level sizes, create a tileindex of groups of counties, then create a tileindex referencing the county group tileindex. I really don't think this would improve performance unless the common zoom/extent was at a county level. The other thought is loading all of these shapefiles into the Oracle database as spatial data. I've gotten a request from the higher-ups to increase the performance of our MapServer. The server we're running on is a 2.8GHz XEON w/ 3GB of RAM. Thinking that maybe an increase in RAM might help us out too. At this point we're pretty invested in the Chameleon framework so a move to another application framework is not really an option. Thanks. shp2img -m default.map -o ../mapserver/default.png -e -86.393 42.251 -84.658 43.465 -all_debug 2 [Wed Nov 14 09:34:06 2007].202794 msDrawMap(): Layer 0 (World Countries), 0.132s [Wed Nov 14 09:34:06 2007].236996 msDrawMap(): Layer 1 (Sea Labels), 0.033s [Wed Nov 14 09:34:06 2007].278533 msDrawMap(): Layer 2 (Ocean Labels), 0.041s [Wed Nov 14 09:34:06 2007].328952 msDrawMap(): Layer 3 (US Land Small Scale), 0.050s [Wed Nov 14 09:34:06 2007].386358 msDrawMap(): Layer 4 (US Urban Areas Small Scale), 0.057s [Wed Nov 14 09:34:06 2007].428937 msDrawMap(): Layer 6 (US Land Small Scale - outline), 0.042s [Wed Nov 14 09:34:06 2007].450979 msDrawMap(): Layer 9 (US Counties), 0.022s [Wed Nov 14 09:34:08 2007].157881 msDrawMap(): Layer 14 (Outdoor Rural), 1.707s [Wed Nov 14 09:34:09 2007].777791 msDrawMap(): Layer 15 (In-Vehicle Rural Hwy), 1.620s [Wed Nov 14 09:34:11 2007].373600 msDrawMap(): Layer 16 (In-Building Suburban), 1.596s [Wed Nov 14 09:34:12 2007].446320 msDrawMap(): Layer 17 (In-Building Urban), 1.073s [Wed Nov 14 09:34:13 2007].29197 msDrawMap(): Layer 18 (In-Building Dense Urban), 0.583s [Wed Nov 14 09:34:13 2007].328139 msDrawMap(): Layer 20 (US Water Bodies - Small Scale), 0.299s [Wed Nov 14 09:34:13 2007].346469 msDrawMap(): Layer 23 (US Large Scale State Borders), 0.018s [Wed Nov 14 09:34:13 2007].364500 msDrawMap(): Layer 27 (US Ferries), 0.018s [Wed Nov 14 09:34:13 2007].419243 msDrawMap(): Layer 29 (US Small Scale Secondary Highways and Major Roads), 0.055s [Wed Nov 14 09:34:13 2007].459989 msDrawMap(): Layer 31 (US Small Scale Primary Highways), 0.041s [Wed Nov 14 09:34:13 2007].503106 msDrawMap(): Layer 33 (US Small Scale Controlled Access Highways), 0.043s [Wed Nov 14 09:34:13 2007].538011 msDrawMap(): Layer 35 (US Small Scale Highway Shields), 0.035s [Wed Nov 14 09:34:13 2007].564523 msDrawMap(): Layer 37 (US Populated Places), 0.026s [Wed Nov 14 09:34:13 2007].570828 msOracleSpatialLayerOpen called with: geom FROM (SELECT st.bts_nbr, sgt.geom FROM site_tab st, site_geom_tab sgt WHERE st.site_id = sgt.site_id AND st.site_status_id = 3) USING SRID 8307 [Wed Nov 14 09:34:13 2007].783949 msOracleSpatialLayerOpen. Shared connection not available. Creating one. [Wed Nov 14 09:34:13 2007].784034 msConnPoolRegister(In Construction,username/password at SID,87b7130) [Wed Nov 14 09:34:13 2007].909150 msOracleSpatialLayerFreeItemInfo was called. [Wed Nov 14 09:34:13 2007].909246 msOracleSpatialLayerInitItemInfo was called. [Wed Nov 14 09:34:13 2007].909279 msOracleSpatialLayerWhichShapes was called. [Wed Nov 14 09:34:13 2007].909411 msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data: SELECT rownum, bts_nbr, geom FROM (SELECT st.bts_nbr, sgt.geom FROM site_tab st, site_geom_tab sgt WHERE st.site_id = sgt.site_id AND st.site_status_id = 3) WHERE SDO_FILTER( geom, MDSYS.SDO_GEOMETRY(2003, 8307, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-86.39 3,42.2076578,-84.658,43.5083422) ),'querytype=window') = 'TRUE' [Wed Nov 14 09:34:14 2007].528095 msOracleSpatialLayerFreeItemInfo was called. [Wed Nov 14 09:34:14 2007].528179 msOracleSpatialLayerClose was called. Layer name: In Construction. Layer connection: username/password at SID [Wed Nov 14 09:34:14 2007].528212 msOracleSpatialLayerClose. Cleaning layerinfo handlers. [Wed Nov 14 09:34:14 2007].528339 msOracleSpatialLayerClose. Cleaning Oracle Cache. [Wed Nov 14 09:34:14 2007].528510 msOracleSpatialLayerClose. Release the Oracle Pool. [Wed Nov 14 09:34:14 2007].528552 msConnPoolRelease(In Construction,username/password at SID,87b7130) [Wed Nov 14 09:34:14 2007].539690 msDrawMap(): Layer 46 (In Construction), 0.975s [Wed Nov 14 09:34:14 2007].545616 msOracleSpatialLayerOpen called with: geom FROM (SELECT st.bts_nbr, sgt.geom FROM site_tab st, site_geom_tab sgt WHERE st.site_id = sgt.site_id AND st.site_status_id IN (4,7)) USING SRID 8307 [Wed Nov 14 09:34:14 2007].545781 msConnPoolRequest(On-Air,username/password at SID) -> got 87b7130 [Wed Nov 14 09:34:14 2007].558612 msOracleSpatialLayerFreeItemInfo was called. [Wed Nov 14 09:34:14 2007].558696 msOracleSpatialLayerInitItemInfo was called. [Wed Nov 14 09:34:14 2007].558729 msOracleSpatialLayerWhichShapes was called. [Wed Nov 14 09:34:14 2007].558792 msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data: SELECT rownum, bts_nbr, geom FROM (SELECT st.bts_nbr, sgt.geom FROM site_tab st, site_geom_tab sgt WHERE st.site_id = sgt.site_id AND st.site_status_id IN (4,7)) WHERE SDO_FILTER( geom, MDSYS.SDO_GEOMETRY(2003, 8307, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-86.39 3,42.2076578,-84.658,43.5083422) ),'querytype=window') = 'TRUE' [Wed Nov 14 09:34:14 2007].795099 msOracleSpatialLayerFreeItemInfo was called. [Wed Nov 14 09:34:14 2007].795180 msOracleSpatialLayerClose was called. Layer name: On-Air. Layer connection: username/password at SID [Wed Nov 14 09:34:14 2007].795215 msOracleSpatialLayerClose. Cleaning layerinfo handlers. [Wed Nov 14 09:34:14 2007].795289 msOracleSpatialLayerClose. Cleaning Oracle Cache. [Wed Nov 14 09:34:14 2007].795422 msOracleSpatialLayerClose. Release the Oracle Pool. [Wed Nov 14 09:34:14 2007].795473 msConnPoolRelease(On-Air,username/password at SID,87b7130) [Wed Nov 14 09:34:14 2007].806672 msDrawMap(): Layer 47 (On-Air), 0.267s [Wed Nov 14 09:34:14 2007].884647 msDrawMap(): Drawing Label Cache, 0.078s [Wed Nov 14 09:34:14 2007].884822 msDrawMap() total time: 8.836s [Wed Nov 14 09:34:15 2007].27863 msOracleSpatialLayerClose was called. Layer name: In Construction. Layer connection: username/password at SID [Wed Nov 14 09:34:15 2007].27958 msOracleSpatialLayerClose was called. Layer name: On-Air. Layer connection: username/password at SID [Wed Nov 14 09:34:15 2007].29464 msConnPoolClose(username/password at SID,87b7130) ---- Timothy J Nolte - tnolte at ilpcs.com Associate Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com > -----Original Message----- > From: Julien-Samuel Lacroix [mailto:jlacroix at mapgears.com] > Sent: Wednesday, November 14, 2007 9:27 AM > To: Nolte, Tim > Cc: chameleon at lists.maptools.org > Subject: Re: [Chameleon] Chameleon & TileCache... > > Hi, > > Chameleon use the MapServer mapfile as a base configuration file. I > don't think you can easily use other source for your map > rendering other > than that. You may have more luck with more standard method to boost > rendering time. > > First things to check: > - Remove any projection block in your mapfile. Reprojection > on the fly > is really CPU consuming. > - Make sure you use simple expressions in your classes. > - Follow the tips for vector and raster data access improvement here: > http://mapserver.gis.umn.edu/docs/faq/performance > http://mapserver.gis.umn.edu/docs/howto/raster_data/#preproces > sing-rasters > > Julien > > Nolte, Tim wrote: > > I'm wondering if anyone has experience with using TileCache > along with > > Chameleon? Is this even possible? We have a large amount of > data that we > > need to try and boost the performance of and wondering if TileCache > > might be the ticket. Thanks. > > > > - Tim > > > > ---- > > Timothy J Nolte - tnolte at ilpcs.com > > Associate Network Planning Engineer > > > > iPCS Wireless, Inc. > > 4717 Broadmoor Ave, Suite G > > Kentwood, MI 49512 > > > > Office: 616-656-5163 > > PCS: 616-706-2438 > > Fax: 616-554-6484 > > Web: www.ipcswirelessinc.com > > > > _______________________________________________ > > Chameleon mailing list > > Chameleon at lists.maptools.org > > http://lists.maptools.org/mailman/listinfo/chameleon > > > > -- > Julien-Samuel Lacroix > Mapgears > http://www.mapgears.com/ > > From steven.ottens at GEODAN.NL Wed Nov 14 06:48:43 2007 From: steven.ottens at GEODAN.NL (Steven M. Ottens) Date: Wed, 14 Nov 2007 15:48:43 +0100 Subject: getCapabilities not valid XML (MSXML) In-Reply-To: <4739AC7A.7080808@mapgears.com> Message-ID: Daniel, I tried to remove the [ ] bit and it still doesn't work :( Once I remove the entire tag it does work, but I guess just because it doesn't know where to validate it against. I'll try to see if I can find what bit of the XML isn't deemed valid by MSXML, but no guarantees that I'll find it out. Regards, Steven Daniel Morissette wrote: > Steven, > > The EMPTY element declaration in the DOCTYPE was simply inspired from > the example found in the spec itself (in Annex A.2 of WMS 1.1.1 and > also present in most/all previous revisions). > > I'm no XML guru so I'm not sure what the best fix is, but once you > find out I'd invite you to file a ticket documenting the original > problem and the new format that makes MSXML and other parsers happy. > > Daniel > > Steven M. Ottens wrote: >> Hi all, >> >> My mapbuilder/openlayers application wasn't working on IE7, it >> complained that the WMS getCapabilities doc generated by Mapserver >> wasn't valid XML. I've finally tracked it down to the doctype >> declaration: >> Mapserver produces >> >> > "http://schemas.opengeospatial.net/wms/1.1.1/capabilities_1_1_1.dtd" >> [ >> >> ]> >> >> The parser removes both the tag and the tag >> from the XML before parsing. So normally the to-be-parsed XML text >> starts with: >> >> Which is a valid piece of XML >> However MSXML apparently thinks that the closing > after EMPTY >> belongs to the opening < before !DOCTYPE. So instead now the XML text >> starts with: >> ]> >> Which obviously isn't valid XML and MSXML fails. >> >> So my questions: >> -Anyone else noticed this problem? >> -Why is there an (empty!) ELEMENT declaration within the DOCTYPE? >> -How can I remove this ELEMENT? >> >> Regards, >> Steven > > From ed at TOPOZONE.COM Wed Nov 14 07:02:18 2007 From: ed at TOPOZONE.COM (Ed McNierney) Date: Wed, 14 Nov 2007 10:02:18 -0500 Subject: Migrating from Windows to Linux: trouble with mapfiles Message-ID: Steven - In addition to Kyle's example and info, one of the most likely problems is that you're moving from an operating system that is not case-sensitive to one that is. If your mapfile refers to the file XYZZY and on Windows you have a file named xyzzy, that file will be found. On Linux it will not be found, as XYZZY and xyzzy are two different filenames. - Ed Ed McNierney TopoZone.com ________________________________ From: UMN MapServer Users List on behalf of Steven De Vriendt Sent: Wed 11/14/2007 9:24 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Migrating from Windows to Linux: trouble with mapfiles Hi list, I'm migrating from windows to linux (ubuntu) but I have some trouble getting a map-file to work. I want to be able to access my server as wms but I'm not sure what to look out for when making a map-file. I'm having trouble with path-names etc... Can someone give me an example of a working mapfile for Linux ? That would be great ! Thanks ! Steven -------------- next part -------------- An HTML attachment was scrubbed... URL: From gisaalter at GMAIL.COM Wed Nov 14 07:06:33 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Wed, 14 Nov 2007 16:06:33 +0100 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <4BF377919225F449BB097CB76FFE9BC87427@ptolemy.topozone.com> Message-ID: Ok, thanks all. With the help from Kyle"s file I was able to access my mapserver, still I do get an error msEvalRegex(): Regular expression error. String (/etc/mapserver/wmsserver.map?) failed expression test. I will search the archives whats causing this... Thanks ! On Nov 14, 2007 4:02 PM, Ed McNierney wrote: > Steven - > > In addition to Kyle's example and info, one of the most likely problems is > that you're moving from an operating system that is not case-sensitive to > one that is. If your mapfile refers to the file XYZZY and on Windows you > have a file named xyzzy, that file will be found. On Linux it will not be > found, as XYZZY and xyzzy are two different filenames. > > - Ed > > Ed McNierney > TopoZone.com > > ________________________________ > > From: UMN MapServer Users List on behalf of Steven De Vriendt > Sent: Wed 11/14/2007 9:24 AM > To: MAPSERVER-USERS at LISTS.UMN.EDU > Subject: [UMN_MAPSERVER-USERS] Migrating from Windows to Linux: trouble > with mapfiles > > > Hi list, > > I'm migrating from windows to linux (ubuntu) but I have some trouble > getting a map-file to work. > I want to be able to access my server as wms but I'm not sure what to look > out for when > making a map-file. I'm having trouble with path-names etc... > > Can someone give me an example of a working mapfile for Linux ? > > That would be great ! > > Thanks ! > > Steven > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregor at HOSTGIS.COM Wed Nov 14 07:15:49 2007 From: gregor at HOSTGIS.COM (Gregor Mosheh) Date: Wed, 14 Nov 2007 08:15:49 -0700 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <8d2ea9d70711140706s7bd1963flda20255b9a051f77@mail.gmail.com> Message-ID: Steven De Vriendt wrote: > msEvalRegex(): Regular expression error. String > (/etc/mapserver/wmsserver.map?) failed expression test. Mapfiles must end in a .map extension. Taker out that extra ? character. It should probably be a & yes? -- Gregor Mosheh / Greg Allensworth System Administrator, HostGIS cartographic development & hosting services http://www.HostGIS.com/ "Remember that no one cares if you can back up, only if you can restore." - AMANDA From gisaalter at GMAIL.COM Wed Nov 14 07:35:32 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Wed, 14 Nov 2007 16:35:32 +0100 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <473B1125.4030502@hostgis.com> Message-ID: Solved this one too :-) thanks ! Still can't see my layers. Maybe 'cause I'm using PostGIS ? However, I can acces my postgis-db from qgis without any trouble. Anything I should be aware of when configuring a mapfile i/c postgis in linux ? On Nov 14, 2007 4:15 PM, Gregor Mosheh wrote: > Steven De Vriendt wrote: > > msEvalRegex(): Regular expression error. String > > (/etc/mapserver/wmsserver.map?) failed expression test. > > Mapfiles must end in a .map extension. > Taker out that extra ? character. It should probably be a & yes? > > -- > Gregor Mosheh / Greg Allensworth > System Administrator, HostGIS cartographic development & hosting services > http://www.HostGIS.com/ > > "Remember that no one cares if you can back up, > only if you can restore." - AMANDA > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gisaalter at GMAIL.COM Wed Nov 14 07:55:14 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Wed, 14 Nov 2007 16:55:14 +0100 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <8d2ea9d70711140706s7bd1963flda20255b9a051f77@mail.gmail.com> Message-ID: Gregor: this is my layer-setup for postgis-wms.. am I missing out something ? LAYER NAME "grens" METADATA "wms_title" "gemeentegrens" END CONNECTIONTYPE postgis CONNECTION "host=****** port=**** dbname=***** user=****** password=*****" DATA "the_geom from alrgemline" TYPE LINE CLASS NAME "KadScan" COLOR 221 221 221 OUTLINECOLOR 238 238 238 END PROJECTION "init=epsg:31300" END On Nov 14, 2007 4:06 PM, Steven De Vriendt wrote: > Ok, thanks all. > With the help from Kyle"s file I was able to access my mapserver, still I > do get an error > > msEvalRegex(): Regular expression error. String > (/etc/mapserver/wmsserver.map?) failed expression test. > > I will search the archives whats causing this... > > Thanks ! > > > > > On Nov 14, 2007 4:02 PM, Ed McNierney < ed at topozone.com> wrote: > > > Steven - > > > > In addition to Kyle's example and info, one of the most likely problems > > is that you're moving from an operating system that is not case-sensitive to > > one that is. If your mapfile refers to the file XYZZY and on Windows you > > have a file named xyzzy, that file will be found. On Linux it will not be > > found, as XYZZY and xyzzy are two different filenames. > > > > - Ed > > > > Ed McNierney > > TopoZone.com > > > > ________________________________ > > > > From: UMN MapServer Users List on behalf of Steven De Vriendt > > Sent: Wed 11/14/2007 9:24 AM > > To: MAPSERVER-USERS at LISTS.UMN.EDU > > Subject: [UMN_MAPSERVER-USERS] Migrating from Windows to Linux: trouble > > with mapfiles > > > > > > Hi list, > > > > I'm migrating from windows to linux (ubuntu) but I have some trouble > > getting a map-file to work. > > I want to be able to access my server as wms but I'm not sure what to > > look out for when > > making a map-file. I'm having trouble with path-names etc... > > > > Can someone give me an example of a working mapfile for Linux ? > > > > That would be great ! > > > > Thanks ! > > > > Steven > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregor at HOSTGIS.COM Wed Nov 14 08:02:47 2007 From: gregor at HOSTGIS.COM (Gregor Mosheh) Date: Wed, 14 Nov 2007 09:02:47 -0700 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <8d2ea9d70711140755m7c6bb18apcc864b977e1edffd@mail.gmail.com> Message-ID: Steven De Vriendt wrote: > Gregor: > this is my layer-setup for postgis-wms.. > am I missing out something ? When you request the layer, what is your request? I ask because you have a wms_title, so I wonder whether you're requesting layer grens or layer gemeentgrens -- it should be grens. Other than that, looks great. What is it doing instead of working? When you hit mapserv directly via a manual WMS request, does it generate a blank image, or an error? Do you have a WMS URL pointing at this layer, which we could use to check? I might also recommend that you go over the WMS Server HOWTO on the website, just in case something got overlooked. Check the usual stuff: projections, wms_srs listing, read your WMS server's capabilities document and make sure it's sane, ... -- Gregor Mosheh / Greg Allensworth System Administrator, HostGIS cartographic development & hosting services http://www.HostGIS.com/ "Remember that no one cares if you can back up, only if you can restore." - AMANDA From David.Fawcett at STATE.MN.US Wed Nov 14 08:06:56 2007 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Wed, 14 Nov 2007 10:06:56 -0600 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: A<8d2ea9d70711140755m7c6bb18apcc864b977e1edffd@mail.gmail.com> Message-ID: If you use this same connection info and data, can you get it to display as a line layer using mode=map? If not, I would debug this as a normal layer first and then convert it to a WMS layer. David. -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Steven De Vriendt Sent: Wednesday, November 14, 2007 9:55 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Migrating from Windows to Linux: trouble with mapfiles Gregor: this is my layer-setup for postgis-wms.. am I missing out something ? LAYER NAME "grens" METADATA "wms_title" "gemeentegrens" END CONNECTIONTYPE postgis CONNECTION "host=****** port=**** dbname=***** user=****** password=*****" DATA "the_geom from alrgemline" TYPE LINE CLASS NAME "KadScan" COLOR 221 221 221 OUTLINECOLOR 238 238 238 END PROJECTION "init=epsg:31300" END On Nov 14, 2007 4:06 PM, Steven De Vriendt wrote: Ok, thanks all. With the help from Kyle"s file I was able to access my mapserver, still I do get an error msEvalRegex(): Regular expression error. String (/etc/mapserver/wmsserver.map?) failed expression test. I will search the archives whats causing this... Thanks ! On Nov 14, 2007 4:02 PM, Ed McNierney < ed at topozone.com> wrote: Steven - In addition to Kyle's example and info, one of the most likely problems is that you're moving from an operating system that is not case-sensitive to one that is. If your mapfile refers to the file XYZZY and on Windows you have a file named xyzzy, that file will be found. On Linux it will not be found, as XYZZY and xyzzy are two different filenames. - Ed Ed McNierney TopoZone.com ________________________________ From: UMN MapServer Users List on behalf of Steven De Vriendt Sent: Wed 11/14/2007 9:24 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Migrating from Windows to Linux: trouble with mapfiles Hi list, I'm migrating from windows to linux (ubuntu) but I have some trouble getting a map-file to work. I want to be able to access my server as wms but I'm not sure what to look out for when making a map-file. I'm having trouble with path-names etc... Can someone give me an example of a working mapfile for Linux ? That would be great ! Thanks ! Steven -------------- next part -------------- An HTML attachment was scrubbed... URL: From gisaalter at GMAIL.COM Wed Nov 14 08:08:09 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Wed, 14 Nov 2007 17:08:09 +0100 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <473B1C27.9080101@hostgis.com> Message-ID: Gregor, I'm trying to access my wms in qgis. When I access this url in qgis: http://80.201.239.208:8888/cgi-bin/mapserv?map=/etc/mapserver/wmsserver.map&version=1.1.0&service=wms&request=getcapabilities I'm getting an error that qgis can't access the postgis db. However, when I try to connect to postgis-db in qgis using same connection params I can access it just fine...strange.. Steven On Nov 14, 2007 5:02 PM, Gregor Mosheh wrote: > Steven De Vriendt wrote: > > Gregor: > > this is my layer-setup for postgis-wms.. > > am I missing out something ? > > When you request the layer, what is your request? I ask because you have > a wms_title, so I wonder whether you're requesting layer grens or layer > gemeentgrens -- it should be grens. > > Other than that, looks great. What is it doing instead of working? When > you hit mapserv directly via a manual WMS request, does it generate a > blank image, or an error? Do you have a WMS URL pointing at this layer, > which we could use to check? > > I might also recommend that you go over the WMS Server HOWTO on the > website, just in case something got overlooked. Check the usual stuff: > projections, wms_srs listing, read your WMS server's capabilities > document and make sure it's sane, ... > > -- > Gregor Mosheh / Greg Allensworth > System Administrator, HostGIS cartographic development & hosting services > http://www.HostGIS.com/ > > "Remember that no one cares if you can back up, > only if you can restore." - AMANDA > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kyle.Wilcox at NOAA.GOV Wed Nov 14 08:20:27 2007 From: Kyle.Wilcox at NOAA.GOV (Kyle Wilcox) Date: Wed, 14 Nov 2007 11:20:27 -0500 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <8d2ea9d70711140808tb05ba46hc9fb46ac658885d3@mail.gmail.com> Message-ID: Did you set up your pg_hba.conf file to allow connections from the Mapserver computer? I am getting a database connection error when going through the WMS, which is accessing the database from the Mapserver box. Steven De Vriendt wrote: > Gregor, > I'm trying to access my wms in qgis. When I access this url in qgis: > http://80.201.239.208:8888/cgi-bin/mapserv?map=/etc/mapserver/wmsserver.map&version=1.1.0&service=wms&request=getcapabilities > I'm getting an error that qgis can't access the postgis db. > However, when I try to connect to postgis-db in qgis using same connection > params I can access it just fine...strange.. > > Steven > > On Nov 14, 2007 5:02 PM, Gregor Mosheh wrote: > >> Steven De Vriendt wrote: >>> Gregor: >>> this is my layer-setup for postgis-wms.. >>> am I missing out something ? >> When you request the layer, what is your request? I ask because you have >> a wms_title, so I wonder whether you're requesting layer grens or layer >> gemeentgrens -- it should be grens. >> >> Other than that, looks great. What is it doing instead of working? When >> you hit mapserv directly via a manual WMS request, does it generate a >> blank image, or an error? Do you have a WMS URL pointing at this layer, >> which we could use to check? >> >> I might also recommend that you go over the WMS Server HOWTO on the >> website, just in case something got overlooked. Check the usual stuff: >> projections, wms_srs listing, read your WMS server's capabilities >> document and make sure it's sane, ... >> >> -- >> Gregor Mosheh / Greg Allensworth >> System Administrator, HostGIS cartographic development & hosting services >> http://www.HostGIS.com/ >> >> "Remember that no one cares if you can back up, >> only if you can restore." - AMANDA >> > -- Kyle Wilcox NOAA Chesapeake Bay Office 410 Severn Avenue Suite 107A Annapolis, MD 21403 office: (410) 295-3151 Kyle.Wilcox at noaa.gov "It is from the wellspring of our despair and the places that we are broken that we come to repair the world." - Murray Waas From gisaalter at GMAIL.COM Wed Nov 14 08:27:19 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Wed, 14 Nov 2007 17:27:19 +0100 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <473B2067.6050300@zeelandnet.nl> Message-ID: Solved the error too, it was a DMZ-IP-issue. Now, I'm able to acces my WMS, can add the layer "grens", but it's not showing up in qgis. I'm not suppose to handle all this on the list though. I'm working it out. Thanks for all your help ! On Nov 14, 2007 5:20 PM, Milo van der Linden wrote: > It seems that this might be a rights issue. Is the postGIS database > running on the same machine as qGIS? is the webserver on the same machine as > the database? Did you allow access to the postGIS database in the > pg_hba.conf? or is it set to localhost access only? > > Kind regards, > > Milo van der Linden > > > Steven De Vriendt schreef: > > Gregor, > I'm trying to access my wms in qgis. When I access this url in qgis: > > http://80.201.239.208:8888/cgi-bin/mapserv?map=/etc/mapserver/wmsserver.map&version=1.1.0&service=wms&request=getcapabilities > I'm getting an error that qgis can't access the postgis db. > However, when I try to connect to postgis-db in qgis using same connection > params I can access it just fine...strange.. > > Steven > > On Nov 14, 2007 5:02 PM, Gregor Mosheh wrote: > > > Steven De Vriendt wrote: > > > Gregor: > > > this is my layer-setup for postgis-wms.. > > > am I missing out something ? > > > > When you request the layer, what is your request? I ask because you > > have > > a wms_title, so I wonder whether you're requesting layer grens or layer > > gemeentgrens -- it should be grens. > > > > Other than that, looks great. What is it doing instead of working? When > > you hit mapserv directly via a manual WMS request, does it generate a > > blank image, or an error? Do you have a WMS URL pointing at this layer, > > which we could use to check? > > > > I might also recommend that you go over the WMS Server HOWTO on the > > website, just in case something got overlooked. Check the usual stuff: > > projections, wms_srs listing, read your WMS server's capabilities > > document and make sure it's sane, ... > > > > -- > > Gregor Mosheh / Greg Allensworth > > System Administrator, HostGIS cartographic development & hosting > > services > > http://www.HostGIS.com/ > > > > "Remember that no one cares if you can back up, > > only if you can restore." - AMANDA > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlinden at ZEELANDNET.NL Wed Nov 14 08:20:55 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Wed, 14 Nov 2007 17:20:55 +0100 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <8d2ea9d70711140808tb05ba46hc9fb46ac658885d3@mail.gmail.com> Message-ID: It seems that this might be a rights issue. Is the postGIS database running on the same machine as qGIS? is the webserver on the same machine as the database? Did you allow access to the postGIS database in the pg_hba.conf? or is it set to localhost access only? Kind regards, Milo van der Linden Steven De Vriendt schreef: > Gregor, > I'm trying to access my wms in qgis. When I access this url in qgis: > http://80.201.239.208:8888/cgi-bin/mapserv?map=/etc/mapserver/wmsserver.map&version=1.1.0&service=wms&request=getcapabilities > > I'm getting an error that qgis can't access the postgis db. > However, when I try to connect to postgis-db in qgis using same > connection params I can access it just fine...strange.. > > Steven > > On Nov 14, 2007 5:02 PM, Gregor Mosheh > wrote: > > Steven De Vriendt wrote: > > Gregor: > > this is my layer-setup for postgis-wms.. > > am I missing out something ? > > When you request the layer, what is your request? I ask because > you have > a wms_title, so I wonder whether you're requesting layer grens or > layer > gemeentgrens -- it should be grens. > > Other than that, looks great. What is it doing instead of working? > When > you hit mapserv directly via a manual WMS request, does it generate a > blank image, or an error? Do you have a WMS URL pointing at this > layer, > which we could use to check? > > I might also recommend that you go over the WMS Server HOWTO on the > website, just in case something got overlooked. Check the usual > stuff: > projections, wms_srs listing, read your WMS server's capabilities > document and make sure it's sane, ... > > -- > Gregor Mosheh / Greg Allensworth > System Administrator, HostGIS cartographic development & hosting > services > http://www.HostGIS.com/ > > "Remember that no one cares if you can back up, > only if you can restore." - AMANDA > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregor at HOSTGIS.COM Wed Nov 14 08:33:33 2007 From: gregor at HOSTGIS.COM (Gregor Mosheh) Date: Wed, 14 Nov 2007 09:33:33 -0700 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <8d2ea9d70711140808tb05ba46hc9fb46ac658885d3@mail.gmail.com> Message-ID: Steven De Vriendt wrote: > I'm trying to access my wms in qgis. When I access this url in qgis: > http://80.201.239.208:8888/cgi-bin/mapserv?map=/etc/mapserver/wmsserver.map&version=1.1.0&service=wms&request=getcapabilities > I'm getting an error that qgis can't access the postgis db. All righty... I got as far as trying to make a map request, and replicated your error: http://80.201.239.208:8888/cgi-bin/mapserv?map=/etc/mapserver/wmsserver.map&version=1.1.1&service=WMS&request=GetMap&layers=grens&format=image/png Indeed, it's complaining that your connection params aren't working. In fact, it's saying "connection refused" which means that the PostgreSQL server isn't listening. Strangely, I'm also able to connect to it via PgAdmin. Indeed, that's baffling. Are you able to SSH in to 80.201.239.208 and then connect to the database using that same connection info from within the server? I have a feeling that this isn't a Mapserver issue, but perhaps some firewall issue keeping you from connecting to the PgSQL server from within the server. One thing worth trying: change the host= part to host=127.0.0.1 This will try to connect to PgSQL on localhost instead of the external IP, and should bypass any weird firewall rules. Beyond that, I'd want to do some sysadmin stuff, hop in and poke around, to debug this; that may not be comfortable with you though. (oh, and BTW, you may want to tighten up on PgSQL's security after you get this working; half the net now knows your IP, dbname, and password. ;) ) -- Gregor Mosheh / Greg Allensworth System Administrator, HostGIS cartographic development & hosting services http://www.HostGIS.com/ "Remember that no one cares if you can back up, only if you can restore." - AMANDA From gregor at HOSTGIS.COM Wed Nov 14 08:36:12 2007 From: gregor at HOSTGIS.COM (Gregor Mosheh) Date: Wed, 14 Nov 2007 09:36:12 -0700 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <8d2ea9d70711140827s6c154930va5a037f6e27877be@mail.gmail.com> Message-ID: Steven De Vriendt wrote: > Solved the error too, it was a DMZ-IP-issue. Hey, I was right. :) > Now, I'm able to acces my WMS, can add the layer "grens", but it's not > showing up in qgis. The most likely culprit is the extent and the projections. That seems to be the #1 cause of "nothing shows up" phenomena. But yeah, you're past the biggest hurdles; just ask if you need anything else. -- Gregor Mosheh / Greg Allensworth System Administrator, HostGIS cartographic development & hosting services http://www.HostGIS.com/ "Remember that no one cares if you can back up, only if you can restore." - AMANDA From gisaalter at GMAIL.COM Wed Nov 14 08:39:50 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Wed, 14 Nov 2007 17:39:50 +0100 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <473B23FC.6000406@hostgis.com> Message-ID: Gregor, Thanks :-) . I will have a look at the extent and projections like you suggest. I will first have a look at my security...I see QGIS is quite friendly in showing information where it shouldn't and not showing information where it should :-) Thanks again Steven On Nov 14, 2007 5:36 PM, Gregor Mosheh wrote: > Steven De Vriendt wrote: > > Solved the error too, it was a DMZ-IP-issue. > > Hey, I was right. :) > > > > Now, I'm able to acces my WMS, can add the layer "grens", but it's not > > showing up in qgis. > > The most likely culprit is the extent and the projections. That seems to > be the #1 cause of "nothing shows up" phenomena. But yeah, you're past > the biggest hurdles; just ask if you need anything else. > > -- > Gregor Mosheh / Greg Allensworth > System Administrator, HostGIS cartographic development & hosting services > http://www.HostGIS.com/ > > "Remember that no one cares if you can back up, > only if you can restore." - AMANDA > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregor at HOSTGIS.COM Wed Nov 14 08:44:15 2007 From: gregor at HOSTGIS.COM (Gregor Mosheh) Date: Wed, 14 Nov 2007 09:44:15 -0700 Subject: Migrating from Windows to Linux: trouble with mapfiles In-Reply-To: <8d2ea9d70711140839g7ee479c8l43a3d72c66fd003@mail.gmail.com> Message-ID: Steven De Vriendt wrote: > I will first have a look at my security...I see QGIS is quite friendly > in showing information > where it shouldn't and not showing information where it should :-) Actually, that's not qGIS at all; that's Mapserver's very verbose error report. One could argue that the password= field should be mangled for exactly this sort of occassion. I think I'll file an enhancement ticket on that topic... -- Gregor Mosheh / Greg Allensworth System Administrator, HostGIS cartographic development & hosting services http://www.HostGIS.com/ "Remember that no one cares if you can back up, only if you can restore." - AMANDA From dn at HDDESIGN.COM Wed Nov 14 09:50:16 2007 From: dn at HDDESIGN.COM (David Niergarth) Date: Wed, 14 Nov 2007 11:50:16 -0600 Subject: How to render current map scale via mapscript? Message-ID: Using an html template, I can render the current map scale using [scale]. How can I do this from mapscript? I'm not using html templates. Instead, I start with a map file, instantiate it in Python mapscript, add various layers, then render the map and legend. I'm trying to tweak my map file (adjusting MAXSCALE, MINSCALE for layers) but it's tedious without knowing what mapserver thinks the current map scale is. Is there some simple way to calculate the current scale? Thanks for any suggestions, --David From info at JERESIN.CO.ZA Thu Nov 15 00:16:58 2007 From: info at JERESIN.CO.ZA (Jeresin) Date: Thu, 15 Nov 2007 00:16:58 -0800 Subject: Java Mapserver app - queryLayerByPoint. How? In-Reply-To: <75b4b93e0711140402i7c88b948n6d536c43c3626e45@mail.gmail.com> Message-ID: Umberto Nicoletti wrote: > > The code snippet is actually missing the code for this function which > does the trick of fetching a shape's value and putting them into a map > for later use: > > protected Map getResult(shapeObj shape, layerObj layer) { > Map aResult = new HashMap(); > for (int z = 0; z < shape.getNumvalues(); z++) { > aResult.put(layer.getItem(z), shape.getValue(z)); > } > return aResult; > } > > Regards, > Umberto > > Thanks Umberto, I'm going to give it a try and get back to you with the outcome. -- View this message in context: http://www.nabble.com/Java-Mapserver-app---queryLayerByPoint.-How--tf4800141.html#a13763410 Sent from the Mapserver - User mailing list archive at Nabble.com. From oliver.wesp at GMAIL.COM Thu Nov 15 00:50:05 2007 From: oliver.wesp at GMAIL.COM (Oliver Wesp) Date: Thu, 15 Nov 2007 09:50:05 +0100 Subject: How to render current map scale via mapscript? In-Reply-To: <473B3558.9000300@hddesign.com> Message-ID: scale is an attribute of mapObj. I don't know for phyton but for java its simple: map.getScale() On Nov 14, 2007 6:50 PM, David Niergarth wrote: > Using an html template, I can render the current map scale using [scale]. > How > can I do this from mapscript? > > I'm not using html templates. Instead, I start with a map file, > instantiate it > in Python mapscript, add various layers, then render the map and legend. > > I'm trying to tweak my map file (adjusting MAXSCALE, MINSCALE for layers) > but > it's tedious without knowing what mapserver thinks the current map scale > is. Is > there some simple way to calculate the current scale? > > Thanks for any suggestions, > > --David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From veeraswamyd at YAHOO.CO.IN Thu Nov 15 02:25:07 2007 From: veeraswamyd at YAHOO.CO.IN (lakku) Date: Thu, 15 Nov 2007 02:25:07 -0800 Subject: sharpmap Message-ID: hi all plz tell me the code for identify , for mutiple layers in SHARPMAP ie when user clicks on the map ,data related to that particular point must me displayed on the grid i worked with only single layer ie polygon but i want code for line and point features also my code for single layer is SharpMap.Geometries. Point ClickPnt = myMap.ImageToWorld(new System.Drawing. Point(e.X, e.Y)); if (rblMapTools.SelectedValue == "3") //Query { SharpMap.Data. FeatureDataSet ds = new SharpMap.Data.FeatureDataSet (); VectorLayer layer = myMap.Layers[0] as SharpMap.Layers. VectorLayer; layer.DataSource.Open(); layer.DataSource.ExecuteIntersectionQuery(ClickPnt.GetBoundingBox(), ds); layer.DataSource.Close(); gridview1.DataSource = ds.Tables[0]; gridview1.DataBind(); SharpMap.Layers. VectorLayer laySelected = new SharpMap.Layers. VectorLayer("Selection"); laySelected.DataSource = new GeometryProvider(ds.Tables[0]); laySelected.Style.Fill = new System.Drawing.SolidBrush(System.Drawing. Color.Pink); myMap.Layers.Add(laySelected); } plz tell me the code for multiple layers(line,point) -- View this message in context: http://www.nabble.com/sharpmap-tf4810997.html#a13765074 Sent from the Mapserver - User mailing list archive at Nabble.com. From RMcCulley at COUNTY24.COM Thu Nov 15 09:47:54 2007 From: RMcCulley at COUNTY24.COM (Rob McCulley) Date: Thu, 15 Nov 2007 10:47:54 -0700 Subject: SVG Labels not Wrapping Message-ID: Hi All, I'm playing around with SVG output, and I'm having a problem with the labels. My label class looks like this: CLASS TEXT (Legal: [Address]*Owner: [Owner]*[Area] Acres) NAME "Owner Labels Small-Large" EXPRESSION ('[Type]' eq 'label' and [Area] < 5) MAXSCALEDENOM 1500 LABEL WRAP "*" TYPE TRUETYPE FONT "alberta" SIZE 10 POSITION CC COLOR 0 0 0 BUFFER 0 PARTIALS FALSE PRIORITY 5 FORCE TRUE END END If I output that to a .png file, the labels look fine, and are wrapped accordingly. If I output it to an .svg file, the labels are not wrapped. The '*' character is removed from the label, but it is not wrapped. I've attached a sample .png and .svg to compare. Is this something I'm doing wrong, or is this a bug? Thanks, Rob McCulley -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: svgTest.png Type: image/png Size: 32628 bytes Desc: svgTest.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: svgTest.svg Type: application/octet-stream Size: 5744 bytes Desc: svgTest.svg URL: From info at JERESIN.CO.ZA Thu Nov 15 11:14:57 2007 From: info at JERESIN.CO.ZA (Jeresin) Date: Thu, 15 Nov 2007 11:14:57 -0800 Subject: Java Mapserver app - queryLayerByPoint. How? In-Reply-To: <75b4b93e0711140402i7c88b948n6d536c43c3626e45@mail.gmail.com> Message-ID: Umberto Nicoletti wrote: > > The code snippet is actually missing the code for this function which > does the trick of fetching a shape's value and putting them into a map > for later use: > > protected Map getResult(shapeObj shape, layerObj layer) { > Map aResult = new HashMap(); > for (int z = 0; z < shape.getNumvalues(); z++) { > aResult.put(layer.getItem(z), shape.getValue(z)); > } > return aResult; > } > > Regards, > Umberto > > Hi Umberto Thanks a lot! This solution works perfectly, so we can consider this thread resolved. I have another issue, but I'll start a new thread for it. -- View this message in context: http://www.nabble.com/Java-Mapserver-app---queryLayerByPoint.-How--tf4800141.html#a13779679 Sent from the Mapserver - User mailing list archive at Nabble.com. From info at JERESIN.CO.ZA Thu Nov 15 11:23:37 2007 From: info at JERESIN.CO.ZA (Jeresin) Date: Thu, 15 Nov 2007 11:23:37 -0800 Subject: Java Desktop App - MapServer slow sometimes Message-ID: Hi all My Java desktop app works well and I'm quite happy with it. However, there is still a little issue that bothers me a bit. Normally, when the mapObj needs to be refreshed (due to a zoom, for instance), MapServer returns with an image quite swiftly. By the way, I'm getting the image directly via the getBytes() method. Other times (not often) MapServer takes a long time to return with the image...I've had to wait up to 30 seconds! The image is not particularly complex, and the same image has previously taken less than a second to be generated. Why the inconsistency? -- View this message in context: http://www.nabble.com/Java-Desktop-App---MapServer-slow-sometimes-tf4816580.html#a13779798 Sent from the Mapserver - User mailing list archive at Nabble.com. From yassefa at DMSOLUTIONS.CA Thu Nov 15 13:15:39 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Thu, 15 Nov 2007 16:15:39 -0500 Subject: SVG Labels not Wrapping In-Reply-To: <8563B9D6767C904A912272A2D56548E41D2E05@vermilion.County24.local> Message-ID: Rob, the wrap parameter is not supported in the svg at this point. I have filed an enhancement bug on this (http://trac.osgeo.org/mapserver/ticket/2400). There might be some efforts in the near future to consolidate drawing functions so they can be used with different output formats, this bug could be addressed at the point. Best Regards, Rob McCulley wrote: > > > Hi All, > > > > I?m playing around with SVG output, and I?m having a problem with the > labels. My label class looks like this: > > > > CLASS > > TEXT (Legal: [Address]*Owner: [Owner]*[Area] Acres) > > NAME "Owner Labels Small-Large" > > EXPRESSION ('[Type]' eq 'label' and [Area] < 5) > > MAXSCALEDENOM 1500 > > LABEL > > WRAP "*" > > TYPE TRUETYPE > > FONT "alberta" > > SIZE 10 > > POSITION CC > > COLOR 0 0 0 > > BUFFER 0 > > PARTIALS FALSE > > PRIORITY 5 > > FORCE TRUE > > END > > END > > > > If I output that to a .png file, the labels look fine, and are wrapped > accordingly. If I output it to an .svg file, the labels are not > wrapped. The ?*? character is removed from the label, but it is not > wrapped. I?ve attached a sample .png and .svg to compare. > > > > Is this something I?m doing wrong, or is this a bug? > > > > Thanks, > > Rob McCulley > > > > > > > ------------------------------------------------------------------------ > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From jeff at BLUEMOONWEATHER.ORG Thu Nov 15 19:33:09 2007 From: jeff at BLUEMOONWEATHER.ORG (Jeff Copes) Date: Thu, 15 Nov 2007 19:33:09 -0800 Subject: Mapserv not accepting POST method Message-ID: Hi all. Working with the MapServer, apache 1.3.33 on Mac OS Tiger. Invoking mapserv from:
This error is displayed: The requested method POST is not allowed for the URL /CGI-Executables/mapserv The mapserv executable is in the CGI-Executables directory, has correct permissions, the other elements exist in the specified place, apache is working, the directories have the right permissions. Postdata is being flushed, browser cache is flushed. I hope this isn't something obvious, I don't need the beating. Thanks, Jeff -- View this message in context: http://www.nabble.com/Mapserv-not-accepting-POST-method-tf4818882.html#a13786675 Sent from the Mapserver - User mailing list archive at Nabble.com. From woklist at KYNGCHAOS.COM Thu Nov 15 19:56:32 2007 From: woklist at KYNGCHAOS.COM (William Kyngesburye) Date: Thu, 15 Nov 2007 21:56:32 -0600 Subject: Mapserv not accepting POST method In-Reply-To: <13786675.post@talk.nabble.com> Message-ID: The web URL for "CGI-Executables" is the standard "/cgi-bin" on OSX. Also, I believe that those other form values need to be web URLs, not file system paths. On Nov 15, 2007, at 9:33 PM, Jeff Copes wrote: > Hi all. > > Working with the MapServer, apache 1.3.33 on Mac OS Tiger. > > Invoking mapserv from: > > >
> > value="/Library/WebServer/Maps/helloworld.map"> > value="/Library/WebServer/Images"> >
> > > > This error is displayed: > > The requested method POST is not allowed for the URL > /CGI-Executables/mapserv > > The mapserv executable is in the CGI-Executables directory, has > correct > permissions, the other elements exist in the specified place, apache > is > working, the directories have the right permissions. Postdata is being > flushed, browser cache is flushed. I hope this isn't something > obvious, I > don't need the beating. > > Thanks, > > Jeff > -- > View this message in context: http://www.nabble.com/Mapserv-not-accepting-POST-method-tf4818882.html#a13786675 > Sent from the Mapserver - User mailing list archive at Nabble.com. ----- William Kyngesburye http://www.kyngchaos.com/ "Mon Dieu! but they are all alike. Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings. And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence.... - the wisdom of Tarzan From bayu at BKURNIAWAN.COM Thu Nov 15 23:41:24 2007 From: bayu at BKURNIAWAN.COM (Bayu Kurniawan R) Date: Fri, 16 Nov 2007 14:41:24 +0700 Subject: Query JOIN table between SHP and MySQL Message-ID: How to join between ESRI Shapefile data with MySQL data I'm try with http://mapserver.gis.umn.edu/docs/reference/mapfile/join JOIN NAME "DEMO" CONNECTION "MYSQL:DEMO,host=localhost,port=3306,user=root,password=" CONNECTIONTYPE ogr TABLE "Gabungan" FROM "Kecamatan" TO "kecamatan" TYPE ONE-TO-ONE END but my query is no result -- Bayu Kurniawan R -------------- next part -------------- An HTML attachment was scrubbed... URL: From umberto.nicoletti at GMAIL.COM Fri Nov 16 00:49:07 2007 From: umberto.nicoletti at GMAIL.COM (Umberto Nicoletti) Date: Fri, 16 Nov 2007 09:49:07 +0100 Subject: Java Desktop App - MapServer slow sometimes In-Reply-To: <13779798.post@talk.nabble.com> Message-ID: It could be because of gc. Run the application with gc logging turned on and see if there is a match between full gcs and application slowness: java -Xloggc:file HTH, Umberto On Nov 15, 2007 8:23 PM, Jeresin wrote: > Hi all > > My Java desktop app works well and I'm quite happy with it. However, there > is still a little issue that bothers me a bit. > > Normally, when the mapObj needs to be refreshed (due to a zoom, for > instance), MapServer returns with an image quite swiftly. By the way, I'm > getting the image directly via the getBytes() method. Other times (not > often) MapServer takes a long time to return with the image...I've had to > wait up to 30 seconds! The image is not particularly complex, and the same > image has previously taken less than a second to be generated. > > Why the inconsistency? > -- > View this message in context: http://www.nabble.com/Java-Desktop-App---MapServer-slow-sometimes-tf4816580.html#a13779798 > Sent from the Mapserver - User mailing list archive at Nabble.com. > From dhasman at DOLPHMAP.COM Fri Nov 16 05:40:02 2007 From: dhasman at DOLPHMAP.COM (Doug_at_DolphMap) Date: Fri, 16 Nov 2007 05:40:02 -0800 Subject: ESRI Annotation in Mapserver Message-ID: Hi, I'm new to the Mapserver world and need to know if it's possible to bring Annotation layers in an ESRI PGDB into an existing mapserver environment/application. If so, how? What's the procedure? Thanks in advance, Doug Hasman (dhasman at dolphmap.com) GIS Manager Dolph Map Ft. Lauderdale, FL -- View this message in context: http://www.nabble.com/ESRI-Annotation-in-Mapserver-tf4821348.html#a13793395 Sent from the Mapserver - User mailing list archive at Nabble.com. From jmckenna at DMSOLUTIONS.CA Fri Nov 16 06:14:31 2007 From: jmckenna at DMSOLUTIONS.CA (Jeff McKenna) Date: Fri, 16 Nov 2007 09:14:31 -0500 Subject: ESRI Annotation in Mapserver In-Reply-To: <13793395.post@talk.nabble.com> Message-ID: Start with this page: http://mapserver.gis.umn.edu/docs/reference/vector_data/pgeo -jeff Doug_at_DolphMap wrote: > Hi, > > I'm new to the Mapserver world and need to know if it's possible to bring > Annotation layers in an ESRI PGDB into an existing mapserver > environment/application. > > If so, how? What's the procedure? > > Thanks in advance, > > Doug Hasman (dhasman at dolphmap.com) > GIS Manager > Dolph Map > Ft. Lauderdale, FL -- Jeff McKenna DM Solutions Group Inc. http://www.dmsolutions.ca From richard.greenwood at GMAIL.COM Fri Nov 16 06:18:01 2007 From: richard.greenwood at GMAIL.COM (Richard Greenwood) Date: Fri, 16 Nov 2007 07:18:01 -0700 Subject: Mapserv not accepting POST method In-Reply-To: <13786675.post@talk.nabble.com> Message-ID: On Nov 15, 2007 8:33 PM, Jeff Copes wrote: > Hi all. > > Working with the MapServer, apache 1.3.33 on Mac OS Tiger. > > Invoking mapserv from: > > >
> > value="/Library/WebServer/Maps/helloworld.map"> > value="/Library/WebServer/Images"> >
> > > > This error is displayed: > > The requested method POST is not allowed for the URL > /CGI-Executables/mapserv > > The mapserv executable is in the CGI-Executables directory, has correct > permissions, the other elements exist in the specified place, apache is > working, the directories have the right permissions. Postdata is being > flushed, browser cache is flushed. I hope this isn't something obvious, I > don't need the beating. > > Thanks, > > Jeff Have you tested that it works as a get, eg: http://localhost/CGI-Executables/mapserv?map=/Library/WebServer/Maps/helloworld.map&map_web_imagepath=/Library/WebServer/Images -- Richard Greenwood richard.greenwood at gmail.com www.greenwoodmap.com From dhasman at DOLPHMAP.COM Fri Nov 16 07:54:22 2007 From: dhasman at DOLPHMAP.COM (Doug_at_DolphMap) Date: Fri, 16 Nov 2007 07:54:22 -0800 Subject: ESRI Annotation in Mapserver In-Reply-To: <473DA5C7.2040002@dmsolutions.ca> Message-ID: I'm aware that PGDB's in general will work, but does anyone have any experience specifically with ArcGIS Annotation layers in a Mapserver app? All of our anno is in TrueType, although we do use custom font symbols. -- View this message in context: http://www.nabble.com/ESRI-Annotation-in-Mapserver-tf4821348.html#a13795833 Sent from the Mapserver - User mailing list archive at Nabble.com. From warmerdam at POBOX.COM Fri Nov 16 08:40:01 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Fri, 16 Nov 2007 11:40:01 -0500 Subject: Query JOIN table between SHP and MySQL In-Reply-To: <45a45b1c0711152341y568e18cdm5e018bb1b97a2132@mail.gmail.com> Message-ID: Bayu Kurniawan R wrote: > How to join between ESRI Shapefile data with MySQL data > I'm try with http://mapserver.gis.umn.edu/docs/reference/mapfile/join > > JOIN > NAME "DEMO" > CONNECTION "MYSQL:DEMO,host=localhost,port=3306,user=root,password=" > CONNECTIONTYPE ogr > TABLE "Gabungan" > FROM "Kecamatan" > TO "kecamatan" > TYPE ONE-TO-ONE > END > > but my query is no result Bayu, It was my understanding that the JOIN declaration in the mapfile only works for dbf files, not ogr datasources though I could be wrong. 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 | President OSGeo, http://osgeo.org From RMcCulley at COUNTY24.COM Fri Nov 16 08:29:44 2007 From: RMcCulley at COUNTY24.COM (Rob McCulley) Date: Fri, 16 Nov 2007 09:29:44 -0700 Subject: ESRI Annotation in Mapserver Message-ID: I've not used the actual PGDB access. What I did was to export the annotation to a point shapefile. The shapefile contains all of the necessary attributes to replicate the labels in mapserver (angle, font size & face, text, etc.). -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Doug_at_DolphMap Sent: Friday, November 16, 2007 8:54 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] ESRI Annotation in Mapserver I'm aware that PGDB's in general will work, but does anyone have any experience specifically with ArcGIS Annotation layers in a Mapserver app? All of our anno is in TrueType, although we do use custom font symbols. -- View this message in context: http://www.nabble.com/ESRI-Annotation-in-Mapserver-tf4821348.html#a13795 833 Sent from the Mapserver - User mailing list archive at Nabble.com. From dhasman at DOLPHMAP.COM Fri Nov 16 08:42:06 2007 From: dhasman at DOLPHMAP.COM (Doug_at_DolphMap) Date: Fri, 16 Nov 2007 08:42:06 -0800 Subject: ESRI Annotation in Mapserver In-Reply-To: <8563B9D6767C904A912272A2D56548E41D2E58@vermilion.County24.local> Message-ID: Does this method accept and accurately reproduce curved labels (ie- using the ArcGIS Maplex extension)? -- View this message in context: http://www.nabble.com/ESRI-Annotation-in-Mapserver-tf4821348.html#a13796872 Sent from the Mapserver - User mailing list archive at Nabble.com. From RMcCulley at COUNTY24.COM Fri Nov 16 09:19:06 2007 From: RMcCulley at COUNTY24.COM (Rob McCulley) Date: Fri, 16 Nov 2007 10:19:06 -0700 Subject: ESRI Annotation in Mapserver Message-ID: That I can't tell you. I've never had the dollars to buy Maplex :) Rob -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Doug_at_DolphMap Sent: Friday, November 16, 2007 9:42 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] ESRI Annotation in Mapserver Does this method accept and accurately reproduce curved labels (ie- using the ArcGIS Maplex extension)? -- View this message in context: http://www.nabble.com/ESRI-Annotation-in-Mapserver-tf4821348.html#a13796 872 Sent from the Mapserver - User mailing list archive at Nabble.com. From dn at HDDESIGN.COM Fri Nov 16 12:33:26 2007 From: dn at HDDESIGN.COM (David Niergarth) Date: Fri, 16 Nov 2007 14:33:26 -0600 Subject: How to render current map scale via mapscript? In-Reply-To: Message-ID: Thanks Oliver! For Python mapscript it's the attribute mapObject.scale. It is documented in the API docs but I had never noticed. --David Oliver Wesp wrote: > scale is an attribute of mapObj. I don't know for phyton but for java > its simple: map.getScale() > > On Nov 14, 2007 6:50 PM, David Niergarth < dn at hddesign.com > > wrote: > > Using an html template, I can render the current map scale using > [scale]. How > can I do this from mapscript? > > I'm not using html templates. Instead, I start with a map file, > instantiate it > in Python mapscript, add various layers, then render the map and legend. > > I'm trying to tweak my map file (adjusting MAXSCALE, MINSCALE for > layers) but > it's tedious without knowing what mapserver thinks the current map > scale is. Is > there some simple way to calculate the current scale? > > Thanks for any suggestions, > > --David > > From Christopher.Kroot at MAINE.GOV Fri Nov 16 14:29:10 2007 From: Christopher.Kroot at MAINE.GOV (Kroot, Christopher) Date: Fri, 16 Nov 2007 17:29:10 -0500 Subject: Automatic loading of spatial file into mapservice Message-ID: Hello all The State of Maine Geolibrary Board is in the process of developing a Geographic Portal. One of the functions that we are interested in providing to users is the ability to: 1) Create and load metadata into the portal - this is easy and can be done now 2) Have an interface that enables the user to upload a shapefile or any OGC compliant file type onto a server and have it automatically loaded into a mapservice - The workflow goes like this, users creates/uploads metadata, portal manager approves metadata, user receives email notification that metadata has been approved and is provided a link to an interface that will enable the user to upload the spatial file, the spatial file is automatically loaded into a mapservice(without human interaction),when a user veiws the metadata they can click on a link and have the data presented in a map viewer. Has anyone developed this functionality? Thanks and have a great day Christopher Kroot GIS Manager Maine Department of Environmental Protection Station # 17, AMHI Complex, Ray Bldg Augusta, Maine 04333 207-287-6167 christopher.kroot at maine.gov Christopher Kroot GIS Manager Maine Department of Environmental Protection Station # 17, AMHI Complex, Ray Bldg Augusta, Maine 04333 207-287-6167 christopher.kroot at maine.gov From jeff at BLUEMOONWEATHER.ORG Sat Nov 17 03:43:33 2007 From: jeff at BLUEMOONWEATHER.ORG (Jeff Copes) Date: Sat, 17 Nov 2007 03:43:33 -0800 Subject: Mapserv not accepting POST method In-Reply-To: <13786675.post@talk.nabble.com> Message-ID: Thanks for replying guys. I had tried putting the GET command in the html page and tried your posted link and Firefox wanted to download the mapserv executable from my web server root and was able to do so. I tried William's reply, too, and got the same error as before about mapserv not taking a POST request. I tried Safari this AM, and the same results. I am able to serve html pages and php from any directory. Could the mapserv version I am using be what is causing this problem? Is there a command I can run on the command line or through my web service to get the version info and re-form a reply? I am running OS X 10.4.10, and the apache in my previous post. Thanks again, and please advise when you can. Jeff Copes wrote: > > Hi all. > > Working with the MapServer, apache 1.3.33 on Mac OS Tiger. > > Invoking mapserv from: > > >
> > value="/Library/WebServer/Maps/helloworld.map"> > value="/Library/WebServer/Images"> >
> > > > This error is displayed: > > The requested method POST is not allowed for the URL > /CGI-Executables/mapserv > > The mapserv executable is in the CGI-Executables directory, has correct > permissions, the other elements exist in the specified place, apache is > working, the directories have the right permissions. Postdata is being > flushed, browser cache is flushed. I hope this isn't something obvious, I > don't need the beating. > > Thanks, > > Jeff > -- View this message in context: http://www.nabble.com/Mapserv-not-accepting-POST-method-tf4818882.html#a13808261 Sent from the Mapserver - User mailing list archive at Nabble.com. From richard.greenwood at GMAIL.COM Sat Nov 17 06:21:55 2007 From: richard.greenwood at GMAIL.COM (Richard Greenwood) Date: Sat, 17 Nov 2007 07:21:55 -0700 Subject: Mapserv not accepting POST method In-Reply-To: <13808261.post@talk.nabble.com> Message-ID: On Nov 17, 2007 4:43 AM, Jeff Copes wrote: > Thanks for replying guys. I had tried putting the GET command in the html > page and tried your posted link and Firefox wanted to download the mapserv > executable from my web server root and was able to do so. I tried William's > reply, too, and got the same error as before about mapserv not taking a POST > request. I tried Safari this AM, and the same results. I am able to serve > html pages and php from any directory. > Could the mapserv version I am using be what is causing this problem? Is > there a command I can run on the command line or through my web service to > get the version info and re-form a reply? I am running OS X 10.4.10, and the > apache in my previous post. Thanks again, and please advise when you can. Sounds like the your mapserv is not executable. Try: chmod +x mapserv then to check you modification: ls -Fal and it should look something like: -rwxr-xr-x 1 rich admin 1220132 Sep 23 11:40 mapserv* If that doesn't resolve it, then check that your cgi directory is setup in your Apache configuration (/etc/httpd/httpd.conf) Should look something like: ScriptAlias /cgi-bin/ "/Library/www/cgi-bin/" Basically this instructs Apache to execute files in the specified directory, rather than serve them as static content. (Remember to restart Apache after modifying the config). HTH, -- Richard Greenwood richard.greenwood at gmail.com www.greenwoodmap.com From jeff at BLUEMOONWEATHER.ORG Sat Nov 17 16:04:08 2007 From: jeff at BLUEMOONWEATHER.ORG (Jeff Copes) Date: Sat, 17 Nov 2007 16:04:08 -0800 Subject: Mapserv not accepting POST method In-Reply-To: Message-ID: Richard, Thanks for your reply. This is a weird one. The permissions were the first thing I checked. I have my ls aliased to ls -F. -rwxrwxr-x 1 satellit wheel 1504560 Nov 14 04:57 mapserv* I checked the ScriptAlias variable, it is pointed to the correct space. I will keep looking. Jeff Richard Greenwood wrote: > > On Nov 17, 2007 4:43 AM, Jeff Copes wrote: >> Thanks for replying guys. I had tried putting the GET command in the html >> page and tried your posted link and Firefox wanted to download the >> mapserv >> executable from my web server root and was able to do so. I tried >> William's >> reply, too, and got the same error as before about mapserv not taking a >> POST >> request. I tried Safari this AM, and the same results. I am able to serve >> html pages and php from any directory. >> Could the mapserv version I am using be what is causing this problem? Is >> there a command I can run on the command line or through my web service >> to >> get the version info and re-form a reply? I am running OS X 10.4.10, and >> the >> apache in my previous post. Thanks again, and please advise when you can. > > Sounds like the your mapserv is not executable. Try: > chmod +x mapserv > then to check you modification: > ls -Fal > and it should look something like: > -rwxr-xr-x 1 rich admin 1220132 Sep 23 11:40 mapserv* > > If that doesn't resolve it, then check that your cgi directory is > setup in your Apache configuration (/etc/httpd/httpd.conf) Should look > something like: > ScriptAlias /cgi-bin/ "/Library/www/cgi-bin/" > Basically this instructs Apache to execute files in the specified > directory, rather than serve them as static content. (Remember to > restart Apache after modifying the config). > > HTH, > -- > Richard Greenwood > richard.greenwood at gmail.com > www.greenwoodmap.com > > -- View this message in context: http://www.nabble.com/Mapserv-not-accepting-POST-method-tf4818882.html#a13814915 Sent from the Mapserver - User mailing list archive at Nabble.com. From rabrant at GMAIL.COM Sun Nov 18 01:16:46 2007 From: rabrant at GMAIL.COM (Brant Anderson) Date: Sun, 18 Nov 2007 03:16:46 -0600 Subject: Ruby/MapScript quark in version 5.0.0 Message-ID: Heres some code I wrote in Ruby on Rails for a dynamic map: def dynamic_map # ==================== # Grab values from the form # ==================== @minx_d = params[:minx_d].to_f # default extent values @miny_d = params[:miny_d].to_f @maxx_d = params[:maxx_d].to_f @maxy_d = params[:maxy_d].to_f @minx_img = params[:minx_img].to_f # image coordinate values @miny_img = params[:miny_img].to_f @maxx_img = params[:maxx_img].to_f @maxy_img = params[:maxy_img].to_f @pin = params[:pin].to_s # parcel identification number @minx = params[:minx].to_f # current extent values @miny = params[:miny].to_f @maxx = params[:maxx].to_f @maxy = params[:maxy].to_f @zoomfactor = params[:zoomfactor].to_i # -2 is zoomout, -1 or 1 is recenter, 2 is zoomin (Integer value). @tool = params[:tool].to_s # This should match the 'getToolbox()' JavaScript function. # ============== # Initialize MapObj # ============== @map = MapObj.new session['mapfile'] @map.setExtent @minx, @miny, @maxx, @maxy # ==================== # Paint the selection yellow. # ==================== layer = @map.getLayerByName 'parcel_poly' layer.classitem = 'PIN' class_poly_hilite = layer.getClass 0 layer.insertClass class_poly_hilite class_poly_hilite.name = 'poly_hilite' class_poly_hilite.setExpression @pin.strip class_poly_hilite_style = class_poly_hilite.getStyle 0 class_poly_hilite_style.color.setRGB 250, 250, 125 # ============= # Add a push-pin. # ============= layer_pt = @map.getLayerByName 'parcel_point' layer_pt.classitem = 'pin' class_pt_hilite = layer_pt.getClass 0 layer_pt.insertClass class_pt_hilite class_pt_hilite.name = 'pt_hilite' class_pt_hilite.setExpression @pin.strip class_pt_hilite_style = class_pt_hilite.getStyle 0 class_pt_hilite_style.size = 32 class_pt_hilite_style.setSymbolByName @map, 'pushpin' # =================================== # Apply the zoom (aka change the extent value). # =================================== if @minx_img != @maxx_img && @miny_img != @maxy_img apply_box @map, @minx_img, @miny_img, @maxx_img, @maxy_img elsif @tool == 'fullview' @map.setExtent @minx_d, @miny_d, @maxx_d, @maxy_d else apply_zoom @map, @zoomfactor, @minx_img, @miny_img end # Set the new extent values to be sent back to the form. @minx = @map.extent.minx.to_f @miny = @map.extent.miny.to_f @maxx = @map.extent.maxx.to_f @maxy = @map.extent.maxy.to_f render :partial => 'map_image' end Here's a snippet from my mapfile: LAYER #-- Parcels Polygon Layer NAME parcel_poly DATA parcelpydoug04 MAXSCALE 72000 STATUS DEFAULT TYPE POLYGON TRANSPARENCY 50 CLASS NAME "Parcels" COLOR -1 -1 -1 OVERLAYOUTLINECOLOR 250 0 0 OVERLAYSYMBOL 'circle' OVERLAYSIZE 2 END END #-- Parcels Polygon Layer LAYER #-- Parcels Point Layer NAME parcel_point CONNECTIONTYPE postgis CONNECTION "user= dbname=experiments host=localhost port=5432 password=" DATA "wkb_geometry from mn_douglas_parcelpoints" MAXSCALE 72000 STATUS DEFAULT TYPE POINT #-- TOLERANCEUNITS miles #-- TOLERANCE 10 TRANSPARENCY 50 CLASS NAME "Parcel Point" COLOR 0 250 0 SYMBOL 'circle' SIZE 10 END END #-- Parcels Point Layer In version 4, the parcel lines and points are drawn. The code written above highlights the selected parcel and changes the point graphic to a push-pin. In version 5, the parcel lines and points are not drawn. Only the highlighted parcel is drawn. Why? How do I write my code so that it displays the defaults from the mapfile as well as the newly defined class? I'm stumped. Any comments or suggestions appreciated. ~Brant -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpulis at GMAIL.COM Sun Nov 18 09:06:34 2007 From: mpulis at GMAIL.COM (Matthew Pulis) Date: Sun, 18 Nov 2007 18:06:34 +0100 Subject: MapScript Bug Message-ID: Hi, I am trying to load sample.map using : http://yancho.no-ip.org/~yancho/cgi-bin/mapserv?mode=map&map=/home/yancho/public_html/nc/sample.map but there is no image being displayed, just a white 800x600 box. In the error log there is written : Sun Nov 18 17:19:56 2007,28480,10.0.0.1,MS,3,623351.784641 212016.000000 664334.215359 242740.000000,-1.000000 -1.000000,,normal execution There is no image being created in the /tmp folder (and it has rights .. it used to create until I started with this new mapscript) The script can be found here : #MAP File created by yancho MAP IMAGETYPE PNG EXTENT 626522 212016 661164 242740 SIZE 800 600 SHAPEPATH "/home/yancho/public_html/nc/" IMAGECOLOR 255 255 255 #STREETS ================================================= LAYER NAME streets DATA streets STATUS ON TYPE LINE CLASS NAME "Streets" STYLE COLOR 232 232 232 END END END #FINISH OF STREETS ============================================= #HOSPITALS ================================================== #-Symbol SYMBOL NAME "Showing_Hospitals" TYPE vector POINTS 4 0 4 8 -99 -99 0 4 8 4 END END #-Hospitals Layer LAYER NAME hospitals DATA hospitals STATUS ON TYPE POINT CLASS NAME "Hospitals" STYLE COLOR 255 67 54 SYMBOL "Showing_Hospitals" END END END #FINISH OF HOSPITALS ============================================ #FIRENEGINES ===================================================== #-Symbol SYMBOL NAME "fire" TYPE vector POINTS 0 8 4 0 8 8 0 8 END END #-Firengines Layer LAYER NAME firestations DATA firestations STATUS ON TYPE POINT CLASS NAME "Fire_Engines" STYLE COLOR 03 100 24 SYMBOL "fire" END END END #FINISH OF FIRESTATIONS =================================================== #MAJORROADS ============================================================== LAYER NAME majorroads DATA majorroads STATUS ON TYPE LINE CLASS NAME "Major Roads" STYLE COLOR 132 132 255 END END END #FINISH OF MAJORROADS #RAILROADS ================================================================== LAYER NAME railroads DATA railroads STATUS OFF TYPE LINE CLASS NAME "Rail Roads" STYLE COLOR 200 100 23 END END END #FINISH OF RAILROADS ======================================================= #====================================================================== #====================================================================== WEB MINSCALE 1000 MAXSCALE 1550000 HEADER templates/header.html FOOTER templates/footer.html TEMPLATE "index.html" IMAGEPATH "/home/yancho/public_html/tmp/" IMAGEURL "/~yancho/tmp/" LOG "/home/yancho/public_html/tmp/error.log" METADATA WMS_TITLE "North Carolina Data Set" WMS_ABSTRACT "This is a MapServer representation of my data" WMS_ACCESSCONSTRAINTS "none" WMS_ONLINERESOURCE "http://localhost/~yancho/nc/index.html" WMS_SRS "EPSG:32119" END END END #OF MAP Or pastebinned here : http://pastebin.com/m48fd6a0b Any help to fix this bug would be extremely appreciated :) Thanks beforehand. Matthew -- Matthew Pulis URL : http://www.solutions-lab.net MSN : pulis_matthew[@]hotmail.com ICQ : 145951110 Skype : solutions-lab.net From mpulis at GMAIL.COM Sun Nov 18 09:40:19 2007 From: mpulis at GMAIL.COM (Matthew Pulis) Date: Sun, 18 Nov 2007 18:40:19 +0100 Subject: MapScript Bug In-Reply-To: Message-ID: Hi Again, Just would like to thank nhv / bitner / chippy for helping me. The problem was that I was setting the LAYER STATUS to ON. Thanks to them for pointing out that STATUS ON does not mean Always-On but only Turn-On-If-Asked.. so to always have a LAYER which is shown better put DEFAULT. Thanks again On Nov 18, 2007 6:06 PM, Matthew Pulis wrote: > Hi, > > I am trying to load sample.map using : > http://yancho.no-ip.org/~yancho/cgi-bin/mapserv?mode=map&map=/home/yancho/public_html/nc/sample.map > but there is no image being displayed, just a white 800x600 box. > > In the error log there is written : > > Sun Nov 18 17:19:56 2007,28480,10.0.0.1,MS,3,623351.784641 > 212016.000000 664334.215359 242740.000000,-1.000000 -1.000000,,normal > execution > > There is no image being created in the /tmp folder (and it has rights > .. it used to create until I started with this new mapscript) > > The script can be found here : > #MAP File created by yancho > > MAP > IMAGETYPE PNG > EXTENT 626522 212016 661164 242740 > SIZE 800 600 > SHAPEPATH "/home/yancho/public_html/nc/" > IMAGECOLOR 255 255 255 > > > #STREETS ================================================= > LAYER > NAME streets > DATA streets > STATUS ON > TYPE LINE > > CLASS > NAME "Streets" > STYLE > COLOR 232 232 232 > END > END > END > #FINISH OF STREETS ============================================= > > #HOSPITALS ================================================== > #-Symbol > SYMBOL > NAME "Showing_Hospitals" > TYPE vector > POINTS > 4 0 > 4 8 > -99 -99 > 0 4 > 8 4 > END > END > #-Hospitals Layer > LAYER > NAME hospitals > DATA hospitals > STATUS ON > TYPE POINT > > CLASS > NAME "Hospitals" > STYLE > COLOR 255 67 54 > SYMBOL "Showing_Hospitals" > END > END > END > > #FINISH OF HOSPITALS ============================================ > > #FIRENEGINES ===================================================== > #-Symbol > SYMBOL > NAME "fire" > TYPE vector > POINTS > 0 8 > 4 0 > 8 8 > 0 8 > END > END > > #-Firengines Layer > LAYER > NAME firestations > DATA firestations > STATUS ON > TYPE POINT > > CLASS > NAME "Fire_Engines" > STYLE > COLOR 03 100 24 > SYMBOL "fire" > END > END > END > > #FINISH OF FIRESTATIONS =================================================== > > > #MAJORROADS ============================================================== > LAYER > NAME majorroads > DATA majorroads > STATUS ON > TYPE LINE > > CLASS > NAME "Major Roads" > STYLE > COLOR 132 132 255 > END > END > END > #FINISH OF MAJORROADS > > #RAILROADS ================================================================== > LAYER > NAME railroads > DATA railroads > STATUS OFF > TYPE LINE > > CLASS > NAME "Rail Roads" > STYLE > COLOR 200 100 23 > END > END > END > #FINISH OF RAILROADS ======================================================= > > > #====================================================================== > #====================================================================== > > WEB > MINSCALE 1000 > MAXSCALE 1550000 > HEADER templates/header.html > FOOTER templates/footer.html > TEMPLATE "index.html" > IMAGEPATH "/home/yancho/public_html/tmp/" > IMAGEURL "/~yancho/tmp/" > LOG "/home/yancho/public_html/tmp/error.log" > > METADATA > WMS_TITLE "North Carolina Data Set" > WMS_ABSTRACT "This is a MapServer representation of my data" > WMS_ACCESSCONSTRAINTS "none" > WMS_ONLINERESOURCE "http://localhost/~yancho/nc/index.html" > WMS_SRS "EPSG:32119" > END > > END > > END #OF MAP > > Or pastebinned here : http://pastebin.com/m48fd6a0b > > Any help to fix this bug would be extremely appreciated :) > > Thanks beforehand. > > Matthew > > > > > -- > Matthew Pulis > URL : http://www.solutions-lab.net > MSN : pulis_matthew[@]hotmail.com > ICQ : 145951110 > Skype : solutions-lab.net > -- Matthew Pulis URL : http://www.solutions-lab.net MSN : pulis_matthew[@]hotmail.com ICQ : 145951110 Skype : solutions-lab.net From ben at REMOTEINFORMATION.COM.AU Sun Nov 18 12:41:17 2007 From: ben at REMOTEINFORMATION.COM.AU (Ben Madin) Date: Mon, 19 Nov 2007 05:41:17 +0900 Subject: Subject: Re: Mapserv not accepting POST method In-Reply-To: Message-ID: G'day Jeff, Excuse me if this is already checked! On 18/11/2007, at 3:01 PM, MAPSERVER-USERS automatic digest system wrote: > Could the mapserv version I am using be what is causing this > problem? Is > there a command I can run on the command line or through my web > service to > get the version info and re-form a reply? I am running OS X > 10.4.10, and the > apache in my previous post. Thanks again, and please advise when > you can. You could try ./mapserv -v : freebsd:/Library/WebServer/CGI-Executables $ ./mapserv -v MapServer version 5.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE additionally, If you go to : http://localhost/cgi-bin/mapserv do you see : No query information to decode. QUERY_STRING is set, but empty. ? cheers Ben -- Ben Madin REMOTE INFORMATION Broome WA 6725 ben at remoteinformation.com.au Out here, it pays to know... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob.Bruce at GOV.MB.CA Sun Nov 18 19:11:42 2007 From: Bob.Bruce at GOV.MB.CA (Bob Bruce) Date: Sun, 18 Nov 2007 21:11:42 -0600 Subject: Premature end of script headers Message-ID: Hi, I'm hoping that someone can help me.... I'm getting the message: "Premature end of script headers" in my Apache error log, I'm running on a VPS running Linux. I have built mapserv and copied it to my cgi-bin folder, I have tested it logged in via SSH with the command: "./mapserv -v" and it returns the MapServer configuration just fine. I also have a look at the shared library dependencies with the command: "ldd mapserv" and it shows all the libraries. When I try out MapServer via the web with the URL: http://209.205.39.229/cgi-bin/mapserv? I get a 500 Internal Server Error and the Apache error log in /usr/local/apache/logs/error_log shows the message: "Premature end of script headers" when I was expecting a message in my browser of: "No query information to decode. QUERY_STRING is set, but empty." My system has Apache version 1.3.39 The output from the command: "./mapserv -v" is: MapServer version 4.10.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=TIFF INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG I'm hoping that someone can help me fix this problem so that I can finish testing the cgi version and then I can go on to building the PHP module. thanks, Bob Bruce From jeff at BLUEMOONWEATHER.ORG Sun Nov 18 20:10:52 2007 From: jeff at BLUEMOONWEATHER.ORG (Jeff Copes) Date: Sun, 18 Nov 2007 20:10:52 -0800 Subject: Mapserv not accepting POST method In-Reply-To: <13786675.post@talk.nabble.com> Message-ID: William and Richard, I reinstalled MapServer and the associated framework from William Kyngesburye's distribution. Works fine. I had to delete receipts, but after that the install went well. The other packages from GRASS I will reinstall from the disk later. Thanks for your help. I will continue to monitor posts where I can be helpful as I get more involved with the application. Jeff Jeff Copes wrote: > > Hi all. > > Working with the MapServer, apache 1.3.33 on Mac OS Tiger. > > Invoking mapserv from: > > >
> > value="/Library/WebServer/Maps/helloworld.map"> > value="/Library/WebServer/Images"> >
> > > > This error is displayed: > > The requested method POST is not allowed for the URL > /CGI-Executables/mapserv > > The mapserv executable is in the CGI-Executables directory, has correct > permissions, the other elements exist in the specified place, apache is > working, the directories have the right permissions. Postdata is being > flushed, browser cache is flushed. I hope this isn't something obvious, I > don't need the beating. > > Thanks, > > Jeff > -- View this message in context: http://www.nabble.com/Mapserv-not-accepting-POST-method-tf4818882.html#a13827529 Sent from the Mapserver - User mailing list archive at Nabble.com. From woklist at KYNGCHAOS.COM Sun Nov 18 20:28:27 2007 From: woklist at KYNGCHAOS.COM (William Kyngesburye) Date: Sun, 18 Nov 2007 22:28:27 -0600 Subject: Mapserv not accepting POST method In-Reply-To: <13827529.post@talk.nabble.com> Message-ID: Good to hear. It's possible that there were old versions of frameworks, or missing frameworks, and the reinstall filled in missing bits. Sometimes surface errors are misleading, and you need to dig into logs to find the real cause. I usually start with console and system logs, if a specific log (ie httpd error log) doesn't help. On Nov 18, 2007, at 10:10 PM, Jeff Copes wrote: > William and Richard, > > I reinstalled MapServer and the associated framework from William > Kyngesburye's distribution. Works fine. I had to delete receipts, > but after > that the install went well. The other packages from GRASS I will > reinstall > from the disk later. > > Thanks for your help. I will continue to monitor posts where I can be > helpful as I get more involved with the application. > > Jeff ----- William Kyngesburye http://www.kyngchaos.com/ "This is a question about the past, is it? ... How can I tell that the past isn't a fiction designed to account for the discrepancy between my immediate physical sensations and my state of mind?" - The Ruler of the Universe From thanhlv at VIDAGIS.COM Sun Nov 18 21:26:45 2007 From: thanhlv at VIDAGIS.COM (=?UTF-8?Q?L=C3=AA_Vi=E1=BA=BFt_Thanh?=) Date: Mon, 19 Nov 2007 12:26:45 +0700 Subject: How to label for each feature base on their angle? Message-ID: I have a point shapefile with rotation angle attribute field for each feature. How do i label these features based on that field. In mapfile, i only set label angle for a layer but not for each feature :( Thanks in advance -- Best regards, Le Viet Thanh GIS Technician - GIS Team __________________________________ Vietnam - Denmark VIDAGIS CO., LTD 5 Lang Ha Str, Hanoi, Vietnam Tel: +84 4 5145570 Fax: +84 4 5145571 http://www.vidagis.com Direct: thanhlv at vidagis.com +84 984 468147 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gisaalter at GMAIL.COM Mon Nov 19 00:48:29 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Mon, 19 Nov 2007 09:48:29 +0100 Subject: query postgis through wms Message-ID: Hi folks, I'm trying to query a postgis-layer through wms. Yet, I do not get any query results. Can anyone have a look at my mapfile. I have tried to label my features too, using a field of the postgis-table, but that doesn't seem to work too. So, my guess it should be something wrong in my map-file. Thanks for helping out ! # # Start of map file # # Sample map file for a chameleon app. # NAME DEMO STATUS ON SIZE 600 500 SYMBOLSET symbols.sym EXTENT 77336.359625 189988.500250 90937.297125 201812.968625 UNITS METERS SHAPEPATH "../data" IMAGECOLOR 255 255 255 FONTSET fonts.txt TRANSPARENT FALSE WEB IMAGEPATH "etc/mapserver/tmp/ms_tmp" IMAGEURL "/tmp/" METADATA "wms_title" "Aalter_WMS" "wms_onlineresource" " "wms_srs" "EPSG:31300" END END OUTPUTFORMAT NAME png DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE PC256 EXTENSION "png" END SCALEBAR IMAGECOLOR 255 255 255 LABEL COLOR 0 0 0 SIZE SMALL END SIZE 150 5 COLOR 255 255 255 BACKGROUNDCOLOR 0 0 0 OUTLINECOLOR 0 0 0 UNITS meters INTERVALS 5 STATUS ON END QUERYMAP STATUS ON SIZE 200 200 STYLE HILITE COLOR 255 0 0 END PROJECTION "init=epsg:31300" END LAYER NAME "Grens" METADATA "wms_title" "gemeentegrens" "gml_include_items" "all" END CONNECTIONTYPE postgis CONNECTION "host="" DATA "the_geom from alr_gemline" DUMP TRUE TEMPLATE "ttt" TYPE LINE CLASS NAME "KadScan" OUTLINECOLOR 208 208 208 END PROJECTION "init=epsg:31300" END END LAYER NAME "Percelen" CONNECTIONTYPE postgis CONNECTION "host="" DATA "the_geom from b_capa_percid" TEMPLATE "ttt" LABELITEM 'capakey' TYPE POLYGON CLASS NAME "KadScan" OUTLINECOLOR 208 208 208 END METADATA "wms_title" "percelen" "gml_include_items" "all" END PROJECTION "init=epsg:31300" END END END # Map File -------------- next part -------------- An HTML attachment was scrubbed... URL: From fsozzi at INTERCAD.CH Mon Nov 19 01:19:09 2007 From: fsozzi at INTERCAD.CH (Francesco Sozzi) Date: Mon, 19 Nov 2007 10:19:09 +0100 Subject: Mapserver as WMS server: every layer contains all Message-ID: Hi All, I have a problem on using mapserver as WMS server. If I try to open by ArcGis or Autodesk Map a mapserver project, I get all on every layer. If I switch off all layer except one (for every one) everithing is displayed. The layer list (and groups) is correct, but each layer contains all. Anybody has experimented the same problem? Best regards Francesco -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at MMMTIKE.FI Mon Nov 19 01:38:55 2007 From: Jukka.Rahkonen at MMMTIKE.FI (Rahkonen Jukka) Date: Mon, 19 Nov 2007 11:38:55 +0200 Subject: Mapserver as WMS server: every layer contains all In-Reply-To: A<008d01c82a8d$3dbbc3d0$2d01a8c0@newsviluppo> Message-ID: Hi, What STATUS do you have in the layer definitions? -Jukka Rahkonen- ________________________________ L?hett?j?: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Puolesta Francesco Sozzi L?hetetty: 19. marraskuuta 2007 11:19 Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU Aihe: [UMN_MAPSERVER-USERS] Mapserver as WMS server: every layer contains all Hi All, I have a problem on using mapserver as WMS server. If I try to open by ArcGis or Autodesk Map a mapserver project, I get all on every layer. If I switch off all layer except one (for every one) everithing is displayed. The layer list (and groups) is correct, but each layer contains all. Anybody has experimented the same problem? Best regards Francesco -------------- next part -------------- An HTML attachment was scrubbed... URL: From conti_lui at GVA.ES Mon Nov 19 02:06:21 2007 From: conti_lui at GVA.ES (Luis Conti) Date: Mon, 19 Nov 2007 04:06:21 -0600 Subject: Problems with Java Mapscript Message-ID: An HTML attachment was scrubbed... URL: From aberenyi at BURKEN.HU Mon Nov 19 02:20:20 2007 From: aberenyi at BURKEN.HU (=?ISO-8859-2?Q?Ber=E9nyi_Attila?=) Date: Mon, 19 Nov 2007 11:20:20 +0100 Subject: mysq: float->decimal...why???? Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dear List, I'm using data from a MySQL database through OGR, but I havce a little problem. In my queries the float and double data are converted to decimal. Anyone faced this problem before? Any suggestion how to solve it? Thanks in advance, Attila LAYER NAME "Full" TYPE POINT STATUS ON CONNECTIONTYPE OGR CONNECTION "full.ovf" DATA "full" ... END # Layer -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHQWNk76iTSmN9z2ARAmDnAJ45zOxWM43sGmn0fRm74GwjNiyYgQCfZmiQ eIewf0F+rVZgC1fS8XEu1po= =f9wr -----END PGP SIGNATURE----- From J.L.H.Hartmann at UVA.NL Mon Nov 19 02:26:07 2007 From: J.L.H.Hartmann at UVA.NL (Jan Hartmann) Date: Mon, 19 Nov 2007 11:26:07 +0100 Subject: Changing a layer's DATA via the URL in MapServer 5.0 Message-ID: Hi, I'm having trouble with changing a layer's DATA in MapServer 5.0 via the URL. In 4.10.0 the following works: datapattern ".*" /cgi-bin/mapserv?map=...map&mapext=...&mapsize=...mode=map&map_layer_0_data=amby/verzamelplan.tif In 5.0 the same call causes the following error: getSymbol(): Symbol definition error. Parsing error near (0):(line 1) Changing the DATA part to: map_layer[0]_data, or map.layer[plan].data, as described in the Migration Guide gives: loadLayer(): Unknown identifier. Parsing error near (amby/verzamelplan.tif):(line 1) Is this a bug, or am I doing something wrong? Jan -------------- next part -------------- An HTML attachment was scrubbed... URL: From fsozzi at INTERCAD.CH Mon Nov 19 02:30:25 2007 From: fsozzi at INTERCAD.CH (Francesco Sozzi) Date: Mon, 19 Nov 2007 11:30:25 +0100 Subject: Mapserver as WMS server: every layer contains all Message-ID: All layer are DEFAULT. Do you think it could be a problem?... ----- Original Message ----- From: Rahkonen Jukka To: MAPSERVER-USERS at LISTS.UMN.EDU Sent: Monday, November 19, 2007 10:38 AM Subject: Re: [UMN_MAPSERVER-USERS] Mapserver as WMS server: every layer contains all Hi, What STATUS do you have in the layer definitions? -Jukka Rahkonen- ---------------------------------------------------------------------------- L?hett?j?: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Puolesta Francesco Sozzi L?hetetty: 19. marraskuuta 2007 11:19 Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU Aihe: [UMN_MAPSERVER-USERS] Mapserver as WMS server: every layer contains all Hi All, I have a problem on using mapserver as WMS server. If I try to open by ArcGis or Autodesk Map a mapserver project, I get all on every layer. If I switch off all layer except one (for every one) everithing is displayed. The layer list (and groups) is correct, but each layer contains all. Anybody has experimented the same problem? Best regards Francesco __________ Informazione NOD32 2666 (20071119) __________ Questo messaggio ? stato controllato dal Sistema Antivirus NOD32 http://www.nod32.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From conti_lui at GVA.ES Mon Nov 19 02:50:21 2007 From: conti_lui at GVA.ES (Luis Conti) Date: Mon, 19 Nov 2007 11:50:21 +0100 Subject: Problems with Java Mapscript Message-ID: Sorry, my last message don't see correctly. Hello: I'm new using Java Mapscript but I can't execute the examples (DrawMap.java) with my testmap.map. This is my system. Linux OpenSuse 10.2 mapserv -v results MapServer version 4.8.4 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE Java -v results java version "1.5.0_08" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03) Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing) the Java IDE is netbeans 5.5.1 This is my testmap file: MAP NAME servidor EXTENT 626680 4191039 817176 4519393 SYMBOLSET "etc/symbol.sym" FONTSET "etc/fonts.txt" IMAGECOLOR 255 153 255 IMAGETYPE jpeg RESOLUTION 96 WEB IMAGEPATH "/var/www/tmp" IMAGEURL "/tmp" METADATA "wms_title" "servidor wms icv" "wms_online_resource" "******************************************" "wms_srs" "EPSG:23030 EPSG:25830 EPSG:4230 EPSG:4258" END END REFERENCE EXTENT 626690 4186545 823410 4519390 IMAGE "./key_map.png" SIZE 150 200 STATUS ON COLOR -1 -1 -1 OUTLINECOLOR 255 0 0 END PROJECTION "init=epsg:23030" END OUTPUTFORMAT NAME jpeg DRIVER "GD/JPEG" MIMETYPE "image/jpeg" IMAGEMODE RGB EXTENSION "jpg" FORMATOPTION "QUALITY=100" END OUTPUTFORMAT NAME png DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE RGBA EXTENSION "png" TRANSPARENT ON FORMATOPTION "INTERLACE=ON" END OUTPUTFORMAT NAME gif DRIVER "GD/gif" MIMETYPE "image/gif" IMAGEMODE PC256 EXTENSION "gif" TRANSPARENT ON FORMATOPTION "INTERLACE=ON" END LAYER NAME "rios_principales_1000" GROUP "Hidrograf?a" CONNECTION "host=****** port=****** dbname=capas user=******* password=******" CONNECTIONTYPE Postgis DATA "the_geom from rios_principales_1000" TYPE LINE METADATA "wms_name" "rios_principales_1000" "wms_group_title" "Hidrograf?a" END CLASS NAME "riosPpal1000" TITLE "" SIZE 4 COLOR 0 112 255 LABEL ANGLE AUTO MINDISTANCE 1500 COLOR 190 232 255 OUTLINECOLOR 0 112 255 SIZE 8 TYPE truetype FONT "fritqat-italic" POSITION auto END END STATUS ON END END The same testmap.map works fine with php_mapscript. When execute the DrawMap.java example crash in the line (43) imageObj img = map.draw(); This is the error: Exception in thread "main" java.lang.UnknownError: Unable to initialize image. at edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw (Native Method) at edu.umn.gis.mapscript.mapObj.draw(mapObj.java:382) at es.gva.icv.jmapscript.DrawMap.main(DrawMap.java:43) I have searched about this error in internet, but I have found nothing. Thanks in advance. Luis Conti -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at MMMTIKE.FI Mon Nov 19 03:02:54 2007 From: Jukka.Rahkonen at MMMTIKE.FI (Rahkonen Jukka) Date: Mon, 19 Nov 2007 13:02:54 +0200 Subject: VS: [UMN_MAPSERVER-USERS] Mapserver as WMS server: every layer contains all In-Reply-To: <00c601c82a97$32a6ce40$2d01a8c0@newsviluppo> Message-ID: Hi, Sure, yes. Try changing them to to ON. -Jukka- ________________________________ L?hett?j?: Francesco Sozzi [mailto:fsozzi at intercad.ch] L?hetetty: 19. marraskuuta 2007 12:30 Vastaanottaja: Rahkonen Jukka; MAPSERVER-USERS at LISTS.UMN.EDU Aihe: Re: [UMN_MAPSERVER-USERS] Mapserver as WMS server: every layer contains all All layer are DEFAULT. Do you think it could be a problem?... ----- Original Message ----- From: Rahkonen Jukka To: MAPSERVER-USERS at LISTS.UMN.EDU Sent: Monday, November 19, 2007 10:38 AM Subject: Re: [UMN_MAPSERVER-USERS] Mapserver as WMS server: every layer contains all Hi, What STATUS do you have in the layer definitions? -Jukka Rahkonen- ________________________________ L?hett?j?: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Puolesta Francesco Sozzi L?hetetty: 19. marraskuuta 2007 11:19 Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU Aihe: [UMN_MAPSERVER-USERS] Mapserver as WMS server: every layer contains all Hi All, I have a problem on using mapserver as WMS server. If I try to open by ArcGis or Autodesk Map a mapserver project, I get all on every layer. If I switch off all layer except one (for every one) everithing is displayed. The layer list (and groups) is correct, but each layer contains all. Anybody has experimented the same problem? Best regards Francesco __________ Informazione NOD32 2666 (20071119) __________ Questo messaggio ? stato controllato dal Sistema Antivirus NOD32 http://www.nod32.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From umberto.nicoletti at GMAIL.COM Mon Nov 19 03:06:19 2007 From: umberto.nicoletti at GMAIL.COM (Umberto Nicoletti) Date: Mon, 19 Nov 2007 12:06:19 +0100 Subject: Problems with Java Mapscript In-Reply-To: <8e53b12d0711190250l27e5ed65p3a84021cf5b2a00a@mail.gmail.com> Message-ID: Try to change the imagetype to png: IMAGETYPE png and please send txt/plain only emails to this list. Umberto On Nov 19, 2007 11:50 AM, Luis Conti wrote: > Sorry, my last message don't see correctly. > > > > Hello: > > I'm new using Java Mapscript but I can't execute the examples ( > DrawMap.java) with my testmap.map. > > This is my system. > > Linux OpenSuse 10.2 > mapserv -v results > MapServer version 4.8.4 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP > OUTPUT=PDF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER > SUPPORTS=WMS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS > INPUT=EPPL7 INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE > > Java -v results > java version "1.5.0_08" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03) > Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing) > > the Java IDE is netbeans 5.5.1 > > This is my testmap file: > > > MAP > NAME servidor > EXTENT 626680 4191039 817176 4519393 > SYMBOLSET "etc/symbol.sym" > FONTSET "etc/fonts.txt" > IMAGECOLOR 255 153 255 > IMAGETYPE jpeg > RESOLUTION 96 > > > > WEB > IMAGEPATH "/var/www/tmp" > IMAGEURL "/tmp" > METADATA > "wms_title" "servidor wms icv" > "wms_online_resource" > "******************************************" > "wms_srs" "EPSG:23030 EPSG:25830 EPSG:4230 EPSG:4258" > > END > END > > REFERENCE > EXTENT 626690 4186545 823410 4519390 > IMAGE "./key_map.png" > SIZE 150 200 > STATUS ON > COLOR -1 -1 -1 > OUTLINECOLOR 255 0 0 > END > > PROJECTION > "init=epsg:23030" > END > > OUTPUTFORMAT > NAME jpeg > DRIVER "GD/JPEG" > MIMETYPE "image/jpeg" > IMAGEMODE RGB > EXTENSION "jpg" > FORMATOPTION "QUALITY=100" > END > > OUTPUTFORMAT > NAME png > DRIVER "GD/PNG" > MIMETYPE "image/png" > IMAGEMODE RGBA > EXTENSION "png" > TRANSPARENT ON > FORMATOPTION "INTERLACE=ON" > END > > OUTPUTFORMAT > NAME gif > DRIVER "GD/gif" > MIMETYPE "image/gif" > IMAGEMODE PC256 > EXTENSION "gif" > TRANSPARENT ON > FORMATOPTION "INTERLACE=ON" > END > > LAYER > NAME "rios_principales_1000" > GROUP "Hidrograf?a" > CONNECTION "host=****** port=****** dbname=capas user=******* > password=******" > CONNECTIONTYPE Postgis > DATA "the_geom from rios_principales_1000" > TYPE LINE > METADATA > "wms_name" "rios_principales_1000" > "wms_group_title" "Hidrograf?a" > END > CLASS > NAME "riosPpal1000" > TITLE "" > SIZE 4 > COLOR 0 112 255 > LABEL > ANGLE AUTO > MINDISTANCE 1500 > COLOR 190 232 255 > OUTLINECOLOR 0 112 255 > SIZE 8 > TYPE truetype > FONT "fritqat-italic" > POSITION auto > END > END > STATUS ON > END > > END > > The same testmap.map works fine with php_mapscript. > > When execute the DrawMap.java example crash in the line (43) > > imageObj img = map.draw(); > > This is the error: > > Exception in thread "main" java.lang.UnknownError: Unable to initialize > image. > at edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw (Native Method) > at edu.umn.gis.mapscript.mapObj.draw(mapObj.java:382) > at es.gva.icv.jmapscript.DrawMap.main(DrawMap.java:43) > > I have searched about this error in internet, but I have found nothing. > > Thanks in advance. > Luis Conti > From conti_lui at GVA.ES Mon Nov 19 03:17:35 2007 From: conti_lui at GVA.ES (Luis Conti) Date: Mon, 19 Nov 2007 05:17:35 -0600 Subject: Problems with Java Mapscript Message-ID: Thanks for your answer I have tried IMAGETYPE png and IMAGETYPE gif, but I still get the same error: Exception in thread "main" java.lang.UnknownError: Unable to initialize image. at edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method) at edu.umn.gis.mapscript.mapObj.draw(mapObj.java:382) at es.gva.icv.jmapscript.DrawMap.main(DrawMap.java:43) Thanks Luis Conti From umberto.nicoletti at GMAIL.COM Mon Nov 19 03:28:57 2007 From: umberto.nicoletti at GMAIL.COM (Umberto Nicoletti) Date: Mon, 19 Nov 2007 12:28:57 +0100 Subject: Problems with Java Mapscript In-Reply-To: Message-ID: Can you post your java code? By looking at package name it seems to me that you are not running exactly the examples from the source distribution. Umberto On Nov 19, 2007 12:17 PM, Luis Conti wrote: > Thanks for your answer > > I have tried IMAGETYPE png and IMAGETYPE gif, but I still get the same error: > > Exception in thread "main" java.lang.UnknownError: Unable to initialize image. > at edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method) > at edu.umn.gis.mapscript.mapObj.draw(mapObj.java:382) > at es.gva.icv.jmapscript.DrawMap.main(DrawMap.java:43) > > Thanks > Luis Conti > From conti_lui at GVA.ES Mon Nov 19 03:41:57 2007 From: conti_lui at GVA.ES (Luis Conti) Date: Mon, 19 Nov 2007 05:41:57 -0600 Subject: Problems with Java Mapscript Message-ID: It's correct, I'm not using the package structure of mapscript examples. Could this be a problem? this my Java code. When execute the code I pass two arguments "/tmp/testmap.map" and "/tmp/testmap.png". import edu.umn.gis.mapscript.*; /** *

Title: Mapscript shape dump example.

*

Description: A Java based mapscript example to create an image given a mapfile.

* @author Yew K Choo ykchoo at geozervice.com * @version 1.0 */ public class DrawMap { public static void usage() { System.err.println("Usage: DrawMap {mapfile} {outfile}"); System.exit(-1); } public static void main(String[] args) { if (args.length != 2) usage(); try { System.loadLibrary("mapscript"); } catch(UnsatisfiedLinkError ule) { System.err.println(ule); System.exit(-1); } System.out.println(args[0]); mapObj map = new mapObj(args[0]); map.getImagecolor().setRGB(153, 153, 204); styleObj st = map.getLayer(0).getClass(0).getStyle(0); st.getColor().setHex("#000000"); imageObj img = map.draw(); System.out.println("The map will be drawn to:"+args[1]); img.save(args[1], map); //img.delete(); //map.delete(); //mapscript.msCleanup(); } } From umberto.nicoletti at GMAIL.COM Mon Nov 19 03:44:31 2007 From: umberto.nicoletti at GMAIL.COM (Umberto Nicoletti) Date: Mon, 19 Nov 2007 12:44:31 +0100 Subject: Problems with Java Mapscript In-Reply-To: Message-ID: Try this: public class DrawMap { public static void usage() { System.err.println("Usage: DrawMap {mapfile} {outfile}"); System.exit(-1); } public static void main(String[] args) { if (args.length != 2) usage(); System.out.println(args[0]); mapObj map = new mapObj(args[0]); imageObj img = map.draw(); System.out.println("The map will be drawn to:"+args[1]); img.save(args[1], map); } } From conti_lui at GVA.ES Mon Nov 19 04:03:25 2007 From: conti_lui at GVA.ES (Luis Conti) Date: Mon, 19 Nov 2007 06:03:25 -0600 Subject: Problems with Java Mapscript Message-ID: Displays the same error. What's happen?, I don't understand. This code is very simple and this is a typical example of Java Mapscript. When I have tried compile the examples with "make test", I have had this error: *** glibc detected *** java: malloc(): memory corruption: 0x45e68d78 *** Thanks for your time. Luis Conti. From jorn at SPACETEC.NO Mon Nov 19 05:21:36 2007 From: jorn at SPACETEC.NO (=?iso-8859-1?q?J=F8rn_Vegard_R=F8snes?=) Date: Mon, 19 Nov 2007 14:21:36 +0100 Subject: query postgis through wms In-Reply-To: <8d2ea9d70711190048p695d2b66hc8903df8e4fe416d@mail.gmail.com> Message-ID: Hi, do you have a column named oid with integer type in your table? cheers J?rn Vegard On Monday 19 November 2007 09:48, Steven De Vriendt wrote: > Hi folks, > > I'm trying to query a postgis-layer through wms. Yet, I do not get any > query results. > Can anyone have a look at my mapfile. I have tried to label my features > too, using > a field of the postgis-table, but that doesn't seem to work too. So, my > guess it should > be something wrong in my map-file. Thanks for helping out ! > > # > # Start of map file > # > # Sample map file for a chameleon app. > # > NAME DEMO > STATUS ON > SIZE 600 500 > SYMBOLSET symbols.sym > EXTENT 77336.359625 189988.500250 90937.297125 201812.968625 > UNITS METERS > SHAPEPATH "../data" > IMAGECOLOR 255 255 255 > FONTSET fonts.txt > TRANSPARENT FALSE > > > WEB > IMAGEPATH "etc/mapserver/tmp/ms_tmp" > IMAGEURL "/tmp/" > > METADATA > "wms_title" "Aalter_WMS" > "wms_onlineresource" " > "wms_srs" "EPSG:31300" > > END > END > > > OUTPUTFORMAT > NAME png > DRIVER "GD/PNG" > MIMETYPE "image/png" > IMAGEMODE PC256 > EXTENSION "png" > END > > > SCALEBAR > IMAGECOLOR 255 255 255 > LABEL > COLOR 0 0 0 > SIZE SMALL > END > SIZE 150 5 > COLOR 255 255 255 > BACKGROUNDCOLOR 0 0 0 > OUTLINECOLOR 0 0 0 > UNITS meters > INTERVALS 5 > STATUS ON > END > > QUERYMAP > STATUS ON > SIZE 200 200 > STYLE HILITE > COLOR 255 0 0 > END > > PROJECTION > "init=epsg:31300" > END > > LAYER > NAME "Grens" > METADATA > "wms_title" "gemeentegrens" > "gml_include_items" "all" > END > CONNECTIONTYPE postgis > CONNECTION "host="" > DATA "the_geom from alr_gemline" > DUMP TRUE > TEMPLATE "ttt" > > TYPE LINE > CLASS > NAME "KadScan" > OUTLINECOLOR 208 208 208 > END > PROJECTION > "init=epsg:31300" > END > END > > LAYER > NAME "Percelen" > > CONNECTIONTYPE postgis > CONNECTION "host="" > DATA "the_geom from b_capa_percid" > TEMPLATE "ttt" > LABELITEM 'capakey' > TYPE POLYGON > CLASS > NAME "KadScan" > > OUTLINECOLOR 208 208 208 > END > METADATA > "wms_title" "percelen" > "gml_include_items" "all" > END > > PROJECTION > "init=epsg:31300" > > END > END > > > END # Map File From gisaalter at GMAIL.COM Mon Nov 19 05:27:48 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Mon, 19 Nov 2007 14:27:48 +0100 Subject: query postgis through wms In-Reply-To: <200711191421.36473.jorn@spacetec.no> Message-ID: Jorn, I have the following columns: gid capakey percid capaty shape_area the_geom Thanks for helping out ! Steven On Nov 19, 2007 2:21 PM, J?rn Vegard R?snes wrote: > Hi, > > do you have a column named oid with integer type in your table? > > cheers > J?rn Vegard > > On Monday 19 November 2007 09:48, Steven De Vriendt wrote: > > Hi folks, > > > > I'm trying to query a postgis-layer through wms. Yet, I do not get any > > query results. > > Can anyone have a look at my mapfile. I have tried to label my features > > too, using > > a field of the postgis-table, but that doesn't seem to work too. So, my > > guess it should > > be something wrong in my map-file. Thanks for helping out ! > > > > # > > # Start of map file > > # > > # Sample map file for a chameleon app. > > # > > NAME DEMO > > STATUS ON > > SIZE 600 500 > > SYMBOLSET symbols.sym > > EXTENT 77336.359625 189988.500250 90937.297125 201812.968625 > > UNITS METERS > > SHAPEPATH "../data" > > IMAGECOLOR 255 255 255 > > FONTSET fonts.txt > > TRANSPARENT FALSE > > > > > > WEB > > IMAGEPATH "etc/mapserver/tmp/ms_tmp" > > IMAGEURL "/tmp/" > > > > METADATA > > "wms_title" "Aalter_WMS" > > "wms_onlineresource" " > > "wms_srs" "EPSG:31300" > > > > END > > END > > > > > > OUTPUTFORMAT > > NAME png > > DRIVER "GD/PNG" > > MIMETYPE "image/png" > > IMAGEMODE PC256 > > EXTENSION "png" > > END > > > > > > SCALEBAR > > IMAGECOLOR 255 255 255 > > LABEL > > COLOR 0 0 0 > > SIZE SMALL > > END > > SIZE 150 5 > > COLOR 255 255 255 > > BACKGROUNDCOLOR 0 0 0 > > OUTLINECOLOR 0 0 0 > > UNITS meters > > INTERVALS 5 > > STATUS ON > > END > > > > QUERYMAP > > STATUS ON > > SIZE 200 200 > > STYLE HILITE > > COLOR 255 0 0 > > END > > > > PROJECTION > > "init=epsg:31300" > > END > > > > LAYER > > NAME "Grens" > > METADATA > > "wms_title" "gemeentegrens" > > "gml_include_items" "all" > > END > > CONNECTIONTYPE postgis > > CONNECTION "host="" > > DATA "the_geom from alr_gemline" > > DUMP TRUE > > TEMPLATE "ttt" > > > > TYPE LINE > > CLASS > > NAME "KadScan" > > OUTLINECOLOR 208 208 208 > > END > > PROJECTION > > "init=epsg:31300" > > END > > END > > > > LAYER > > NAME "Percelen" > > > > CONNECTIONTYPE postgis > > CONNECTION "host="" > > DATA "the_geom from b_capa_percid" > > TEMPLATE "ttt" > > LABELITEM 'capakey' > > TYPE POLYGON > > CLASS > > NAME "KadScan" > > > > OUTLINECOLOR 208 208 208 > > END > > METADATA > > "wms_title" "percelen" > > "gml_include_items" "all" > > END > > > > PROJECTION > > "init=epsg:31300" > > > > END > > END > > > > > > END # Map File > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at SPACETEC.NO Mon Nov 19 05:34:56 2007 From: jorn at SPACETEC.NO (=?iso-8859-1?q?J=F8rn_Vegard_R=F8snes?=) Date: Mon, 19 Nov 2007 14:34:56 +0100 Subject: query postgis through wms In-Reply-To: <8d2ea9d70711190527v2b03b422te742083e6418a230@mail.gmail.com> Message-ID: Hi, try to add the column to the tables alter table add column oid integer; On Monday 19 November 2007 14:27, Steven De Vriendt wrote: > Jorn, > > I have the following columns: > > gid > capakey > percid > capaty > shape_area > the_geom > > Thanks for helping out ! > > Steven > > On Nov 19, 2007 2:21 PM, J?rn Vegard R?snes wrote: > > Hi, > > > > do you have a column named oid with integer type in your table? > > > > cheers > > J?rn Vegard > > > > On Monday 19 November 2007 09:48, Steven De Vriendt wrote: > > > Hi folks, > > > > > > I'm trying to query a postgis-layer through wms. Yet, I do not get any > > > query results. > > > Can anyone have a look at my mapfile. I have tried to label my features > > > too, using > > > a field of the postgis-table, but that doesn't seem to work too. So, my > > > guess it should > > > be something wrong in my map-file. Thanks for helping out ! > > > > > > # > > > # Start of map file > > > # > > > # Sample map file for a chameleon app. > > > # > > > NAME DEMO > > > STATUS ON > > > SIZE 600 500 > > > SYMBOLSET symbols.sym > > > EXTENT 77336.359625 189988.500250 90937.297125 201812.968625 > > > UNITS METERS > > > SHAPEPATH "../data" > > > IMAGECOLOR 255 255 255 > > > FONTSET fonts.txt > > > TRANSPARENT FALSE > > > > > > > > > WEB > > > IMAGEPATH "etc/mapserver/tmp/ms_tmp" > > > IMAGEURL "/tmp/" > > > > > > METADATA > > > "wms_title" "Aalter_WMS" > > > "wms_onlineresource" " > > > "wms_srs" "EPSG:31300" > > > > > > END > > > END > > > > > > > > > OUTPUTFORMAT > > > NAME png > > > DRIVER "GD/PNG" > > > MIMETYPE "image/png" > > > IMAGEMODE PC256 > > > EXTENSION "png" > > > END > > > > > > > > > SCALEBAR > > > IMAGECOLOR 255 255 255 > > > LABEL > > > COLOR 0 0 0 > > > SIZE SMALL > > > END > > > SIZE 150 5 > > > COLOR 255 255 255 > > > BACKGROUNDCOLOR 0 0 0 > > > OUTLINECOLOR 0 0 0 > > > UNITS meters > > > INTERVALS 5 > > > STATUS ON > > > END > > > > > > QUERYMAP > > > STATUS ON > > > SIZE 200 200 > > > STYLE HILITE > > > COLOR 255 0 0 > > > END > > > > > > PROJECTION > > > "init=epsg:31300" > > > END > > > > > > LAYER > > > NAME "Grens" > > > METADATA > > > "wms_title" "gemeentegrens" > > > "gml_include_items" "all" > > > END > > > CONNECTIONTYPE postgis > > > CONNECTION "host="" > > > DATA "the_geom from alr_gemline" > > > DUMP TRUE > > > TEMPLATE "ttt" > > > > > > TYPE LINE > > > CLASS > > > NAME "KadScan" > > > OUTLINECOLOR 208 208 208 > > > END > > > PROJECTION > > > "init=epsg:31300" > > > END > > > END > > > > > > LAYER > > > NAME "Percelen" > > > > > > CONNECTIONTYPE postgis > > > CONNECTION "host="" > > > DATA "the_geom from b_capa_percid" > > > TEMPLATE "ttt" > > > LABELITEM 'capakey' > > > TYPE POLYGON > > > CLASS > > > NAME "KadScan" > > > > > > OUTLINECOLOR 208 208 208 > > > END > > > METADATA > > > "wms_title" "percelen" > > > "gml_include_items" "all" > > > END > > > > > > PROJECTION > > > "init=epsg:31300" > > > > > > END > > > END > > > > > > > > > END # Map File From gisaalter at GMAIL.COM Mon Nov 19 05:58:55 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Mon, 19 Nov 2007 14:58:55 +0100 Subject: postgis layer: DATA "the_geom from
AS foo USING UNIQUE gid" Message-ID: When I configure my layer as DATA "the_geom from AS foo USING UNIQUE gid" Mapserver returns the following error: ? msDrawMap(): Image handling error. Failed to draw layer named 'percelen'. prepare_database(): Query error. Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from b_capa_percid AS foo WHERE the_geom && setSRID('BOX3D(76945.5918856108 189996.502536997,91328.1081143621 201805.497460877)'::BOX3D, find_srid('','b_capa_percid AS foo','the_geom') )' Postgresql reports the error as 'ERROR: find_srid() - couldnt find the corresponding SRID - is the geometry registered in the GEOMETRY_COLUMNS table? Is there an uppercase/lowercase missmatch? ' More Help: Error with POSTGIS data variable. You specified 'check your .map file'. Standard ways of specifiying are : (1) 'geometry_column from geometry_table' (2) 'geometry_column from (sub query) as foo using unique column name using SRID=srid#' Make sure you put in the 'using unique column name' and 'using SRID=#' clauses in. For more help, please see http://postgis.refractions.net/documentation/ Mappostgis.c - version of Jan 23/2004. However when I add the SRID=31300, Mapserver throws this: ? ? msDrawMap(): Image handling error. Failed to draw layer named 'percelen'. msPOSTGISLayerWhichShapes(): Query error. Error executing POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from b_capa_percid AS foo WHERE the_geom && setSRID('BOX3D(76945.5918856108 189996.502536997,91328.1081143621 201805.497460877)'::BOX3D, 31300 ) -ERROR: Operation on two geometries with different SRIDs How can I use the gid as unique column ? Thanks Steven -------------- next part -------------- An HTML attachment was scrubbed... URL: From gisaalter at GMAIL.COM Mon Nov 19 06:00:25 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Mon, 19 Nov 2007 15:00:25 +0100 Subject: query postgis through wms In-Reply-To: <200711191434.56503.jorn@spacetec.no> Message-ID: Jorn, I have tried to add the following: DATA "the_geom from b_capa_percid AS foo USING UNIQUE gid using SRD=31300" but that turns other errors. When I try to do your suggestions, the query takes forever to run... Steven On Nov 19, 2007 2:34 PM, J?rn Vegard R?snes wrote: > Hi, > > try to add the column to the tables > alter table
add column oid integer; > > > > On Monday 19 November 2007 14:27, Steven De Vriendt wrote: > > Jorn, > > > > I have the following columns: > > > > gid > > capakey > > percid > > capaty > > shape_area > > the_geom > > > > Thanks for helping out ! > > > > Steven > > > > On Nov 19, 2007 2:21 PM, J?rn Vegard R?snes wrote: > > > Hi, > > > > > > do you have a column named oid with integer type in your table? > > > > > > cheers > > > J?rn Vegard > > > > > > On Monday 19 November 2007 09:48, Steven De Vriendt wrote: > > > > Hi folks, > > > > > > > > I'm trying to query a postgis-layer through wms. Yet, I do not get > any > > > > query results. > > > > Can anyone have a look at my mapfile. I have tried to label my > features > > > > too, using > > > > a field of the postgis-table, but that doesn't seem to work too. So, > my > > > > guess it should > > > > be something wrong in my map-file. Thanks for helping out ! > > > > > > > > # > > > > # Start of map file > > > > # > > > > # Sample map file for a chameleon app. > > > > # > > > > NAME DEMO > > > > STATUS ON > > > > SIZE 600 500 > > > > SYMBOLSET symbols.sym > > > > EXTENT 77336.359625 189988.500250 90937.297125 201812.968625 > > > > UNITS METERS > > > > SHAPEPATH "../data" > > > > IMAGECOLOR 255 255 255 > > > > FONTSET fonts.txt > > > > TRANSPARENT FALSE > > > > > > > > > > > > WEB > > > > IMAGEPATH "etc/mapserver/tmp/ms_tmp" > > > > IMAGEURL "/tmp/" > > > > > > > > METADATA > > > > "wms_title" "Aalter_WMS" > > > > "wms_onlineresource" " > > > > "wms_srs" "EPSG:31300" > > > > > > > > END > > > > END > > > > > > > > > > > > OUTPUTFORMAT > > > > NAME png > > > > DRIVER "GD/PNG" > > > > MIMETYPE "image/png" > > > > IMAGEMODE PC256 > > > > EXTENSION "png" > > > > END > > > > > > > > > > > > SCALEBAR > > > > IMAGECOLOR 255 255 255 > > > > LABEL > > > > COLOR 0 0 0 > > > > SIZE SMALL > > > > END > > > > SIZE 150 5 > > > > COLOR 255 255 255 > > > > BACKGROUNDCOLOR 0 0 0 > > > > OUTLINECOLOR 0 0 0 > > > > UNITS meters > > > > INTERVALS 5 > > > > STATUS ON > > > > END > > > > > > > > QUERYMAP > > > > STATUS ON > > > > SIZE 200 200 > > > > STYLE HILITE > > > > COLOR 255 0 0 > > > > END > > > > > > > > PROJECTION > > > > "init=epsg:31300" > > > > END > > > > > > > > LAYER > > > > NAME "Grens" > > > > METADATA > > > > "wms_title" "gemeentegrens" > > > > "gml_include_items" "all" > > > > END > > > > CONNECTIONTYPE postgis > > > > CONNECTION "host="" > > > > DATA "the_geom from alr_gemline" > > > > DUMP TRUE > > > > TEMPLATE "ttt" > > > > > > > > TYPE LINE > > > > CLASS > > > > NAME "KadScan" > > > > OUTLINECOLOR 208 208 208 > > > > END > > > > PROJECTION > > > > "init=epsg:31300" > > > > END > > > > END > > > > > > > > LAYER > > > > NAME "Percelen" > > > > > > > > CONNECTIONTYPE postgis > > > > CONNECTION "host="" < http://192.168.102.100/> > > > > DATA "the_geom from b_capa_percid" > > > > TEMPLATE "ttt" > > > > LABELITEM 'capakey' > > > > TYPE POLYGON > > > > CLASS > > > > NAME "KadScan" > > > > > > > > OUTLINECOLOR 208 208 208 > > > > END > > > > METADATA > > > > "wms_title" "percelen" > > > > "gml_include_items" "all" > > > > END > > > > > > > > PROJECTION > > > > "init=epsg:31300" > > > > > > > > END > > > > END > > > > > > > > > > > > END # Map File > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcos at BURKE.ATH.CX Mon Nov 19 06:19:13 2007 From: marcos at BURKE.ATH.CX (Marcos =?ISO-8859-1?Q?S=E1nchez?= Provencio) Date: Mon, 19 Nov 2007 15:19:13 +0100 Subject: query postgis through wms In-Reply-To: <8d2ea9d70711190048p695d2b66hc8903df8e4fe416d@mail.gmail.com> Message-ID: try DATA "the_geom from (SELECT * FROM b_capa_percid) as foo using srid=31300 using unique gid" El lun, 19-11-2007 a las 09:48 +0100, Steven De Vriendt escribi?: > DATA "the_geom from b_capa_percid" From gisaalter at GMAIL.COM Mon Nov 19 06:26:52 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Mon, 19 Nov 2007 15:26:52 +0100 Subject: query postgis through wms In-Reply-To: <1195481953.6236.7.camel@savin> Message-ID: Marcos, When I try your suggestion Mapserver returns: ? ? msDrawMap(): Image handling error. Failed to draw layer named 'percelen'. msPOSTGISLayerWhichShapes(): Query error. Error executing POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from (SELECT * FROM b_capa_percid) AS foo WHERE the_geom && setSRID('BOX3D( 76945.5918856108 189996.502536997,91328.1081143621 201805.497460877)'::BOX3D, 31300 ) -ERROR: Operation on two geometries with different SRIDs On Nov 19, 2007 3:19 PM, Marcos S?nchez Provencio wrote: > try > DATA "the_geom from (SELECT * FROM b_capa_percid) as foo > using srid=31300 using unique gid" > > > > El lun, 19-11-2007 a las 09:48 +0100, Steven De Vriendt escribi?: > > DATA "the_geom from b_capa_percid" > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gisaalter at GMAIL.COM Mon Nov 19 06:31:59 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Mon, 19 Nov 2007 15:31:59 +0100 Subject: query postgis through wms In-Reply-To: <8d2ea9d70711190626i4ba51de4v3862cd71a55c06cf@mail.gmail.com> Message-ID: update: when I use SRID=-1 I get a map in return but I'm still unable to query it.. Steven On Nov 19, 2007 3:26 PM, Steven De Vriendt wrote: > Marcos, > > When I try your suggestion Mapserver returns: > > ? > > ? > > > msDrawMap(): Image handling error. Failed to draw layer named 'percelen'. > msPOSTGISLayerWhichShapes(): Query error. Error executing POSTGIS SQL > statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT > asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from (SELECT > * FROM b_capa_percid) AS foo WHERE the_geom && setSRID('BOX3D( > 76945.5918856108 189996.502536997,91328.1081143621 201805.497460877)'::BOX3D, > 31300 ) > -ERROR: Operation on two geometries with different SRIDs > > > > > > > On Nov 19, 2007 3:19 PM, Marcos S?nchez Provencio > wrote: > > > try > > DATA "the_geom from (SELECT * FROM b_capa_percid) as foo > > using srid=31300 using unique gid" > > > > > > > > El lun, 19-11-2007 a las 09:48 +0100, Steven De Vriendt escribi?: > > > DATA "the_geom from b_capa_percid" > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From umberto.nicoletti at GMAIL.COM Mon Nov 19 06:32:49 2007 From: umberto.nicoletti at GMAIL.COM (Umberto Nicoletti) Date: Mon, 19 Nov 2007 15:32:49 +0100 Subject: Problems with Java Mapscript In-Reply-To: Message-ID: You are using a quite old (and unsupported) version of mapserver. You should first upgrade to version 5. Umberto On Nov 19, 2007 1:03 PM, Luis Conti wrote: > Displays the same error. > > What's happen?, I don't understand. This code is very simple and this is a > typical example of Java Mapscript. > > When I have tried compile the examples with "make test", I have had this error: > > *** glibc detected *** java: malloc(): memory corruption: 0x45e68d78 *** > > Thanks for your time. > Luis Conti. > > From marcos at BURKE.ATH.CX Mon Nov 19 06:41:38 2007 From: marcos at BURKE.ATH.CX (Marcos =?ISO-8859-1?Q?S=E1nchez?= Provencio) Date: Mon, 19 Nov 2007 15:41:38 +0100 Subject: query postgis through wms In-Reply-To: <8d2ea9d70711190626i4ba51de4v3862cd71a55c06cf@mail.gmail.com> Message-ID: Try using the srid your data is stored in instead of 31300. You might use the function getsrid SELECT getsrid(the_geom) from b_capa_percid limit 1; El lun, 19-11-2007 a las 15:26 +0100, Steven De Vriendt escribi?: > Marcos, > > When I try your suggestion Mapserver returns: > > ? > > ? > > > msDrawMap(): Image handling error. Failed to draw layer named > 'percelen'. > msPOSTGISLayerWhichShapes(): Query error. Error executing POSTGIS SQL > statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT > asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from > (SELECT * FROM b_capa_percid) AS foo WHERE the_geom && > setSRID('BOX3D( 76945.5918856108 189996.502536997,91328.1081143621 > 201805.497460877)'::BOX3D, 31300 ) > -ERROR: Operation on two geometries with different SRIDs > > > > > > On Nov 19, 2007 3:19 PM, Marcos S?nchez Provencio > wrote: > try > DATA "the_geom from (SELECT * FROM b_capa_percid) as foo > using srid=31300 using unique gid" > > > > El lun, 19-11-2007 a las 09:48 +0100, Steven De Vriendt > escribi?: > > > DATA "the_geom from b_capa_percid" > > > From gisaalter at GMAIL.COM Mon Nov 19 06:51:12 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Mon, 19 Nov 2007 15:51:12 +0100 Subject: query postgis through wms In-Reply-To: <1195483299.6236.12.camel@savin> Message-ID: How can I see what SRID the data is using ? I'm quite new to all this... Steven On Nov 19, 2007 3:41 PM, Marcos S?nchez Provencio wrote: > Try using the srid your data is stored in instead of 31300. You might > use the function getsrid > > SELECT getsrid(the_geom) from b_capa_percid limit 1; > > > El lun, 19-11-2007 a las 15:26 +0100, Steven De Vriendt escribi?: > > Marcos, > > > > When I try your suggestion Mapserver returns: > > > > ? > > > > ? > > > > > > msDrawMap(): Image handling error. Failed to draw layer named > > 'percelen'. > > msPOSTGISLayerWhichShapes(): Query error. Error executing POSTGIS SQL > > statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT > > asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from > > (SELECT * FROM b_capa_percid) AS foo WHERE the_geom && > > setSRID('BOX3D( 76945.5918856108 189996.502536997,91328.1081143621 > > 201805.497460877)'::BOX3D, 31300 ) > > -ERROR: Operation on two geometries with different SRIDs > > > > > > > > > > > > On Nov 19, 2007 3:19 PM, Marcos S?nchez Provencio > > wrote: > > try > > DATA "the_geom from (SELECT * FROM b_capa_percid) as foo > > using srid=31300 using unique gid" > > > > > > > > El lun, 19-11-2007 a las 09:48 +0100, Steven De Vriendt > > escribi?: > > > > > DATA "the_geom from b_capa_percid" > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luca76 at GMAIL.COM Mon Nov 19 06:52:29 2007 From: luca76 at GMAIL.COM (Luca Manganelli) Date: Mon, 19 Nov 2007 15:52:29 +0100 Subject: Speeding up the visualization of a shapefile with more than one million of lines Message-ID: Hi, I have a shapefile with more than one million of lines (it's 42MB in size). It's a cadastral layer. I've split it in a map of 8x8 pieces. It's faster at low scales, but if I want to see the entire map it's slow to render (about 5-6 seconds on an Pentium IV 2,8 GHz server). I would like to know is there's any way to speed up the rendering, i.e., not rendering lines smaller than a factor. From yassefa at DMSOLUTIONS.CA Mon Nov 19 06:57:50 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Mon, 19 Nov 2007 09:57:50 -0500 Subject: Changing a layer's DATA via the URL in MapServer 5.0 In-Reply-To: Message-ID: Jan, You could try something like ...&map.layer[plan]=data+amby/verzamelplan.tif This seem to work. Best Regards, Jan Hartmann wrote: > Hi, > > I'm having trouble with changing a layer's DATA in MapServer 5.0 via > the URL. In 4.10.0 the following works: > > datapattern ".*" > /cgi-bin/mapserv?map=...map&mapext=...&mapsize=...mode=map&map_layer_0_data=amby/verzamelplan.tif > > In 5.0 the same call causes the following error: > > getSymbol(): Symbol definition error. Parsing error near (0):(line 1) > > Changing the DATA part to: map_layer[0]_data, or map.layer[plan].data, > as described in the Migration Guide gives: > > loadLayer(): Unknown identifier. Parsing error near > (amby/verzamelplan.tif):(line 1) > > > Is this a bug, or am I doing something wrong? > > Jan -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From marcos at BURKE.ATH.CX Mon Nov 19 07:01:37 2007 From: marcos at BURKE.ATH.CX (Marcos =?ISO-8859-1?Q?S=E1nchez?= Provencio) Date: Mon, 19 Nov 2007 16:01:37 +0100 Subject: query postgis through wms In-Reply-To: <8d2ea9d70711190631j3f59797epa2e18b561ea05276@mail.gmail.com> Message-ID: Try setting debug and see what querys get the database. El lun, 19-11-2007 a las 15:31 +0100, Steven De Vriendt escribi?: > update: > when I use SRID=-1 I get a map in return but I'm still unable to query > it.. > > Steven > > On Nov 19, 2007 3:26 PM, Steven De Vriendt > wrote: > Marcos, > > When I try your suggestion Mapserver returns: > > ? > > ? > > > msDrawMap(): Image handling error. Failed to draw layer named > 'percelen'. > msPOSTGISLayerWhichShapes(): Query error. Error executing > POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor BINARY > CURSOR FOR SELECT > asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text > from (SELECT * FROM b_capa_percid) AS foo WHERE the_geom && > setSRID('BOX3D( 76945.5918856108 > 189996.502536997,91328.1081143621 201805.497460877)'::BOX3D, > 31300 ) > -ERROR: Operation on two geometries with different SRIDs > > > > > > > > On Nov 19, 2007 3:19 PM, Marcos S?nchez Provencio > wrote: > try > DATA "the_geom from (SELECT * FROM b_capa_percid) as > foo > using srid=31300 using unique gid" > > > > El lun, 19-11-2007 a las 09:48 +0100, Steven De > Vriendt escribi?: > > > DATA "the_geom from b_capa_percid" > > > > > From gisaalter at GMAIL.COM Mon Nov 19 07:09:59 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Mon, 19 Nov 2007 16:09:59 +0100 Subject: query postgis through wms In-Reply-To: <1195484497.6236.14.camel@savin> Message-ID: I will reconvert my data again in PostGIS. I think ogr2or creates a oid automatically. Thanks for helping out Steven On Nov 19, 2007 4:01 PM, Marcos S?nchez Provencio wrote: > Try setting debug and see what querys get the database. > > > El lun, 19-11-2007 a las 15:31 +0100, Steven De Vriendt escribi?: > > update: > > when I use SRID=-1 I get a map in return but I'm still unable to query > > it.. > > > > Steven > > > > On Nov 19, 2007 3:26 PM, Steven De Vriendt > > wrote: > > Marcos, > > > > When I try your suggestion Mapserver returns: > > > > ? > > > > ? > > > > > > msDrawMap(): Image handling error. Failed to draw layer named > > 'percelen'. > > msPOSTGISLayerWhichShapes(): Query error. Error executing > > POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor BINARY > > CURSOR FOR SELECT > > asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text > > from (SELECT * FROM b_capa_percid) AS foo WHERE the_geom && > > setSRID('BOX3D( 76945.5918856108 > > 189996.502536997,91328.1081143621 201805.497460877)'::BOX3D, > > 31300 ) > > -ERROR: Operation on two geometries with different SRIDs > > > > > > > > > > > > > > > > On Nov 19, 2007 3:19 PM, Marcos S?nchez Provencio > > wrote: > > try > > DATA "the_geom from (SELECT * FROM b_capa_percid) as > > foo > > using srid=31300 using unique gid" > > > > > > > > El lun, 19-11-2007 a las 09:48 +0100, Steven De > > Vriendt escribi?: > > > > > DATA "the_geom from b_capa_percid" > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregor at HOSTGIS.COM Mon Nov 19 07:21:45 2007 From: gregor at HOSTGIS.COM (Gregor Mosheh) Date: Mon, 19 Nov 2007 08:21:45 -0700 Subject: Speeding up the visualization of a shapefile with more than one million of lines In-Reply-To: Message-ID: Hi, Luca. A bunch of us put our heads together and came up with a zillion ways to make maps faster, then posted it to the Mapserver website. Go to the Mapserver site, in the documentation, and look for "how do I make my maps faster" or "vector optimization" -- Gregor Mosheh / Greg Allensworth System Administrator, HostGIS cartographic development & hosting services http://www.HostGIS.com/ "Remember that no one cares if you can back up, only if you can restore." - AMANDA From andreas.albarello at TERRITORIUMONLINE.COM Mon Nov 19 07:42:03 2007 From: andreas.albarello at TERRITORIUMONLINE.COM (Andreas Albarello) Date: Mon, 19 Nov 2007 16:42:03 +0100 Subject: postgis layer: DATA "the_geom from
AS foo USING UNIQUE gid" In-Reply-To: <8d2ea9d70711190558t2716bb3fl5526c283132d17c4@mail.gmail.com> Message-ID: Steven De Vriendt wrote: > When I configure my layer as DATA "the_geom from AS foo USING > UNIQUE gid" > Mapserver returns the following error [...] You don't need any "AS foo" in your DATA statement unless you are using a subselect instead of referencing a table directly through its tablename. Drop the "AS foo" and everything should be fine. Best regards, -- -------------------------------------------------------------------- Andreas Albarello Analysis & SW Development Territorium Online srl/GmbH Via Buozzi/Buozzistra?e 12 - I 39100 Bolzano/Bozen email: andreas.albarello at territoriumonline.com web: www.territoriumonline.com -------------------------------------------------------------------- From bfraser at GEOANALYTIC.COM Mon Nov 19 08:13:05 2007 From: bfraser at GEOANALYTIC.COM (Brent Fraser) Date: Mon, 19 Nov 2007 09:13:05 -0700 Subject: How to label for each feature base on their angle? Message-ID: Try http://mapserver.gis.umn.edu/docs/reference/mapfile/layer LABELANGLEITEM [attribute] Item name in attribute table to use for class annotation angles. Values should be in degrees. For Example: LABELANGLEITEM "LabelAngle" Brent Fraser GeoAnalytic Inc. Calgary, Alberta ----- Original Message ----- From: "L? Vi?t Thanh" To: Sent: Sunday, November 18, 2007 10:26 PM Subject: [UMN_MAPSERVER-USERS] How to label for each feature base on their angle? > I have a point shapefile with rotation angle attribute field for each > feature. How do i label these features based on that field. In mapfile, i > only set label angle for a layer but not for each feature :( > Thanks in advance > > -- > Best regards, > > Le Viet Thanh > GIS Technician - GIS Team > __________________________________ > Vietnam - Denmark VIDAGIS CO., LTD > 5 Lang Ha Str, Hanoi, Vietnam > Tel: +84 4 5145570 Fax: +84 4 5145571 > http://www.vidagis.com > Direct: thanhlv at vidagis.com +84 984 468147 > From Tim.Nolte at IPCSWIRELESSINC.COM Mon Nov 19 11:14:41 2007 From: Tim.Nolte at IPCSWIRELESSINC.COM (Nolte, Tim) Date: Mon, 19 Nov 2007 14:14:41 -0500 Subject: Legend Template Question... Message-ID: Anyone have a hint on how I can write my legend template so that the Group name will show up if 1 or more layers in that group are visible? Thanks. - Tim ---- Timothy J Nolte - tnolte at ilpcs.com Associate Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com From luca76 at GMAIL.COM Mon Nov 19 12:35:19 2007 From: luca76 at GMAIL.COM (Luca Manganelli) Date: Mon, 19 Nov 2007 21:35:19 +0100 Subject: Speeding up the visualization of a shapefile with more than one million of lines In-Reply-To: <4741AA09.8020801@hostgis.com> Message-ID: On Nov 19, 2007 4:21 PM, Gregor Mosheh wrote: > Hi, Luca. > A bunch of us put our heads together and came up with a zillion ways to > make maps faster, then posted it to the Mapserver website. Go to the > Mapserver site, in the documentation, and look for "how do I make my > maps faster" or "vector optimization" Thank you for the reply. I have already seen those pages: I have already tiled the big shp (42 MB) into 8x8 pieces. But my question is: at the highest scale, rendering an 8x8 shp of 42MB is slow. From gregor at HOSTGIS.COM Mon Nov 19 12:53:09 2007 From: gregor at HOSTGIS.COM (Gregor Mosheh) Date: Mon, 19 Nov 2007 13:53:09 -0700 Subject: Speeding up the visualization of a shapefile with more than one million of lines In-Reply-To: Message-ID: Luca Manganelli wrote: > Thank you for the reply. I have already seen those pages: I have > already tiled the big shp (42 MB) into 8x8 pieces. > But my question is: > at the highest scale, rendering an 8x8 shp of 42MB is slow. Well, that's not a question, just a fact. :) Seriously, though: Have you run shptree to create a spatial index? If so, are you sure that your shapefile is NOT specifying the .shp extension? Wrong: DATA "streets/tiger.shp" Right: DATA "streets/tiger" And what about your mapfile's classifications? Is the map drawing every street segment with every request? That can be a killer! Use classes to break them up into highways for large views, and streets for closer-up views. If you're already using a spatial index, then most of the time is probably not scanning the shapefiles but rather in drawing the shapes, so let's see the appropriate mapfile layer. -- Gregor Mosheh / Greg Allensworth System Administrator, HostGIS cartographic development & hosting services http://www.HostGIS.com/ "Remember that no one cares if you can back up, only if you can restore." - AMANDA From chelm at WAPA.GOV Mon Nov 19 13:04:13 2007 From: chelm at WAPA.GOV (Chris Helm) Date: Mon, 19 Nov 2007 15:04:13 -0600 Subject: Using GDAL WMS Driver Message-ID: Hi All, I'm searching for any use cases of using the new GDAL WMS driver within MapServer. The goal is to use the GDAL WMS .xml file (below) as the raster image in a mapserver layer definition (also below). I can use the xml file successfully within QGIS 9.0 and also convert it into other formats on the command line via gdal_translate. I've re-compiled MapServer to read the new GDAL install and am getting a "format not recognized" error (below) from MapServer. MapServer Layer Def: LAYER NAME "gdal_wms_test" STATUS OFF TYPE RASTER DATA "/local/path/to/gdal_wms.xml" PROJECTION "init=epsg:4326" END END GDAL XML File: 1.0.0 http://localhost/cgi-bin/wms_server? EPSG:4326 image/png wms_test_layer -105.003889 40.412778 -104.98333 40.399722 580 480 EPSG:4326 3 Here's the output of gdalinfo on the above xml file: >>$ gdalinfo gdal_wms.xml Driver: WMS/OGC Web Map Service Files: gdal_wms.xml Size is 580, 480 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.01745329251994328, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]] Origin = (-105.003889000000001,40.412778000000003) Pixel Size = (0.000035446551724,-0.000027200000000) Corner Coordinates: Upper Left (-105.0038890, 40.4127780) (105d 0'14.00"W, 40d24'46.00"N) Lower Left (-105.0038890, 40.3997220) (105d 0'14.00"W, 40d23'59.00"N) Upper Right (-104.9833300, 40.4127780) (104d58'59.99"W, 40d24'46.00"N) Lower Right (-104.9833300, 40.3997220) (104d58'59.99"W, 40d23'59.00"N) Center (-104.9936095, 40.4062500) (104d59'36.99"W, 40d24'22.50"N) Band 1 Block=1024x1024 Type=Byte, ColorInterp=Undefined Band 2 Block=1024x1024 Type=Byte, ColorInterp=Undefined Band 3 Block=1024x1024 Type=Byte, ColorInterp=Undefined The MapServer Error: msDrawMap(): Image handling error. Failed to draw layer named 'gdal_wms_test'. msDrawRaster(): Image handling error. Unrecognized or unsupported image format drawEPP(): Image handling error. EPPL7 support is not available. Any help is appreciated, thank you. Chris From siki at AGT.BME.HU Mon Nov 19 15:25:20 2007 From: siki at AGT.BME.HU (Siki Zoltan) Date: Mon, 19 Nov 2007 22:25:20 -0100 Subject: Speeding up the visualization of a shapefile with more than one million of lines {Scanned} {Scanned} In-Reply-To: Message-ID: Hi Luca, You can use scale dependent display of layers, generate a simplified layer for smaller scales (for example create a layer from the streets/public areas only). The tiled layer should be displayed only at large scales. The fasters solution is if you pregenerate the overview layer instead of on the fly generation with for example FILTER. Bye Zoltan On Mon, 19 Nov 2007, Luca Manganelli wrote: > On Nov 19, 2007 4:21 PM, Gregor Mosheh wrote: >> Hi, Luca. >> A bunch of us put our heads together and came up with a zillion ways to >> make maps faster, then posted it to the Mapserver website. Go to the >> Mapserver site, in the documentation, and look for "how do I make my >> maps faster" or "vector optimization" > > Thank you for the reply. I have already seen those pages: I have > already tiled the big shp (42 MB) into 8x8 pieces. > But my question is: > > at the highest scale, rendering an 8x8 shp of 42MB is slow. > From warmerdam at POBOX.COM Mon Nov 19 13:38:17 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Mon, 19 Nov 2007 16:38:17 -0500 Subject: Using GDAL WMS Driver In-Reply-To: Message-ID: Chris Helm wrote: > Hi All, > > I'm searching for any use cases of using the new GDAL WMS driver within > MapServer. The goal is to use the GDAL WMS .xml file (below) as the raster > image in a mapserver layer definition (also below). I can use the xml file > successfully within QGIS 9.0 and also convert it into other formats on the > command line via gdal_translate. I've re-compiled MapServer to read the new > GDAL install and am getting a "format not recognized" error (below) from > MapServer. ... > The MapServer Error: > msDrawMap(): Image handling error. Failed to draw layer named 'gdal_wms_test'. > msDrawRaster(): Image handling error. Unrecognized or unsupported image format > drawEPP(): Image handling error. EPPL7 support is not available. Chris, I *suspect* your MapServer build isn't really using the new GDAL. Either that, or possible permissions problems on the file when running as Apache. Can you try shp2img on the map? If that works, it's library ordering or permissions. If shp2img doesn't work then you can easily check libraries using ldd on shp2img, and it can't be permissions. 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 | President OSGeo, http://osgeo.org From maurerj at NSIDC.ORG Mon Nov 19 13:24:18 2007 From: maurerj at NSIDC.ORG (John Maurer) Date: Mon, 19 Nov 2007 14:24:18 -0700 Subject: Can MapServer center wrapped labels? Message-ID: Hi everybody, When using the WRAP keyword for labels, is there a way to also center them? I'm getting things like: Greenland Ice Sheet This would look a heck of a lot better on my maps centered as: Greenland Ice Sheet Or even better, if I could specify a max line length for the WRAP keyword and end up with: Greenland Ice Sheet Are either of these things possible? Couldn't find anything in the documentation so I'm guessing not?? Thanks!, John Maurer -- John Maurer Web/Database Applications Engineer National Snow and Ice Data Center (NSIDC) University of Colorado at Boulder http://cires.colorado.edu/~maurerj +1-303-735-5316 ------------------------------------ "Without geography, you're nowhere!" From CHelm at WAPA.GOV Mon Nov 19 13:51:55 2007 From: CHelm at WAPA.GOV (Christopher Helm) Date: Mon, 19 Nov 2007 14:51:55 -0700 Subject: Using GDAL WMS Driver In-Reply-To: <47420249.6050604@pobox.com> Message-ID: Frank, That's it. Works like a charm. I had to re-order my GDAL configuration scripts. Thank you. Chris From Steve.Lime at DNR.STATE.MN.US Mon Nov 19 21:52:52 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Mon, 19 Nov 2007 23:52:52 -0600 Subject: Can MapServer center wrapped labels? Message-ID: Hi John: The GD rendering software doesn't support text alignment although it's something being discussed for 5.2. One possible work around would be to use a different class expression to detect long labels and draw them differently. There's a length operator in the logical expression support so you can have different classes based on the length of a string. If you're using PostGIS perhaps there is the possibility of a custom function that would place a wrap character in the right spot based on length? Just an idea. Sorry... Steve >>> John Maurer 11/19/07 3:24 PM >>> Hi everybody, When using the WRAP keyword for labels, is there a way to also center them? I'm getting things like: Greenland Ice Sheet This would look a heck of a lot better on my maps centered as: Greenland Ice Sheet Or even better, if I could specify a max line length for the WRAP keyword and end up with: Greenland Ice Sheet Are either of these things possible? Couldn't find anything in the documentation so I'm guessing not?? Thanks!, John Maurer -- John Maurer Web/Database Applications Engineer National Snow and Ice Data Center (NSIDC) University of Colorado at Boulder http://cires.colorado.edu/~maurerj +1-303-735-5316 ------------------------------------ "Without geography, you're nowhere!" From Steve.Lime at DNR.STATE.MN.US Mon Nov 19 21:55:21 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Mon, 19 Nov 2007 23:55:21 -0600 Subject: Changing a layer's DATA via the URL in MapServer 5.0 Message-ID: Note that I believe you also need to set DATAPATTERN to a regex to restrict what values DATA can take. This isn't new but is required. Steve >>> Yewondwossen Assefa 11/19/07 8:57 AM >>> Jan, You could try something like ...&map.layer[plan]=data+amby/verzamelplan.tif This seem to work. Best Regards, Jan Hartmann wrote: > Hi, > > I'm having trouble with changing a layer's DATA in MapServer 5.0 via > the URL. In 4.10.0 the following works: > > datapattern ".*" > /cgi-bin/mapserv?map=...map&mapext=...&mapsize=...mode=map&map_layer_0_data=amby/verzamelplan.tif > > In 5.0 the same call causes the following error: > > getSymbol(): Symbol definition error. Parsing error near (0):(line 1) > > Changing the DATA part to: map_layer[0]_data, or map.layer[plan].data, > as described in the Migration Guide gives: > > loadLayer(): Unknown identifier. Parsing error near > (amby/verzamelplan.tif):(line 1) > > > Is this a bug, or am I doing something wrong? > > Jan -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From Steve.Lime at DNR.STATE.MN.US Mon Nov 19 21:57:19 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Mon, 19 Nov 2007 23:57:19 -0600 Subject: How to label for each feature base on their angle? Message-ID: For 5.0 that syntax has changed and apparently the docs haven't been updated. Instead of LABELANGLEITEM bind the LABEL ANGLE property using syntax like: ANGLE [labelangle] Steve >>> Brent Fraser 11/19/07 10:13 AM >>> Try http://mapserver.gis.umn.edu/docs/reference/mapfile/layer LABELANGLEITEM [attribute] Item name in attribute table to use for class annotation angles. Values should be in degrees. For Example: LABELANGLEITEM "LabelAngle" Brent Fraser GeoAnalytic Inc. Calgary, Alberta ----- Original Message ----- From: "L? Vi?t Thanh" To: Sent: Sunday, November 18, 2007 10:26 PM Subject: [UMN_MAPSERVER-USERS] How to label for each feature base on their angle? > I have a point shapefile with rotation angle attribute field for each > feature. How do i label these features based on that field. In mapfile, i > only set label angle for a layer but not for each feature :( > Thanks in advance > > -- > Best regards, > > Le Viet Thanh > GIS Technician - GIS Team > __________________________________ > Vietnam - Denmark VIDAGIS CO., LTD > 5 Lang Ha Str, Hanoi, Vietnam > Tel: +84 4 5145570 Fax: +84 4 5145571 > http://www.vidagis.com > Direct: thanhlv at vidagis.com +84 984 468147 > From luca76 at GMAIL.COM Mon Nov 19 23:25:17 2007 From: luca76 at GMAIL.COM (Luca Manganelli) Date: Tue, 20 Nov 2007 08:25:17 +0100 Subject: Speeding up the visualization of a shapefile with more than one million of lines {Scanned} {Scanned} In-Reply-To: Message-ID: On 11/20/07, Siki Zoltan wrote: > The fasters solution is if you pregenerate the overview layer instead of > on the fly generation with for example FILTER. what's the overview layer? From rdmailings at DUIF.NET Mon Nov 19 23:37:35 2007 From: rdmailings at DUIF.NET (Richard Duivenvoorde) Date: Tue, 20 Nov 2007 08:37:35 +0100 Subject: query postgis through wms In-Reply-To: <8d2ea9d70711190651n7bfce30ds747ff941731c0a67@mail.gmail.com> Message-ID: Hi Steven, there are some srid related places places: 1) if you added the column using AddGeometryColumn SELECT AddGeometryColumn('public', 'kaas', 'wkb_geometry_rd', 28992, 'POINT', 2) a record is added to 'geometry_columns' where you can find the srid for that table 2) every geometry in the table also holds a srid. Find out bij looking at the geometries as GML: select AsGML(wkb_geometry) from kaas or just ask for the srid: select getsrid(wkb_geometry) from kaas besides that be sure your projection is defined in the spatial_ref_sys table (and if you reproject, into the proj definitions of mapserver). But 31300 ("Belge 1972 / Belge Lambert 72") shouldn't be the problem. Biggest problem is probably that mapserver asks for 31300, and your columns OR you geometry_columns -table hold different OR mixed(!) srids. Be sure your data is all one srid and the srid-value in geometry_columns corresponds to that. It's very easy to reproject in postgis: First add a new column with the new epsg (for example 4326): SELECT AddGeometryColumn('public', 'kaas', 'wkb_geometry_4326', 4326, 'POINT', 2) then fill it using: UPDATE kaas SET wkb_geometry_4326 = Transform(wkb_geometry, 4326) If your data is ok, it doesn't mather anymore what mapserver is calling for, because (if the srid/epsg is defined in the web-part of you mapfile) mapserver will reproject it anyway. Hope this helps a little :-) Groeten, Richard Duivenvoorde Steven De Vriendt wrote: > How can I see what SRID the data is using ? I'm quite new to all this... > > Steven > > On Nov 19, 2007 3:41 PM, Marcos S?nchez Provencio > wrote: > > Try using the srid your data is stored in instead of 31300. You might > use the function getsrid > > SELECT getsrid(the_geom) from b_capa_percid limit 1; > > > El lun, 19-11-2007 a las 15:26 +0100, Steven De Vriendt escribi?: > > Marcos, > > > > When I try your suggestion Mapserver returns: > > > > ? > > > > ? > > > > > > msDrawMap(): Image handling error. Failed to draw layer named > > 'percelen'. > > msPOSTGISLayerWhichShapes(): Query error. Error executing POSTGIS SQL > > statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT > > asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from > > (SELECT * FROM b_capa_percid) AS foo WHERE the_geom && > > setSRID('BOX3D( 76945.5918856108 189996.502536997,91328.1081143621 > > 201805.497460877)'::BOX3D, 31300 ) > > -ERROR: Operation on two geometries with different SRIDs > > > > > > > > > > > > On Nov 19, 2007 3:19 PM, Marcos S?nchez Provencio > > > wrote: > > try > > DATA "the_geom from (SELECT * FROM b_capa_percid) as foo > > using srid=31300 using unique gid" > > > > > > > > El lun, 19-11-2007 a las 09:48 +0100, Steven De Vriendt > > escribi?: > > > > > DATA "the_geom from b_capa_percid" > > > > > > > > From siki at AGT.BME.HU Tue Nov 20 01:57:40 2007 From: siki at AGT.BME.HU (Siki Zoltan) Date: Tue, 20 Nov 2007 08:57:40 -0100 Subject: Speeding up the visualization of a shapefile with more than one million of lines {Scanned} {Scanned} {Scanned} In-Reply-To: Message-ID: Overview in this case means a new layer which is generated from the original but contains fewer details, my tipp was to create a layer containincg only public area parcels (streets) only. Zoltan On Tue, 20 Nov 2007, Luca Manganelli wrote: > On 11/20/07, Siki Zoltan wrote: >> The fasters solution is if you pregenerate the overview layer instead of >> on the fly generation with for example FILTER. > > what's the overview layer? > From conti_lui at GVA.ES Tue Nov 20 00:04:06 2007 From: conti_lui at GVA.ES (Luis Conti) Date: Tue, 20 Nov 2007 02:04:06 -0600 Subject: Problems with Java Mapscript Message-ID: Thankyou very much Umberto, now works fine. I have compiled mapserver v5 and Java mapscript have worked correctly. Bye. Luis Conti From vishu_73ns at YAHOO.COM Tue Nov 20 00:57:09 2007 From: vishu_73ns at YAHOO.COM (Vishal Nagpal) Date: Tue, 20 Nov 2007 02:57:09 -0600 Subject: NEW Mapserver Application Message-ID: I have been working with mapserver to learn the basics. I have learnt about accessing GDAL/OGR files , Mysql data Postgres Data cartoweb demo , and other features of zooming panning using cgi and mapscripts. Now I wish to start developing my application, Question 1 Can somebody suggest which is the best option to develop my application CGI or Mapscript.. Question 2 Which is the best software available for developing user interface. (Cartography). Is their a basic version available as a start point. like mapserver itasca demo. Thanks, Regards, Vishal From gisaalter at GMAIL.COM Tue Nov 20 01:09:50 2007 From: gisaalter at GMAIL.COM (Steven De Vriendt) Date: Tue, 20 Nov 2007 10:09:50 +0100 Subject: NEW Mapserver Application In-Reply-To: Message-ID: Vishal, I suggest you take a look at the ms4w package. After that you can install optional packages as Chameleon, MapLab,...which will help you sorting out a user interface. They come in standard with zoom, pan, etc...function you will need. Or you can use CartoWeb. Steven On Nov 20, 2007 9:57 AM, Vishal Nagpal wrote: > I have been working with mapserver to learn the basics. > I have learnt about accessing GDAL/OGR files , Mysql data Postgres Data > cartoweb demo , and other features of zooming panning using cgi and > mapscripts. > Now I wish to start developing my application, > Question 1 Can somebody suggest which is the best option to develop my > application CGI or Mapscript.. > Question 2 Which is the best software available for developing user > interface. (Cartography). Is their a basic version available as a start > point. like mapserver itasca demo. > Thanks, > Regards, > Vishal > -------------- next part -------------- An HTML attachment was scrubbed... URL: From henric at ERNSTSON.NU Tue Nov 20 01:41:19 2007 From: henric at ERNSTSON.NU (Henric Ernstson) Date: Tue, 20 Nov 2007 10:41:19 +0100 Subject: Some easy help with IIS Message-ID: Have I misunderstood any thing or shall I first install ms4w as usual and then go to the http://mapserver.gis.umn.edu/docs/howto/setupiis/?searchterm=IIS and fix the ini-files.. -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.L.H.Hartmann at UVA.NL Tue Nov 20 01:45:13 2007 From: J.L.H.Hartmann at UVA.NL (Jan Hartmann) Date: Tue, 20 Nov 2007 10:45:13 +0100 Subject: Changing a layer's DATA via the URL in MapServer 5.0 Message-ID: Yes, that did it, thanks Assefa, Steve. It actually said so in the CGI Reference Guide, with an example of the different calls for MapServer 4 and 5, so next time I'm going to read the manual completely to the end :-) Jan ________________________________ From: UMN MapServer Users List on behalf of Steve Lime Sent: Tue 11/20/2007 6:55 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] Changing a layer's DATA via the URL in MapServer 5.0 Note that I believe you also need to set DATAPATTERN to a regex to restrict what values DATA can take. This isn't new but is required. Steve >>> Yewondwossen Assefa 11/19/07 8:57 AM >>> Jan, You could try something like ...&map.layer[plan]=data+amby/verzamelplan.tif This seem to work. Best Regards, Jan Hartmann wrote: > Hi, > > I'm having trouble with changing a layer's DATA in MapServer 5.0 via > the URL. In 4.10.0 the following works: > > datapattern ".*" > /cgi-bin/mapserv?map=...map&mapext=...&mapsize=...mode=map&map_layer_0_data=amby/verzamelplan.tif > > In 5.0 the same call causes the following error: > > getSymbol(): Symbol definition error. Parsing error near (0):(line 1) > > Changing the DATA part to: map_layer[0]_data, or map.layer[plan].data, > as described in the Migration Guide gives: > > loadLayer(): Unknown identifier. Parsing error near > (amby/verzamelplan.tif):(line 1) > > > Is this a bug, or am I doing something wrong? > > Jan -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From vishu_73ns at YAHOO.COM Tue Nov 20 01:52:52 2007 From: vishu_73ns at YAHOO.COM (Vishal Nagpal) Date: Tue, 20 Nov 2007 03:52:52 -0600 Subject: NEW Mapserver Application Message-ID: Hi, Thanks for the quick reply, But I am working on a Linux Server and already have a mapserver working with CGI and cartoweb3. My query is should i start developing my application in CGI OR Mapscript, and if mapscript then js or php. Regards, vishal From mapserver at GISMAP.CH Tue Nov 20 03:16:26 2007 From: mapserver at GISMAP.CH (Roman Meier) Date: Tue, 20 Nov 2007 12:16:26 +0100 Subject: Truncated Output Message-ID: Hi list We face a strange behaviour on a clients webserver. We recently changed the webserver hardware. Everything went on just fine. We face problems using the umn mapserver cgi. The output is truncated !!! The code ends when parsing of [legend] should start. We work with umn mapserver for so many years now and I haven?t ever heard of a problem similar to that. I beleave that the problem doesn?t come from umn mapserver. However - has anybody faced a similar problem? Thanks in advance Roman From marcos at BURKE.ATH.CX Tue Nov 20 03:47:11 2007 From: marcos at BURKE.ATH.CX (Marcos =?ISO-8859-1?Q?S=E1nchez?= Provencio) Date: Tue, 20 Nov 2007 12:47:11 +0100 Subject: NEW Mapserver Application In-Reply-To: Message-ID: Everyone could tell their own experience. As a client, you might try mapbuilder . Start with the cgi. If it is not enough, try your own programming in whatever language you are confortable in (I am using Django+Python mapscript, for example). El mar, 20-11-2007 a las 02:57 -0600, Vishal Nagpal escribi?: > I have been working with mapserver to learn the basics. > I have learnt about accessing GDAL/OGR files , Mysql data Postgres Data > cartoweb demo , and other features of zooming panning using cgi and mapscripts. > Now I wish to start developing my application, > Question 1 Can somebody suggest which is the best option to develop my > application CGI or Mapscript.. > Question 2 Which is the best software available for developing user > interface. (Cartography). Is their a basic version available as a start > point. like mapserver itasca demo. > Thanks, > Regards, > Vishal From dmorissette at MAPGEARS.COM Tue Nov 20 05:09:18 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Tue, 20 Nov 2007 08:09:18 -0500 Subject: Truncated Output In-Reply-To: <1195557386.4742c20adef91@www.mail2web.ch> Message-ID: Roman Meier wrote: > Hi list > > We face a strange behaviour on a clients webserver. We recently changed the > webserver hardware. Everything went on just fine. We face problems using the > umn mapserver cgi. The output is truncated !!! The code ends when parsing of > [legend] should start. > > We work with umn mapserver for so many years now and I haven?t ever heard of a > problem similar to that. I beleave that the problem doesn?t come from umn > mapserver. However - has anybody faced a similar problem? > There was an issue with large legends being truncated (or being completely absent) that's been fixed in V5.0: http://trac.osgeo.org/mapserver/ticket/1946 If you can't upgrade to 5.0 right away then you could possibly patch your current install locally as the fix is fairly simple: http://trac.osgeo.org/mapserver/changeset/6504 Daniel -- Daniel Morissette http://www.mapgears.com/ From rabrant at GMAIL.COM Tue Nov 20 05:44:42 2007 From: rabrant at GMAIL.COM (Brant Anderson) Date: Tue, 20 Nov 2007 07:44:42 -0600 Subject: NEW Mapserver Application In-Reply-To: Message-ID: >> Question 1 Can somebody suggest which is the best option to develop my >> application CGI or Mapscript.. I agree with Marcos. The CGI is a good starting point to get your feet wet. That's where I began. Until one day I decided to take the leap. I'd recommend using MapScript with a language that you're comfortable with. I tried MapScript using Python. I found that I could develop an app easier using MapScript than with the CGI. Eventually, I started developing Ruby on Rails apps. So I thought I'd give Ruby/MapScript a try. I'm not sure what has changed in Ruby/MapScript since the 5.0.0 release. But I found that my application was buggy when I switched from 4 to 5. If you're going to try Ruby/MapScript, I'd recommend using version 4.10 of MapServer. >> Question 2 Which is the best software available for developing user >> interface. (Cartography). Is their a basic version available as a start >> point. like mapserver itasca demo. You stated that you're using Linux. You might want to look into Quantum GIS. I think there is a MapServer Mapfile Export feature. I haven't tried it, so I'm not sure how it works. Best Regards, Brant -------------- next part -------------- An HTML attachment was scrubbed... URL: From linda.rawson at GMAIL.COM Tue Nov 20 08:52:48 2007 From: linda.rawson at GMAIL.COM (Linda Rawson) Date: Tue, 20 Nov 2007 10:52:48 -0600 Subject: WMS Http Proxy Message-ID: An HTML attachment was scrubbed... URL: From arndw at WTAL.DE Tue Nov 20 09:06:05 2007 From: arndw at WTAL.DE (Arnd Wippermann) Date: Tue, 20 Nov 2007 18:06:05 +0100 Subject: AW: [UMN_MAPSERVER-USERS] getCapabilities not valid XML (MSXML) In-Reply-To: <4739A3B8.9010407@geodan.nl> Message-ID: Hello, I have no problem to request and parse the MapServer GetCapabilites.xml on IE7 with "MSXML2.DOMDocument.6.0" or "MSXML2.DOMDocument.4.0". Perhaps because I have set xmlDoc.validateOnParse = false;, but I haven't it verified. Mit freundlichen Gr?ssen Arnd Wippermann http://gis.ibbeck.de/ginfo/ -----Urspr?ngliche Nachricht----- Von: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Im Auftrag von Steven M. Ottens Gesendet: Dienstag, 13. November 2007 14:17 An: MAPSERVER-USERS at LISTS.UMN.EDU Betreff: [UMN_MAPSERVER-USERS] getCapabilities not valid XML (MSXML) Hi all, My mapbuilder/openlayers application wasn't working on IE7, it complained that the WMS getCapabilities doc generated by Mapserver wasn't valid XML. I've finally tracked it down to the doctype declaration: Mapserver produces ]> The parser removes both the tag and the tag from the XML before parsing. So normally the to-be-parsed XML text starts with: Which is a valid piece of XML However MSXML apparently thinks that the closing > after EMPTY belongs to the opening < before !DOCTYPE. So instead now the XML text starts with: ]> Which obviously isn't valid XML and MSXML fails. So my questions: -Anyone else noticed this problem? -Why is there an (empty!) ELEMENT declaration within the DOCTYPE? -How can I remove this ELEMENT? Regards, Steven From ciraudo at CT.INGV.IT Tue Nov 20 10:35:10 2007 From: ciraudo at CT.INGV.IT (Alessia Ciraudo) Date: Tue, 20 Nov 2007 19:35:10 +0100 Subject: mapserver and animated gif Message-ID: Dear all. Can mapserver manage animated gif? In particular in my application I have a layer, representing the topography of the ground, on which I would show a flow. So, in the map file I have LAYER NAME dem TYPE RASTER STATUS ON DATA dem.tif END LAYER NAME flow TYPE RASTER STATUS ON DATA flow.gif OFFSITE 255 255 255 TRANSPARENCY 100 END but I see only the first frame of the animation. Can you help me? thank you! Alessia ________________________________________________________________ Sent via the WebMail system at mail.ct.ingv.it From jimlug at CO.CLACKAMAS.OR.US Tue Nov 20 13:37:25 2007 From: jimlug at CO.CLACKAMAS.OR.US (ClackJim) Date: Tue, 20 Nov 2007 13:37:25 -0800 Subject: search.xml -pMapper Message-ID: Aloha, Is there a way to make the search.xml file within pMapper Dynamic? Currently you manually enter the layers that would display in the search dialog box. However, I only want to add layers that are active in the table of contents. Any help would be greatly appreciated. Thanks. -- View this message in context: http://www.nabble.com/search.xml--pMapper-tf4846502.html#a13866153 Sent from the Mapserver - User mailing list archive at Nabble.com. From simon at SIBERN.COM.AU Tue Nov 20 16:15:08 2007 From: simon at SIBERN.COM.AU (Simon Haddon) Date: Wed, 21 Nov 2007 11:15:08 +1100 Subject: raster with large grid cell size shifting Message-ID: Hi, I wasn't quiet sure what subject heading to give this problem. I hope it is ok. I have a map file which creates maps in decimal degrees. The data is a mix raster and vector. It is the raster data which I am having trouble with. If I have any raster data with a large grid cell size (ie: 25 km) the generated map always has complete pixels (cells) created. There are never any truncated pixels. As a result pixels don't even maintain their correct relative position and can be seen differently, compared to the overlayed point and polygon data, depending on how fair you move or resize the map. If I move the map a whole pixel cell size the pixels redraw in their correct position. If a move the map 1/2 a pixel cell size then the pixels move to fit the image. This can also extend to stretching the pixel cells to always ensure that a complete set of cells are displayed on the map Has anyone had any experience with this problem and does anyone have any suggestions about how to fix it. -------------- next part -------------- A non-text attachment was scrubbed... Name: mui.map Type: application/octet-stream Size: 3412 bytes Desc: not available URL: From rabrant at GMAIL.COM Wed Nov 21 00:29:10 2007 From: rabrant at GMAIL.COM (Brant Anderson) Date: Wed, 21 Nov 2007 02:29:10 -0600 Subject: NEW Mapserver Application In-Reply-To: <140869.48817.qm@web58204.mail.re3.yahoo.com> Message-ID: With the CGI you are passing arguments to the URL. The Mapfile has templates that it parses to create different views. With MapScript you are manipulating the map through code. In your case you would be using .NET MapScript API calls. Using MapScript, as far as I know, the templates are not used. Instead you'll have to write your own views. Steve's mapserv.js manipulates the CGI argument string. Look at the code for that, it has a wealth of starting point knowledge. http://maps.dnr.state.mn.us/tools/dbox/ In my opinion, the MapScript API is easier to work with because if you already know a web-programming language, you only need to learn the API; you don't need to figure out how to setup templates or how to manipulate the CGI argument string. Also, read this post: http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0311/msg00147.html To answer the unanswered question from that post: >>Why would I want to use Mapscript? You have favorite a web-programming language you like to write applications with. >>Which benefits does it give me? More flexible application development. A smaller learning curve (for me anyway). >>Simply better control? Yes. IMHO. Hope that helps, Brant On Nov 21, 2007 12:18 AM, Saka Royban wrote: > Hi > can i ask a basic question? > what's the difference between using Mapscript and CGI? > i'm a bit familiar with Asp.net and its architecture of web programming > but i'm confused about the different ways of prgramming UMN mapserver. > THX > > ----- Original Message ---- > From: Brant Anderson > To: MAPSERVER-USERS at LISTS.UMN.EDU > Sent: Tuesday, November 20, 2007 5:14:42 PM > Subject: Re: [UMN_MAPSERVER-USERS] NEW Mapserver Application > > >> Question 1 Can somebody suggest which is the best option to develop > my > >> application CGI or Mapscript.. > I agree with Marcos. The CGI is a good starting point to get your feet > wet. That's where I began. Until one day I decided to take the leap. I'd > recommend using MapScript with a language that you're comfortable with. > > I tried MapScript using Python. I found that I could develop an app easier > using MapScript than with the CGI. > > Eventually, I started developing Ruby on Rails apps. So I thought I'd give > Ruby/MapScript a try. I'm not sure what has changed in Ruby/MapScript since > the 5.0.0 release. But I found that my application was buggy when I > switched from 4 to 5. If you're going to try Ruby/MapScript, I'd recommend > using version 4.10 of MapServer. > > >> Question 2 Which is the best software available for developing user > >> interface. (Cartography). Is their a basic version available as a start > >> point. like mapserver itasca demo. > You stated that you're using Linux. You might want to look into Quantum > GIS. I think there is a MapServer Mapfile Export feature. I haven't tried > it, so I'm not sure how it works. > > Best Regards, > Brant > > > ------------------------------ > Get easy, one-click access to your favorites. Make Yahoo! your homepage. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From warmerdam at POBOX.COM Wed Nov 21 07:13:53 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Wed, 21 Nov 2007 10:13:53 -0500 Subject: raster with large grid cell size shifting In-Reply-To: <20253.143.188.101.65.1195604108.squirrel@calippo.sibern.com.au> Message-ID: Simon Haddon wrote: > Hi, > > I wasn't quiet sure what subject heading to give this problem. I hope it > is ok. > > I have a map file which creates maps in decimal degrees. The data is a > mix raster and vector. It is the raster data which I am having trouble > with. > > If I have any raster data with a large grid cell size (ie: 25 km) the > generated map always has complete pixels (cells) created. There are never > any truncated pixels. As a result pixels don't even maintain their > correct relative position and can be seen differently, compared to the > overlayed point and polygon data, depending on how fair you move or resize > the map. > > If I move the map a whole pixel cell size the pixels redraw in their > correct position. If a move the map 1/2 a pixel cell size then the pixels > move to fit the image. This can also extend to stretching the pixel cells > to always ensure that a complete set of cells are displayed on the map > > Has anyone had any experience with this problem and does anyone have any > suggestions about how to fix it. Simon, This is due to an optimization in MapServer to use the GDAL RasterIO() call for up/down sampling. The net result is that requests are always made on "pixel boundaries" and you get the result you see. If you add the line: PROCESSING "RESAMPLE=NEAREST" then MapServer will use a more general resampling code chunk which will give better results, but at some performance cost. 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 | President OSGeo, http://osgeo.org From schroeter at NETGIS.DE Wed Nov 21 07:11:29 2007 From: schroeter at NETGIS.DE (Sven Schroeter) Date: Wed, 21 Nov 2007 16:11:29 +0100 Subject: no rasterlayer with resample if Query Message-ID: Hallo, I'm using Mapserver 4.10 as cgi on a Windows 2003 Server with IIS 6. If I use antialiasing (PROCESSING "Resample=average") on a rasterlayer ("tk100") and start a query on any other vectorlayer the rasterlayer disapears and only the vector layer is hilited. If I delete the PROCCESSING the rasterlayer is visible and the vector layer is hilited. Mapfile: ... IMAGETYPE jpeg OUTPUTFORMAT NAME jpeg DRIVER "GD/JPEG" MIMETYPE "image/jpeg" IMAGEMODE RGB EXTENSION "jpg" FORMATOPTION "QUALITY=100" END QUERYMAP STATUS ON STYLE HILITE COLOR 255 240 0 END LAYER NAME "tk100" STATUS ON DATA tk100/lux100.tif TYPE RASTER PROCESSING "Resample=average" END ... any idea? Thanks Sven From warmerdam at POBOX.COM Wed Nov 21 07:54:29 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Wed, 21 Nov 2007 10:54:29 -0500 Subject: no rasterlayer with resample if Query In-Reply-To: <002801c82c50$cb68d4b0$1cb2a8c0@sven> Message-ID: Sven Schroeter wrote: > Hallo, > I'm using Mapserver 4.10 as cgi on a Windows 2003 Server with IIS 6. > If I use antialiasing (PROCESSING "Resample=average") on a rasterlayer > ("tk100") and start a query on any other vectorlayer the rasterlayer > disapears and only the vector layer is hilited. If I delete the PROCCESSING > the rasterlayer is visible and the vector layer is hilited. > Mapfile: > ... > IMAGETYPE jpeg > OUTPUTFORMAT > NAME jpeg > DRIVER "GD/JPEG" > MIMETYPE "image/jpeg" > IMAGEMODE RGB > EXTENSION "jpg" > FORMATOPTION "QUALITY=100" > END > > QUERYMAP > STATUS ON > STYLE HILITE > COLOR 255 240 0 > END > > LAYER > NAME "tk100" > STATUS ON > DATA tk100/lux100.tif > TYPE RASTER > PROCESSING "Resample=average" > END > ... > > any idea? > Thanks Sven Sven, Wow, mysterious. If this is happening with MapServer 5 and you can submit a bug report that makes it really really really easy for me to reproduce I'll try and look into it. If it isn't really really really easy for me to reproduce, I'll almost certainly get distracted and never return to the issue for years. But I would like to fix it if there is a problem. 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 | President OSGeo, http://osgeo.org From woodbri at SWOODBRIDGE.COM Wed Nov 21 08:20:36 2007 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Wed, 21 Nov 2007 11:20:36 -0500 Subject: NEW Mapserver Application In-Reply-To: <3d7e96b90711210029o279510dana24647d825b0cdc5@mail.gmail.com> Message-ID: Another strategy would be using OpenLayers as the client layer, and mapserver CGI as the renderer called from OpenLayers and if you need customized applications, write REST/AJax/JSON based applets on the server in Perl/PHP/Python/Java/etc to service the Javascript in your client and build a real Web 2.0 application. -Steve W Brant Anderson wrote: > With the CGI you are passing arguments to the URL. The Mapfile has > templates that it parses to create different views. With MapScript you > are manipulating the map through code. In your case you would be using > .NET MapScript API calls. Using MapScript, as far as I know, the > templates are not used. Instead you'll have to write your own views. > > Steve's mapserv.js manipulates the CGI argument string. Look at the code > for that, it has a wealth of starting point knowledge. > http://maps.dnr.state.mn.us/tools/dbox/ > > > In my opinion, the MapScript API is easier to work with because if you > already know a web-programming language, you only need to learn the API; > you don't need to figure out how to setup templates or how to manipulate > the CGI argument string. > > Also, read this post: > http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0311/msg00147.html > > To answer the unanswered question from that post: > >>Why would I want to use Mapscript? > You have favorite a web-programming language you like to write > applications with. > > >>Which benefits does it give me? > More flexible application development. A smaller learning curve (for me > anyway). > > >>Simply better control? > Yes. IMHO. > > > Hope that helps, > Brant > > > On Nov 21, 2007 12:18 AM, Saka Royban < srph124 at yahoo.com > > wrote: > > Hi > can i ask a basic question? > what's the difference between using Mapscript and CGI? > i'm a bit familiar with Asp.net and its > architecture of web programming but i'm confused about the different > ways of prgramming UMN mapserver. > THX > > ----- Original Message ---- > From: Brant Anderson > > To: MAPSERVER-USERS at LISTS.UMN.EDU > Sent: Tuesday, November 20, 2007 5:14:42 PM > Subject: Re: [UMN_MAPSERVER-USERS] NEW Mapserver Application > > >> Question 1 Can somebody suggest which is the best option to > develop my > >> application CGI or Mapscript.. > I agree with Marcos. The CGI is a good starting point to get your > feet wet. That's where I began. Until one day I decided to take the > leap. I'd recommend using MapScript with a language that you're > comfortable with. > > I tried MapScript using Python. I found that I could develop an app > easier using MapScript than with the CGI. > > Eventually, I started developing Ruby on Rails apps. So I thought > I'd give Ruby/MapScript a try. I'm not sure what has changed in > Ruby/MapScript since the 5.0.0 release. But I found that my > application was buggy when I switched from 4 to 5. If you're going > to try Ruby/MapScript, I'd recommend using version 4.10 of MapServer. > > >> Question 2 Which is the best software available for developing > user > >> interface. (Cartography). Is their a basic version available as > a start > >> point. like mapserver itasca demo. > You stated that you're using Linux. You might want to look into > Quantum GIS. I think there is a MapServer Mapfile Export feature. I > haven't tried it, so I'm not sure how it works. > > Best Regards, > Brant > > > Get easy, one-click access to your favorites. Make Yahoo! your > homepage. > > From mhoward at AKIMEKATECH.COM Wed Nov 21 09:39:15 2007 From: mhoward at AKIMEKATECH.COM (Mark Howard) Date: Wed, 21 Nov 2007 07:39:15 -1000 Subject: PROBLEMS Reprojecting using cascading WMS Message-ID: I'm using terraserver in ArcMap as a background, but the service does not support NAD27 - epsg:4267. So there's a problem with data alignment as the service is WGS84. I thought I'd create a map service and cascade /reproject to solve the problem -- i.e. specify in NAD27 the map file and WGS84 in the layer for the terraserver WMS service (see below) BUT there are 2 problems: 1. The image does not seem to reproject - seems the same when I define the map file epsg as 4267 or 4326. 2. The image seems to get resampled down no matter if I specify PNG, JPEG or TIFF. Loses a lot of detail. Any ideas on fixing these issues?? THANKS!! Mark ************************************ MAP FILE STUFF ******************************* PROJECTION "init=epsg:4267" END LAYER NAME "terraserver" TYPE RASTER STATUS ON CONNECTIONTYPE WMS CONNECTION "http://terraservice.net/ogcmap.ashx?" PROJECTION "init=epsg:4326" END METADATA "wms_srs" "EPSG:4326" "wms_title" "DOQ" "wms_name" "DOQ" "wms_server_version" "1.1.1" "wms_format" "image/png" END END From simon at SIBERN.COM.AU Wed Nov 21 13:05:53 2007 From: simon at SIBERN.COM.AU (Simon Haddon) Date: Thu, 22 Nov 2007 08:05:53 +1100 Subject: raster with large grid cell size shifting In-Reply-To: <47444B31.4050106@pobox.com> Message-ID: Hi Frank, Thank you very much. I have been ripping my hair out over that one. Cheers, Simon Frank Warmerdam wrote: > Simon Haddon wrote: >> Hi, >> >> I wasn't quiet sure what subject heading to give this problem. I >> hope it >> is ok. >> >> I have a map file which creates maps in decimal degrees. The data is a >> mix raster and vector. It is the raster data which I am having trouble >> with. >> >> If I have any raster data with a large grid cell size (ie: 25 km) the >> generated map always has complete pixels (cells) created. There are >> never >> any truncated pixels. As a result pixels don't even maintain their >> correct relative position and can be seen differently, compared to the >> overlayed point and polygon data, depending on how fair you move or >> resize >> the map. >> >> If I move the map a whole pixel cell size the pixels redraw in their >> correct position. If a move the map 1/2 a pixel cell size then the >> pixels >> move to fit the image. This can also extend to stretching the pixel >> cells >> to always ensure that a complete set of cells are displayed on the map >> >> Has anyone had any experience with this problem and does anyone have any >> suggestions about how to fix it. > > Simon, > > This is due to an optimization in MapServer to use the GDAL RasterIO() > call > for up/down sampling. The net result is that requests are always made > on "pixel boundaries" and you get the result you see. If you add the > line: > > PROCESSING "RESAMPLE=NEAREST" > > then MapServer will use a more general resampling code chunk which > will give > better results, but at some performance cost. > > Best regards, From Bob.Bruce at GOV.MB.CA Wed Nov 21 21:22:15 2007 From: Bob.Bruce at GOV.MB.CA (Bob Bruce) Date: Wed, 21 Nov 2007 23:22:15 -0600 Subject: Premature end of script headers Message-ID: Problem solved - so far. Chris M had a look at the server and found that the mapserv binary was owned by root and that apache was running suexec and restricting access to the CGI to the user running the website. So the ownership of the mapserv binary had to be changed to the user running the website and then users from the WWW could run mapserv. Bob From bradley_mclain at DEBORTOLIWINES.COM Wed Nov 21 22:42:40 2007 From: bradley_mclain at DEBORTOLIWINES.COM (Bradley McLain) Date: Thu, 22 Nov 2007 17:42:40 +1100 Subject: GIS Project Message-ID: Currently I am working on an Open Source GIS project and was looking for some advice on which way to go with it. What I am trying to do is use an openlayers front end which is queryable and searchable to display custom geodata (raster and vector) of our business using Google Maps as the backdrop. Currently I have Mapserver serving the custom data and OpenLayers importing and meshing it with Google maps (with some projection errors causing the maps to not line up perfect, but thats another topic for another day). I want to then hopefully use Openlayers to create a search function so users can search addresses of salespersons, growers etc and then they will be extracted from a database and the relevant data displayed. This data needs to be easily maintainable so it can be regularly and easily be updated. I have read a little about the postgreSQL database and PostGIS backend and was thinking about using this to house my salepersons etc data. However I have no knowledge or either of these programs. How do you suggest I go about this? Is what I am trying to do achievable? Has anything like this been done before and are there links to it? I would be very interested to hear all of your opinions on this and any tips or hints you may have. Cheers Brad -------------- next part -------------- An HTML attachment was scrubbed... URL: From el.migno at POST.CZ Wed Nov 21 23:01:53 2007 From: el.migno at POST.CZ (=?us-ascii?Q?Milan=20Lazecky?=) Date: Thu, 22 Nov 2007 08:01:53 +0100 Subject: PHP_OGR problem Message-ID: Hi everybody. Does anybody of you have experience with php_ogr.dll in Windows? I can't make it work :-( When I try in command line php.exe -q ogr2ogr.php...... it works great! But when I try to run it in a web browser (yes I have edited the example files to work in the browser), it gives an "Access denied" error for php_ogr.dll. Maybe I have some dependency problem, but I used the Dependency Walker for this library and it seems to be ok (well, I had to find a msjava.dll file on the web). All the libraries included in ms4w installation file I have copied into the C:\PHP folder (and this folder is also in system PATH). I really am confused, I don't know what I do wrong. PHP is in the newest version, php_ogr is from the ms4w newest version. Thank you very much! Milan From guillaume.sueur at NEOGEO-ONLINE.NET Thu Nov 22 00:31:27 2007 From: guillaume.sueur at NEOGEO-ONLINE.NET (Guillaume Sueur) Date: Thu, 22 Nov 2007 09:31:27 +0100 Subject: PHP_OGR problem In-Reply-To: <7153.16239-30481-1668295363-1195714913@post.cz> Message-ID: Hi Milan, Maybe you're running IIS6 and you must explicitely authorize php_ogr.dll to be used by the internet user. I don't remember precisely, but it should be somewhere under the IIS administration console. Hope that helps Milan Lazecky a ?crit : > Hi everybody. > Does anybody of you have experience with php_ogr.dll in Windows? > I can't make it work :-( > When I try in command line php.exe -q ogr2ogr.php...... it works great! > But when I try to run it in a web browser (yes I have edited the example files to work in the browser), it gives an "Access denied" error for php_ogr.dll. > Maybe I have some dependency problem, but I used the Dependency Walker for this library and it seems to be ok (well, I had to find a msjava.dll file on the web). All the libraries included in ms4w installation file I have copied into the C:\PHP folder (and this folder is also in system PATH). I really am confused, I don't know what I do wrong. > PHP is in the newest version, php_ogr is from the ms4w newest version. > Thank you very much! > Milan > -- Guillaume SUEUR Expert SIG et OpenSource NEOGEO 46 RUE MATABIAU 31000 TOULOUSE 06 65 58 88 82 Site web : http://www.neogeo-online.net -------------- next part -------------- A non-text attachment was scrubbed... Name: guillaume_sueur.vcf Type: text/x-vcard Size: 310 bytes Desc: not available URL: From gagan.bansal at RELIANCEADA.COM Thu Nov 22 01:38:49 2007 From: gagan.bansal at RELIANCEADA.COM (Gagan Bansal) Date: Thu, 22 Nov 2007 03:38:49 -0600 Subject: under laid layer does not diplay Message-ID: Hi I am displaying many layers with different classes inside the layers. the data I am accessing from oracle spatial. I am not able to display the under laid layers only top layer is getting displayed. enclosed is the sample map file. thanks Gagan -------------- next part -------------- MAP # # Start of map file # # Sample map file for a chameleon app. # NAME DEMO STATUS ON SIZE 1200 900 SYMBOLSET ../etc/symbols.sym #EXTENT 270000 2100000 279000 2110000 EXTENT -197273 789426 2735369 4103591 UNITS METERS SHAPEPATH "../data1" IMAGECOLOR 255 255 255 FONTSET ../etc/fonts.txt TRANSPARENT OFF OUTPUTFORMAT NAME png24 DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE RGB EXTENSION "png" END # # Start of web interface definition # WEB #MINSCALE 2000000 #MAXSCALE 50000000 MAXSCALE 16125993 # # On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the root # of the drive where the .MAP file resides. # IMAGEPATH "/ms4w/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" # LOG "/tmp/gmap.log" METADATA END END # # Start of reference map # REFERENCE IMAGE images/keymap.gif EXTENT 270000 2100000 279000 2110000 STATUS ON COLOR -1 -1 -1 OUTLINECOLOR 255 0 0 SIZE 120 90 END PROJECTION "init=epsg:32643" END # Start of layer definitions #----------------Building-------# LAYER GROUP "Polygon" NAME "build_utm" CONNECTIONTYPE oraclespatial CONNECTION "scott/bigmaps at orcl" #DATA building DATA "GEOM FROM BUILD_UTM USING UNIQUE OBJECTID SRID 32643 VERSION 10g" #DATA "GEOM FROM (select t.geom,t.objectid,t.bldgname from build_utm t where SDO_WITHIN_DISTANCE(t.geom, SDO_GEOMETRY(2001,32643,SDO_POINT_TYPE( 273977.776, 2104464.25,NULL),NULL,NULL), 'distance =1000 querytype=FILTER') = 'TRUE') USING UNIQUE OBJECTID SRID 32643 VERSION 10g" METADATA "DESCRIPTION" "building" "RESULT_FIELDS" "BLDGNAME" "GROUP" "Polygon" "LAYER" "build_utm" "QUERYABLE" "TRUE" "SEARCHFIELD" "OBJECTID" END TYPE POLYGON STATUS OFF CLASS NAME "BUILDING" COLOR 200 255 0 OUTLINECOLOR 120 120 120 TEMPLATE "C:/ttt_query1.html" END TOLERANCE 5 END # Layer ##########LAYER States ############## LAYER GROUP "Polygon" NAME "states_utm" CONNECTIONTYPE oraclespatial CONNECTION "scott/bigmaps at orcl" DATA "GEOM FROM states_utm USING UNIQUE OBJECTID SRID 32643 VERSION 10g" METADATA "DESCRIPTION" "States" "RESULT_FIELDS" "STATENAME" "GROUP" "Polygon" "LAYER" "states_utm" "QUERYABLE" "TRUE" "SEARCHFIELD" "OBJECTID" END TYPE POLYGON STATUS ON CLASS NAME "States" COLOR 255 255 190 OUTLINECOLOR 0 0 0 #OUTLINEWIDTH 0.40 TEMPLATE "C:/ttt_query1.html" END TOLERANCE 5 END # Layer ##########LAYER ############## ##########LAYER City ############## LAYER GROUP "Polygon" NAME "city_utm" CONNECTIONTYPE oraclespatial CONNECTION "scott/bigmaps at orcl" DATA "GEOMPG FROM city_UTM USING UNIQUE OBJECTID SRID 32643 VERSION 10g" METADATA "DESCRIPTION" "City" "RESULT_FIELDS" "CITY" "GROUP" "Polygon" "LAYER" "city_utm" "QUERYABLE" "TRUE" "SEARCHFIELD" "OBJECTID" END TYPE POLYGON STATUS ON CLASS NAME "City" COLOR 255 255 240 OUTLINECOLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END TOLERANCE 5 END # Layer ##########LAYER LandUse############### LAYER GROUP "Polygon" NAME "LU_MUM_UTM" CONNECTIONTYPE oraclespatial CONNECTION "scott/bigmaps at orcl" DATA "GEOM FROM LU_MUM_UTM USING UNIQUE Type SRID 32643 VERSION 10g" CLASSITEM "TYPE" METADATA "DESCRIPTION" "Landuse" "GROUP" "Polygon" "LAYER" "LU_MUM_UTM" "QUERYABLE" "FALSE" END TYPE POLYGON STATUS ON CLASS NAME "Water Pools" EXPRESSION "Ponds / Swimming" COLOR 151 219 242 OUTLINECOLOR 151 219 242 END CLASS NAME "Water Bodies" EXPRESSION /Canal|Drains|Forest|Hydrology - Others|Lakes|River|Reservoir/ COLOR 151 219 242 OUTLINECOLOR 151 219 242 END CLASS NAME "Parks" EXPRESSION /Golf Course|Park/ COLOR 163 215 115 OUTLINECOLOR 163 255 115 END CLASS NAME "Open Space" EXPRESSION "Open Space" COLOR 255 234 201 OUTLINECOLOR 255 234 201 END CLASS NAME "Sandy Area - Beach" EXPRESSION "Sandy Area / Beach" COLOR 225 225 225 OUTLINECOLOR 225 225 225 END CLASS NAME "Plantations" EXPRESSION "Plantations" COLOR 115 178 115 OUTLINECOLOR 115 178 115 END CLASS NAME "Play Ground Sports Complex" EXPRESSION /Play Ground|Sports Complex/ COLOR 239 228 190 OUTLINECOLOR 239 228 190 END CLASS NAME "Rocky Area" EXPRESSION "Rocky Area" COLOR 168 112 0 OUTLINECOLOR 168 112 0 END CLASS NAME "Swampy-Marshy" EXPRESSION "Swampy/Marshy" COLOR 238 241 160 OUTLINECOLOR 238 241 160 END CLASS NAME "Traffic Islands" EXPRESSION "Traffic Islands" COLOR 156 156 156 OUTLINECOLOR 156 156 156 END TOLERANCE 5 END # Layer ##########LAYER Railway############## LAYER GROUP "Line" NAME "railway_utm" CONNECTIONTYPE oraclespatial CONNECTION "scott/bigmaps at orcl" DATA "GEOM FROM railway_utm" #"GEOM FROM railway_utm USING UNIQUE OBJECTID SRID 32643 VERSION 10g" METADATA "DESCRIPTION" "railways" "RESULT_FIELDS" "OBJECTID" "GROUP" "Line" "LAYER" "Railway" END TYPE Line STATUS ON CLASS SYMBOL "cartoline" color 154 154 154 size 2 END TOLERANCE 5 END # Layer ##########LAYER Road############## LAYER GROUP "Line" NAME "road_utm" CONNECTIONTYPE oraclespatial CONNECTION "scott/bigmaps at orcl" DATA "GEOM FROM MUM_RD_UTM USING UNIQUE OBJECTID SRID 32643 VERSION 10g" CLASSITEM "SPEEDCLASS" LABELITEM "STREETNAME" METADATA "DESCRIPTION" "Road" "RESULT_FIELDS" "OBJECTID" "GROUP" "Line" "LAYER" "Road" END TYPE Line STATUS ON TRANSPARENCY alpha CLASS NAME "HIGHWAY" #MAXSCALE 75000 #MINSCALE 0 EXPRESSION ([SPEEDCLASS] >= 50) #style #SYMBOL 8 #SIZE 8 #COLOR 0 0 0 #end style SYMBOL 8 SIZE 7 COLOR 254 144 16 ANTIALIAS true end END CLASS NAME "MAJOR-ROADS" MAXSCALE 75000 MINSCALE 0 EXPRESSION ([SPEEDCLASS] < 50 AND [SPEEDCLASS] >= 20) #style #SYMBOL 8 #SIZE 6 #COLOR 0 0 0 #end style SYMBOL 8 SIZE 5 COLOR 230 221 53 ANTIALIAS true end END CLASS NAME "MINOR-ROADS" MAXSCALE 15000 MINSCALE 0 EXPRESSION ([SPEEDCLASS] < 20) #style #SYMBOL 8 #SIZE 5 #COLOR 0 0 0 #end style SYMBOL 8 SIZE 2 COLOR 104 104 104 ANTIALIAS true end END TOLERANCE 5 END # Layer ##########LAYER Landmarks############# LAYER GROUP "Point" NAME "landmarks_utm1" CONNECTIONTYPE oraclespatial CONNECTION "scott/bigmaps at orcl" DATA "GEOM FROM landmarks_utm USING UNIQUE OBJECTID SRID 32643 VERSION 10g" FILTER "DISPLAYCLA = 1" # CLASSITEM "DISPLAYCLA" CLASSITEM "SYMBOLID" LABELITEM "LANDMARKNA" MAXSCALE 35000 METADATA "DESCRIPTION" "Landmarks" "RESULT_FIELDS" "LANDMARKNA" "GROUP" "Point" "LAYER" "Landmarks" "QUERYABLE" "TRUE" "SEARCHFIELD" "OBJECTID" END TYPE Point STATUS ON CLASS NAME "garden" EXPRESSION "P303" style SYMBOL "park2" Size 18 COLOR 0 166 57 end style SYMBOL "park" Size 18 COLOR 157 79 33 end TEMPLATE "C:/ttt_query1.html" END CLASS NAME "petroleum" EXPRESSION /P103|P452/ SYMBOL "petrol" Size 18 COLOR 0 0 0 #LABEL # COLOR 255 0 0 # FONT fritqat-italic # TYPE truetype # SIZE 8 # POSITION AUTO # PARTIALS FALSE #OUTLINECOLOR 255 255 255 #END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "bus-depot" EXPRESSION "P174" style SYMBOL "bus-depot2" Size 18 COLOR 255 255 255 end style SYMBOL "bus-depot" Size 18 COLOR 0 56 147 end LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 8 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "railway-station" EXPRESSION "P175" style SYMBOL "bus-depot2" Size 18 COLOR 255 255 255 end style SYMBOL "railway" Size 18 COLOR 0 56 147 end LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 6 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "university" EXPRESSION "P201" SYMBOL "university" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "school" EXPRESSION "P202" SYMBOL "school" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "postofc" EXPRESSION "P251" SYMBOL "postofc" Size 18 COLOR 0 0 0 LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 8 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "fire-station" EXPRESSION "P257" SYMBOL "fire-station" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "police" EXPRESSION /P259|P264/ SYMBOL "police" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "cremation" EXPRESSION "P307" SYMBOL "cremation" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "cemetry" EXPRESSION "p308" SYMBOL "cemetry" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "mills" EXPRESSION "P407" SYMBOL "mills" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "gymkhana" EXPRESSION "P451" SYMBOL "gymkhana" Size 18 COLOR 168 0 255 LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 8 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "temple" EXPRESSION "P458" SYMBOL "temple" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "church" EXPRESSION "P459" SYMBOL "church" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "mosque" EXPRESSION "P460" SYMBOL "mosque" Size 18 COLOR 0 200 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "convention" EXPRESSION "P463" SYMBOL "conventional-halls" Size 18 COLOR 168 0 255 LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 8 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "cinema" EXPRESSION "P464" SYMBOL "cinema" Size 18 COLOR 0 0 0 LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 8 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "guruduara" EXPRESSION "P466" SYMBOL "guruduara" Size 18 COLOR 255 255 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "hospital" EXPRESSION "P501" SYMBOL "hospital" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "hotel" EXPRESSION "P504" SYMBOL "hotel" Size 18 COLOR 0 0 0 LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 8 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "guest-house" EXPRESSION "P505" SYMBOL "hotel" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "medical-college" EXPRESSION "P507" SYMBOL "mcollege" Size 18 COLOR 0 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "stadium" EXPRESSION "P601" SYMBOL "stadium" Size 18 COLOR 168 0 255 LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 8 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "science-museum" EXPRESSION "P654" SYMBOL "museum" Size 18 COLOR 168 0 255 LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 8 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "bank" EXPRESSION "P7" SYMBOL "bank" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END TOLERANCE 5 END # Layer ############################################ LAYER GROUP "Point" NAME "landmarks_utm2" CONNECTIONTYPE oraclespatial CONNECTION "scott/bigmaps at orcl" DATA "GEOM FROM landmarks_utm USING UNIQUE OBJECTID SRID 32643 VERSION 10g" FILTER "DISPLAYCLA = 2" # CLASSITEM "DISPLAYCLA" CLASSITEM "SYMBOLID" LABELITEM "LANDMARKNA" MAXSCALE 15000 METADATA "DESCRIPTION" "Landmarks" "RESULT_FIELDS" "LANDMARKNA" "GROUP" "Point" "LAYER" "Landmarks" "QUERYABLE" "TRUE" "SEARCHFIELD" "OBJECTID" END TYPE Point STATUS ON CLASS NAME "garden" EXPRESSION "P303" style SYMBOL "park2" Size 18 COLOR 0 166 57 end style SYMBOL "park" Size 18 COLOR 157 79 33 end LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 6 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "petroleum" EXPRESSION /P103|P452/ SYMBOL "petrol" Size 18 COLOR 0 0 0 #LABEL # COLOR 255 0 0 # FONT fritqat-italic # TYPE truetype # SIZE 8 # POSITION AUTO # PARTIALS FALSE #OUTLINECOLOR 255 255 255 #END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "bus-depot" EXPRESSION "P174" style SYMBOL "bus-depot2" Size 18 COLOR 255 255 255 end style SYMBOL "bus-depot" Size 18 COLOR 0 56 147 end TEMPLATE "C:/ttt_query1.html" END CLASS NAME "railway-station" EXPRESSION "P175" style SYMBOL "bus-depot2" Size 18 COLOR 255 255 255 end style SYMBOL "railway" Size 18 COLOR 0 56 147 end TEMPLATE "C:/ttt_query1.html" END CLASS NAME "university" EXPRESSION "P201" SYMBOL "university" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "school" EXPRESSION "P202" SYMBOL "school" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "postofc" EXPRESSION "P251" SYMBOL "postofc" Size 18 COLOR 0 0 0 LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 6 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "fire-station" EXPRESSION "P257" SYMBOL "fire-station" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "police" EXPRESSION /P259|P264/ SYMBOL "police" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "cremation" EXPRESSION "P307" SYMBOL "cremation" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "cemetry" EXPRESSION "p308" SYMBOL "cemetry" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "mills" EXPRESSION "P407" SYMBOL "mills" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "gymkhana" EXPRESSION "P451" SYMBOL "gymkhana" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "temple" EXPRESSION "P458" SYMBOL "temple" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "church" EXPRESSION "P459" SYMBOL "church" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "mosque" EXPRESSION "P460" SYMBOL "mosque" Size 18 COLOR 0 200 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "convention" EXPRESSION "P463" SYMBOL "conventional-halls" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "cinema" EXPRESSION "P464" SYMBOL "cinema" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "guruduara" EXPRESSION "P466" SYMBOL "guruduara" Size 18 COLOR 255 255 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "hospital" EXPRESSION "P501" SYMBOL "hospital" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "hotel" EXPRESSION "P504" SYMBOL "hotel" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "guest-house" EXPRESSION "P505" SYMBOL "hotel" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "medical-college" EXPRESSION "P507" SYMBOL "mcollege" Size 18 COLOR 0 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "stadium" EXPRESSION "P601" SYMBOL "stadium" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "science-museum" EXPRESSION "P654" SYMBOL "museum" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "bank" EXPRESSION "P7" SYMBOL "bank" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END TOLERANCE 5 END # Layer ############################################### LAYER GROUP "Point" NAME "landmarks_utm3" CONNECTIONTYPE oraclespatial CONNECTION "scott/bigmaps at orcl" DATA "GEOM FROM landmarks_utm USING UNIQUE OBJECTID SRID 32643 VERSION 10g" FILTER "DISPLAYCLA = 3" # CLASSITEM "DISPLAYCLA" CLASSITEM "SYMBOLID" LABELITEM "LANDMARKNA" MAXSCALE 5000 METADATA "DESCRIPTION" "Landmarks" "RESULT_FIELDS" "LANDMARKNA" "GROUP" "Point" "LAYER" "Landmarks" "QUERYABLE" "TRUE" "SEARCHFIELD" "OBJECTID" END TYPE Point STATUS ON CLASS NAME "garden" EXPRESSION "P303" style SYMBOL "park2" Size 18 COLOR 0 166 57 end style SYMBOL "park" Size 18 COLOR 157 79 33 end TEMPLATE "C:/ttt_query1.html" END CLASS NAME "petroleum" EXPRESSION /P103|P452/ SYMBOL "petrol" Size 18 COLOR 0 0 0 #LABEL # COLOR 255 0 0 # FONT fritqat-italic # TYPE truetype # SIZE 8 # POSITION AUTO # PARTIALS FALSE #OUTLINECOLOR 255 255 255 #END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "bus-depot" EXPRESSION "P174" style SYMBOL "bus-depot2" Size 18 COLOR 255 255 255 end style SYMBOL "bus-depot" Size 18 COLOR 0 56 147 end TEMPLATE "C:/ttt_query1.html" END CLASS NAME "railway-station" EXPRESSION "P175" style SYMBOL "bus-depot2" Size 18 COLOR 255 255 255 end style SYMBOL "railway" Size 18 COLOR 0 56 147 end TEMPLATE "C:/ttt_query1.html" END CLASS NAME "university" EXPRESSION "P201" SYMBOL "university" Size 18 COLOR 168 0 255 LABEL COLOR 0 0 0 FONT fritqat-italic TYPE truetype SIZE 6 POSITION AUTO PARTIALS FALSE #OUTLINECOLOR 255 255 255 END TEMPLATE "C:/ttt_query1.html" END CLASS NAME "school" EXPRESSION "P202" SYMBOL "school" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "postofc" EXPRESSION "P251" SYMBOL "postofc" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "fire-station" EXPRESSION "P257" SYMBOL "fire-station" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "police" EXPRESSION /P259|P264/ SYMBOL "police" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "cremation" EXPRESSION "P307" SYMBOL "cremation" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "cemetry" EXPRESSION "p308" SYMBOL "cemetry" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "mills" EXPRESSION "P407" SYMBOL "mills" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "gymkhana" EXPRESSION "P451" SYMBOL "gymkhana" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "temple" EXPRESSION "P458" SYMBOL "temple" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "church" EXPRESSION "P459" SYMBOL "church" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "mosque" EXPRESSION "P460" SYMBOL "mosque" Size 18 COLOR 0 200 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "convention" EXPRESSION "P463" SYMBOL "conventional-halls" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "cinema" EXPRESSION "P464" SYMBOL "cinema" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "guruduara" EXPRESSION "P466" SYMBOL "guruduara" Size 18 COLOR 255 255 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "hospital" EXPRESSION "P501" SYMBOL "hospital" Size 18 COLOR 168 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "hotel" EXPRESSION "P504" SYMBOL "hotel" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "guest-house" EXPRESSION "P505" SYMBOL "hotel" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "medical-college" EXPRESSION "P507" SYMBOL "mcollege" Size 18 COLOR 0 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "stadium" EXPRESSION "P601" SYMBOL "stadium" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "science-museum" EXPRESSION "P654" SYMBOL "museum" Size 18 COLOR 168 0 255 TEMPLATE "C:/ttt_query1.html" END CLASS NAME "bank" EXPRESSION "P7" SYMBOL "bank" Size 18 COLOR 0 0 0 TEMPLATE "C:/ttt_query1.html" END TOLERANCE 5 END # Layer END # Map File From carolin.latze at UNIFR.CH Thu Nov 22 06:35:24 2007 From: carolin.latze at UNIFR.CH (Carolin Latze) Date: Thu, 22 Nov 2007 15:35:24 +0100 Subject: Strange Problem with dbf Files Message-ID: Hi all, I'm using Mapserver with Cartoweb (MS 4) and create shp, shx and dbf Files using the shapelib C library (1.2.10). I encounter a strange problem when using string attributes. I write them using DBFWriteStringAttribute and see them using every available DBF viewer (dbfdump ...). But if I try to read them out using ogrinfo, I only see (null) values... I have really no idea, what's happening.... Does anybody have an idea? Thanks in Advance Carolin -- Carolin Latze Research Assistant Department of Computer Science Boulevard de P?rolles 90 CH-1700 Fribourg phone: +41 26 300 83 30 From schroeter at NETGIS.DE Fri Nov 23 00:49:12 2007 From: schroeter at NETGIS.DE (Sven Schroeter) Date: Fri, 23 Nov 2007 09:49:12 +0100 Subject: ms4w dlls for IIS-installation Message-ID: Hallo, I want to install the latest Mapserver 4.10 on a Windows 2003 Server with IIS (PHP 5.2.3 is already installed as cgi). In older mapserver-versions I copied some .dlls in the system32 and the mapserv.exe in the cgi-bin of the IIS. Then php-mapscript in the ext-folder of php and everything worked fine. With the install-packages ms4w (f.e. ms4w_2.2.5) there are many dlls in the cgi-bin (ms4w\Apache\cgi-bin) and I dont know what .dll are really used and important for mapserver and mapscript. Some files are for apache or php5 (f.e. php5apache2.dll) . Can anybody list the basic .dlls I need for a installation with IIS? Thanks Sven From carolin.latze at UNIFR.CH Fri Nov 23 01:46:00 2007 From: carolin.latze at UNIFR.CH (Carolin Latze) Date: Fri, 23 Nov 2007 10:46:00 +0100 Subject: Strange Problem with dbf Files In-Reply-To: <474593AC.4090301@unifr.ch> Message-ID: Hi again, sorry, I solved it... the new mapserver cannot handle strings of 512 bytes... Using shorter strings solved it... Thanks anyway Carolin Carolin Latze wrote: > Hi all, > > I'm using Mapserver with Cartoweb (MS 4) and create shp, shx and dbf > Files using the shapelib C library (1.2.10). I encounter a strange > problem when using string attributes. I write them using > DBFWriteStringAttribute and see them using every available DBF viewer > (dbfdump ...). But if I try to read them out using ogrinfo, I only see > (null) values... I have really no idea, what's happening.... Does > anybody have an idea? > > Thanks in Advance > Carolin > > -- Carolin Latze Research Assistant Department of Computer Science Boulevard de P?rolles 90 CH-1700 Fribourg phone: +41 26 300 83 30 From juanma.mr at GMAIL.COM Fri Nov 23 02:56:41 2007 From: juanma.mr at GMAIL.COM (Juanma M. R.) Date: Fri, 23 Nov 2007 11:56:41 +0100 Subject: Problems whith UTF8 characters when filtering with slds Message-ID: Hi all, We have a postgres layer with data tables linked to it that seems to work propperly when asking maps and applying a SLD file. It has got a field with UTF-8 characters that are shown correctly in the database and when labeling with it in the map. But when using it to filter and clasify within the SLD file, it fails and do not locate the literal indicated in the SLD file in the table as if they were different. I have looked for it in the bugs track list in order to check if it is a bug of that version of mapserver but I haven't found anything. I have attached the SLD file in case it could be useful for anyone. We are using Mapserver 4.10.2 in a Fedora Core 6 system (UTF-8 encoding) with postgres 8.2.2. The database is also UTF-8 encoding. Best regards, Juanma. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sld_ejemplo_filtro_utf8.rar Type: application/octet-stream Size: 2618 bytes Desc: not available URL: From mapserver at GISMAP.CH Fri Nov 23 04:59:59 2007 From: mapserver at GISMAP.CH (Roman Meier) Date: Fri, 23 Nov 2007 13:59:59 +0100 Subject: Truncated Output In-Reply-To: <4742DC7E.2070609@mapgears.com> Message-ID: Hi Daniel Your were right! The length of the legend is the problem. I reduced the number of layers and suddenly the legend showed up. I checked the fix and noticed that the code changed quite a bit, since we are using mapserver v4.0.2. However, I tried to fix it, but the problem remains the same. We used the same code of mapserver v4.0.2 before together with the same data, templates, etc. All we did, was upgrading the hardware and switching to a newer platform (linux opensuse 10.2). Can?t it be, that this problem has nothing to do with UMN Mapserver, but with a shared library? I attached the two files with the corrections I made. Can you please have a look at it? Kind regards Roman Quoting Daniel Morissette : > Roman Meier wrote: > > Hi list > > > > We face a strange behaviour on a clients webserver. We recently changed > the > > webserver hardware. Everything went on just fine. We face problems using > the > > umn mapserver cgi. The output is truncated !!! The code ends when parsing > of > > [legend] should start. > > > > We work with umn mapserver for so many years now and I haven?t ever heard > of a > > problem similar to that. I beleave that the problem doesn?t come from umn > > mapserver. However - has anybody faced a similar problem? > > > > There was an issue with large legends being truncated (or being > completely absent) that's been fixed in V5.0: > http://trac.osgeo.org/mapserver/ticket/1946 > > If you can't upgrade to 5.0 right away then you could possibly patch > your current install locally as the fix is fairly simple: > http://trac.osgeo.org/mapserver/changeset/6504 > > Daniel > -- > Daniel Morissette > http://www.mapgears.com/ > -------------- next part -------------- A non-text attachment was scrubbed... Name: fix.zip Type: application/zip Size: 27288 bytes Desc: not available URL: From mlinden at ZEELANDNET.NL Fri Nov 23 04:54:30 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Fri, 23 Nov 2007 13:54:30 +0100 Subject: ms4w dlls for IIS-installation In-Reply-To: <000f01c82dad$b8517f40$1cb2a8c0@sven> Message-ID: Hello Sven! Here is my configuration on Windows 2003 Server IIS 6.0 1. Download the MS4W PHP5 Base Installer v2.2.6 (Sept 18, 2007) 2. Open the zip ms4w_2.2.6.zip and copy the content of /ms4w/Apache/cgi-bin gekopieerd naar to the (virtual) folder that will serve as your cgi-bin 3. Copy /ms4w/gdaldata, /ms4w/gdalplugins, /ms4w/proj and ms4w/tools somewhere on your system, not necessary a path that can be reached from the webserver (IIS) I created a folder C:\mapserver that contains everything that is mapserver related Set up the system variables: Add to PATH: c:\MapServer\\cgi-bin; C:\MapServer\tools\gdal-ogr; C:\MapServer\\tools\mapserv; C:\MapServer\tools\shapelib; C:\MapServer\proj\bin; C:\MapServer\tools\shp2tile; C:\MapServer\tools\shpdiff; C:\MapServer\tools\avce00; And create: GDAL_DATA=C:\MapServer\gdaldata GDAL_DRIVER_PATH=C:\MapServer\gdalplugins PROJ_LIB=C:\MapServer\proj\nad Assign rights to IIS to read from your directories to IS_WPG (Workgroep IIS) on folder c:\mapserver and all sub-dirs: * Read and Execute * List Folder Content * Read Create a webservice extension that points to C:\MapServer\cgi-bin\mapserv.exe set it to "Allow" restart IIS by starting and stopping the Webserver service, otherwise the system variables will not be updated. Good luck! Sven Schroeter schreef: > Hallo, > I want to install the latest Mapserver 4.10 on a Windows 2003 Server > with IIS (PHP 5.2.3 is already installed as cgi). > In older mapserver-versions I copied some .dlls in the system32 and > the mapserv.exe in the cgi-bin of the IIS. Then php-mapscript in the > ext-folder of php and everything worked fine. > With the install-packages ms4w (f.e. ms4w_2.2.5) there are many dlls > in the cgi-bin (ms4w\Apache\cgi-bin) and I dont know what .dll are > really used and important for mapserver and mapscript. > Some files are for apache or php5 (f.e. php5apache2.dll) . > Can anybody list the basic .dlls I need for a installation with IIS? > Thanks > Sven -- Milo van der Linden skype: milovanderlinden mlinden at zeelandnet.nl milovanderlinden at gmail.com milo at 3dsite.nl http://www.3dsite.nl De informatie in dit bericht reflecteert mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bij het betreffende medium behorende voorwaarden. The information in this message reflects my personal opinion and not that of a company or public body. All rights reserved.If this message is contained in a mailing-list or community, the rights on the medium are automatically adapted. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dnuttall at DNLT.COM Fri Nov 23 05:30:18 2007 From: dnuttall at DNLT.COM (Dave Nuttall) Date: Fri, 23 Nov 2007 07:30:18 -0600 Subject: Hosting services & Mapserver/PHP Mapscript? Message-ID: After following Mapserver development/evolution for a couple years, I've reached a point where a very small entity has requested my help to build a web-based dynamic map application. From my vantage point, it seems to be a great fit for a LAMP (Linux/Apache/MySQL(or Postgres)/PHP-or-PERL) environment. Once in a while there are posts/blogs that point to Dreamhost and a couple others but so far each has been less than I'd hope for. Dreamhost does allow compiling your Mapserver.cgi with Apache2.x but asserts they will NOT support Apache DSO modules. Also, they do not allow Postgres..which would be OK if they just allowed DSO modules like mod_auth_mysql and php_mapscript!!! Other hosts that seem to cater to Mapserver folk appear to be still using Mapserver 4.x instead of the current, apparently stable 5.x version. I've queried one or two by e-mail and get absolutely no response, so that tells me a lot about how they take care of their customers! Short of contracting for a virtual host with root access at 6-10 times the typical cost of a main stream hosting service like Dreamhost, MidPhase, et al, I'm stumped with regard to WHERE to look! And this while I live within a 10-minute drive of AT&T headquarters and the new Rackspace mega-data-center!!! TIA for any advice/hints from mapserver production practitioners! Dave Nuttall San Antonio, Texas From jmckenna at DMSOLUTIONS.CA Fri Nov 23 06:24:05 2007 From: jmckenna at DMSOLUTIONS.CA (Jeff McKenna) Date: Fri, 23 Nov 2007 09:24:05 -0500 Subject: ms4w dlls for IIS-installation In-Reply-To: <000f01c82dad$b8517f40$1cb2a8c0@sven> Message-ID: Sven Schroeter wrote: > Can anybody list the basic .dlls I need for a installation with IIS? There is a list provided in the MS4W readme doc (http://www.maptools.org/ms4w/index.phtml?page=README_INSTALL.html#i-installing-the-ms4w-mapserver-binaries-in-other-environments). -jeff From Tim.Nolte at IPCSWIRELESSINC.COM Fri Nov 23 06:38:20 2007 From: Tim.Nolte at IPCSWIRELESSINC.COM (Nolte, Tim) Date: Fri, 23 Nov 2007 09:38:20 -0500 Subject: Tile/Slice Shapefiles... Message-ID: I've found references to shp2tile and even found some downloads of the program. One thing I'm confused about is if this is actually going to tile a shapefile the way I think it will. I have one shapefile in particular that is one large object, basically the outline of many states. If I run this shapefile through shp2tile will it actually cut up the object into smaller objects? Seems the description of the shp2tile application refers to only splitting up shapefiles into smaller shapefile by splitting out objects but not actually breaking apart an object. Is there anyone that can clarify this for me? - Tim ---- Timothy J Nolte - tnolte at ilpcs.com Associate Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com From dmorissette at MAPGEARS.COM Fri Nov 23 06:44:36 2007 From: dmorissette at MAPGEARS.COM (Daniel Morissette) Date: Fri, 23 Nov 2007 09:44:36 -0500 Subject: Tile/Slice Shapefiles... In-Reply-To: <1532456BD081F146A176FB6929E6B0D1AF6F7A@KTWMAIL.ilpcs.com> Message-ID: Nolte, Tim wrote: > I've found references to shp2tile and even found some downloads of the > program. One thing I'm confused about is if this is actually going to > tile a shapefile the way I think it will. I have one shapefile in > particular that is one large object, basically the outline of many > states. If I run this shapefile through shp2tile will it actually cut up > the object into smaller objects? Seems the description of the shp2tile > application refers to only splitting up shapefiles into smaller > shapefile by splitting out objects but not actually breaking apart an > object. Is there anyone that can clarify this for me? > That's correct, shp2tile will *not* split your large polygon into smaller ones. Daniel -- Daniel Morissette http://www.mapgears.com/ From jmckenna at DMSOLUTIONS.CA Fri Nov 23 07:15:44 2007 From: jmckenna at DMSOLUTIONS.CA (Jeff McKenna) Date: Fri, 23 Nov 2007 10:15:44 -0500 Subject: Tile/Slice Shapefiles... In-Reply-To: <1532456BD081F146A176FB6929E6B0D1AF6F7A@KTWMAIL.ilpcs.com> Message-ID: Nolte, Tim wrote: > I've found references to shp2tile and even found some downloads of the > program. FYI: a windows build of shp2tile is included in MS4W. -jeff From nicolas.fortin at EC.GC.CA Fri Nov 23 07:54:30 2007 From: nicolas.fortin at EC.GC.CA (Fortin,Nicolas [SteFoy]) Date: Fri, 23 Nov 2007 10:54:30 -0500 Subject: ms4w dlls for IIS-installation In-Reply-To: A<000f01c82dad$b8517f40$1cb2a8c0@sven> Message-ID: Hi! You can open mapserv.exe with Dependency Walker http://www.dependencywalker.com/ and you'll see ALL the dll it needs. Here are the mapserver specific ones I got with my own version MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=ORACLESPATIAL INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG OCI.DLL BGD.DLL GDAL13.DLL GEOS_C.DLL ICONV.DLL LIBCURL.DLL LIBMAP.DLL LIBXML2.DLL PROJ.DLL ZLIB1.DLL Also, I never put the needed mapserver dlls in system32, instead I prefer to create a new folder, put the dlls in it and add it to the path. It's easier to keep your system clean and to upgrade to new version. Nicolas -----Message d'origine----- De : UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la part de Sven Schroeter Envoy? : 23 novembre 2007 03:49 ? : MAPSERVER-USERS at LISTS.UMN.EDU Objet : [UMN_MAPSERVER-USERS] ms4w dlls for IIS-installation Hallo, I want to install the latest Mapserver 4.10 on a Windows 2003 Server with IIS (PHP 5.2.3 is already installed as cgi). In older mapserver-versions I copied some .dlls in the system32 and the mapserv.exe in the cgi-bin of the IIS. Then php-mapscript in the ext-folder of php and everything worked fine. With the install-packages ms4w (f.e. ms4w_2.2.5) there are many dlls in the cgi-bin (ms4w\Apache\cgi-bin) and I dont know what .dll are really used and important for mapserver and mapscript. Some files are for apache or php5 (f.e. php5apache2.dll) . Can anybody list the basic .dlls I need for a installation with IIS? Thanks Sven From pauljame at GMAIL.COM Fri Nov 23 08:12:39 2007 From: pauljame at GMAIL.COM (Paul james) Date: Fri, 23 Nov 2007 13:12:39 -0300 Subject: Change reference size dynamically (Mapscript) Message-ID: Hello, I?m need change reference image size in mapscript (C#)... I tried that: mapaObj.reference.height = 100; but got that error: Error 8 Property or indexer 'OSGeo.MapServer.referenceMapObj.height' cannot be assigned to -- it is read only How can I change that? Thanks From szekerest at GMAIL.COM Fri Nov 23 13:02:13 2007 From: szekerest at GMAIL.COM (Tamas Szekeres) Date: Fri, 23 Nov 2007 22:02:13 +0100 Subject: Change reference size dynamically (Mapscript) In-Reply-To: <33fad6880711230812n1f80558chb8db49022b907635@mail.gmail.com> Message-ID: Paul, I've created a ticket for this issue and fixed it in the SVN trunk. http://trac.osgeo.org/mapserver/ticket/2407 http://trac.osgeo.org/mapserver/changeset/7072 Best regards, Tamas 2007/11/23, Paul james : > Hello, I?m need change reference image size in mapscript (C#)... > > I tried that: > > mapaObj.reference.height = 100; > > but got that error: > Error 8 Property or indexer 'OSGeo.MapServer.referenceMapObj.height' > cannot be assigned to -- it is read only > > How can I change that? > > Thanks > From sacha.black at GMAIL.COM Fri Nov 23 14:12:37 2007 From: sacha.black at GMAIL.COM (Sacha Black) Date: Fri, 23 Nov 2007 14:12:37 -0800 Subject: Using different OUTPUTFORMAT? Message-ID: i'm looking in the mapfile reference docs, and i can't figure out if it is possible to use more than one OUTPUTFORMAT in a single mapfile. for example I want to use JPEG for a photo layer and PNG for a different layer. is it possible? if so, how to specify in the layer definitions in the map file? sacha From jfletcher at LATITUDEGEO.COM Fri Nov 23 16:32:15 2007 From: jfletcher at LATITUDEGEO.COM (John Fletcher) Date: Fri, 23 Nov 2007 16:32:15 -0800 Subject: Using different OUTPUTFORMAT? In-Reply-To: A Message-ID: Whether your final image is jpeg or png depends on the format included in the request, rather than what's included in the OUTPUTFORMAT block. I don't even normally put an OUTPUTFORMAT block in my mapfile - mapserver will accept requests for any image formats that it's been programmed to use by default (which includes jpeg and png for you already, very likely). That said, you can put multiple OUTPUTFORMAT blocks in your mapfile. They are actually children of the MAP block rather than the LAYER block - you can't declare that a particular layer in a mapfile is only to be rendered in a particular output format. See the OUTPUTFORMAT section in the mapfile reference for more details. To get a jpeg for layer1 and a png for layer2, you'll need two separate requests, like: http://server/mapserv?request=GetMap&...&format=image/jpeg&layers=layer1 &... http://server/mapserv?request=GetMap&...&format=image/png&layers=layer2& ... This is for CGI - if you're using mapscript someone else'll have to let you know how to generate the separate images. John Fletcher -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Sacha Black Sent: Friday, November 23, 2007 2:13 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Using different OUTPUTFORMAT? i'm looking in the mapfile reference docs, and i can't figure out if it is possible to use more than one OUTPUTFORMAT in a single mapfile. for example I want to use JPEG for a photo layer and PNG for a different layer. is it possible? if so, how to specify in the layer definitions in the map file? sacha From friendvn2000 at YAHOO.COM Fri Nov 23 19:14:59 2007 From: friendvn2000 at YAHOO.COM (Hei Jo) Date: Fri, 23 Nov 2007 21:14:59 -0600 Subject: Looking for an open source MapServer application that use PHPMapscrip Message-ID: Hi everyone, I'm looking for an open source MapServer application that use PHPMapscript. I found Gmap and pMapper but the first one is too simple and the second one is very complicated. My expectation is a application between them, that have basic mapping functions like zoom, pan, query and don't use CGI mapserv.exe Thank you From arthan at DSL.TTNET.NET.TR Sat Nov 24 01:45:33 2007 From: arthan at DSL.TTNET.NET.TR (Volkan Ulukut) Date: Sat, 24 Nov 2007 11:45:33 +0200 Subject: Looking for an open source MapServer application that use PHPMapscrip Message-ID: Hi Hei, You should really try ka-map http://ka-map.maptools.org/ an example application: http://clima.ominiverdi.org/ka-map/htdocs/ -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Hei Jo Sent: Saturday, November 24, 2007 5:15 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Looking for an open source MapServer application that use PHPMapscrip Hi everyone, I'm looking for an open source MapServer application that use PHPMapscript. I found Gmap and pMapper but the first one is too simple and the second one is very complicated. My expectation is a application between them, that have basic mapping functions like zoom, pan, query and don't use CGI mapserv.exe Thank you From el.migno at POST.CZ Sat Nov 24 08:54:39 2007 From: el.migno at POST.CZ (=?us-ascii?Q?Milan=20Lazecky?=) Date: Sat, 24 Nov 2007 17:54:39 +0100 Subject: PHP_OGR problem In-Reply-To: <47453E5F.9010707@neogeo-online.net> Message-ID: Thank you Guillaume but it doesn't help. I have IIS 5.1 - and I haven't found any options to do it there. I am very confused about this. Can somebody help? Just some suggestions, I would try anything! Once more - I cannot make php_ogr work in a web browser. When I use command line (php -q ... - php_ogr examples) it works. But when I try to open a php in web browser, it says this: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\php_ogr.dll' - Access denied. in Unknown on line 0 Thank you for your ideas. Milan > ------------ P?vodn? zpr?va ------------ > Od: Guillaume Sueur > P?edm?t: Re: [UMN_MAPSERVER-USERS] PHP_OGR problem > Datum: 22.11.2007 10:00:09 > ---------------------------------------- > Hi Milan, > > Maybe you're running IIS6 and you must explicitely authorize php_ogr.dll > to be used by the internet user. I don't remember precisely, but it > should be somewhere under the IIS administration console. > > Hope that helps > > Milan Lazecky a ?crit : > > Hi everybody. > > Does anybody of you have experience with php_ogr.dll in Windows? > > I can't make it work :-( > > When I try in command line php.exe -q ogr2ogr.php...... it works great! > > But when I try to run it in a web browser (yes I have edited the example files > to work in the browser), it gives an "Access denied" error for php_ogr.dll. > > Maybe I have some dependency problem, but I used the Dependency Walker for > this library and it seems to be ok (well, I had to find a msjava.dll file on the > web). All the libraries included in ms4w installation file I have copied into > the C:\PHP folder (and this folder is also in system PATH). I really am > confused, I don't know what I do wrong. > > PHP is in the newest version, php_ogr is from the ms4w newest version. > > Thank you very much! > > Milan > > > > -- > Guillaume SUEUR > Expert SIG et OpenSource > NEOGEO > 46 RUE MATABIAU > 31000 TOULOUSE > 06 65 58 88 82 > Site web : http://www.neogeo-online.net > > > > From bruno_gendron at YAHOO.COM Sat Nov 24 12:52:08 2007 From: bruno_gendron at YAHOO.COM (Bruno Gendron) Date: Sat, 24 Nov 2007 14:52:08 -0600 Subject: C# Mapscript ASP.NET Deployment Problem Message-ID: Hi, We are developing an ASP.NET 2.0 web application with C# Mapscript. We are using VS 2005. All the DLLs are copied in the /bin directory. When run from VS, the application works perfectly.. However, when deployed (published) to IIS (on the same machine as the one used for development), the computer crashes badly (the speaker goes on loud, etc.)... Does it have something to do with C# Mapscript being compiled against .NET 1.1? Help would be greatly appreciated, as this app is meant to go out very soon... Cheers, -- Bruno From szekerest at GMAIL.COM Sat Nov 24 14:55:19 2007 From: szekerest at GMAIL.COM (Tamas Szekeres) Date: Sat, 24 Nov 2007 23:55:19 +0100 Subject: C# Mapscript ASP.NET Deployment Problem In-Reply-To: Message-ID: Hi Bruno, Some of the ASP.NET related issues have been enumerated here: http://mapserver.gis.umn.edu/docs/howto/mapscriptcscompile But I'd add some further info that might be important: 1. If you develop with VS 2005 you probably use WebDev.Webserver.exe as the ASP.NET hosting process under the security context of the local user. Upon deploying the application to the IIS environment you probably use the aspnet_wp.exe or w3wp.exe according to the OS you use. These processes are working differently from where the dependent dll-s are loded actually. Under the IIS environment the standard dll search approach is used for those dll-s that are not referenced directly by the csharp related dll-s in the assembly manifest. The standard dll search order for Windows can be: a. The directory from which the application loaded. b. The current directory c. The system directory. d. The 16-bit system directory. e. The Windows directory. f. The directories that are listed in the PATH environment variable. Note on #a: The common locations of the ASP:NET host process are: - On Windows 2003: %SYSTEMROOT%\System32\inetsrv - On WIndows XP: %SYTEMROOT%\Microsoft.NET\Framework\[framework version] Note on #f: You can either set the PATH globally or only for the ASPNET user. You can use the sysinternals filemon tool to track where your files are to be loaded actually. 2. If you run the application on x64 IIS will use the Win64 framework by default so you should compile all of the dlls for x64. Otherwise you get a BadImageFormatException during the load. It must be noted that WebDev.WebServer always runs the 32 bit version of the .NET framework. My questions 1. Do you have a specific error message if you enable the debug and error reporting option in your Web.config file? 2. Is your app running on .NET FW 1.1 or .NET FW 2.0 Best regards, Tamas 2007/11/24, Bruno Gendron : > Hi, > > We are developing an ASP.NET 2.0 web application with C# Mapscript. We are > using VS 2005. > > All the DLLs are copied in the /bin directory. > > When run from VS, the application works perfectly.. > > However, when deployed (published) to IIS (on the same machine as the one > used for development), the computer crashes badly (the speaker goes on loud, > etc.)... > > Does it have something to do with C# Mapscript being compiled against .NET 1.1? > > Help would be greatly appreciated, as this app is meant to go out very soon... > > Cheers, > > -- > Bruno > From bruno_gendron at YAHOO.COM Sat Nov 24 14:56:06 2007 From: bruno_gendron at YAHOO.COM (Bruno Gendron) Date: Sat, 24 Nov 2007 16:56:06 -0600 Subject: UPDATE Re: C# Mapscript ASP.NET Deployment Problem Message-ID: Update to my previous post... When run in VS 2005 using VS internal Development Server, everything's fine... However, it crashes when using IIS Web Server, even from within VS debugging environment... Hope this will help someone understand what's going wrong! -- Bruno From szekerest at GMAIL.COM Sat Nov 24 15:40:28 2007 From: szekerest at GMAIL.COM (Tamas Szekeres) Date: Sun, 25 Nov 2007 00:40:28 +0100 Subject: UPDATE Re: C# Mapscript ASP.NET Deployment Problem In-Reply-To: Message-ID: I should also ask you about the mapserver version, which dependencies are compiled in, and the actual use case of your application that produce the problem with special regards of the usage of the mapscript objects. Best regards, Tamas 2007/11/24, Bruno Gendron : > Update to my previous post... > > When run in VS 2005 using VS internal Development Server, everything's fine... > > However, it crashes when using IIS Web Server, even from within VS debugging > environment... > > Hope this will help someone understand what's going wrong! > > -- > Bruno > From cplist at SECONDCREEK.ORG Sun Nov 25 07:42:42 2007 From: cplist at SECONDCREEK.ORG (Charlton Galvarino) Date: Sun, 25 Nov 2007 10:42:42 -0500 Subject: SOS eventTime not liking formatted time cols Message-ID: Hi, all: I am running into a problem w/ eventTime when I am trying to hit a timstamp col. that I've formatted. In other words, my SOS would return nice results for this DATA string . . . select *, to_char(m_date at time zone 'UTC','YYYY-MM-DD') || 'T' || to_char(m_date at time zone 'UTC','HH24:MI+00:00') as t from v_platform_sensor_obs . . . and sos_timeitem is 't' when I do NOT tack on an eventTime constraint. But when I try to tack on an eventTime constraint to the URL, I get an emty result set (and I know there should be obs). eventTime=2007-08-012007-08-03 If the DATA string were this, instead . . . select * from v_platform_sensor_obs . . . and the sos_timeitem were 'm_date', I'd get hits w/ the above eventTime constraint. All I'm really trying to do is control the ouputted format of my timestamp col., and something must be getting lost in translation. I'm happy to post an example if necessary. Charlton From lethanhx2k at GMAIL.COM Sun Nov 25 18:50:40 2007 From: lethanhx2k at GMAIL.COM (=?UTF-8?Q?L=C3=AA_Vi=E1=BA=BFt_Thanh?=) Date: Mon, 26 Nov 2007 09:50:40 +0700 Subject: FME, POSTGIS and MAPSERVER Message-ID: Hi all, i have a problem in converting from Esri Shapefile to Postgis. If i use shp2pgsql tool to do, it's successful to read in Mapserver but with converting in FME is not successful.I cant understand what happened? Does anyone know? Thanks -- Best regards, Le Viet Thanh GIS Technician - GIS Team __________________________________ Vietnam - Denmark VIDAGIS CO., LTD 5 Lang Ha Str, Hanoi, Vietnam Tel: +84 4 5145570 Fax: +84 4 5145571 http://www.vidagis.com Direct: thanhlv at vidagis.com +84 984 468147 -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.sueur at NEOGEO-ONLINE.NET Sun Nov 25 23:50:41 2007 From: guillaume.sueur at NEOGEO-ONLINE.NET (Guillaume Sueur) Date: Mon, 26 Nov 2007 08:50:41 +0100 Subject: FME, POSTGIS and MAPSERVER In-Reply-To: Message-ID: Hi You should check the FME dataset's options you're creating the pg table with. I've used FME a few times to export to pg, and I remember having had to play around with options : - geometry type of the new dataset : don't set to geometry, but to proper geometric type (point, linestring, polygon...) - projection of course. also check the geometry_columns table of your database, there should be a line about your dataset in here. Good luck, Guillaume L? Vi?t Thanh a ?crit : > Hi all, i have a problem in converting from Esri Shapefile to Postgis. > If i use shp2pgsql tool to do, it's successful to read in Mapserver but > with converting in FME is not successful.I cant understand what > happened? Does anyone know? > Thanks > > > -- > Best regards, > > Le Viet Thanh > GIS Technician - GIS Team > __________________________________ > Vietnam - Denmark VIDAGIS CO., LTD > 5 Lang Ha Str, Hanoi, Vietnam > Tel: +84 4 5145570 Fax: +84 4 5145571 > http://www.vidagis.com > Direct: thanhlv at vidagis.com +84 984 > 468147 -- Guillaume SUEUR Expert SIG et OpenSource NEOGEO 46 RUE MATABIAU 31000 TOULOUSE 06 65 58 88 82 Site web : http://www.neogeo-online.net -------------- next part -------------- A non-text attachment was scrubbed... Name: guillaume_sueur.vcf Type: text/x-vcard Size: 324 bytes Desc: not available URL: From mlinden at ZEELANDNET.NL Mon Nov 26 02:19:19 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Mon, 26 Nov 2007 11:19:19 +0100 Subject: speeding up ecw layer Message-ID: Hello list, I have a 254Mb bathy layer of the world. Somehow I get the feeling this layer can be optimized, but I don't know how. Is there a way to optimize large raster ECW? Does anybody have any tips on what I can do? Kind regards, Milo van der Linden -------------- next part -------------- An HTML attachment was scrubbed... URL: From maartenhilgenga at GMAIL.COM Mon Nov 26 02:22:44 2007 From: maartenhilgenga at GMAIL.COM (Maarten Hilgenga) Date: Mon, 26 Nov 2007 11:22:44 +0100 Subject: getting elevation data from mapserver Message-ID: Dear all, I'm trying to output elevation data in dem format as described in the WCS server example. The elevation data is in dted format (hgt file). Since gdalinfo doesn't recognize this file as useable, I've used global mapper to convert it to geotiff. The geoTiff is 1201x1201 and has three bands: Band 1 Block=1201x1 Type=Byte, ColorInterp=Red Band 2 Block=1201x1 Type=Byte, ColorInterp=Green Band 3 Block=1201x1 Type=Byte, ColorInterp=Blue The output from mapserver is 800 x 600 and has three bands as well, Band 1 Block=800x5 Type=Int16, ColorInterp=Gray Band 2 Block=800x5 Type=Int16, ColorInterp=Undefined Band 3 Block=800x5 Type=Int16, ColorInterp=Undefined When I load the resulting file as geotiff into global mapper, I get a black image. The height of the whole map is at least 1000m. Does anyone know how to display this elevation data? Could it be that the elevation is first converted to 8 bit and then to 16? TIA, Maarten From Tom.Kralidis at EC.GC.CA Mon Nov 26 05:11:22 2007 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Mon, 26 Nov 2007 08:11:22 -0500 Subject: SOS eventTime not liking formatted time cols In-Reply-To: A<000301c82f79$d1cadb60$670fa8c0@latitude> Message-ID: > Hi, all: > > I am running into a problem w/ eventTime when I am trying to > hit a timstamp col. that I've formatted. In other words, my > SOS would return nice results for this DATA string . . . > > select *, to_char(m_date at time zone 'UTC','YYYY-MM-DD') || > 'T' || to_char(m_date at time zone 'UTC','HH24:MI+00:00') as > t from v_platform_sensor_obs > > . . . and sos_timeitem is 't' when I do NOT tack on an > eventTime constraint. > > But when I try to tack on an eventTime constraint to the URL, > I get an emty result set (and I know there should be obs). > > eventTime=2007-08-01 ginPosition> ml:endPosition>2007-08-03 > > If the DATA string were this, instead . . . > > select * from v_platform_sensor_obs > > . . . and the sos_timeitem were 'm_date', I'd get hits w/ the > above eventTime constraint. > > All I'm really trying to do is control the ouputted format of > my timestamp col., and something must be getting lost in translation. > Charlton, What happens when you apply the eventTime constraint with gml:beginPosition and gml:endPosition formatted as per the to_char functions in your SQL statement? ..Tom From mlinden at ZEELANDNET.NL Mon Nov 26 05:54:27 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Mon, 26 Nov 2007 14:54:27 +0100 Subject: speeding up ecw layer In-Reply-To: Message-ID: Luca, Thank you for the response! I read the document and noticed it is mostly about Tiff, can gdal_translate -co TILED=YES original.tif tiled.tif be used on ecw raster too? Or is it wise to translate my ECW to a tiled tif? If it can, I would like to add this as comment to the documentation. Luca Manganelli schreef: > On 11/26/07, Milo van der Linden wrote: > >> I have a 254Mb bathy layer of the world. Somehow I get the feeling this >> layer can be optimized, but I don't know how. Is there a way to optimize >> large raster ECW? Does anybody have any tips on what I can do? >> > > read here > http://mapserver.gis.umn.edu/docs/howto/optimizeraster > > -- Milo van der Linden skype: milovanderlinden mlinden at zeelandnet.nl milovanderlinden at gmail.com milo at 3dsite.nl http://www.3dsite.nl De informatie in dit bericht reflecteert mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bij het betreffende medium behorende voorwaarden. The information in this message reflects my personal opinion and not that of a company or public body. All rights reserved.If this message is contained in a mailing-list or community, the rights on the medium are automatically adapted. -------------- next part -------------- An HTML attachment was scrubbed... URL: From warmerdam at POBOX.COM Mon Nov 26 06:25:11 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Mon, 26 Nov 2007 09:25:11 -0500 Subject: getting elevation data from mapserver In-Reply-To: <57c579e80711260222v4b343bc1v3d1369e87641217e@mail.gmail.com> Message-ID: Maarten Hilgenga wrote: > Dear all, > > I'm trying to output elevation data in dem format as described in the > WCS server example. The elevation data is in dted format (hgt file). > Since gdalinfo doesn't recognize this file as useable, ... Maarten, GDAL/MapServer supports the DTED format. DTED files; however, do not normally have the .hgt extension. This often is used for SRTM data in "raw" format. > ...I've used > global mapper to convert it to geotiff. The geoTiff is 1201x1201 and > has three bands: > > Band 1 Block=1201x1 Type=Byte, ColorInterp=Red > Band 2 Block=1201x1 Type=Byte, ColorInterp=Green > Band 3 Block=1201x1 Type=Byte, ColorInterp=Blue It would appear that this translation with global mapper has damaged the image data - converting it to 8bit and apparently into RGB mode as well. Either skip this step and work directly from your DTED files (if they are really dted) or figure out a more appropriate way to do the translation. 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 | President OSGeo, http://osgeo.org From bfraser at GEOANALYTIC.COM Mon Nov 26 07:02:03 2007 From: bfraser at GEOANALYTIC.COM (Brent Fraser) Date: Mon, 26 Nov 2007 08:02:03 -0700 Subject: getting elevation data from mapserver Message-ID: Maarten, If you use GlobalMapper to export the elevation to GeoTIFF, make sure you select Elevation from the File Type list on the GeoTIFF Export Options, otherwise it exports it as a color-coded image. GDAL/Mapserver will then be able to read the 16-bit integer (or 32-bit float) data GlobalMapper exports. If you don't want to use GlobalMapper and you have .hgt (likely SRTM data?), you can create an .hdr header file for each .hgt file so GDAL/Mapserver will load them, or you can wait for GDAL 1.5.0 to be released (it can read them without header files). Brent Fraser GeoAnalytic Inc. Calgary, Alberta ----- Original Message ----- From: "Maarten Hilgenga" To: Sent: Monday, November 26, 2007 3:22 AM Subject: [UMN_MAPSERVER-USERS] getting elevation data from mapserver > Dear all, > > I'm trying to output elevation data in dem format as described in the > WCS server example. The elevation data is in dted format (hgt file). > Since gdalinfo doesn't recognize this file as useable, I've used > global mapper to convert it to geotiff. The geoTiff is 1201x1201 and > has three bands: > > Band 1 Block=1201x1 Type=Byte, ColorInterp=Red > Band 2 Block=1201x1 Type=Byte, ColorInterp=Green > Band 3 Block=1201x1 Type=Byte, ColorInterp=Blue > > The output from mapserver is 800 x 600 and has three bands as well, > > Band 1 Block=800x5 Type=Int16, ColorInterp=Gray > Band 2 Block=800x5 Type=Int16, ColorInterp=Undefined > Band 3 Block=800x5 Type=Int16, ColorInterp=Undefined > > When I load the resulting file as geotiff into global mapper, I get a > black image. The height of the whole map is at least 1000m. Does > anyone know how to display this elevation data? Could it be that the > elevation is first converted to 8 bit and then to 16? > > TIA, Maarten From guillaume.sueur at NEOGEO-ONLINE.NET Mon Nov 26 06:31:43 2007 From: guillaume.sueur at NEOGEO-ONLINE.NET (Guillaume Sueur) Date: Mon, 26 Nov 2007 15:31:43 +0100 Subject: Getting rid of QueryByShape error message Message-ID: Hi there, I'm using a queryByShape on a layer, and I'd like to avoid the MapServer's message in case of no matching record found. But even with the php @ operator, I still have it. Any other way to avoid it ? Config : PHP 5.2.5 as apache module, Mapserver 5. Thanks -- Guillaume SUEUR -------------- next part -------------- A non-text attachment was scrubbed... Name: guillaume_sueur.vcf Type: text/x-vcard Size: 310 bytes Desc: not available URL: From lorenzetti at FAUNALIA.IT Mon Nov 26 03:56:42 2007 From: lorenzetti at FAUNALIA.IT (Walter Lorenzetti) Date: Mon, 26 Nov 2007 12:56:42 +0100 Subject: WMS server: gml_include_items bug? Message-ID: Hi all, I'm working with mapserver 5.0 in wms server mode. If in a metadata object layer I put "gml_include_items" "all", when I try to do a getFeautureInfo request I obtain only the features number but not the others features in dbf file... for to obtain a good getFeatureInfo respost I've to put "wms_include_items" instead of "gml_incl..." Anybody had the same problem? Walter -- Please no .doc, .xls, .ppt, .dwg: https://www.faunalia.it/dokuwiki/doku.php?id=public:OpenFormats Walter Lorenzetti email+jabber: lorenzetti at faunalia.it www.faunalia.it Cell: (+39) 347-6597931 Tel+Fax: (+39) 0587-213742 Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy From Absentar+mapserver at GMAIL.COM Mon Nov 26 07:49:18 2007 From: Absentar+mapserver at GMAIL.COM (H=?ISO-8859-1?Q?=E9ctor_Paniagua?=) Date: Mon, 26 Nov 2007 09:49:18 -0600 Subject: Reprojection RasterData Problem Message-ID: Hello. I have some problems when I try to reproject a raster layer from EPSG:23030(UTM zone 30N, ED50) to EPSG:4258 (Lat/Long, ETRS89) beacuse I find a litte difference (about 150 meters) respect to the others data with EPSG:4258 initial projection, but when I reproject the raster layer to EPSG:4230 (Lat/Long, ED50) works fine and I don?t see any diference respect to other layers. Have you ever had this problem ? How did you fix it? Any ideas would be greatly appreciated. Thanks! H?ctor Paniagua. MapFile: MAP NAME "DMA-DUERO 09 ORTOFOTO" IMAGECOLOR 255 255 255 EXTENT 56057.1 463637.28 623342 4784640 SIZE 500 500 IMAGECOLOR 255 255 255 IMAGETYPE JPEG UNITS METERS DEBUG ON SHAPEPATH "/var/mapserver/data" QUERYMAP COLOR 120 0 120 STATUS ON STYLE hilite END ... PROJECTION "init=epsg:23030" END ... LAYER NAME "ortofoto" METADATA wms_title "ortofoto" wms_srs "EPSG:23030 EPSG:4230 EPSG:25830 EPSG:4258" wms_group_title "ortofoto" wfs_title "ortofoto" wfs_srs "EPSG:23030 EPSG:4230 EPSG:25830 EPSG:4258" gml_include_items "all" END TYPE RASTER TILEINDEX "./shapes/ortofoto/ortofoto.shp" TILEITEM "location" GROUP "ORTOFOTO" DUMP TRUE DEBUG ON STATUS OFF MINSCALE 5000 MAXSCALE 20000 END ... END EPSG:4230: http://www.mirame.chduero.es/cgi-bin/mapserv?REQUEST=GetMap&VERSION=1.1.0&SERVICE=WMS&SRS=EPSG:4230&BBOX=-6.15011,41.20324,-6.10329,41.24034&WIDTH=958&HEIGHT=759&LAYERS=ortofoto&STYLES=default&FORMAT=image/jpeg&BGCOLOR=0xFFFFFF&TRANSPARENT=FALSE&EXCEPTIONS=INIMAGE&map=/var/mapserver/maps/dmaduero09ortofoto.map EPSG:4258: http://www.mirame.chduero.es/cgi-bin/mapserv?REQUEST=GetMap&VERSION=1.1.0&SERVICE=WMS&SRS=EPSG:4258&BBOX=-6.15011,41.20324,-6.10329,41.24034&WIDTH=958&HEIGHT=759&LAYERS=ortofoto&STYLES=default&FORMAT=image/jpeg&BGCOLOR=0xFFFFFF&TRANSPARENT=FALSE&EXCEPTIONS=INIMAGE&map=/var/mapserver/maps/dmaduero09ortofoto.map From fischersk1 at ORNL.GOV Mon Nov 26 10:49:26 2007 From: fischersk1 at ORNL.GOV (Sarah Fischer) Date: Mon, 26 Nov 2007 12:49:26 -0600 Subject: Mapserver 5 binaries Message-ID: I am new to Mapserver. Are there Mapserver 5.0 binaries available for Redhat Enterprise Linux 5? I'd appreciate you pointing me to them (and any info you think would be helpful to help me get it installed. I will be using it with Ruby and MapScript, so any tips on that would be helpful, too). Thanks, Sarah From luca76 at GMAIL.COM Mon Nov 26 11:12:03 2007 From: luca76 at GMAIL.COM (Luca Manganelli) Date: Mon, 26 Nov 2007 20:12:03 +0100 Subject: speeding up ecw layer In-Reply-To: <474AD013.8050908@zeelandnet.nl> Message-ID: On Nov 26, 2007 2:54 PM, Milo van der Linden wrote: > Thank you for the response! I read the document and noticed it is mostly > about Tiff, can > gdal_translate -co TILED=YES original.tif tiled.tif > be used on ecw raster too? Or is it wise to translate my ECW to a tiled tif? Yes. Please follow this discussion: http://lists.maptools.org/pipermail/fwtools/2006-December/000588.html there's an email with a script as an script as attachment, you would give it a try. From yassefa at DMSOLUTIONS.CA Mon Nov 26 11:15:28 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Mon, 26 Nov 2007 14:15:28 -0500 Subject: WMS server: gml_include_items bug? In-Reply-To: <474AB47A.4030007@faunalia.it> Message-ID: Hi There, If don't believe this is a problem. If you see the docs at http://mapserver.gis.umn.edu/docs/howto/wms_server (specifically the first comment at the end of the page), it mentions that the wms_include_items is used when the output is of type text/plain and gml_incl_items used for gml type output. You can also use ows_include_items to cover both cases. This comment did not make it yet in the main doc page, but hopefully it will be done on the next round of doc update. Hope it helps. Best Regards, Walter Lorenzetti wrote: > Hi all, > > I'm working with mapserver 5.0 in wms server mode. > If in a metadata object layer I put "gml_include_items" "all", > when I try to do a getFeautureInfo request I obtain only the features number > but not the others features in dbf file... > > for to obtain a good getFeatureInfo respost I've to put > "wms_include_items" instead of > "gml_incl..." > > Anybody had the same problem? > > Walter > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From luca76 at GMAIL.COM Mon Nov 26 11:16:18 2007 From: luca76 at GMAIL.COM (Luca Manganelli) Date: Mon, 26 Nov 2007 20:16:18 +0100 Subject: Problem with TILEINDEX with Mapserver 5.0 In-Reply-To: Message-ID: Hi, I have problem with TILEINDEX. Mapserver 5.0 refuses to render this layer. Note that Mapserver 4.10 works flawlessy. Is there any known bug referring to 5.0? LAYER NAME "test tiled" TYPE LINE TILEINDEX "base/test" TILEITEM "LOCATION" STATUS OFF TEMPLATE void OPACITY 30 MINSCALE 500 CLASS NAME "test" STYLE COLOR 0 0 0 SIZE 1 END END END -- Grazie al modello matematico posso dirvi Come ? nato l'universo: non chiedetemi il Perch?. (Stephen Hawking) From thomas.bonfort at GMAIL.COM Mon Nov 26 11:26:27 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Mon, 26 Nov 2007 20:26:27 +0100 Subject: Problem with TILEINDEX with Mapserver 5.0 In-Reply-To: Message-ID: is this using the agg renderer? if so try using WIDTH instead of SIZE thomas On Nov 26, 2007 8:16 PM, Luca Manganelli wrote: > Hi, > > I have problem with TILEINDEX. Mapserver 5.0 refuses to render this > layer. Note that Mapserver 4.10 works flawlessy. Is there any known > bug referring to 5.0? > > LAYER > NAME "test tiled" > TYPE LINE > TILEINDEX "base/test" > TILEITEM "LOCATION" > STATUS OFF > TEMPLATE void > OPACITY 30 > MINSCALE 500 > CLASS > NAME "test" > STYLE > COLOR 0 0 0 > SIZE 1 > END > END > END > > > > -- > Grazie al modello matematico posso dirvi Come ? nato l'universo: > non chiedetemi il Perch?. (Stephen Hawking) > From cplist at SECONDCREEK.ORG Mon Nov 26 11:26:26 2007 From: cplist at SECONDCREEK.ORG (Charlton Galvarino) Date: Mon, 26 Nov 2007 14:26:26 -0500 Subject: SOS eventTime not liking formatted time cols In-Reply-To: <2DC5CCA14756424BBBEE8B4B2E4A682F0105A0A6@ecburexch1.ontario.int.ec.gc.ca> Message-ID: Hi, Tom: > > I am running into a problem w/ eventTime when I am trying to > > hit a timstamp col. that I've formatted. In other words, my > > SOS would return nice results for this DATA string . . . > > > > select *, to_char(m_date at time zone 'UTC','YYYY-MM-DD') || > > 'T' || to_char(m_date at time zone 'UTC','HH24:MI+00:00') as > > t from v_platform_sensor_obs > > What happens when you apply the eventTime constraint with > gml:beginPosition and gml:endPosition formatted as per the to_char > functions in your SQL statement? No dice. Link w/o eventTime (all results): http://preview.tinyurl.com/yvzmfe Link w/ eventTime (no results): http://preview.tinyurl.com/2ey9sf TIA, Charlton From guillaume.sueur at NEOGEO-ONLINE.NET Mon Nov 26 12:54:28 2007 From: guillaume.sueur at NEOGEO-ONLINE.NET (Guillaume Sueur) Date: Mon, 26 Nov 2007 21:54:28 +0100 Subject: Never forget : TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER Message-ID: Hey, I've just spent a bunch of hours wondering what was going wrong... I've been praticing MapServer for years, but it always takes a while to remember that : TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER I think some bot could send the message to everyone every week or something. Just to KEEP IT IN MIND. ARHRHRHHHRHRHHGHGHHTHHGHGHG Sorry guys, I think I feel better now. I couldn't scream now at home because the kid is sleeping... -- Guillaume SUEUR -------------- next part -------------- A non-text attachment was scrubbed... Name: guillaume_sueur.vcf Type: text/x-vcard Size: 310 bytes Desc: not available URL: From matt.pettis at THOMSON.COM Mon Nov 26 13:24:14 2007 From: matt.pettis at THOMSON.COM (Matt Pettis) Date: Mon, 26 Nov 2007 15:24:14 -0600 Subject: PHP Mapscript: Map extent not being set to what I am passing setExtent on my map object Message-ID: Hi, I am passing an extent to my map object to set it, but it is not being set to what I am telling it. I cannot find an error -- can someone look at it? Here's the relevant code: === PHP code === echo "
buf_max_extent is: "; print_r( $buf_max_extent ); echo
"

\n"; $map->setExtent($buf_max_extent[1],$buf_max_extent[2],$buf_max_extent[3] ,$buf_max_extent[4]); echo "
final extent is: "; print_r( $map->extent ); echo
"

\n"; === End PHP code === === HTTP Output === buf_max_extent is: Array ( [1] => 490059.61375 [2] => 5163285.525 [3] => 764351.51125 [4] => 5388702.975 ) final extent is: ms_rect_obj Object ( [_handle_] => Resource id #7 [minx] => 476927.2625 [miny] => 5163285.525 [maxx] => 777483.8625 [maxy] => 5388702.975 ) === End HTTP Output === tia, matt It is from the wellspring of our despair and the places that we are broken that we come to repair the world. -- Murray Waas -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.pettis at THOMSON.COM Mon Nov 26 13:31:48 2007 From: matt.pettis at THOMSON.COM (Matt Pettis) Date: Mon, 26 Nov 2007 15:31:48 -0600 Subject: PHP Mapscript: Map extent not being set to what I am passing setExtent on my map object In-Reply-To: <89C159F45B13A24682D98BDEF58E451F13A52CC8@TLRUSMNEAGMBX28.ERF.THOMSON.COM> Message-ID: umm... i think i *may* have answered my own question... does it have to do with the dimensions of the ouput image that is set? i have a final image that has a 4:3 ratio, and does the setExtent function automatically account for the image dimensions? It seems so, for when I do this: === PHP code === $map->setExtent(-1,-1,1,1); echo "
final extent is: "; print_r( $map->extent ); echo
"

\n"; === End PHP code === I get: === HTML Output === final extent is: ms_rect_obj Object ( [_handle_] => Resource id #7 [minx] => -1.33333333333 [miny] => -1 [maxx] => 1.33333333333 [maxy] => 1 ) === End HTML Output === Just threw me... thanks, matt ________________________________ From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Pettis, Matthew (TOC TGTI) Sent: Monday, November 26, 2007 3:24 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] PHP Mapscript: Map extent not being set to what I am passing setExtent on my map object Hi, I am passing an extent to my map object to set it, but it is not being set to what I am telling it. I cannot find an error -- can someone look at it? Here's the relevant code: === PHP code === echo "
buf_max_extent is: "; print_r( $buf_max_extent ); echo
"

\n"; $map->setExtent($buf_max_extent[1],$buf_max_extent[2],$buf_max_extent[3] ,$buf_max_extent[4]); echo "
final extent is: "; print_r( $map->extent ); echo
"

\n"; === End PHP code === === HTTP Output === buf_max_extent is: Array ( [1] => 490059.61375 [2] => 5163285.525 [3] => 764351.51125 [4] => 5388702.975 ) final extent is: ms_rect_obj Object ( [_handle_] => Resource id #7 [minx] => 476927.2625 [miny] => 5163285.525 [maxx] => 777483.8625 [maxy] => 5388702.975 ) === End HTTP Output === tia, matt It is from the wellspring of our despair and the places that we are broken that we come to repair the world. -- Murray Waas -------------- next part -------------- An HTML attachment was scrubbed... URL: From nospam420 at YAHOO.COM Mon Nov 26 17:53:07 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Mon, 26 Nov 2007 17:53:07 -0800 Subject: AGG install In-Reply-To: <2482247e0709060218v72c14b1aj61cbb889b6afbd46@mail.gmail.com> Message-ID: frequens wrote: > > Would somebody be willing to write a few > lines how to install Libagg for Mapserver use, preferably for a Linux > system? > Disclaimer -- I haven't tried anything with this yet, in fact I hadn't even heard about AGG until just now while browsing the mailing lists to try to solve problems I was having with antialiasing not working on lines of TYPE CARTOLINE. Nevertheless, if you're running Debian etch (aka debian 4.0), I see that there's a package available for libagg-dev. So just `aptitude install libagg-dev` or `apt-get install libagg-dev`. Right now I've been playing around with mapserver on Debian sarge (aka debian 3.1), but I've been thinking of upgrading to etch. [rich at etchbuild ~ 17:43:21]$ dpkg -p libagg-dev Package: libagg-dev Priority: optional Section: libdevel Installed-Size: 2996 Maintainer: Debian OpenOffice Team Architecture: i386 Source: agg Version: 2.4+20060719-3 Conflicts: libagg23-dev Filename: pool/main/a/agg/libagg-dev_2.4+20060719-3_i386.deb Size: 518774 MD5sum: 998ba7490b83657c9ba56c0ee7320776 Description: The AntiGrain Geometry graphical toolkit (development files) Anti-Grain Geometry (AGG) is a general purpose graphical toolkit written completely in standard and platform independent C++. It can be used in many areas of computer programming where high quality 2D graphics is an essential part of the project. . This package contains the development files for building applications using agg. SHA1: b216ed638764aeef26ecf1c2c5103d8840670d71 SHA256: 7f03cb1a9d07b01ad4ce3360a89e14dea5058eee3097ea5a86b4a082dda63178 Tag: devel::library [rich at etchbuild ~ 17:43:25]$ -- View this message in context: http://www.nabble.com/AGG-install-tf4390828.html#a13963191 Sent from the Mapserver - User mailing list archive at Nabble.com. From nospam420 at YAHOO.COM Mon Nov 26 18:21:16 2007 From: nospam420 at YAHOO.COM (Rich Fromm) Date: Mon, 26 Nov 2007 20:21:16 -0600 Subject: AGG docs (and 5.0.0 docs in general) ? Message-ID: I've been exploring mapserver a bit for the past few weeks, and my main source of documentation has been the various bits that are here: http://mapserver.gis.umn.edu/docs And specifically this URL for the mapfile syntax: http://mapserver.gis.umn.edu/docs/reference/mapfile As I mentioned in another post: http://lists.umn.edu/cgi-bin/wa?A2=ind0711&L=mapserver-users&T=0&F=&S=&X=1543504A22CA5E519A&Y=nospam420%40yahoo.com&P=51466 I was considering posting to the list a question about having trouble getting antialiasing working with lines of TYPE CARTOLINE. It was only through exploring these archives that I became aware of the existence of AGG, and the fact that cartoline symbols are likely to be deprecated in the future: http://lists.umn.edu/cgi-bin/wa?A2=ind0709&L=MAPSERVER-USERS&P=R29108&D=0&H=0&O=T&T=0&X=1543504A22CA5E519A&Y=nospam420%40yahoo.com I gather from reading these archives a little that using AGG largely just entails specifying it as an OUTPUTFORMAT, although I can find no mention of AGG as an available OUTPUTFORMAT here: http://mapserver.gis.umn.edu/docs/reference/mapfile/outputformat I had been under the impression that that documentation was current for 5.0.0. I do recognize that the cartographic symbol documentation itself makes no claim to be any more recent than 4.8 http://mapserver.gis.umn.edu/docs/howto/cartosymbols/ So finally, the crux of my question: 1) Is there any specific documentation for using AGG with mapserver? The only mention of it that I have yet been able to find outside of this mailing list archive is the following single line in README.CONFIGURE (so I assume I will have to install agg and then recompile mapserver to try this). --with-agg[=DIR] Include AGG support (DIR is AGG's install dir). 2) More generally, is there any mapserver 5.0.0 specific documentation, and is there any way to know what version any particular documentation refers to if it does not explicitly say? There's not much in the way of documentation included in the mapserver .tar.gz file, certainly nothing with the (very good) level of detail that is available on the web. Thanks in advance for any help you may have to offer. - Rich Fromm From nospam420 at YAHOO.COM Mon Nov 26 18:47:49 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Mon, 26 Nov 2007 18:47:49 -0800 Subject: AGG docs (and 5.0.0 docs in general) ? In-Reply-To: Message-ID: rich.fromm wrote: > > 1) Is there any specific documentation for using AGG with mapserver? > Just to clarify, in case it wasn't obvious, I do see that there's documentation with the AGG distribution itself: http://www.antigrain.com/doc/index.html But I'm talking about information specifically about using AGG as a rendering backend for mapserver. Thanks. - Rich -- View this message in context: http://www.nabble.com/AGG-docs-%28and-5.0.0-docs-in-general%29---tf4879380.html#a13963692 Sent from the Mapserver - User mailing list archive at Nabble.com. From woodbri at SWOODBRIDGE.COM Mon Nov 26 19:03:02 2007 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Mon, 26 Nov 2007 22:03:02 -0500 Subject: AGG docs (and 5.0.0 docs in general) ? In-Reply-To: <13963692.post@talk.nabble.com> Message-ID: rich.fromm wrote: > rich.fromm wrote: >> 1) Is there any specific documentation for using AGG with mapserver? >> > > Just to clarify, in case it wasn't obvious, I do see that there's > documentation with the AGG distribution itself: > http://www.antigrain.com/doc/index.html > > But I'm talking about information specifically about using AGG as a > rendering backend for mapserver. > > Thanks. > - Rich > Go to the http://mapserver.gis.umn.edu and search for agg sand you should find http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics/?searchterm=agg If you have compile/build problems, please be specific. This closed bug might give you some hints, but it should all be taken care with the ./configure script now. http://trac.osgeo.org/mapserver/ticket/2215 -Steve W From luca76 at GMAIL.COM Mon Nov 26 23:53:48 2007 From: luca76 at GMAIL.COM (Luca Manganelli) Date: Tue, 27 Nov 2007 08:53:48 +0100 Subject: Problem with TILEINDEX with Mapserver 5.0 In-Reply-To: Message-ID: It doesn't work, using AGG or normal renderer. On 11/26/07, thomas bonfort wrote: > is this using the agg renderer? > if so try using WIDTH instead of SIZE > > thomas > > On Nov 26, 2007 8:16 PM, Luca Manganelli wrote: > > Hi, > > > > I have problem with TILEINDEX. Mapserver 5.0 refuses to render this > > layer. Note that Mapserver 4.10 works flawlessy. Is there any known > > bug referring to 5.0? > > > > LAYER > > NAME "test tiled" > > TYPE LINE > > TILEINDEX "base/test" > > TILEITEM "LOCATION" > > STATUS OFF > > TEMPLATE void > > OPACITY 30 > > MINSCALE 500 > > CLASS > > NAME "test" > > STYLE > > COLOR 0 0 0 > > SIZE 1 > > END > > END > > END > > > > > > > > -- > > Grazie al modello matematico posso dirvi Come ? nato l'universo: > > non chiedetemi il Perch?. (Stephen Hawking) > > > -- Grazie al modello matematico posso dirvi Come ? nato l'universo: non chiedetemi il Perch?. (Stephen Hawking) From woodbri at SWOODBRIDGE.COM Tue Nov 27 05:25:11 2007 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Tue, 27 Nov 2007 08:25:11 -0500 Subject: Problem with TILEINDEX with Mapserver 5.0 In-Reply-To: Message-ID: Try changing STATUS OFF to STATUS DEFAULT -Steve W Luca Manganelli wrote: > It doesn't work, using AGG or normal renderer. > > On 11/26/07, thomas bonfort wrote: >> is this using the agg renderer? >> if so try using WIDTH instead of SIZE >> >> thomas >> >> On Nov 26, 2007 8:16 PM, Luca Manganelli wrote: >>> Hi, >>> >>> I have problem with TILEINDEX. Mapserver 5.0 refuses to render this >>> layer. Note that Mapserver 4.10 works flawlessy. Is there any known >>> bug referring to 5.0? >>> >>> LAYER >>> NAME "test tiled" >>> TYPE LINE >>> TILEINDEX "base/test" >>> TILEITEM "LOCATION" >>> STATUS OFF >>> TEMPLATE void >>> OPACITY 30 >>> MINSCALE 500 >>> CLASS >>> NAME "test" >>> STYLE >>> COLOR 0 0 0 >>> SIZE 1 >>> END >>> END >>> END >>> >>> >>> >>> -- >>> Grazie al modello matematico posso dirvi Come ? nato l'universo: >>> non chiedetemi il Perch?. (Stephen Hawking) >>> > > From nospam420 at YAHOO.COM Tue Nov 27 13:32:19 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Tue, 27 Nov 2007 13:32:19 -0800 Subject: AGG install In-Reply-To: <2482247e0709061422h3691cd43j38c4b38dfb1c1eed@mail.gmail.com> Message-ID: frequens wrote: > > On 9/6/07, Stephen Woodbridge wrote: > >> You do not need install AGG, just download it to a working dir and type >> make in that dir. Then in the mapserver dir >> ./configure --with-agg=/path/to/agg/dir ... >> and you are done. > > Sorry, Steve and Thomas, did not work for me at all on a Linux Opteron > box. > > I had to do it the way Yves describes it: > http://wiki.gloobe.org/doku.php/foss_installation#compilation_v5.0 > (already > also in English, thanks Yves; I had to do also the "make install"). > And yes, libSDL2.1-devel seems to be obligatory, while the > '?libdir=/usr/lib64' setting was not needed on my system. > Trying to access that URL, I get what I believe is trying to tell me of a 403 error in French, so I'll write up a few tips here based on my experiences. Note that this was using AGG 2.5, so ymmv. My understanding is that mapserver 5.0.0 is currently recommending AGG 2.4 for licensing reasons, but for initial experimentation I decided to just download the latest since I'm building it all from source. I'm fairly certain it is now using AGG instead of GD, although since I'm still not able to get working the feature that motivated my switch to AGG (antialiased lines), you may wish to take these instructions with a grain of salt. I am running Debian 3.1 (sarge). As I noted before, there is currently no sarge backport for libagg-dev (it is available on Debian 4.0, aka etch). agg 2.5 suggests building using the auto* tools. (This requires you to have automake, autoconf, etc. already installed. That's beyond the scope of what I'm going to describe here.) Once you unpack the *.tar.gz file, to run up to and through the configure step, execute: . autogen.sh When I did this, I ended up with the following error: ./configure: line 19907: syntax error near unexpected token `$SDL_VERSION,' ./configure: line 19907: `AM_PATH_SDL($SDL_VERSION,' which seems to confirm what frequens earlier said about libsdl being necessary. This was trivial to install for me, since there was a debian package: sudo aptitude install libsdl-dev (Or use apt-get instead of aptitude, and/or just run as root if you don't use sudo.) This did scare me a little bit, since it pulled in a LOT of other dependencies, but it ultimately seemed to install fine. Now I reran the autogen script which I think seemed to go okay this time. Make by executing: make I think that not installing agg (as recommended by Stephen Woodbridge) is likely to be problematic for your build of mapserver, since the build puts the resulting libbagg.so in a src/.libs subdir, and I think that the mapserver build is assuming a lib subdir of whatever is passed to configure with the --with-agg flag. So I ended up installing it with: sudo make install (Or run as root if you don't use sudo.) This will put everything in subdirs of /usr/local, unless you passed some different --prefix=/foo/bar to the configure script (possibly via the autogen.sh script). Now you're free to configure and build mapserver. When I initially added just the following to my configure line: --with-agg=/usr/local I got the following error: checking if AGG support requested... configure: error: freetype required for agg support - please configure --with-freetype. So I ended up adding all of the following to my existing configure line: --with-agg=/usr/local --with-freetype And that worked fine. I already had the libfreetype6-dev debian package for sarge (version 2.1.7-8), so there was nothing further to install. Then I executed: make And all worked well. However, when I tried generating a map via apache2 and the CGI interface, I got a 500 error, and the following in my /var/log/apache2/error.log file: mapserv: error while loading shared libraries: libagg.so.2: cannot open shared object file: No such file or directory This was also evident when I tried to just run: mapserv -v With the previous binary (before I build with AGG), it returned: MapServer version 5.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=THREADS INPUT=EPPL7 INPUT=SHAPEFILE But now it returned: /usr/lib/cgi-bin/mapserv: error while loading shared libraries: libagg.so.2: cannot open shared object file: No such file or directory I could fix this locally by setting: export LD_LIBRARY_PATH=/usr/local/lib And now it returned: MapServer version 5.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=THREADS INPUT=EPPL7 INPUT=SHAPEFILE So the final bit was figuring out how to get apache2 to set this via the CGI interface. I added the following to my configuration at /etc/apache2/sites-available/default SetEnv LD_LIBRARY_PATH /usr/local/lib An alternative that also worked was just placing the SetEnv line within a previously existing tag. # ... SetEnv LD_LIBRARY_PATH /usr/local/lib # ... But I preferred the former, since it limited this to just what I needed, nameply mapserver. Your specific manner of configuring your webserver may vary (this is for apache2 2.0), and the specific location of your configuration files may also vary (apache2 is installed for me via the sarge debian package). Hopefully this might be of some help to someone. This probably would have been FAR easier on debian etch, since the libagg-dev package presumably would have automatically pulled in anything it needed (like libsdl-dev), and the libraries would have ended up in /usr/lib instead of /usr/local/lib, therefore avoiding having to explicitly set LD_LIBRARY_PATH for apache2. - Rich Fromm -- View this message in context: http://www.nabble.com/AGG-install-tf4390828.html#a13979959 Sent from the Mapserver - User mailing list archive at Nabble.com. From nospam420 at YAHOO.COM Tue Nov 27 14:03:31 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Tue, 27 Nov 2007 14:03:31 -0800 Subject: antialiased lines with AGG Message-ID: Summary: I was previously trying to get antialiased lines working with cartographic symbols and having no luck. I've now switched my rendering backend from GD to AGG and am still not able to get antialiased lines working. I have downloaded and installed AGG 2.5. I realize that for licensing reasons, mapserver is currently suggesting AGG 2.4. Might this be significant? I haven't yet tried this with AGG 2.4, I had thought the issue was just one of licensing, and not functionality. In case it's at all relevant, some details of my install and build experience can be found here: http://lists.umn.edu/cgi-bin/wa?A2=ind0711&L=mapserver-users&D=1&T=0&O=D&X=5A77662D019C30E09D&Y=nospam420%40yahoo.com&P=52157 http://www.nabble.com/AGG-install-tf4390828.html#a13979959 As suggested by Stephen Woodbridge : http://lists.umn.edu/cgi-bin/wa?A2=ind0711&L=mapserver-users&D=1&T=0&O=D&X=5A77662D019C30E09D&Y=nospam420%40yahoo.com&P=51780 http://www.nabble.com/AGG-docs-%28and-5.0.0-docs-in-general%29---tf4879380.html I am using the following as my reference for AGG: http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics/?searchterm=agg There it says: --- All rendering is now done antialiased by default. All ANTIALIAS keywords are now ignored --- I have narrowed things down to a fairly small testcase, with just a single line layer: LAYER NAME majhwys DATA MajHwys STATUS DEFAULT # DEFAULT means on TYPE LINE CLASS NAME "Major Highways" STYLE COLOR 32 32 32 END END END I have alternatively tried all three of the suggested PNG OUTPUTFORMAT's from that web page (only one at a time, of course): OUTPUTFORMAT NAME 'AGG' DRIVER AGG/PNG IMAGEMODE RGB END OUTPUTFORMAT NAME 'AGG' DRIVER AGG/PNG IMAGEMODE RGBA END OUTPUTFORMAT NAME 'AGG_Q' DRIVER AGG/PNG IMAGEMODE RGB FORMATOPTION "QUANTIZE_FORCE=ON" FORMATOPTION "QUANTIZE_DITHER=OFF" FORMATOPTION "QUANTIZE_COLORS=256" END And I have also tried the following suggested OUTPUTFORMAT from http://mapserver.gis.umn.edu/development/rfc/ms-rfc-32/?searchterm=AGG OUTPUTFORMAT NAME 'AGG_PNG24' DRIVER AGG/PNG IMAGEMODE RGB END I have not tried JPEG, as I have not compiled with jpeg support. Additionally, I have alternatively tried this: IMAGETYPE PNG vs. this: IMAGETYPE PNG24 So 8 permutations total. In none of the cases am I rendering antialiased lines. I tried adding 'ANTIALIAS TRUE' to the STYLE section (contrary to the advice in the docs), and indeed it does not help. Antialiased text (in a more complex example) is working for me. And indeed I no longer need the 'ANTIALIAS TRUE' in the corresponding LABEL section like I used to with GD. The text is indeed antialiased automatically without it now, like the docs claim. But I can't get antialiased lines. This is true if I specify no width (and get lines of width 1), or if I specify a width with the WIDTH parameter in the STYLE section. See the attached png image which was generated using the first IMAGETYPE and first OUTPUTFORMAT shown above, and has all of the major highways in all of CA and NV drawn with a single pixel width. [I hope this worked, the nabble web interface to this mailing list isn't all that clear on whether or not it did...] This is with mapserver-5.0.0, running on debian sarge (3.1), served via CGI with apache2 2.0.54-5sarge1. Thanks for any help that anyone might be able to provide. - Rich Fromm -- View this message in context: http://www.nabble.com/antialiased-lines-with-AGG-tf4884770.html#a13980962 Sent from the Mapserver - User mailing list archive at Nabble.com. From yassefa at DMSOLUTIONS.CA Tue Nov 27 14:11:24 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Tue, 27 Nov 2007 17:11:24 -0500 Subject: AGG rendering : fill symbol using vector symbols Message-ID: Tomas, When using a vector symbol as fills for a polygon type layer, even if the GAP parameter is set to 0, there seems to be a 1pix gap between the tiles used as fills. It this something that is desired? Thanks -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From nospam420 at YAHOO.COM Tue Nov 27 14:11:23 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Tue, 27 Nov 2007 14:11:23 -0800 Subject: AGG docs (and 5.0.0 docs in general) ? In-Reply-To: <474B88E6.1040803@swoodbridge.com> Message-ID: Stephen Woodbridge wrote: > > Go to the http://mapserver.gis.umn.edu and search for agg sand you > should find > http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics/?searchterm=agg > > If you have compile/build problems, please be specific. This closed bug > might give you some hints, but it should all be taken care with the > ./configure script now. > http://trac.osgeo.org/mapserver/ticket/2215 > Further help that I'm requesting has now moved to a new topic that I think is more specific and therefore appropriate. However, just for completeness of anyone reading this in the future, another page with some AGG info is here: http://mapserver.gis.umn.edu/development/rfc/ms-rfc-32/?searchterm=AGG And my issues compiling and building agg and mapserver can be found here: http://lists.umn.edu/cgi-bin/wa?A2=ind0711&L=mapserver-users&D=1&T=0&O=D&F=&S=&X=5A77662D019C30E09D&Y=nospam420%40yahoo.com&P=52157 http://www.nabble.com/AGG-install-tf4390828.html#a13979959 -- View this message in context: http://www.nabble.com/AGG-docs-%28and-5.0.0-docs-in-general%29---tf4879380.html#a13980967 Sent from the Mapserver - User mailing list archive at Nabble.com. From thomas.bonfort at GMAIL.COM Tue Nov 27 14:17:39 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Tue, 27 Nov 2007 23:17:39 +0100 Subject: antialiased lines with AGG In-Reply-To: <13980962.post@talk.nabble.com> Message-ID: Rich: it's your IMAGETYPE that you're setting wrong. it should reference one of the agg outputformats, eg IMAGETYPE AGG or IMAGETYPE AGG_Q thomas On Nov 27, 2007 11:03 PM, rich.fromm wrote: > Summary: I was previously trying to get antialiased lines working with > cartographic symbols and having no luck. I've now switched my rendering > backend from GD to AGG and am still not able to get antialiased lines > working. > > I have downloaded and installed AGG 2.5. I realize that for licensing > reasons, mapserver is currently suggesting AGG 2.4. Might this be > significant? I haven't yet tried this with AGG 2.4, I had thought the issue > was just one of licensing, and not functionality. In case it's at all > relevant, some details of my install and build experience can be found here: > > http://lists.umn.edu/cgi-bin/wa?A2=ind0711&L=mapserver-users&D=1&T=0&O=D&X=5A77662D019C30E09D&Y=nospam420%40yahoo.com&P=52157 > http://www.nabble.com/AGG-install-tf4390828.html#a13979959 > > As suggested by Stephen Woodbridge : > > http://lists.umn.edu/cgi-bin/wa?A2=ind0711&L=mapserver-users&D=1&T=0&O=D&X=5A77662D019C30E09D&Y=nospam420%40yahoo.com&P=51780 > http://www.nabble.com/AGG-docs-%28and-5.0.0-docs-in-general%29---tf4879380.html > > I am using the following as my reference for AGG: > > http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics/?searchterm=agg > > There it says: > > --- > All rendering is now done antialiased by default. All ANTIALIAS keywords are > now ignored > --- > > I have narrowed things down to a fairly small testcase, with just a single > line layer: > > LAYER > NAME majhwys > DATA MajHwys > STATUS DEFAULT # DEFAULT means on > TYPE LINE > CLASS > NAME "Major Highways" > STYLE > COLOR 32 32 32 > END > END > END > > I have alternatively tried all three of the suggested PNG OUTPUTFORMAT's > from > that web page (only one at a time, of course): > > OUTPUTFORMAT > NAME 'AGG' > DRIVER AGG/PNG > IMAGEMODE RGB > END > > OUTPUTFORMAT > NAME 'AGG' > DRIVER AGG/PNG > IMAGEMODE RGBA > END > > OUTPUTFORMAT > NAME 'AGG_Q' > DRIVER AGG/PNG > IMAGEMODE RGB > FORMATOPTION "QUANTIZE_FORCE=ON" > FORMATOPTION "QUANTIZE_DITHER=OFF" > FORMATOPTION "QUANTIZE_COLORS=256" > END > > And I have also tried the following suggested OUTPUTFORMAT from > http://mapserver.gis.umn.edu/development/rfc/ms-rfc-32/?searchterm=AGG > > OUTPUTFORMAT > NAME 'AGG_PNG24' > DRIVER AGG/PNG > IMAGEMODE RGB > END > > I have not tried JPEG, as I have not compiled with jpeg support. > > Additionally, I have alternatively tried this: > > IMAGETYPE PNG > > vs. this: > > IMAGETYPE PNG24 > > So 8 permutations total. In none of the cases am I rendering antialiased > lines. > > I tried adding 'ANTIALIAS TRUE' to the STYLE section (contrary to the advice > in the docs), and indeed it does not help. > > Antialiased text (in a more complex example) is working for me. And indeed > I > no longer need the 'ANTIALIAS TRUE' in the corresponding LABEL section like > I > used to with GD. The text is indeed antialiased automatically without it > now, > like the docs claim. > > But I can't get antialiased lines. This is true if I specify no width (and > get lines of width 1), or if I specify a width with the WIDTH parameter in > the > STYLE section. > > See the attached png image which was generated using the first IMAGETYPE and > first OUTPUTFORMAT shown above, and has all of the major highways in all of > CA > and NV drawn with a single pixel width. [I hope this worked, the nabble web > interface to this mailing list isn't all that clear on whether or not it > did...] > > This is with mapserver-5.0.0, running on debian sarge (3.1), served via CGI > with apache2 2.0.54-5sarge1. > > Thanks for any help that anyone might be able to provide. > > - Rich Fromm > > -- > View this message in context: http://www.nabble.com/antialiased-lines-with-AGG-tf4884770.html#a13980962 > Sent from the Mapserver - User mailing list archive at Nabble.com. > From thomas.bonfort at GMAIL.COM Tue Nov 27 14:23:11 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Tue, 27 Nov 2007 23:23:11 +0100 Subject: antialiased lines with AGG In-Reply-To: Message-ID: oh, and agg 2.4 is for the time being strictly identical to 2.5 , except for the license. tb On Nov 27, 2007 11:17 PM, thomas bonfort wrote: > Rich: > it's your IMAGETYPE that you're setting wrong. it should reference > one of the agg outputformats, eg IMAGETYPE AGG or IMAGETYPE AGG_Q > > thomas > > > On Nov 27, 2007 11:03 PM, rich.fromm wrote: > > Summary: I was previously trying to get antialiased lines working with > > cartographic symbols and having no luck. I've now switched my rendering > > backend from GD to AGG and am still not able to get antialiased lines > > working. > > > > I have downloaded and installed AGG 2.5. I realize that for licensing > > reasons, mapserver is currently suggesting AGG 2.4. Might this be > > significant? I haven't yet tried this with AGG 2.4, I had thought the issue > > was just one of licensing, and not functionality. In case it's at all > > relevant, some details of my install and build experience can be found here: > > > > http://lists.umn.edu/cgi-bin/wa?A2=ind0711&L=mapserver-users&D=1&T=0&O=D&X=5A77662D019C30E09D&Y=nospam420%40yahoo.com&P=52157 > > http://www.nabble.com/AGG-install-tf4390828.html#a13979959 > > > > As suggested by Stephen Woodbridge : > > > > http://lists.umn.edu/cgi-bin/wa?A2=ind0711&L=mapserver-users&D=1&T=0&O=D&X=5A77662D019C30E09D&Y=nospam420%40yahoo.com&P=51780 > > http://www.nabble.com/AGG-docs-%28and-5.0.0-docs-in-general%29---tf4879380.html > > > > I am using the following as my reference for AGG: > > > > http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics/?searchterm=agg > > > > There it says: > > > > --- > > All rendering is now done antialiased by default. All ANTIALIAS keywords are > > now ignored > > --- > > > > I have narrowed things down to a fairly small testcase, with just a single > > line layer: > > > > LAYER > > NAME majhwys > > DATA MajHwys > > STATUS DEFAULT # DEFAULT means on > > TYPE LINE > > CLASS > > NAME "Major Highways" > > STYLE > > COLOR 32 32 32 > > END > > END > > END > > > > I have alternatively tried all three of the suggested PNG OUTPUTFORMAT's > > from > > that web page (only one at a time, of course): > > > > OUTPUTFORMAT > > NAME 'AGG' > > DRIVER AGG/PNG > > IMAGEMODE RGB > > END > > > > OUTPUTFORMAT > > NAME 'AGG' > > DRIVER AGG/PNG > > IMAGEMODE RGBA > > END > > > > OUTPUTFORMAT > > NAME 'AGG_Q' > > DRIVER AGG/PNG > > IMAGEMODE RGB > > FORMATOPTION "QUANTIZE_FORCE=ON" > > FORMATOPTION "QUANTIZE_DITHER=OFF" > > FORMATOPTION "QUANTIZE_COLORS=256" > > END > > > > And I have also tried the following suggested OUTPUTFORMAT from > > http://mapserver.gis.umn.edu/development/rfc/ms-rfc-32/?searchterm=AGG > > > > OUTPUTFORMAT > > NAME 'AGG_PNG24' > > DRIVER AGG/PNG > > IMAGEMODE RGB > > END > > > > I have not tried JPEG, as I have not compiled with jpeg support. > > > > Additionally, I have alternatively tried this: > > > > IMAGETYPE PNG > > > > vs. this: > > > > IMAGETYPE PNG24 > > > > So 8 permutations total. In none of the cases am I rendering antialiased > > lines. > > > > I tried adding 'ANTIALIAS TRUE' to the STYLE section (contrary to the advice > > in the docs), and indeed it does not help. > > > > Antialiased text (in a more complex example) is working for me. And indeed > > I > > no longer need the 'ANTIALIAS TRUE' in the corresponding LABEL section like > > I > > used to with GD. The text is indeed antialiased automatically without it > > now, > > like the docs claim. > > > > But I can't get antialiased lines. This is true if I specify no width (and > > get lines of width 1), or if I specify a width with the WIDTH parameter in > > the > > STYLE section. > > > > See the attached png image which was generated using the first IMAGETYPE and > > first OUTPUTFORMAT shown above, and has all of the major highways in all of > > CA > > and NV drawn with a single pixel width. [I hope this worked, the nabble web > > interface to this mailing list isn't all that clear on whether or not it > > did...] > > > > This is with mapserver-5.0.0, running on debian sarge (3.1), served via CGI > > with apache2 2.0.54-5sarge1. > > > > Thanks for any help that anyone might be able to provide. > > > > - Rich Fromm > > > > -- > > View this message in context: http://www.nabble.com/antialiased-lines-with-AGG-tf4884770.html#a13980962 > > Sent from the Mapserver - User mailing list archive at Nabble.com. > > > From nospam420 at YAHOO.COM Tue Nov 27 14:25:55 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Tue, 27 Nov 2007 14:25:55 -0800 Subject: Premature end of script headers In-Reply-To: Message-ID: fwiw, i have found that a message like that, more specifically for me like: [Tue Nov 27 11:13:08 2007] [error] [client 127.0.0.1] Premature end of script headers: mapserv in /var/log/apache2/error.log (this is with apache2 2.0.54-5sarge1 installed from dpkg on debian sarge) is mapserver's generic way of saying that something went drastically wrong. every problem that i've had that's resulted in a 500 (internal server) error of the webserver processing the mapserv cgi-bin has resulted in a message like this in the apache error log. sometimes there's also some more useful info there, sometimes not. - rich -- View this message in context: http://www.nabble.com/Premature-end-of-script-headers-tf4833034.html#a13981485 Sent from the Mapserver - User mailing list archive at Nabble.com. From nospam420 at YAHOO.COM Tue Nov 27 14:38:36 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Tue, 27 Nov 2007 14:38:36 -0800 Subject: antialiased lines with AGG In-Reply-To: Message-ID: tbonfort wrote: > > it's your IMAGETYPE that you're setting wrong. it should reference > one of the agg outputformats, eg IMAGETYPE AGG or IMAGETYPE AGG_Q > Thank you so much! That did the trick. Image size is somewhat important to me, so I suspect I'll be using IMAGETYPE AGG_Q. Other than what's shown in the example at: http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics/view do you know if there are any other FORMATOPTION's within the OUTPUTFORMAT that can be tweaked? The OUTPUTFORMAT docs within the mapfile reference still just make reference to GD options, not AGG: http://mapserver.gis.umn.edu/docs/reference/mapfile/outputformat I suppose if all else fails I could look in the source, although I'm not sure if that would be more appropriate in the mapserver source or the agg source. -- View this message in context: http://www.nabble.com/antialiased-lines-with-AGG-tf4884770.html#a13981498 Sent from the Mapserver - User mailing list archive at Nabble.com. From thomas.bonfort at GMAIL.COM Tue Nov 27 14:44:59 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Tue, 27 Nov 2007 23:44:59 +0100 Subject: antialiased lines with AGG In-Reply-To: <13981498.post@talk.nabble.com> Message-ID: I think they are all in that howto, except for the fact that you can specify your own palette if using quantization. what are you looking for in particular? On Nov 27, 2007 11:38 PM, rich.fromm wrote: > tbonfort wrote: > > > > it's your IMAGETYPE that you're setting wrong. it should reference > > one of the agg outputformats, eg IMAGETYPE AGG or IMAGETYPE AGG_Q > > > > Thank you so much! That did the trick. > > Image size is somewhat important to me, so I suspect I'll be using IMAGETYPE > AGG_Q. Other than what's shown in the example at: > > http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics/view > > do you know if there are any other FORMATOPTION's within the OUTPUTFORMAT > that can be tweaked? > > The OUTPUTFORMAT docs within the mapfile reference still just make reference > to GD options, not AGG: > > http://mapserver.gis.umn.edu/docs/reference/mapfile/outputformat > > I suppose if all else fails I could look in the source, although I'm not > sure if that would be more appropriate in the mapserver source or the agg > source. > > -- > View this message in context: http://www.nabble.com/antialiased-lines-with-AGG-tf4884770.html#a13981498 > > Sent from the Mapserver - User mailing list archive at Nabble.com. > From nospam420 at YAHOO.COM Tue Nov 27 15:15:16 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Tue, 27 Nov 2007 15:15:16 -0800 Subject: antialiased lines with AGG In-Reply-To: Message-ID: tbonfort wrote: > > I think they are all in that howto, except for the fact that you can > specify your own palette if using quantization. what are you looking > for in particular? > >> Image size is somewhat important to me, so I suspect I'll be using >> IMAGETYPE >> AGG_Q. Other than what's shown in the example at: >> >> http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics/view >> >> do you know if there are any other FORMATOPTION's within the OUTPUTFORMAT >> that can be tweaked? > I don't have anything in particular that I was looking for. I just wanted to know what knobs are available, so that when I get to the point of really worrying about time vs. space vs. quality tradeoffs I know what my options are. For example, if I take one of my testcases (generated using IMAGETYPE AGG_Q) and run it through pngcrush, it goes from 47783 bytes down to 45402. Which means there is at least a little room (if not necessarily via mapserver) for making it smaller, although the crushed file is 95% of the original size, so that's a sign that mapserver as configured is doing a pretty good job. Thanks again for your help. - Rich -- View this message in context: http://www.nabble.com/antialiased-lines-with-AGG-tf4884770.html#a13982316 Sent from the Mapserver - User mailing list archive at Nabble.com. From nospam420 at YAHOO.COM Tue Nov 27 15:38:12 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Tue, 27 Nov 2007 15:38:12 -0800 Subject: outline colors for lines ? Message-ID: First of all, thank you for all of the prompt and helpful assistance I've gotten so far. I hope I'm not asking too many questions here. Now on to my current quandry: Is there any simple way of drawing lines with outlines? The mapfile docs: http://mapserver.gis.umn.edu/docs/reference/mapfile/style are indeed very clear in saying for OUTLINECOLOR that: Line symbols do not support outline colors. Although since there seem to be other examples of where those docs are mapserver 4.x centric, I thought it might be worth asking with respect to 5.0.0. But I don't see any evidence of it in the 4.10.x to 5.0.x migration guide: http://trac.osgeo.org/mapserver/browser/tags/rel-5-0-0/mapserver/MIGRATION_GUIDE.TXT And I tried just adding an OUTLINECOLOR along with the existing COLOR in the STYLE section for a line, and that didn't work. Currently the approach that I'm taking is as follows. For a line of width of m pixels plus an outline of n pixels, I first draw a line of width m+(2*n) with the COLOR of the outline, and then I draw a line of width m with the COLOR of the main line atop that. This was based on suggestions here: http://mapserver.gis.umn.edu/docs/howto/cartosymbols/ While that works, it seems a little hacky, and I wonder if it has performance issues since ultimately each line has to be completely rendered twice. So I was wondering if there was a better way. -- View this message in context: http://www.nabble.com/outline-colors-for-lines---tf4885234.html#a13982649 Sent from the Mapserver - User mailing list archive at Nabble.com. From woodbri at SWOODBRIDGE.COM Tue Nov 27 19:24:37 2007 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Tue, 27 Nov 2007 22:24:37 -0500 Subject: outline colors for lines ? In-Reply-To: <13982649.post@talk.nabble.com> Message-ID: Rich, Lines with outlines are drawn either using a SYMBOL that is a pixmap that is dragged along the line. Or you can use two or more STYLEs in a single CLASS like: STYLE COLOR 255 0 0 WIDTH 5 END STYLE COLOR 0 0 255 WIDTH 3 END Which would draw a 5 pixel wide red line and then overlay that with a 3 pixel wide blue line giving the appearance of blue line with a one pixel outline in red. -Steve W rich.fromm wrote: > First of all, thank you for all of the prompt and helpful assistance I've > gotten so far. I hope I'm not asking too many questions here. > > Now on to my current quandry: Is there any simple way of drawing lines with > outlines? > > The mapfile docs: > > http://mapserver.gis.umn.edu/docs/reference/mapfile/style > > are indeed very clear in saying for OUTLINECOLOR that: > > Line symbols do not support outline colors. > > Although since there seem to be other examples of where those docs are > mapserver 4.x centric, I thought it might be worth asking with respect to > 5.0.0. But I don't see any evidence of it in the 4.10.x to 5.0.x migration > guide: > > > http://trac.osgeo.org/mapserver/browser/tags/rel-5-0-0/mapserver/MIGRATION_GUIDE.TXT > > And I tried just adding an OUTLINECOLOR along with the existing COLOR in the > STYLE section for a line, and that didn't work. > > Currently the approach that I'm taking is as follows. For a line of width > of > m pixels plus an outline of n pixels, I first draw a line of width m+(2*n) > with the COLOR of the outline, and then I draw a line of width m with the > COLOR of the main line atop that. This was based on suggestions here: > > http://mapserver.gis.umn.edu/docs/howto/cartosymbols/ > > While that works, it seems a little hacky, and I wonder if it has > performance > issues since ultimately each line has to be completely rendered twice. So I > was wondering if there was a better way. > From kreshna_iceheart at YAHOO.COM Tue Nov 27 20:09:55 2007 From: kreshna_iceheart at YAHOO.COM (kreshna_iceheart@yahoo.com) Date: Tue, 27 Nov 2007 20:09:55 -0800 Subject: Multiple adjacent shape file and postGIS? Message-ID: Er, I hope I'm not asking the wrong question here. I'm about to try MapServer with postGIS spatial database. I have tried converting SHP file to postGIS table using this guide: http://www.bostongis.com/?content_name=postgis_tut01 And it was quite successful. However, my real data is multiple adjacent SHPs. When using SHP files for Map Server, I can use tile indexing. But now I'm going to use postGIS table. So the question is: how can I convert all those adjacent shape files to a postGIS table? Is there any 'append' feature that I haven't been aware of? Many thanks, -Kresh __________________________________________________________________ So be it. If saying "NO" means being alone, then to hell with love, with women, with marriage, with God, religions, bars, nightclubs, computer games, and all the shit life keeps pumping at me. I'll walk alone, but with freedom and a healed pride. ____________________________________________________________________________________ Get easy, one-click access to your favorites. Make Yahoo! your homepage. http://www.yahoo.com/r/hs From woodbri at SWOODBRIDGE.COM Tue Nov 27 21:17:54 2007 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Wed, 28 Nov 2007 00:17:54 -0500 Subject: Multiple adjacent shape file and postGIS? In-Reply-To: <996650.70840.qm@web56108.mail.re3.yahoo.com> Message-ID: kreshna_iceheart at yahoo.com wrote: > Er, I hope I'm not asking the wrong question here. > > I'm about to try MapServer with postGIS spatial > database. I have tried converting SHP file to postGIS > table using this guide: > http://www.bostongis.com/?content_name=postgis_tut01 > > And it was quite successful. > > However, my real data is multiple adjacent SHPs. When > using SHP files for Map Server, I can use tile > indexing. But now I'm going to use postGIS table. > > So the question is: how can I convert all those > adjacent shape files to a postGIS table? Is there any > 'append' feature that I haven't been aware of? > > Many thanks, > -Kresh For the first file in a table use -c and then for all the rest use -a read: woodbri at carto:~/dev$ shp2pgsql RCSID: $Id: shp2pgsql.c,v 1.106 2006/01/16 10:42:58 strk Exp $ USAGE: shp2pgsql [] [.]
OPTIONS: -s Set the SRID field. If not specified it defaults to -1. (-d|a|c|p) These are mutually exclusive options: -d Drops the table , then recreates it and populates it with current shape file data. -a Appends shape file into current table, must be exactly the same table schema. -c Creates a new table and populates it, this is the default if you do not specify any options. -p Prepare mode, only creates the table -g Specify the name of the geometry column (mostly useful in append mode). -D Use postgresql dump format (defaults to sql insert statments. -k Keep postgresql identifiers case. -i Use int4 type for all integer dbf fields. -I Create a GiST index on the geometry column. -w Use wkt format (for postgis-0.x support - drops M - drifts coordinates). -W Specify the character encoding of Shape's attribute column. (default : "ASCII") -N Specify NULL geometries handling policy (insert,skip,abort) From warmerdam at POBOX.COM Tue Nov 27 21:54:44 2007 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Wed, 28 Nov 2007 00:54:44 -0500 Subject: GDAL/OGR 1.4.4 Release Message-ID: The GDAL project is pleased to announce the GDAL/OGR 1.4.4 release. This is a bug fix release in the 1.4.x stable release series and adds no significant new features. This release replaces the GDAL/OGR 1.4.3 release which has been retracted by the project as it included an unexpected ABI (Application Binary Interface) change from the earlier 1.4.x releases. This ABI change means that applications using the GDAL/OGR C++ interface, and GDAL/OGR driver plugins built against GDAL/OGR 1.4.0, 1.4.1 or 1.4.2 could not be safely used with GDAL/OGR 1.4.3. All applications redistributing binaries are encouraged to discard GDAL/OGR 1.4.3 and use 1.4.4 instead. The GDAL/OGR 1.4.4 release is ABI compatiable with all earlier 1.4.x releases except for the disavowed 1.4.3. GDAL/OGR 1.4.4 is available in source format at: http://download.osgeo.org/gdal/gdal-1.4.4.tar.gz http://download.osgeo.org/gdal/gdal144.zip More detailed NEWS on fixes in the 1.4.4 release can be found at: http://trac.osgeo.org/gdal/wiki/Release/1.4.4-News GDAL 1.5.0, a major "new features" release, will be entering beta during December, and it is hoped a GDAL 1.5.0 release will be available by the end of year. 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 | President OSGeo, http://osgeo.org From boolean10001 at YAHOO.COM Wed Nov 28 07:27:12 2007 From: boolean10001 at YAHOO.COM (Carlos Ruiz) Date: Wed, 28 Nov 2007 07:27:12 -0800 Subject: QUERYRESULT QUESTION Message-ID: Hello to all, I have a polygon layer, and i do a query by point operation, it's possible just to show the polygon's perimeter as selected instead the whole polygon ? Thanks in advance IC Carlos Ruiz --------------------------------- Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From klawrenc at NRCAN.GC.CA Wed Nov 28 12:06:57 2007 From: klawrenc at NRCAN.GC.CA (Lawrence, Kevin) Date: Wed, 28 Nov 2007 15:06:57 -0500 Subject: Esri trying a wms GetFeatureInfo from mapserver In-Reply-To: A<4733404F.2000206@frii.com> Message-ID: Hi all I am sure this has been hashed about before. I am using mapserver 4.4.1 a client is using ESRI product GisServer. My capabilities document does not list text/xml as a feature response, but the client's getfeatureinfo request always come across with a &INFO_FORMAT=text/xml. The response from my mapserv can be seen at https://glfc.cfsnet.nfis.org/mapserver/cgi-bin/wms_layer02100?SERVICE=WM S&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=g6181&STYLES=&SRS=EPSG:432 6&BBOX=-145,12.4713876967096,-50,117.52861230329&FORMAT=image/png&HEIGHT =773&WIDTH=699&TRANSPARENT=FALSE&BGCOLOR=0xFFFFFF&QUERY_LAYERS=g6181&INF O_FORMAT=text/xml&FEATURE_COUNT=50&X=351&Y=497&EXCEPTIONS=application/vn d.ogc.se_xml The client seems to have no idea how to controll the software from their end so I am tring to find out if if I can provide an acceptable response. Does mapserver support INFO_FORMAT=text/xml and if so at what version? If not I will try to intercept the request and format a correct response, but I hate doing something that has already been done before. Thanks in advance Kevin Lawrence GIS analyst 1219 Queen Street East Sault Ste. Marie Ontario P6A 2E5 From David.Fawcett at STATE.MN.US Wed Nov 28 12:29:02 2007 From: David.Fawcett at STATE.MN.US (Fawcett, David) Date: Wed, 28 Nov 2007 14:29:02 -0600 Subject: Esri trying a wms GetFeatureInfo from mapserver In-Reply-To: A<8E69C9E47359D64D89A7CB9B0375FB990220D3DE@S0-OTT-X3.nrn.nrcan.gc.ca> Message-ID: Kevin, MapServer 4.4 is very old. I believe that much of the work and improvements on WMS/WFS started around version 4.6 You should definitely upgrade to at least 4.10 or 5.0. David. -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Lawrence, Kevin Sent: Wednesday, November 28, 2007 2:07 PM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] Esri trying a wms GetFeatureInfo from mapserver Hi all I am sure this has been hashed about before. I am using mapserver 4.4.1 a client is using ESRI product GisServer. My capabilities document does not list text/xml as a feature response, but the client's getfeatureinfo request always come across with a &INFO_FORMAT=text/xml. The response from my mapserv can be seen at https://glfc.cfsnet.nfis.org/mapserver/cgi-bin/wms_layer02100?SERVICE=WM S&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=g6181&STYLES=&SRS=EPSG:432 6&BBOX=-145,12.4713876967096,-50,117.52861230329&FORMAT=image/png&HEIGHT =773&WIDTH=699&TRANSPARENT=FALSE&BGCOLOR=0xFFFFFF&QUERY_LAYERS=g6181&INF O_FORMAT=text/xml&FEATURE_COUNT=50&X=351&Y=497&EXCEPTIONS=application/vn d.ogc.se_xml The client seems to have no idea how to controll the software from their end so I am tring to find out if if I can provide an acceptable response. Does mapserver support INFO_FORMAT=text/xml and if so at what version? If not I will try to intercept the request and format a correct response, but I hate doing something that has already been done before. Thanks in advance Kevin Lawrence GIS analyst 1219 Queen Street East Sault Ste. Marie Ontario P6A 2E5 From dnuttall at DNLT.COM Wed Nov 28 16:44:41 2007 From: dnuttall at DNLT.COM (Dave Nuttall) Date: Wed, 28 Nov 2007 18:44:41 -0600 Subject: PHP Mapscript Zoom/Pan Help Needed Message-ID: I have a working instance of MS5.0 on CentOS-5 with PHP and Mapscript running as modules. Using the MS5 cgi tutorial on the wiki, I am able to create static maps of the Upper Great Lakes region, but I'm stumped when it comes to duplicating the zoom/pan functions via the Mapscript module. My code/map are attached in the hope that someone can/will offer some assistance. TIA to anyone who shares knowledge with me! Dave Nuttall San Antonio, Texas -------------- next part -------------- A non-text attachment was scrubbed... Name: example2.php Type: application/octet-stream Size: 3198 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example2.map Type: application/octet-stream Size: 11210 bytes Desc: not available URL: From arko at LDEO.COLUMBIA.EDU Wed Nov 28 21:42:30 2007 From: arko at LDEO.COLUMBIA.EDU (Bob Arko) Date: Thu, 29 Nov 2007 00:42:30 -0500 Subject: access WFS attributes in MS client? Message-ID: I have installed and tested a WFS server and client with MapServer 4.10.3 and PostGIS 1.2.1. My WFS layer (feature) loads and displays properly, and I can query it by clicking the map - which returns the correct class template.html. How do I access the attributes of the feature instance in the template file? I've tried various versions of [attrname], [name], [wfs_attrname] with no luck. Thanks. Bob From mlinden at ZEELANDNET.NL Thu Nov 29 02:12:46 2007 From: mlinden at ZEELANDNET.NL (Milo van der Linden) Date: Thu, 29 Nov 2007 11:12:46 +0100 Subject: gdal2tiles and mapserver Message-ID: Hello list! I am currently slicing up a ecw file with gdal2tiles (as included in FWtools 2.0) It works like a charm and I see a nice directory structure appear. Now I would like to be able to use these tiles in mapserver, does anyone know if this is possible at all? Or am I on the wrong track and should I use the batch-script that was handed to me earlier? Kind regards, Milo van der Linden -------------- next part -------------- An HTML attachment was scrubbed... URL: From holger.jaekel at GAF.DE Thu Nov 29 03:08:23 2007 From: holger.jaekel at GAF.DE (Holger Jaekel) Date: Thu, 29 Nov 2007 12:08:23 +0100 Subject: gdal2tiles and mapserver In-Reply-To: A<474E909E.30700@zeelandnet.nl> Message-ID: Hello Milo, On Thursday, November 29, 2007 11:13 AM, Milo van der Linden wrote: > I am currently slicing up a ecw file with gdal2tiles (as included in FWtools 2.0) I think ECW allows decompression of selected regions without the need to decompress the whole file, so what is the advantage of creating tiles? Mapserver can read ECW via GDAL, so you can define a layer like: LAYER NAME "ecwlayer" DATA "image.ecw" TYPE RASTER STATUS ON END > Now I would like to be able to use these tiles in mapserver, does anyone know if > this is possible at all? Or am I on the wrong track and should I use the batch-script > that was handed to me earlier? You have to create a tileindex file (e.g. with gdaltindex) and use the tileindex shapefile in your mapfile. Best regards, Holger --- Holger Jaekel phone: +49 (89) 121528-75 mailto:holger.jaekel at gaf.de fax: +49 (89) 121528-79 http://www.gaf.de GAF AG Arnulfstr. 197 D-80634 Muenchen Germany Vorstand: Dr. Peter Volk, Aufsichtsratsvorsitzender: Marcello Maranesi Amtsgericht Muenchen HRB 140 509, Firmensitz: Muenchen From umn-ms at HYDROTEC.DE Thu Nov 29 03:44:29 2007 From: umn-ms at HYDROTEC.DE (Benedikt Rothe) Date: Thu, 29 Nov 2007 12:44:29 +0100 Subject: layerObj.queryByAttributes changed with Oracle Message-ID: Hello List I'm using Mapserer with Oracle/Java-Mapscript and migrating my app from Mapserver 4.x to Mapserer 5.x and have a problem with layerObj.queryByAttributes. I used to query features with code like this: alayerObj.queryByAttributes(aMapObj, "ID", "ID=4711", mapscript. MS_SINGLE); In Mapserver 5 this code results in an Mapserver-Error-Message stating, that the "SQL command is not properly ended". The Mapserver-generated SQL-Command includes a Where-Clause of the form "ID = ID = 4711". I had a look in maporaclespatial.c function "osFilteritem". Follwing code seems to produce this Where-Clause: if (layer->filteritem != NULL) { sprintf (query_str + strlen(query_str), " %s = ", layer->filteritem); //snprintf (query_str + strlen(query_str), " %s = ", layer->filteritem); } Changing my Java-Code to alayerObj.queryByAttributes(aMapObj, "ID", "4711", mapscript.MS_SINGLE); solves the problem. Questions: * Is this a bug in Mapserver or a new feature? * Is this really a change in Mapserver 5.0? * Shall I rather change my Java-Code or shall I patch Mapserver/ maporaclespatial.c/osFilteritem? Would the changed Java-Code work with the Oracle-driver only? Greetings from Aachen/Germany Benedikt Rothe Attachement "Error-Message": (Added Newlines) msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-00933: SQL command not properly ended . Query statement: SELECT ID, ID, SHAPE FROM (select ID,SHAPE FROM MYTABLE) WHERE ID = ID = 4711 AND SDO_FILTER( SHAPE, MDSYS.SDO_GEOMETRY(2003, 82015, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3), MDSYS.SDO_ORDINATE_ARRAY(2501576.69,5621567,2503419.31,5622567) ),'querytype=window') = 'TRUE' . Check your data statement. Attachement "Part of mapfile": # Projekte LAYER NAME "PROJEKT" TYPE POINT STATUS DEFAULT #DEBUG ON TEMPLATE "dummy.html" CONNECTION "XXX/YYY at ZZZ" CONNECTIONTYPE oraclespatial DATA "SHAPE FROM (select ID,SHAPE FROM MYTABLE) using unique ID srid 82015" CLASS NAME "" STYLE COLOR 0 100 100 OUTLINECOLOR 0 0 0 SIZE 12 SYMBOL 'star' END END END -------------- next part -------------- An HTML attachment was scrubbed... URL: From fsimon at UNIVALI.BR Thu Nov 29 07:57:40 2007 From: fsimon at UNIVALI.BR (Fernando Simon) Date: Thu, 29 Nov 2007 13:57:40 -0200 Subject: layerObj.queryByAttributes changed with Oracle In-Reply-To: Message-ID: Hi Benedikt, This is a Oracle Spatial driver change for 5.0. And the source of this issue was relate with some Filter/FilterItem problems for Oracle Spatial in early versions (4.x). The osFilterItem function in the source code is relate with FILTER and FILTERITEM definitions for Mapfile (you can see here: http://mapserver.gis.umn.edu/docs/reference/mapfile/referencemanual-all-pages) and Mapscript. In the PHPMapscript, the info for queryByAttribute relate that the parameters that you pass will overwrite what you define for FILTER/FILTERITEM in Mapfile. In the same doc for queryByAttribute: "qitem is the item (attribute) on which the query is performed, and qstring is the expression to match." In the source code for 5.0 version this is a new (maybe better) interpretation for the docs. I believe that this new way is better when compared with the docs. Best regards. Fernando Simon Benedikt Rothe wrote: > > Hello List > > I'm using Mapserer with Oracle/Java-Mapscript and migrating my app > from Mapserver 4.x to Mapserer 5.x > and have a problem with layerObj.queryByAttributes. > > I used to query features with code like this: > alayerObj.queryByAttributes(aMapObj, "ID", "ID=4711", > mapscript./MS_SINGLE/); > In Mapserver 5 this code results in an Mapserver-Error-Message > stating, that the "SQL command is not properly ended". > > The Mapserver-generated SQL-Command includes a Where-Clause of the > form "ID = ID = 4711". > > I had a look in maporaclespatial.c function "osFilteritem". > Follwing code seems to produce this Where-Clause: > if (layer->filteritem != NULL) > { > sprintf (query_str + strlen(query_str), " %s = ", layer->filteritem); > //snprintf (query_str + strlen(query_str), " %s = ", > layer->filteritem); > } > > Changing my Java-Code to > alayerObj.queryByAttributes(aMapObj, "ID", "4711", > mapscript./MS_SINGLE/); > solves the problem. > > Questions: > * Is this a bug in Mapserver or a new feature? > * Is this really a change in Mapserver 5.0? > * Shall I rather change my Java-Code or shall I patch Mapserver/ > maporaclespatial.c/osFilteritem? > Would the changed Java-Code work with the Oracle-driver only? > > Greetings from Aachen/Germany > Benedikt Rothe > > *Attachement "Error-Message": *(Added Newlines) > msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: > ORA-00933: SQL command not properly ended > . Query statement: > SELECT > ID, ID, SHAPE > FROM > (select ID,SHAPE > FROM MYTABLE) > WHERE *ID = ID = 4711* AND > SDO_FILTER( > SHAPE, MDSYS.SDO_GEOMETRY(2003, 82015, > NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3), > MDSYS.SDO_ORDINATE_ARRAY(2501576.69,5621567,2503419.31,5622567) > ),'querytype=window') = 'TRUE' . > Check your data statement. > > *Attachement "Part of mapfile":* > # Projekte > LAYER > NAME "PROJEKT" > TYPE POINT > STATUS DEFAULT > #DEBUG ON > TEMPLATE "dummy.html" > CONNECTION "XXX/YYY at ZZZ" > CONNECTIONTYPE oraclespatial > DATA "SHAPE FROM (select ID,SHAPE FROM MYTABLE) using unique ID > srid 82015" > CLASS > NAME "" > STYLE > COLOR 0 100 100 > OUTLINECOLOR 0 0 0 > SIZE 12 > SYMBOL 'star' > END > END > END From umn-ms at HYDROTEC.DE Thu Nov 29 08:39:40 2007 From: umn-ms at HYDROTEC.DE (Benedikt Rothe) Date: Thu, 29 Nov 2007 17:39:40 +0100 Subject: layerObj.queryByAttributes changed with Oracle In-Reply-To: <474EE174.5040406@univali.br> Message-ID: Hi Fernando Thanks for your quick response! Since in many cases the where-part is more complex the easiest solution for me is to omit the second parameter: alayerObj.queryByAttributes(aMapObj, null, "ID=4711",mapscript./MS_SINGLE/); Mmmh. It looks like this parameter was useless all the time anyway! Thank you very much! Benedikt PS: The documentation in http://mapserver.gis.umn.edu/docs/reference/mapfile/referencemanual-all-pages states, that FILTERITEM is only used in conjunction with OGR/Shapefile. Fernando Simon schrieb am 29.11.2007 16:57:40: > Hi Benedikt, > This is a Oracle Spatial driver change for 5.0. And the source of > this issue was relate with some Filter/FilterItem problems for Oracle > Spatial in early versions (4.x). > The osFilterItem function in the source code is relate with FILTER > and FILTERITEM definitions for Mapfile (you can see here: > http://mapserver.gis.umn.edu/docs/reference/mapfile/referencemanual-all-pages) > and Mapscript. In the PHPMapscript, the info for queryByAttribute relate > that the parameters that you pass will overwrite what you define for > FILTER/FILTERITEM in Mapfile. In the same doc for queryByAttribute: > "qitem is the item (attribute) on which the query is performed, and > qstring is the expression to match." > In the source code for 5.0 version this is a new (maybe better) > interpretation for the docs. I believe that this new way is better when > compared with the docs. > Best regards. > > Fernando Simon > > > Benedikt Rothe wrote: > > > > Hello List > > > > I'm using Mapserer with Oracle/Java-Mapscript and migrating my app > > from Mapserver 4.x to Mapserer 5.x > > and have a problem with layerObj.queryByAttributes. > > > > I used to query features with code like this: > > alayerObj.queryByAttributes(aMapObj, "ID", "ID=4711", > > mapscript./MS_SINGLE/); > > In Mapserver 5 this code results in an Mapserver-Error-Message > > stating, that the "SQL command is not properly ended". > > > > The Mapserver-generated SQL-Command includes a Where-Clause of the > > form "ID = ID = 4711". > > > > I had a look in maporaclespatial.c function "osFilteritem". > > Follwing code seems to produce this Where-Clause: > > if (layer->filteritem != NULL) > > { > > sprintf (query_str + strlen(query_str), " %s = ", layer->filteritem); > > //snprintf (query_str + strlen(query_str), " %s = ", > > layer->filteritem); > > } > > > > Changing my Java-Code to > > alayerObj.queryByAttributes(aMapObj, "ID", "4711", > > mapscript./MS_SINGLE/); > > solves the problem. > > > > Questions: > > * Is this a bug in Mapserver or a new feature? > > * Is this really a change in Mapserver 5.0? > > * Shall I rather change my Java-Code or shall I patch Mapserver/ > > maporaclespatial.c/osFilteritem? > > Would the changed Java-Code work with the Oracle-driver only? > > > > Greetings from Aachen/Germany > > Benedikt Rothe > > > > *Attachement "Error-Message": *(Added Newlines) > > msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: > > ORA-00933: SQL command not properly ended > > . Query statement: > > SELECT > > ID, ID, SHAPE > > FROM > > (select ID,SHAPE > > FROM MYTABLE) > > WHERE *ID = ID = 4711* AND > > SDO_FILTER( > > SHAPE, MDSYS.SDO_GEOMETRY(2003, 82015, > > NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3), > > MDSYS.SDO_ORDINATE_ARRAY(2501576.69,5621567,2503419.31,5622567) > > ),'querytype=window') = 'TRUE' . > > Check your data statement. > > > > *Attachement "Part of mapfile":* > > # Projekte > > LAYER > > NAME "PROJEKT" > > TYPE POINT > > STATUS DEFAULT > > #DEBUG ON > > TEMPLATE "dummy.html" > > CONNECTION "XXX/YYY at ZZZ" > > CONNECTIONTYPE oraclespatial > > DATA "SHAPE FROM (select ID,SHAPE FROM MYTABLE) using unique ID > > srid 82015" > > CLASS > > NAME "" > > STYLE > > COLOR 0 100 100 > > OUTLINECOLOR 0 0 0 > > SIZE 12 > > SYMBOL 'star' > > END > > END > > END -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Lime at DNR.STATE.MN.US Thu Nov 29 10:48:53 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Thu, 29 Nov 2007 12:48:53 -0600 Subject: QUERYRESULT QUESTION In-Reply-To: <593449.506.qm@web38207.mail.mud.yahoo.com> Message-ID: In a querymap or ??? Sorta depends on how you are using the image in your application. You could, for example, setup a special layer that is not normally drawn for this purpose. In your mapfile you'd have: # normal polygon layer LAYER ... END # layer to hilite a polygon LAYER NAME 'hilite' ... CLASSITEM 'primary_key' CLASS EXPRESSION '[primary_key_value]' END END Then in your query results instead of using a query map you'd call mapserver, turning on the hilite layer and passing in the primary key value for the selected polygon, for example: That would work if you're using query templates. You could also query the hilite layer specifically, only turning it on for queries and using a standard querymap. You get more flexibility in symbolization with the first approach. Make sense? Steve >>> On 11/28/2007 at 9:27 AM, in message <593449.506.qm at web38207.mail.mud.yahoo.com>, Carlos Ruiz wrote: > Hello to all, > > I have a polygon layer, and i do a query by point operation, it's possible > just to show the > polygon's perimeter as selected instead the whole polygon ? > > Thanks in advance > > > IC Carlos Ruiz > > > > --------------------------------- > Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it > now. From Steve.Lime at DNR.STATE.MN.US Thu Nov 29 10:53:25 2007 From: Steve.Lime at DNR.STATE.MN.US (Steve Lime) Date: Thu, 29 Nov 2007 12:53:25 -0600 Subject: Never forget : TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER In-Reply-To: <474B3284.5030304@neogeo-online.net> Message-ID: ;-) Note that there is an RFC out now that will address this, although you'll still have to explicitly set it so your message will change to: QUERYABLE MUST BE TRUE IF YOU WANT TO QUERY YOUR LAYER QUERYABLE MUST BE TRUE IF YOU WANT TO QUERY YOUR LAYER QUERYABLE MUST BE TRUE IF YOU WANT TO QUERY YOUR LAYER QUERYABLE MUST BE TRUE IF YOU WANT TO QUERY YOUR LAYER QUERYABLE MUST BE TRUE IF YOU WANT TO QUERY YOUR LAYER Steve >>> On 11/26/2007 at 2:54 PM, in message <474B3284.5030304 at neogeo-online.net>, Guillaume Sueur wrote: > Hey, > > I've just spent a bunch of hours wondering what was going wrong... > I've been praticing MapServer for years, but it always takes a while to > remember that : > TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER > TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER > TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER > TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER > TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER > > I think some bot could send the message to everyone every week or > something. Just to KEEP IT IN MIND. > > > ARHRHRHHHRHRHHGHGHHTHHGHGHG > > Sorry guys, I think I feel better now. I couldn't scream now at home > because the kid is sleeping... From guillaume.sueur at NEOGEO-ONLINE.NET Thu Nov 29 12:16:50 2007 From: guillaume.sueur at NEOGEO-ONLINE.NET (Guillaume Sueur) Date: Thu, 29 Nov 2007 21:16:50 +0100 Subject: Never forget : TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER In-Reply-To: <474EB645.5157.008F.0@dnr.state.mn.us> Message-ID: Thanks Steve, I'll update my checklist ! Steve Lime a ?crit : > ;-) > > Note that there is an RFC out now that will address this, although you'll still have to > explicitly set it so your message will change to: > > QUERYABLE MUST BE TRUE IF YOU WANT TO QUERY YOUR LAYER > QUERYABLE MUST BE TRUE IF YOU WANT TO QUERY YOUR LAYER > QUERYABLE MUST BE TRUE IF YOU WANT TO QUERY YOUR LAYER > QUERYABLE MUST BE TRUE IF YOU WANT TO QUERY YOUR LAYER > QUERYABLE MUST BE TRUE IF YOU WANT TO QUERY YOUR LAYER > > Steve > >>>> On 11/26/2007 at 2:54 PM, in message <474B3284.5030304 at neogeo-online.net>, > Guillaume Sueur wrote: >> Hey, >> >> I've just spent a bunch of hours wondering what was going wrong... >> I've been praticing MapServer for years, but it always takes a while to >> remember that : >> TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER >> TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER >> TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER >> TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER >> TEMPLATE MUST BE SET IF YOU WANT TO QUERY YOUR LAYER >> >> I think some bot could send the message to everyone every week or >> something. Just to KEEP IT IN MIND. >> >> >> ARHRHRHHHRHRHHGHGHHTHHGHGHG >> >> Sorry guys, I think I feel better now. I couldn't scream now at home >> because the kid is sleeping... > -- Guillaume SUEUR Expert SIG et OpenSource NEOGEO 46 RUE MATABIAU 31000 TOULOUSE 06 65 58 88 82 Site web : http://www.neogeo-online.net From nospam420 at YAHOO.COM Thu Nov 29 15:07:48 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Thu, 29 Nov 2007 15:07:48 -0800 Subject: substitution or transformation of text data via mapserver Message-ID: From bruno_gendron at YAHOO.COM Fri Nov 30 05:35:45 2007 From: bruno_gendron at YAHOO.COM (Bruno Gendron) Date: Fri, 30 Nov 2007 07:35:45 -0600 Subject: UPDATE Re: C# Mapscript ASP.NET Deployment Problem Message-ID: Hi Tamas, First, sorry for not answering your message sooner, I've been very busy since last Sunday trying to understand what's going on. To make a short story, our ASP.NET 2.0 webapp is now deployed on a shared server. We are using MS4W-2.2.6, with all dependencies. Right now, the web page that uses C#Mapscript does not load because of the following security exception: System.Security.SecurityException: That assembly does not allow partially trusted callers. I suspect the problem I was getting last week was related to the same error. I was hoping to get around this problem by re-compiling Mapserver with fewer dependencies. So, I've downloaded Howard Butler's Build Kit (version 4.8), and I managed to get it to compile OK, but no manifest is created with mapscript.dll (manifests are only created with mapserv.exe and other EXEs). I also tried the default build kit nmake.opts file with other versions of Mapserver (4.10 and 5.0), but in these cases, there is an error when building csharp: something like "a syntax error occurred in input #1". So, I'm unable to verify if a manifest will be created with the mapscript DLL. Any ideas? Yours, -- Bruno On Sun, 25 Nov 2007 00:40:28 +0100, Tamas Szekeres wrote: >I should also ask you about the mapserver version, which dependencies >are compiled in, and the actual use case of your application that >produce the problem with special regards of the usage of the mapscript >objects. > >Best regards, > >Tamas From schuermann at CITKOMM.DE Fri Nov 30 06:06:17 2007 From: schuermann at CITKOMM.DE (Matthias Schuermann) Date: Fri, 30 Nov 2007 15:06:17 +0100 Subject: legend not drawn with mapserver 5.0? Message-ID: Hi, I'm having trouble with legends in MapServer 5.0, they will not be drawn at all! With MapServer 4.10 everything works fine, but in 5.0 something goes wrong. By the way, it's the same Mapfile. Is this a bug, or do I have to configure new legend-specific params in 5.0? Thank you for your answer in advance. Matthias Sch?rmann From thomas.bonfort at GMAIL.COM Fri Nov 30 07:26:42 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Fri, 30 Nov 2007 16:26:42 +0100 Subject: legend not drawn with mapserver 5.0? In-Reply-To: <001001c8335a$2d0366d0$ae2ec20a@xschueml1> Message-ID: yes its a bug that will be fixed in 5.0.1. for the time being you can replace maplegend.c in your source tree by this one: http://trac.osgeo.org/mapserver/browser/branches/branch-5-0/mapserver/maplegend.c?format=raw and recompile. thomas On Nov 30, 2007 3:06 PM, Matthias Schuermann wrote: > Hi, > > I'm having trouble with legends in MapServer 5.0, they will not be drawn at > all! > With MapServer 4.10 everything works fine, but in 5.0 something goes wrong. > By the way, it's the same Mapfile. > > Is this a bug, or do I have to configure new legend-specific params in 5.0? > > Thank you for your answer in advance. > > Matthias Sch?rmann > From szekerest at GMAIL.COM Fri Nov 30 10:41:00 2007 From: szekerest at GMAIL.COM (Tamas Szekeres) Date: Fri, 30 Nov 2007 19:41:00 +0100 Subject: UPDATE Re: C# Mapscript ASP.NET Deployment Problem In-Reply-To: Message-ID: Bruno, I guess your deployment configuration would require to add the following line: [assembly:AllowPartiallyTrustedCallers] in mapscript\csharp\config\AssemblyInfo.cs You can add this row and recompile the csharp bindings to see whether this fix solves the problem or not. However I've never run into this problem. Could you describe the steps in a ticket to reproduce this behaviour? http://trac.osgeo.org/mapserver/newticket Best regards, Tamas 2007/11/30, Bruno Gendron : > Hi Tamas, > > First, sorry for not answering your message sooner, I've been very busy > since last Sunday trying to understand what's going on. > > To make a short story, our ASP.NET 2.0 webapp is now deployed on a shared > server. We are using MS4W-2.2.6, with all dependencies. Right now, the web > page that uses C#Mapscript does not load because of the following security > exception: > > System.Security.SecurityException: That assembly does not allow partially > trusted callers. > > I suspect the problem I was getting last week was related to the same error. > > I was hoping to get around this problem by re-compiling Mapserver with fewer > dependencies. > > So, I've downloaded Howard Butler's Build Kit (version 4.8), and I managed > to get it to compile OK, but no manifest is created with mapscript.dll > (manifests are only created with mapserv.exe and other EXEs). > > I also tried the default build kit nmake.opts file with other versions of > Mapserver (4.10 and 5.0), but in these cases, there is an error when > building csharp: something like "a syntax error occurred in input #1". So, > I'm unable to verify if a manifest will be created with the mapscript DLL. > > Any ideas? > > Yours, > > -- > Bruno > > On Sun, 25 Nov 2007 00:40:28 +0100, Tamas Szekeres wrote: > > >I should also ask you about the mapserver version, which dependencies > >are compiled in, and the actual use case of your application that > >produce the problem with special regards of the usage of the mapscript > >objects. > > > >Best regards, > > > >Tamas > > From gregor at HOSTGIS.COM Fri Nov 30 11:51:16 2007 From: gregor at HOSTGIS.COM (Gregor Mosheh) Date: Fri, 30 Nov 2007 12:51:16 -0700 Subject: Why does my WFS filter not work? Message-ID: Hey, all. I have my Mapserver WFS server basically working, and can do BBOX queries: http://69.59.158.15/cgi-bin/mapserv?map=/maps/spraywatch2/wms/mapfile.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&typename=parcels&srs=EPSG:4326&bbox=168.011840820312,-46.9196395874023,168.127075195312,-46.896656036377) But I can't filter by other features: http://69.59.158.15/cgi-bin/mapserv?map=/maps/spraywatch2/wms/mapfile.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&typename=parcels&Filter=gid2389524 If you look closely, you'll see that the first feature listed in the bbox URL is the one being queried in the second URL, gid=2389524 What am I missing here? -- Gregor Mosheh / Greg Allensworth System Administrator, HostGIS cartographic development & hosting services http://www.HostGIS.com/ "Remember that no one cares if you can back up, only if you can restore." - AMANDA From nospam420 at YAHOO.COM Fri Nov 30 12:09:54 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Fri, 30 Nov 2007 12:09:54 -0800 Subject: Color shifts using QUANTIZE_COLORS=256 In-Reply-To: <44DA32D2.80009@swoodbridge.com> Message-ID: Stephen Woodbridge wrote: > > Thanks for the pointer to the bug. I will add some comments to it even > though it is closed. > > Bart van den Eijnden (OSGIS) wrote: >> there is some info by Frank in the following bug report (assuming it is >> not outdated): >> >> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=684 > I think this may be just a rehashing of this same issue, which I think is further covered in the following (the URL has moved): http://trac.osgeo.org/mapserver/ticket/684 Trouble tricking Mapserver colors in 8-bit mode Ticket #684 (closed defect: wontfix) Although since that was opened 4 years ago, last modified more than 1 year ago, and this thread is from the time (>1 year ago) of that last modification, I want to make sure that this is valid and I'm understanding things properly. I've narrowed this down to a very simple test case (see below). ALL that I'm attempting to displaying here is an 80% grey background. This works fine with both the AGG and GD rendering backends, as long as quantization is not enabled. However, if I enable quantization, instead of getting a uniform background of (204,204,204), I get (204,206,204). And I'm quite surprised at how visually noticeable such a small green shift is. I can preserve the proper color if I use IMAGEMODE PC256 rather than IMAGEMODE RGB, but that is only valid with GD. If I try to use it with AGG, I get the following error message: --- msDrawMap(): Image handling error. Unable to initialize image. msPrepareImage(): GD library error. Unable to initialize image. msImageCreateAGG(): AGG library error. AGG driver only supports RGB or RGBA pixel models. --- I have a very strong preference for using AGG instead of GD. And I would prefer to make my PNG's smaller by not using full 24bit color. I realize a plain background is a bit of an extreme case, but in this case the size difference is dramatic: -rw-r--r-- 1 rich engr 2809 2007-11-30 11:14 agg.png -rw-r--r-- 1 rich engr 133 2007-11-30 11:15 agg_q.png -rw-r--r-- 1 rich engr 2809 2007-11-30 11:14 gd.png -rw-r--r-- 1 rich engr 133 2007-11-30 11:37 gd_q.png -rw-r--r-- 1 rich engr 133 2007-11-30 11:47 gd_256.png And here are the color distributions within the images: agg.png -------- 0: (204,204,204) grey80 agg_q.png -------- 0: (204,206,204) #CCCECC gd.png -------- 0: (204,204,204) grey80 gd_q.png -------- 0: (204,206,204) #CCCECC gd_256.png -------- 0: (204,204,204) grey80 I realize that sometimes quantization will by its very nature need to change colors, but I had not expected this if the input image already had a sufficiently small number of colors. Is this indeed still recognized as a known issue that is not going to be fixed? One of the replies here suggested the possibility of reserving colors via a PALETTE option, but I can find no mention of this anywhere in the docs. I suppose another option would be to have mapserver output 24bit color PNG images and use some external program (like ImageMagick) to convert to 8bit PNG. I am running mapserver-5.0.0, compiled with gd-2.0.35 and agg-2.5. Complete map files to reproduce my testcases are included below. - Rich Fromm --- begin agg.map --- MAP NAME agg IMAGETYPE AGG OUTPUTFORMAT NAME 'AGG' DRIVER AGG/PNG IMAGEMODE RGB END EXTENT -122.293878 37.838295 -122.288122 37.841705 SIZE 640 480 IMAGECOLOR 204 204 204 # background END --- end agg.map --- --- begin agg_q.map --- MAP NAME agg_q IMAGETYPE AGG_Q OUTPUTFORMAT NAME 'AGG_Q' DRIVER AGG/PNG IMAGEMODE RGB FORMATOPTION "QUANTIZE_FORCE=ON" FORMATOPTION "QUANTIZE_DITHER=OFF" FORMATOPTION "QUANTIZE_COLORS=256" END EXTENT -122.293878 37.838295 -122.288122 37.841705 SIZE 640 480 IMAGECOLOR 204 204 204 # background END --- end agg_q.map --- --- begin gd.map --- MAP NAME gd IMAGETYPE PNG OUTPUTFORMAT NAME 'PNG' DRIVER GD/PNG IMAGEMODE RGB END EXTENT -122.293878 37.838295 -122.288122 37.841705 SIZE 640 480 IMAGECOLOR 204 204 204 # background END --- end gd.map --- --- begin gd_q.map --- MAP NAME gd IMAGETYPE PNG_Q OUTPUTFORMAT NAME 'PNG_Q' DRIVER GD/PNG IMAGEMODE RGB FORMATOPTION "QUANTIZE_FORCE=ON" FORMATOPTION "QUANTIZE_DITHER=OFF" FORMATOPTION "QUANTIZE_COLORS=256" END EXTENT -122.293878 37.838295 -122.288122 37.841705 SIZE 640 480 IMAGECOLOR 204 204 204 # background END --- end gd_q.map --- --- begin gd_256.map --- MAP NAME gd_256 IMAGETYPE PNG_256 OUTPUTFORMAT NAME 'PNG_256' DRIVER GD/PNG IMAGEMODE PC256 END EXTENT -122.293878 37.838295 -122.288122 37.841705 SIZE 640 480 IMAGECOLOR 204 204 204 # background END --- end gd_256.map --- -- View this message in context: http://www.nabble.com/Color-shifts-using-QUANTIZE_COLORS%3D256-tf2080351.html#a14092078 Sent from the Mapserver - User mailing list archive at Nabble.com. From woodbri at SWOODBRIDGE.COM Fri Nov 30 12:37:09 2007 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Fri, 30 Nov 2007 15:37:09 -0500 Subject: Color shifts using QUANTIZE_COLORS=256 In-Reply-To: <14092078.post@talk.nabble.com> Message-ID: Try using something liek this: OUTPUTFORMAT NAME "agg/png24" MIMETYPE "image/png; mode=24bit" DRIVER "AGG/PNG" EXTENSION "png" FORMATOPTION "PALETTE_FORCE=TRUE" FORMATOPTION "PALETTE=/u/data/maps/palette-google-agg.txt" END where /u/data/maps/palette-google-agg.txt has something like this in it. Obviously pick the colors that you want to quantize to: 0,0,0 0,0,89 0,0,255 0,100,0 51,51,0 75,200,75 100,100,100 119,119,119 136,136,136 150,150,150 153,153,153 153,179,204 167,204,149 170,153,136 170,153,34 171,153,136 180,176,177 187,187,187 200,75,200 200,200,200 204,204,204 208,208,205 210,201,138 220,220,5 230,230,230 233,228,218 236,230,220 238,102,34 238,187,34 242,239,233 245,245,231 255,0,0 255,221,68 255,255,119 255,255,238 255,255,255 rich.fromm wrote: > Stephen Woodbridge wrote: >> Thanks for the pointer to the bug. I will add some comments to it even >> though it is closed. >> >> Bart van den Eijnden (OSGIS) wrote: >>> there is some info by Frank in the following bug report (assuming it is >>> not outdated): >>> >>> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=684 > > I think this may be just a rehashing of this same issue, which I think is > further covered in the following (the URL has moved): > > http://trac.osgeo.org/mapserver/ticket/684 > Trouble tricking Mapserver colors in 8-bit mode > Ticket #684 (closed defect: wontfix) > > Although since that was opened 4 years ago, last modified more than 1 year > ago, and this thread is from the time (>1 year ago) of that last > modification, > I want to make sure that this is valid and I'm understanding things > properly. > > I've narrowed this down to a very simple test case (see below). ALL that > I'm > attempting to displaying here is an 80% grey background. This works fine > with > both the AGG and GD rendering backends, as long as quantization is not > enabled. However, if I enable quantization, instead of getting a uniform > background of (204,204,204), I get (204,206,204). And I'm quite surprised > at > how visually noticeable such a small green shift is. I can preserve the > proper color if I use IMAGEMODE PC256 rather than IMAGEMODE RGB, but that is > only valid with GD. If I try to use it with AGG, I get the following error > message: > > --- > msDrawMap(): Image handling error. Unable to initialize > image. msPrepareImage(): GD library error. Unable to initialize > image. msImageCreateAGG(): AGG library error. AGG driver only supports RGB > or > RGBA pixel models. > --- > > I have a very strong preference for using AGG instead of GD. And I would > prefer to make my PNG's smaller by not using full 24bit color. I realize a > plain background is a bit of an extreme case, but in this case the size > difference is dramatic: > > -rw-r--r-- 1 rich engr 2809 2007-11-30 11:14 agg.png > -rw-r--r-- 1 rich engr 133 2007-11-30 11:15 agg_q.png > -rw-r--r-- 1 rich engr 2809 2007-11-30 11:14 gd.png > -rw-r--r-- 1 rich engr 133 2007-11-30 11:37 gd_q.png > -rw-r--r-- 1 rich engr 133 2007-11-30 11:47 gd_256.png > > And here are the color distributions within the images: > > agg.png -------- > 0: (204,204,204) grey80 > agg_q.png -------- > 0: (204,206,204) #CCCECC > gd.png -------- > 0: (204,204,204) grey80 > gd_q.png -------- > 0: (204,206,204) #CCCECC > gd_256.png -------- > 0: (204,204,204) grey80 > > I realize that sometimes quantization will by its very nature need to change > colors, but I had not expected this if the input image already had a > sufficiently small number of colors. > > Is this indeed still recognized as a known issue that is not going to be > fixed? One of the replies here suggested the possibility of reserving > colors > via a PALETTE option, but I can find no mention of this anywhere in the > docs. > > I suppose another option would be to have mapserver output 24bit color PNG > images and use some external program (like ImageMagick) to convert to 8bit > PNG. > > I am running mapserver-5.0.0, compiled with gd-2.0.35 and agg-2.5. > > Complete map files to reproduce my testcases are included below. > > - Rich Fromm > > --- begin agg.map --- > MAP > NAME agg > > IMAGETYPE AGG > OUTPUTFORMAT > NAME 'AGG' > DRIVER AGG/PNG > IMAGEMODE RGB > END > > EXTENT -122.293878 37.838295 -122.288122 37.841705 > > SIZE 640 480 > IMAGECOLOR 204 204 204 # background > END > --- end agg.map --- > > --- begin agg_q.map --- > MAP > NAME agg_q > > IMAGETYPE AGG_Q > OUTPUTFORMAT > NAME 'AGG_Q' > DRIVER AGG/PNG > IMAGEMODE RGB > FORMATOPTION "QUANTIZE_FORCE=ON" > FORMATOPTION "QUANTIZE_DITHER=OFF" > FORMATOPTION "QUANTIZE_COLORS=256" > END > > EXTENT -122.293878 37.838295 -122.288122 37.841705 > > SIZE 640 480 > IMAGECOLOR 204 204 204 # background > END > --- end agg_q.map --- > > --- begin gd.map --- > MAP > NAME gd > > IMAGETYPE PNG > OUTPUTFORMAT > NAME 'PNG' > DRIVER GD/PNG > IMAGEMODE RGB > END > > EXTENT -122.293878 37.838295 -122.288122 37.841705 > > SIZE 640 480 > IMAGECOLOR 204 204 204 # background > END > --- end gd.map --- > > --- begin gd_q.map --- > MAP > NAME gd > > IMAGETYPE PNG_Q > OUTPUTFORMAT > NAME 'PNG_Q' > DRIVER GD/PNG > IMAGEMODE RGB > FORMATOPTION "QUANTIZE_FORCE=ON" > FORMATOPTION "QUANTIZE_DITHER=OFF" > FORMATOPTION "QUANTIZE_COLORS=256" > END > > EXTENT -122.293878 37.838295 -122.288122 37.841705 > > SIZE 640 480 > IMAGECOLOR 204 204 204 # background > > END > --- end gd_q.map --- > > --- begin gd_256.map --- > MAP > NAME gd_256 > > IMAGETYPE PNG_256 > OUTPUTFORMAT > NAME 'PNG_256' > DRIVER GD/PNG > IMAGEMODE PC256 > END > > EXTENT -122.293878 37.838295 -122.288122 37.841705 > > SIZE 640 480 > IMAGECOLOR 204 204 204 # background > END > --- end gd_256.map --- > From nospam420 at YAHOO.COM Fri Nov 30 12:37:01 2007 From: nospam420 at YAHOO.COM (rich.fromm) Date: Fri, 30 Nov 2007 12:37:01 -0800 Subject: Color shifts using QUANTIZE_COLORS=256 In-Reply-To: <14092078.post@talk.nabble.com> Message-ID: rich.fromm wrote: > > ALL that I'm > attempting to displaying here is an 80% grey background. This works fine > with > both the AGG and GD rendering backends, as long as quantization is not > enabled. However, if I enable quantization, instead of getting a uniform > background of (204,204,204), I get (204,206,204). > here's another little tidbit. i iterated through all possible grey backgrounds from (0,0,0) through (255,255,255). in not one case did mapserver return a pure grey background. the green was always shifted by -2 or +2 relative to the red and the blue. - Rich [rich at peyote bg 12:30:14]$ for c in `seq 0 255`; do ~joe/bin/colorhist agg_q.${c}grey.png; done agg_q.0grey.png -------- 0: ( 4, 2, 4) #040204 agg_q.1grey.png -------- 0: ( 4, 2, 4) #040204 agg_q.2grey.png -------- 0: ( 4, 2, 4) #040204 agg_q.3grey.png -------- 0: ( 4, 2, 4) #040204 agg_q.4grey.png -------- 0: ( 4, 6, 4) #040604 agg_q.5grey.png -------- 0: ( 4, 6, 4) #040604 agg_q.6grey.png -------- 0: ( 4, 6, 4) #040604 agg_q.7grey.png -------- 0: ( 4, 6, 4) #040604 agg_q.8grey.png -------- 0: ( 12, 10, 12) #0C0A0C agg_q.9grey.png -------- 0: ( 12, 10, 12) #0C0A0C agg_q.10grey.png -------- 0: ( 12, 10, 12) #0C0A0C agg_q.11grey.png -------- 0: ( 12, 10, 12) #0C0A0C agg_q.12grey.png -------- 0: ( 12, 14, 12) #0C0E0C agg_q.13grey.png -------- 0: ( 12, 14, 12) #0C0E0C agg_q.14grey.png -------- 0: ( 12, 14, 12) #0C0E0C agg_q.15grey.png -------- 0: ( 12, 14, 12) #0C0E0C agg_q.16grey.png -------- 0: ( 20, 18, 20) #141214 agg_q.17grey.png -------- 0: ( 20, 18, 20) #141214 agg_q.18grey.png -------- 0: ( 20, 18, 20) #141214 agg_q.19grey.png -------- 0: ( 20, 18, 20) #141214 agg_q.20grey.png -------- 0: ( 20, 22, 20) #141614 agg_q.21grey.png -------- 0: ( 20, 22, 20) #141614 agg_q.22grey.png -------- 0: ( 20, 22, 20) #141614 agg_q.23grey.png -------- 0: ( 20, 22, 20) #141614 agg_q.24grey.png -------- 0: ( 28, 26, 28) #1C1A1C agg_q.25grey.png -------- 0: ( 28, 26, 28) #1C1A1C agg_q.26grey.png -------- 0: ( 28, 26, 28) #1C1A1C agg_q.27grey.png -------- 0: ( 28, 26, 28) #1C1A1C agg_q.28grey.png -------- 0: ( 28, 30, 28) #1C1E1C agg_q.29grey.png -------- 0: ( 28, 30, 28) #1C1E1C agg_q.30grey.png -------- 0: ( 28, 30, 28) #1C1E1C agg_q.31grey.png -------- 0: ( 28, 30, 28) #1C1E1C agg_q.32grey.png -------- 0: ( 36, 34, 36) #242224 agg_q.33grey.png -------- 0: ( 36, 34, 36) #242224 agg_q.34grey.png -------- 0: ( 36, 34, 36) #242224 agg_q.35grey.png -------- 0: ( 36, 34, 36) #242224 agg_q.36grey.png -------- 0: ( 36, 38, 36) #242624 agg_q.37grey.png -------- 0: ( 36, 38, 36) #242624 agg_q.38grey.png -------- 0: ( 36, 38, 36) #242624 agg_q.39grey.png -------- 0: ( 36, 38, 36) #242624 agg_q.40grey.png -------- 0: ( 44, 42, 44) #2C2A2C agg_q.41grey.png -------- 0: ( 44, 42, 44) #2C2A2C agg_q.42grey.png -------- 0: ( 44, 42, 44) #2C2A2C agg_q.43grey.png -------- 0: ( 44, 42, 44) #2C2A2C agg_q.44grey.png -------- 0: ( 44, 46, 44) #2C2E2C agg_q.45grey.png -------- 0: ( 44, 46, 44) #2C2E2C agg_q.46grey.png -------- 0: ( 44, 46, 44) #2C2E2C agg_q.47grey.png -------- 0: ( 44, 46, 44) #2C2E2C agg_q.48grey.png -------- 0: ( 52, 50, 52) #343234 agg_q.49grey.png -------- 0: ( 52, 50, 52) #343234 agg_q.50grey.png -------- 0: ( 52, 50, 52) #343234 agg_q.51grey.png -------- 0: ( 52, 50, 52) #343234 agg_q.52grey.png -------- 0: ( 52, 54, 52) #343634 agg_q.53grey.png -------- 0: ( 52, 54, 52) #343634 agg_q.54grey.png -------- 0: ( 52, 54, 52) #343634 agg_q.55grey.png -------- 0: ( 52, 54, 52) #343634 agg_q.56grey.png -------- 0: ( 60, 58, 60) #3C3A3C agg_q.57grey.png -------- 0: ( 60, 58, 60) #3C3A3C agg_q.58grey.png -------- 0: ( 60, 58, 60) #3C3A3C agg_q.59grey.png -------- 0: ( 60, 58, 60) #3C3A3C agg_q.60grey.png -------- 0: ( 60, 62, 60) #3C3E3C agg_q.61grey.png -------- 0: ( 60, 62, 60) #3C3E3C agg_q.62grey.png -------- 0: ( 60, 62, 60) #3C3E3C agg_q.63grey.png -------- 0: ( 60, 62, 60) #3C3E3C agg_q.64grey.png -------- 0: ( 68, 66, 68) #444244 agg_q.65grey.png -------- 0: ( 68, 66, 68) #444244 agg_q.66grey.png -------- 0: ( 68, 66, 68) #444244 agg_q.67grey.png -------- 0: ( 68, 66, 68) #444244 agg_q.68grey.png -------- 0: ( 68, 70, 68) #444644 agg_q.69grey.png -------- 0: ( 68, 70, 68) #444644 agg_q.70grey.png -------- 0: ( 68, 70, 68) #444644 agg_q.71grey.png -------- 0: ( 68, 70, 68) #444644 agg_q.72grey.png -------- 0: ( 76, 74, 76) #4C4A4C agg_q.73grey.png -------- 0: ( 76, 74, 76) #4C4A4C agg_q.74grey.png -------- 0: ( 76, 74, 76) #4C4A4C agg_q.75grey.png -------- 0: ( 76, 74, 76) #4C4A4C agg_q.76grey.png -------- 0: ( 76, 78, 76) #4C4E4C agg_q.77grey.png -------- 0: ( 76, 78, 76) #4C4E4C agg_q.78grey.png -------- 0: ( 76, 78, 76) #4C4E4C agg_q.79grey.png -------- 0: ( 76, 78, 76) #4C4E4C agg_q.80grey.png -------- 0: ( 84, 82, 84) #545254 agg_q.81grey.png -------- 0: ( 84, 82, 84) #545254 agg_q.82grey.png -------- 0: ( 84, 82, 84) #545254 agg_q.83grey.png -------- 0: ( 84, 82, 84) #545254 agg_q.84grey.png -------- 0: ( 84, 86, 84) #545654 agg_q.85grey.png -------- 0: ( 84, 86, 84) #545654 agg_q.86grey.png -------- 0: ( 84, 86, 84) #545654 agg_q.87grey.png -------- 0: ( 84, 86, 84) #545654 agg_q.88grey.png -------- 0: ( 92, 90, 92) #5C5A5C agg_q.89grey.png -------- 0: ( 92, 90, 92) #5C5A5C agg_q.90grey.png -------- 0: ( 92, 90, 92) #5C5A5C agg_q.91grey.png -------- 0: ( 92, 90, 92) #5C5A5C agg_q.92grey.png -------- 0: ( 92, 94, 92) #5C5E5C agg_q.93grey.png -------- 0: ( 92, 94, 92) #5C5E5C agg_q.94grey.png -------- 0: ( 92, 94, 92) #5C5E5C agg_q.95grey.png -------- 0: ( 92, 94, 92) #5C5E5C agg_q.96grey.png -------- 0: (100, 98,100) #646264 agg_q.97grey.png -------- 0: (100, 98,100) #646264 agg_q.98grey.png -------- 0: (100, 98,100) #646264 agg_q.99grey.png -------- 0: (100, 98,100) #646264 agg_q.100grey.png -------- 0: (100,102,100) #646664 agg_q.101grey.png -------- 0: (100,102,100) #646664 agg_q.102grey.png -------- 0: (100,102,100) #646664 agg_q.103grey.png -------- 0: (100,102,100) #646664 agg_q.104grey.png -------- 0: (108,106,108) #6C6A6C agg_q.105grey.png -------- 0: (108,106,108) #6C6A6C agg_q.106grey.png -------- 0: (108,106,108) #6C6A6C agg_q.107grey.png -------- 0: (108,106,108) #6C6A6C agg_q.108grey.png -------- 0: (108,110,108) #6C6E6C agg_q.109grey.png -------- 0: (108,110,108) #6C6E6C agg_q.110grey.png -------- 0: (108,110,108) #6C6E6C agg_q.111grey.png -------- 0: (108,110,108) #6C6E6C agg_q.112grey.png -------- 0: (116,114,116) #747274 agg_q.113grey.png -------- 0: (116,114,116) #747274 agg_q.114grey.png -------- 0: (116,114,116) #747274 agg_q.115grey.png -------- 0: (116,114,116) #747274 agg_q.116grey.png -------- 0: (116,118,116) #747674 agg_q.117grey.png -------- 0: (116,118,116) #747674 agg_q.118grey.png -------- 0: (116,118,116) #747674 agg_q.119grey.png -------- 0: (116,118,116) #747674 agg_q.120grey.png -------- 0: (124,122,124) #7C7A7C agg_q.121grey.png -------- 0: (124,122,124) #7C7A7C agg_q.122grey.png -------- 0: (124,122,124) #7C7A7C agg_q.123grey.png -------- 0: (124,122,124) #7C7A7C agg_q.124grey.png -------- 0: (124,126,124) #7C7E7C agg_q.125grey.png -------- 0: (124,126,124) #7C7E7C agg_q.126grey.png -------- 0: (124,126,124) #7C7E7C agg_q.127grey.png -------- 0: (124,126,124) #7C7E7C agg_q.128grey.png -------- 0: (132,130,132) #848284 agg_q.129grey.png -------- 0: (132,130,132) #848284 agg_q.130grey.png -------- 0: (132,130,132) #848284 agg_q.131grey.png -------- 0: (132,130,132) #848284 agg_q.132grey.png -------- 0: (132,134,132) #848684 agg_q.133grey.png -------- 0: (132,134,132) #848684 agg_q.134grey.png -------- 0: (132,134,132) #848684 agg_q.135grey.png -------- 0: (132,134,132) #848684 agg_q.136grey.png -------- 0: (140,138,140) #8C8A8C agg_q.137grey.png -------- 0: (140,138,140) #8C8A8C agg_q.138grey.png -------- 0: (140,138,140) #8C8A8C agg_q.139grey.png -------- 0: (140,138,140) #8C8A8C agg_q.140grey.png -------- 0: (140,142,140) #8C8E8C agg_q.141grey.png -------- 0: (140,142,140) #8C8E8C agg_q.142grey.png -------- 0: (140,142,140) #8C8E8C agg_q.143grey.png -------- 0: (140,142,140) #8C8E8C agg_q.144grey.png -------- 0: (148,146,148) #949294 agg_q.145grey.png -------- 0: (148,146,148) #949294 agg_q.146grey.png -------- 0: (148,146,148) #949294 agg_q.147grey.png -------- 0: (148,146,148) #949294 agg_q.148grey.png -------- 0: (148,150,148) #949694 agg_q.149grey.png -------- 0: (148,150,148) #949694 agg_q.150grey.png -------- 0: (148,150,148) #949694 agg_q.151grey.png -------- 0: (148,150,148) #949694 agg_q.152grey.png -------- 0: (156,154,156) #9C9A9C agg_q.153grey.png -------- 0: (156,154,156) #9C9A9C agg_q.154grey.png -------- 0: (156,154,156) #9C9A9C agg_q.155grey.png -------- 0: (156,154,156) #9C9A9C agg_q.156grey.png -------- 0: (156,158,156) #9C9E9C agg_q.157grey.png -------- 0: (156,158,156) #9C9E9C agg_q.158grey.png -------- 0: (156,158,156) #9C9E9C agg_q.159grey.png -------- 0: (156,158,156) #9C9E9C agg_q.160grey.png -------- 0: (164,162,164) #A4A2A4 agg_q.161grey.png -------- 0: (164,162,164) #A4A2A4 agg_q.162grey.png -------- 0: (164,162,164) #A4A2A4 agg_q.163grey.png -------- 0: (164,162,164) #A4A2A4 agg_q.164grey.png -------- 0: (164,166,164) #A4A6A4 agg_q.165grey.png -------- 0: (164,166,164) #A4A6A4 agg_q.166grey.png -------- 0: (164,166,164) #A4A6A4 agg_q.167grey.png -------- 0: (164,166,164) #A4A6A4 agg_q.168grey.png -------- 0: (172,170,172) #ACAAAC agg_q.169grey.png -------- 0: (172,170,172) #ACAAAC agg_q.170grey.png -------- 0: (172,170,172) #ACAAAC agg_q.171grey.png -------- 0: (172,170,172) #ACAAAC agg_q.172grey.png -------- 0: (172,174,172) #ACAEAC agg_q.173grey.png -------- 0: (172,174,172) #ACAEAC agg_q.174grey.png -------- 0: (172,174,172) #ACAEAC agg_q.175grey.png -------- 0: (172,174,172) #ACAEAC agg_q.176grey.png -------- 0: (180,178,180) #B4B2B4 agg_q.177grey.png -------- 0: (180,178,180) #B4B2B4 agg_q.178grey.png -------- 0: (180,178,180) #B4B2B4 agg_q.179grey.png -------- 0: (180,178,180) #B4B2B4 agg_q.180grey.png -------- 0: (180,182,180) #B4B6B4 agg_q.181grey.png -------- 0: (180,182,180) #B4B6B4 agg_q.182grey.png -------- 0: (180,182,180) #B4B6B4 agg_q.183grey.png -------- 0: (180,182,180) #B4B6B4 agg_q.184grey.png -------- 0: (188,186,188) #BCBABC agg_q.185grey.png -------- 0: (188,186,188) #BCBABC agg_q.186grey.png -------- 0: (188,186,188) #BCBABC agg_q.187grey.png -------- 0: (188,186,188) #BCBABC agg_q.188grey.png -------- 0: (188,190,188) #BCBEBC agg_q.189grey.png -------- 0: (188,190,188) #BCBEBC agg_q.190grey.png -------- 0: (188,190,188) #BCBEBC agg_q.191grey.png -------- 0: (188,190,188) #BCBEBC agg_q.192grey.png -------- 0: (196,194,196) #C4C2C4 agg_q.193grey.png -------- 0: (196,194,196) #C4C2C4 agg_q.194grey.png -------- 0: (196,194,196) #C4C2C4 agg_q.195grey.png -------- 0: (196,194,196) #C4C2C4 agg_q.196grey.png -------- 0: (196,198,196) #C4C6C4 agg_q.197grey.png -------- 0: (196,198,196) #C4C6C4 agg_q.198grey.png -------- 0: (196,198,196) #C4C6C4 agg_q.199grey.png -------- 0: (196,198,196) #C4C6C4 agg_q.200grey.png -------- 0: (204,202,204) #CCCACC agg_q.201grey.png -------- 0: (204,202,204) #CCCACC agg_q.202grey.png -------- 0: (204,202,204) #CCCACC agg_q.203grey.png -------- 0: (204,202,204) #CCCACC agg_q.204grey.png -------- 0: (204,206,204) #CCCECC agg_q.205grey.png -------- 0: (204,206,204) #CCCECC agg_q.206grey.png -------- 0: (204,206,204) #CCCECC agg_q.207grey.png -------- 0: (204,206,204) #CCCECC agg_q.208grey.png -------- 0: (212,210,212) #D4D2D4 agg_q.209grey.png -------- 0: (212,210,212) #D4D2D4 agg_q.210grey.png -------- 0: (212,210,212) #D4D2D4 agg_q.211grey.png -------- 0: (212,210,212) #D4D2D4 agg_q.212grey.png -------- 0: (212,214,212) #D4D6D4 agg_q.213grey.png -------- 0: (212,214,212) #D4D6D4 agg_q.214grey.png -------- 0: (212,214,212) #D4D6D4 agg_q.215grey.png -------- 0: (212,214,212) #D4D6D4 agg_q.216grey.png -------- 0: (220,218,220) #DCDADC agg_q.217grey.png -------- 0: (220,218,220) #DCDADC agg_q.218grey.png -------- 0: (220,218,220) #DCDADC agg_q.219grey.png -------- 0: (220,218,220) #DCDADC agg_q.220grey.png -------- 0: (220,222,220) #DCDEDC agg_q.221grey.png -------- 0: (220,222,220) #DCDEDC agg_q.222grey.png -------- 0: (220,222,220) #DCDEDC agg_q.223grey.png -------- 0: (220,222,220) #DCDEDC agg_q.224grey.png -------- 0: (228,226,228) #E4E2E4 agg_q.225grey.png -------- 0: (228,226,228) #E4E2E4 agg_q.226grey.png -------- 0: (228,226,228) #E4E2E4 agg_q.227grey.png -------- 0: (228,226,228) #E4E2E4 agg_q.228grey.png -------- 0: (228,230,228) #E4E6E4 agg_q.229grey.png -------- 0: (228,230,228) #E4E6E4 agg_q.230grey.png -------- 0: (228,230,228) #E4E6E4 agg_q.231grey.png -------- 0: (228,230,228) #E4E6E4 agg_q.232grey.png -------- 0: (236,234,236) #ECEAEC agg_q.233grey.png -------- 0: (236,234,236) #ECEAEC agg_q.234grey.png -------- 0: (236,234,236) #ECEAEC agg_q.235grey.png -------- 0: (236,234,236) #ECEAEC agg_q.236grey.png -------- 0: (236,238,236) #ECEEEC agg_q.237grey.png -------- 0: (236,238,236) #ECEEEC agg_q.238grey.png -------- 0: (236,238,236) #ECEEEC agg_q.239grey.png -------- 0: (236,238,236) #ECEEEC agg_q.240grey.png -------- 0: (244,242,244) #F4F2F4 agg_q.241grey.png -------- 0: (244,242,244) #F4F2F4 agg_q.242grey.png -------- 0: (244,242,244) #F4F2F4 agg_q.243grey.png -------- 0: (244,242,244) #F4F2F4 agg_q.244grey.png -------- 0: (244,246,244) #F4F6F4 agg_q.245grey.png -------- 0: (244,246,244) #F4F6F4 agg_q.246grey.png -------- 0: (244,246,244) #F4F6F4 agg_q.247grey.png -------- 0: (244,246,244) #F4F6F4 agg_q.248grey.png -------- 0: (252,250,252) #FCFAFC agg_q.249grey.png -------- 0: (252,250,252) #FCFAFC agg_q.250grey.png -------- 0: (252,250,252) #FCFAFC agg_q.251grey.png -------- 0: (252,250,252) #FCFAFC agg_q.252grey.png -------- 0: (252,254,252) #FCFEFC agg_q.253grey.png -------- 0: (252,254,252) #FCFEFC agg_q.254grey.png -------- 0: (252,254,252) #FCFEFC agg_q.255grey.png -------- 0: (252,254,252) #FCFEFC [rich at peyote bg 12:32:02]$ -- View this message in context: http://www.nabble.com/Color-shifts-using-QUANTIZE_COLORS%3D256-tf2080351.html#a14093208 Sent from the Mapserver - User mailing list archive at Nabble.com. From thomas.bonfort at GMAIL.COM Fri Nov 30 13:12:05 2007 From: thomas.bonfort at GMAIL.COM (thomas bonfort) Date: Fri, 30 Nov 2007 22:12:05 +0100 Subject: Color shifts using QUANTIZE_COLORS=256 In-Reply-To: <14092078.post@talk.nabble.com> Message-ID: Mapserver relies on a gd library function to do the actual quantization, so there's little we can do about the color shifting you're experiencing another solution is to use a precomputed palette OUTPUTFORMAT [... snip...] FORMATOPTION "PALETTE_FORCE=TRUE" FORMATOPTION "PALETTE=/path/to/my/palette.txt" END where palette.txt contains 1 rgb triplet per line cheers On Nov 30, 2007 9:09 PM, rich.fromm wrote: > Stephen Woodbridge wrote: > > > > Thanks for the pointer to the bug. I will add some comments to it even > > though it is closed. > > > > Bart van den Eijnden (OSGIS) wrote: > >> there is some info by Frank in the following bug report (assuming it is > >> not outdated): > >> > >> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=684 > > > > I think this may be just a rehashing of this same issue, which I think is > further covered in the following (the URL has moved): > > http://trac.osgeo.org/mapserver/ticket/684 > Trouble tricking Mapserver colors in 8-bit mode > Ticket #684 (closed defect: wontfix) > > Although since that was opened 4 years ago, last modified more than 1 year > ago, and this thread is from the time (>1 year ago) of that last > modification, > I want to make sure that this is valid and I'm understanding things > properly. > > I've narrowed this down to a very simple test case (see below). ALL that > I'm > attempting to displaying here is an 80% grey background. This works fine > with > both the AGG and GD rendering backends, as long as quantization is not > enabled. However, if I enable quantization, instead of getting a uniform > background of (204,204,204), I get (204,206,204). And I'm quite surprised > at > how visually noticeable such a small green shift is. I can preserve the > proper color if I use IMAGEMODE PC256 rather than IMAGEMODE RGB, but that is > only valid with GD. If I try to use it with AGG, I get the following error > message: > > --- > msDrawMap(): Image handling error. Unable to initialize > image. msPrepareImage(): GD library error. Unable to initialize > image. msImageCreateAGG(): AGG library error. AGG driver only supports RGB > or > RGBA pixel models. > --- > > I have a very strong preference for using AGG instead of GD. And I would > prefer to make my PNG's smaller by not using full 24bit color. I realize a > plain background is a bit of an extreme case, but in this case the size > difference is dramatic: > > -rw-r--r-- 1 rich engr 2809 2007-11-30 11:14 agg.png > -rw-r--r-- 1 rich engr 133 2007-11-30 11:15 agg_q.png > -rw-r--r-- 1 rich engr 2809 2007-11-30 11:14 gd.png > -rw-r--r-- 1 rich engr 133 2007-11-30 11:37 gd_q.png > -rw-r--r-- 1 rich engr 133 2007-11-30 11:47 gd_256.png > > And here are the color distributions within the images: > > agg.png -------- > 0: (204,204,204) grey80 > agg_q.png -------- > 0: (204,206,204) #CCCECC > gd.png -------- > 0: (204,204,204) grey80 > gd_q.png -------- > 0: (204,206,204) #CCCECC > gd_256.png -------- > 0: (204,204,204) grey80 > > I realize that sometimes quantization will by its very nature need to change > colors, but I had not expected this if the input image already had a > sufficiently small number of colors. > > Is this indeed still recognized as a known issue that is not going to be > fixed? One of the replies here suggested the possibility of reserving > colors > via a PALETTE option, but I can find no mention of this anywhere in the > docs. > > I suppose another option would be to have mapserver output 24bit color PNG > images and use some external program (like ImageMagick) to convert to 8bit > PNG. > > I am running mapserver-5.0.0, compiled with gd-2.0.35 and agg-2.5. > > Complete map files to reproduce my testcases are included below. > > - Rich Fromm > > --- begin agg.map --- > MAP > NAME agg > > IMAGETYPE AGG > OUTPUTFORMAT > NAME 'AGG' > DRIVER AGG/PNG > IMAGEMODE RGB > END > > EXTENT -122.293878 37.838295 -122.288122 37.841705 > > SIZE 640 480 > IMAGECOLOR 204 204 204 # background > END > --- end agg.map --- > > --- begin agg_q.map --- > MAP > NAME agg_q > > IMAGETYPE AGG_Q > OUTPUTFORMAT > NAME 'AGG_Q' > DRIVER AGG/PNG > IMAGEMODE RGB > FORMATOPTION "QUANTIZE_FORCE=ON" > FORMATOPTION "QUANTIZE_DITHER=OFF" > FORMATOPTION "QUANTIZE_COLORS=256" > END > > EXTENT -122.293878 37.838295 -122.288122 37.841705 > > SIZE 640 480 > IMAGECOLOR 204 204 204 # background > END > --- end agg_q.map --- > > --- begin gd.map --- > MAP > NAME gd > > IMAGETYPE PNG > OUTPUTFORMAT > NAME 'PNG' > DRIVER GD/PNG > IMAGEMODE RGB > END > > EXTENT -122.293878 37.838295 -122.288122 37.841705 > > SIZE 640 480 > IMAGECOLOR 204 204 204 # background > END > --- end gd.map --- > > --- begin gd_q.map --- > MAP > NAME gd > > IMAGETYPE PNG_Q > OUTPUTFORMAT > NAME 'PNG_Q' > DRIVER GD/PNG > IMAGEMODE RGB > FORMATOPTION "QUANTIZE_FORCE=ON" > FORMATOPTION "QUANTIZE_DITHER=OFF" > FORMATOPTION "QUANTIZE_COLORS=256" > END > > EXTENT -122.293878 37.838295 -122.288122 37.841705 > > SIZE 640 480 > IMAGECOLOR 204 204 204 # background > > END > --- end gd_q.map --- > > --- begin gd_256.map --- > MAP > NAME gd_256 > > IMAGETYPE PNG_256 > OUTPUTFORMAT > NAME 'PNG_256' > DRIVER GD/PNG > IMAGEMODE PC256 > END > > EXTENT -122.293878 37.838295 -122.288122 37.841705 > > SIZE 640 480 > IMAGECOLOR 204 204 204 # background > END > --- end gd_256.map --- > > -- > View this message in context: http://www.nabble.com/Color-shifts-using-QUANTIZE_COLORS%3D256-tf2080351.html#a14092078 > Sent from the Mapserver - User mailing list archive at Nabble.com. > From dn at HDDESIGN.COM Fri Nov 30 13:36:35 2007 From: dn at HDDESIGN.COM (David Niergarth) Date: Fri, 30 Nov 2007 15:36:35 -0600 Subject: postgis table joins in layer DATA and FILTER Message-ID: I'm wondering if there is a way to join two postgres tables within a layer object. We have a postgres table with a postgis geometry column and other details (name, address columns). Problem is, we need to join that table with a couple of other tables in the same database. We have tried getting around the join problem by creating a view that hides the needed joins but performance is terrible. We have also tried using an exists subselect but performance is even worse. Creating a custom table for each map we want to generate is completely impractical due to the size of the database. However, writing sql as joins is super quick. Here's an example of what we'd like to accomplish. DATA "p.the_geom from people_points p, spam_table s, eggs_table e" FILTER "p.id=s.id and p.id=e.id and s.spam='foo' and e.eggs='bar'" Is there some other way to do this without having to create a (massive and unnormalized) table with all the info we need or a view? We're using postgres 8.1, mapserver 4.9, ubuntu server 7.04. We've heard there were improvements to postgres (maybe in 8.2) that improved view performance, but it's not practical for us to upgrade right now. Any info or suggestions welcome, --David Niergarth From woodbri at SWOODBRIDGE.COM Fri Nov 30 14:06:50 2007 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Fri, 30 Nov 2007 17:06:50 -0500 Subject: postgis table joins in layer DATA and FILTER In-Reply-To: <47508263.7070508@hddesign.com> Message-ID: Hi David, Try this: DATA "the_geom from (select the_geom, name, checked, gid from sm100k a, files b where a.uid=b.uid ) as foo using SRID=4326 using unique gid" You have to put your joins into a sub-select. Regards, -Steve W David Niergarth wrote: > I'm wondering if there is a way to join two postgres tables within a > layer object. > > We have a postgres table with a postgis geometry column and other > details (name, address columns). Problem is, we need to join that table > with a couple of other tables in the same database. > > We have tried getting around the join problem by creating a view that > hides the needed joins but performance is terrible. We have also tried > using an exists subselect but performance is even worse. Creating a > custom table for each map we want to generate is completely impractical > due to the size of the database. > > However, writing sql as joins is super quick. > > Here's an example of what we'd like to accomplish. > > DATA "p.the_geom from people_points p, spam_table s, eggs_table e" > FILTER "p.id=s.id and p.id=e.id and s.spam='foo' and e.eggs='bar'" > > Is there some other way to do this without having to create a (massive > and unnormalized) table with all the info we need or a view? > > We're using postgres 8.1, mapserver 4.9, ubuntu server 7.04. We've heard > there were improvements to postgres (maybe in 8.2) that improved view > performance, but it's not practical for us to upgrade right now. > > Any info or suggestions welcome, > > --David Niergarth From dn at HDDESIGN.COM Fri Nov 30 14:19:00 2007 From: dn at HDDESIGN.COM (David Niergarth) Date: Fri, 30 Nov 2007 16:19:00 -0600 Subject: postgis table joins in layer DATA and FILTER In-Reply-To: <47508263.7070508@hddesign.com> Message-ID: David Niergarth wrote: > Here's an example of what we'd like to accomplish. > > DATA "p.the_geom from people_points p, spam_table s, eggs_table e" > FILTER "p.id=s.id and p.id=e.id and s.spam='foo' and e.eggs='bar'" The only problem with the example above is that mapserver takes everything in the FROM clause and includes it in a find_srid() call. See the generated query below; note especially the last full line. DECLARE mycursor BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d(pp.the_geom)),'NDR'),OID::text from people_points p, spam_table s, eggs_table e WHERE (p.id = s.id and p.id = e.id) and (p.the_geom && setSRID('BOX3D(-91.5260946100404 41.6407165527344,-91.4920023137877 41.667503356933)'::BOX3D, find_srid('','people_points p, spam_table s, eggs_table e', 'p.the_geom') )) That last line should be find_srid('','people_points','the_geom') rather than find_srid('','people_points p, spam_table s, eggs_table e', 'p.the_geom') which it gets by grabbing everything following "from" in the DATA string DATA "p.the_geom from people_points p, spam_table s, eggs_table e" If mapserver were to parse the DATA line more precisely, join queries like this would just work. (Would this extra parsing be too postgres-specific?) This seems like such a common sort of query to want to run I'm wondering if I'm missing some obvious other way to do it. (Or maybe I should make this a feature request?) How are others making this sort of database join for layers? Thanks, --David From yassefa at DMSOLUTIONS.CA Fri Nov 30 14:18:58 2007 From: yassefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Fri, 30 Nov 2007 17:18:58 -0500 Subject: Why does my WFS filter not work? In-Reply-To: <475069B4.9020103@hostgis.com> Message-ID: Gregor, I don't see anything wrong with the request. I also tested locally the latest Mapserver svn with a local postgis layer using the same kind of request and I did have the expected result. (From what I can see, the layer in question is a postgis layer, is this correct ?) If possible, please send me a "small" dump of your layer (shape would be good) and a map file and I can load it locally and do the same kind of requests to see what is happening. Best Regards, Gregor Mosheh wrote: > Hey, all. > I have my Mapserver WFS server basically working, and can do BBOX queries: > > http://69.59.158.15/cgi-bin/mapserv?map=/maps/spraywatch2/wms/mapfile.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&typename=parcels&srs=EPSG:4326&bbox=168.011840820312,-46.9196395874023,168.127075195312,-46.896656036377) > > > But I can't filter by other features: > > http://69.59.158.15/cgi-bin/mapserv?map=/maps/spraywatch2/wms/mapfile.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&typename=parcels&Filter=gid2389524 > > > If you look closely, you'll see that the first feature listed in the > bbox URL is the one being queried in the second URL, gid=2389524 > > What am I missing here? > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From dn at HDDESIGN.COM Fri Nov 30 15:20:33 2007 From: dn at HDDESIGN.COM (David Niergarth) Date: Fri, 30 Nov 2007 17:20:33 -0600 Subject: postgis table joins in layer DATA and FILTER In-Reply-To: <4750897A.9000002@swoodbridge.com> Message-ID: Hi Steve, Stephen Woodbridge wrote: > Try this: > > DATA "the_geom from (select the_geom, name, checked, gid from sm100k a, > files b where a.uid=b.uid ) as foo using SRID=4326 using unique gid" > > You have to put your joins into a sub-select. Ah! Using an anonymous table, the join is now working. I'm still figuring out the "using unique gid" bit at the end. Is gid like an oid for geometry tables? My table has no gid column. Is that something I can add? Gold coins for you! --David From woodbri at SWOODBRIDGE.COM Fri Nov 30 15:56:00 2007 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Fri, 30 Nov 2007 18:56:00 -0500 Subject: postgis table joins in layer DATA and FILTER In-Reply-To: <47509AC1.6030304@hddesign.com> Message-ID: David Niergarth wrote: > Hi Steve, > > Stephen Woodbridge wrote: >> Try this: >> >> DATA "the_geom from (select the_geom, name, checked, gid from sm100k >> a, files b where a.uid=b.uid ) as foo using SRID=4326 using unique gid" >> >> You have to put your joins into a sub-select. > > Ah! Using an anonymous table, the join is now working. I'm still > figuring out the "using unique gid" bit at the end. Is gid like an oid > for geometry tables? My table has no gid column. Is that something I can > add? > > Gold coins for you! > > --David gid is a just a unique column, you can use and primary key or unique column the is an integer. Mapserver expects it in case you want to do a query so if you don't have one just add a serial column to one of you tables and reference it. -Steve From lethanhx2k at GMAIL.COM Fri Nov 30 19:10:12 2007 From: lethanhx2k at GMAIL.COM (=?UTF-8?Q?L=C3=AA_Vi=E1=BA=BFt_Thanh?=) Date: Sat, 1 Dec 2007 10:10:12 +0700 Subject: How to filter the feature based on it's attribute? Message-ID: Hi all, I have a shapefile with an attribute field used to classified the feature. It's value for each record like as "234,234,245,267,234" (delimited by comma and without double quote, field type are string). I just want to call the feature with value 234, so how do i? Thanks in advance. -- Best regards, Le Viet Thanh GIS Technician - GIS Team __________________________________ Vietnam - Denmark VIDAGIS CO., LTD 5 Lang Ha Str, Hanoi, Vietnam Tel: +84 4 5145570 Fax: +84 4 5145571 http://www.vidagis.com Direct: thanhlv at vidagis.com +84 984 468147 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lethanhx2k at GMAIL.COM Fri Nov 30 19:21:35 2007 From: lethanhx2k at GMAIL.COM (=?UTF-8?Q?L=C3=AA_Vi=E1=BA=BFt_Thanh?=) Date: Sat, 1 Dec 2007 10:21:35 +0700 Subject: How to filter the feature based on it's attribute? Message-ID: Hi all, I have a shapefile with an attribute field used to classify the feature. It's value for each record like as "234,234,245,267,234" (delimited by comma and without double quote, field type are string). I just want to call the feature with value 234, so how do i? Thanks in advance. -- Best regards, Le Viet Thanh GIS Technician - GIS Team __________________________________ Vietnam - Denmark VIDAGIS CO., LTD 5 Lang Ha Str, Hanoi, Vietnam Tel: +84 4 5145570 Fax: +84 4 5145571 http://www.vidagis.com Direct: thanhlv at vidagis.com +84 984 468147 -------------- next part -------------- An HTML attachment was scrubbed... URL: