From steve.lime at dnr.state.mn.us Mon Nov 1 09:35:27 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Mon, 01 Nov 1999 11:35:27 -0600 Subject: Version 3.3 Status Message-ID: Greetings: I plan on releasing 3.3 late this week, probably on Friday or Saturday. I'll also have ready a MapServer test suite of about 20 simple examples showing various type of functionality. MapScript will also be included although I would consider it alpha code. A full list of changes will accompany an announcement at the end of the week. Steve Stephen Lime Internet Applications Analyst MIS Bureau - MN DNR (651) 297-2937 steve.lime at dnr.state.mn.us From pgallen at randomlogic.com Mon Nov 1 11:28:01 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Mon, 01 Nov 1999 11:28:01 -0800 Subject: Version 3.3 Status References: Message-ID: <381DE9C1.A222AD57@randomlogic.com> Stephen Lime wrote: > Greetings: I plan on releasing 3.3 late this week, probably on Friday or Saturday. > I'll also have ready a MapServer test suite of about 20 simple examples showing > various type of functionality. MapScript will also be included although I would > consider it alpha code. A full list of changes will accompany an announcement > at the end of the week. > Great! I have a question/suggestion/comment (can't decide exactly which one it is, you decide ;) While discussing security issues with a couple KPLUG (Kernel Panic Linux Users Group, www.kernel-panic.com) and a couple MapServer users, it occurred to me that it might be desirable to include the ability to do authentication in MapServer. Someone (forget who, maybe he'll speak up) suggested that maybe it could be an option in the .ini file. By embedding this ability into mapserv itself, additional data security (above the seemingly limited security offered by web servers and CGI) could be had by disallowing mapserv to create a map or query without proper UID/password. As further security, the authentication portion could be a module so that a user could change the algorithm if they wish (this way no one could be sure what algorithm is being used for the password, even though the mapserv source is readily available). Comments are very welcome, especially since I am new to web related programming, though not new to other types of programming? PGA From pgallen at randomlogic.com Tue Nov 2 00:04:36 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Tue, 02 Nov 1999 00:04:36 -0800 Subject: Question relating to queries Message-ID: <381E9B14.F3795F34@randomlogic.com> I would like to be able to display a map as well as query data on the same web page. Is this possible? If so, how could I do this? PGA From marin at here.is Tue Nov 2 05:52:08 1999 From: marin at here.is (Ma) Date: Tue, 02 Nov 1999 13:52:08 +0000 Subject: offsite, transparent color, gd1.3 References: Message-ID: <381EEC88.93A37C1A@here.is> > To build with 1.3 you should just have to switch > the references in the Makefile to point to the other dist. I don't know if 1.3 is where the GD > lib went from column major to row major. If so there are a few other fixes that have to happen. I think it will be better to have gd1.3 instead gd1.2. In this case we will have a mapserver with multilanguage support (8-bit and 16-bit fonts support) at least with bitmap fonts. Which I think are enough at the beginning. What do you think? > > GD is not used at all in processing TRUETYPE fonts > so this will not remedy the character mapping issues with latin chars. May fix that with BITMAP > fonts assuming the GD version include those characters. Haven't had time to test your sample > data yet, will do this week sometime. -- Ma From bfraser at geoanalytic.com Tue Nov 2 08:15:44 1999 From: bfraser at geoanalytic.com (Brent Fraser) Date: Tue, 2 Nov 1999 09:15:44 -0700 Subject: Question relating to queries References: <381E9B14.F3795F34@randomlogic.com> Message-ID: <001701bf254d$842dd950$390002c0@servo> Paul, I've been thinking of doing this too. I'm going to try frames instead of a table to create several "panes" on the web page, one of which will be for query results. Brent ----- Original Message ----- From: Paul G. Allen To: MapServer Users List Sent: Tuesday, November 02, 1999 1:04 AM Subject: Question relating to queries > I would like to be able to display a map as well as query data on the same web > page. Is this possible? If so, how could I do this? > > PGA > From steve.lime at dnr.state.mn.us Tue Nov 2 10:46:55 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 02 Nov 1999 12:46:55 -0600 Subject: Question relating to queries Message-ID: You can do it a couple of ways. One is to use frames. The other is to embed a normal mapserver form in a query template. The image in that form has to be created with another call to the mapserver (i.e. or . With 3.2 there is no way to isolate the returned shapes (eg. hilite) but you can create a map of the queried area. You could even save a reference to the last image using hidden variables and passing the image url through to the query page. I have several apps that embed maps on the query results. Here's an example: The Recreation Compass at the DNR, zoom into the SE portion of the state and click on any of the yellow-orange polygons. I use the extent of the shape to build a map with different data than is on the compass. I even go so far as to compute scales for the map to be created and if the area is too small I recompute with some minimum scale an recompute. Use MSIE to actually view the code. http://www.dnr.state.mn.us/compass Here's an example with frames: http://www.dnr.state.mn.us/minerals/testing/ Map activies happen in one frame, mapserver query results are in another and hits on msql in yet another. Works pretty nice. Hope this helps. Steve >>> "Brent Fraser" 11/02/99 10:15AM >>> Paul, I've been thinking of doing this too. I'm going to try frames instead of a table to create several "panes" on the web page, one of which will be for query results. Brent ----- Original Message ----- From: Paul G. Allen To: MapServer Users List Sent: Tuesday, November 02, 1999 1:04 AM Subject: Question relating to queries > I would like to be able to display a map as well as query data on the same web > page. Is this possible? If so, how could I do this? > > PGA > From pgallen at randomlogic.com Wed Nov 3 06:28:35 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Wed, 03 Nov 1999 06:28:35 -0800 Subject: Label problems Message-ID: <38204693.34C6070A@randomlogic.com> I am attempting to add labels to my "field units" shapes. These shapes are points, and the shapefile was generated with my scripts from a text file containing the appropriate data. When I query a field unit or multiple field units (mode=query or mode=nquery) the resulting html is perfectly fine (BTW, I've implemented frames for this and it works quite nicely), so I know all the data is there and all parts of the shapefile are OK. When I try to create a map with the units displayed along with their labels, I get an Internal Server Error. My server log shows this: [Wed Nov 3 06:20:32 1999] [error] [client 216.120.6.10] Premature end of script headers: /home/httpd/cgi-bin/mapserv However, if I zoom the map in without the labels on, until I only have a few field units showing, then turn the labels on, the thing works fine. What gives? Trying to display all the Street Names either works or returns no data (The later indicating that no names were able to be displayed due to too much overlap or something. This only happens when zoomed way out). (Unfortunately I can't let you see the page as the data is proprietary.) PGA From ddnebert at usgs.gov Thu Nov 4 08:51:07 1999 From: ddnebert at usgs.gov (Doug Nebert) Date: Thu, 04 Nov 1999 11:51:07 -0500 Subject: Shading certain polygons Message-ID: <3821B97B.ABD04F74@usgs.gov> I have a complex polygon layer in which I have polygonal water bodies and islands within them. I need to be able to apply shading to only the water based on an attribute and to have all other valid polygons (like islands) from the shapefile be not shaded. How do I declare this selection in the .map file? -- Douglas D. Nebert Clearinghouse Coordinator FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html From steve.lime at dnr.state.mn.us Thu Nov 4 09:58:27 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Thu, 04 Nov 1999 11:58:27 -0600 Subject: Shading certain polygons Message-ID: Declare a class with an expression that matches only the water polys. Shapes without a class are ignored. You could edit the shape file and delete the islands altogether. The hole should still be there but as part of the water shapes. Holes in multipart polygons are rendered correctly. Faster that way, less data and no class expression evaluation. Steve <<< Doug Nebert 11/ 4 10:53a >>> I have a complex polygon layer in which I have polygonal water bodies and islands within them. I need to be able to apply shading to only the water based on an attribute and to have all other valid polygons (like islands) from the shapefile be not shaded. How do I declare this selection in the .map file? -- Douglas D. Nebert Clearinghouse Coordinator FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html From rchavez at perseus.tufts.edu Thu Nov 4 10:25:14 1999 From: rchavez at perseus.tufts.edu (Robert Chavez) Date: Thu, 04 Nov 1999 13:25:14 -0500 Subject: graduated color symbols and mapserver Message-ID: <3821CF8A.BFCC9B73@perseus.tufts.edu> I'm wondering if there is some way to imitate ArcView's Graduated Color Legend/Symbol type. I have a shapefile of contour lines and I'd like to come up with a graduated color line symbol (or symbols) for ranges of elevation. It's kind of a dumb aesthetic problem, but I'd like to figure out how to represent these different elevations visually with MapServer. All I can think of right now is breaking apart the shapefile into separate files based on ranges of elevation. Robert Chavez Programmer Perseus Project rchavez at perseus.tufts.edu From ddnebert at usgs.gov Thu Nov 4 10:57:38 1999 From: ddnebert at usgs.gov (Doug Nebert) Date: Thu, 04 Nov 1999 13:57:38 -0500 Subject: Conditional "Legends" Message-ID: <3821D722.77DF213@usgs.gov> I have a series of base maps that are being used to present a world to local view. At different levels of zoom (or surrogate scale) I would like to display different items in the legend as declared in the _template.html file. It would seem that a scale variable could be accessible to JavaScript based on the current extent, yes? Thus I would not even show roads as an option on a global view and could switch layers and labels at a high level of zoom. I need to not use Zoom level but the derived scale being used for the current image. Example javaScript solutions appreciated! -- Douglas D. Nebert Clearinghouse Coordinator FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html From steve.lime at dnr.state.mn.us Thu Nov 4 11:01:41 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Thu, 04 Nov 1999 13:01:41 -0600 Subject: graduated color symbols and mapserver Message-ID: That's what classes are for. Each class has it's own symbolization. The hard part is the expression to use with ranges of numbers. One easy thing to do is to pre-classify each shape in arcview and then use that column in mapserver class expressions. Steve <<< Robert Chavez 11/ 4 12:15p >>> I'm wondering if there is some way to imitate ArcView's Graduated Color Legend/Symbol type. I have a shapefile of contour lines and I'd like to come up with a graduated color line symbol (or symbols) for ranges of elevation. It's kind of a dumb aesthetic problem, but I'd like to figure out how to represent these different elevations visually with MapServer. All I can think of right now is breaking apart the shapefile into separate files based on ranges of elevation. Robert Chavez Programmer Perseus Project rchavez at perseus.tufts.edu From kames at keyspanenergy.com Thu Nov 4 11:01:01 1999 From: kames at keyspanenergy.com (KIERAN AMES) Date: Thu, 04 Nov 1999 14:01:01 -0500 Subject: Image Cache Message-ID: <3821D7ED.F7F42926@keyspanenergy.com> I've installed a port of Mapserv onto a NT4.0 machine and am now experimenting. I've run across an implementation problem with regard to images being cached. I believe that image names are created with the map name concatenated to the processID. In NT, process IDs don't run very high and are re-used. Therefore, when a new image is created, the client browser sees an image name and if it finds it in its local cache, it doesn't fetch the revised image that was just created. I can control this in regular cgi (Perl) by sending non-parsed headers and delivering a "Pragma:No-cache" line in the http headers. Is there an equivalent solution with MapServ on an NT platform? Thanks very much. Kieran Ames PS. I'm new to MapServ, but I think its GREAT! From steve.lime at dnr.state.mn.us Thu Nov 4 11:22:21 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Thu, 04 Nov 1999 13:22:21 -0600 Subject: Image Cache Message-ID: You could hack mapserv.c and have it spit out the tag you mention. Another way would be to come up with a more unique naming convention. Version 3.3 now uses time + pid for what should be a truly unique name. If you can hold out for a few more days your problem should be solved, assuming it'll compile on NT. ;-) Steve <<< "KIERAN AMES" 11/ 4 1:04p >>> I've installed a port of Mapserv onto a NT4.0 machine and am now experimenting. I've run across an implementation problem with regard to images being cached. I believe that image names are created with the map name concatenated to the processID. In NT, process IDs don't run very high and are re-used. Therefore, when a new image is created, the client browser sees an image name and if it finds it in its local cache, it doesn't fetch the revised image that was just created. I can control this in regular cgi (Perl) by sending non-parsed headers and delivering a "Pragma:No-cache" line in the http headers. Is there an equivalent solution with MapServ on an NT platform? Thanks very much. Kieran Ames PS. I'm new to MapServ, but I think its GREAT! From kames at keyspanenergy.com Thu Nov 4 11:29:15 1999 From: kames at keyspanenergy.com (KIERAN AMES) Date: Thu, 04 Nov 1999 14:29:15 -0500 Subject: Image Cache References: Message-ID: <3821DE8A.4C534EBE@keyspanenergy.com> I've waited for more than a year to be able to do the things I've done in just the past few days! By all means, "Carry on!" . (I just worry about the "assuming it'll compile on NT" part of your reply. Brent has been great help. Dare I ask for more???) shiver, shiver; worry, worry. Then, what'll I do?? Kieran Stephen Lime wrote: > You could hack mapserv.c and have it spit out > the tag you mention. Another way would be to > come up with a more unique naming convention. > Version 3.3 now uses time + pid for what should > be a truly unique name. If you can hold out for a > few more days your problem should be solved, > assuming it'll compile on NT. ;-) > > Steve > > <<< "KIERAN AMES" 11/ 4 1:04p >>> > I've installed a port of Mapserv onto a NT4.0 machine and am now > experimenting. I've run across an implementation problem with regard to > images being cached. > > I believe that image names are created with the map name concatenated to > the processID. In NT, process IDs don't run very high and are re-used. > Therefore, when a new image is created, the client browser sees an image > name and if it finds it in its local cache, it doesn't fetch the revised > image that was just created. > > I can control this in regular cgi (Perl) by sending non-parsed headers > and delivering a "Pragma:No-cache" line in the http headers. Is there an > equivalent solution with MapServ on an NT platform? > > Thanks very much. > Kieran Ames > > PS. I'm new to MapServ, but I think its GREAT! From ddnebert at usgs.gov Thu Nov 4 11:33:39 1999 From: ddnebert at usgs.gov (Doug Nebert) Date: Thu, 04 Nov 1999 14:33:39 -0500 Subject: Shading certain polygons References: Message-ID: <3821DF93.2780EA71@usgs.gov> Stephen Lime wrote: > > Try this: > > CLASSITEM HYC > CLASS > EXPRESSION "8" > COLOR 50 50 250 > END > > The / /'s are a perlism I believe and they are > not necessary. Note the expression "8" matches any > value with an 8 in it while "^8$" matches only a > single 8. You can add outlines by defining an outlinecolor. > > Lot's of stratagies for dealing with large shapefiles. One is > reduced resolution version, just like you did with the DEM images > but with vector data. Another is using spatial indexes. I > usually work with both. Note, mapserver does not > use arcview indexes, rather it has it's own > indexer- shpindex. I can expand on that if anybody > cares to listen... > Turns out I don't have quite the right content in the global lakes polygon shapefile that I thought I had. I will work more on it in arc/info and re-shape it. I will also use some threshholding and create low-res lakes to be shown at certain scales. So how does shpindex work? It would appear that the shapefile is being digested when first loaded and that subsequent reads are either from memory or an index, yes? At least it seems that second draws of a different region are faster than the first access. Doug. > Steve > > <<< Doug Nebert 11/ 4 12:39p >>> > Not to sound stupid but might it look like the following? > > CLASS > HYC = 8 > COLOR 50 50 250 > END > > The documentation says: > > Regular expression that defines membership in this class. If no > expression is given then all features are said to belong to this > class. > > That might imply use of / / characters to evaluate regexp. Do I > need to use / / at all? > > I would assume that if I assign color I will get no outline, yes? > > I processed all the DCW data as I said I would and have been > converting it to shapefile from ARC/INFO. The ARCSHAPE command > doesn't allow for selective polygon exporting since ARC sees > them as topological polygons, everyone, and the polylines that > are in shapefiles don't care about their neighbors. > > These are really big shapefiles (80+ MB) so I may need to > consider tiling. > > Doug. > > Stephen Lime wrote: > > > > Declare a class with an expression that matches only the water polys. Shapes without a class are > > ignored. You could edit the shape file and delete > > the islands altogether. The hole should still be > > there but as part of the water shapes. Holes in > > multipart polygons are rendered correctly. Faster > > that way, less data and no class expression evaluation. > > > > Steve > > > > <<< Doug Nebert 11/ 4 10:53a >>> > > I have a complex polygon layer in which I have polygonal water > > bodies and islands within them. I need to be able to apply > > shading to only the water based on an attribute and to have > > all other valid polygons (like islands) from the shapefile > > be not shaded. > > > > How do I declare this selection in the .map file? > > > > -- > > Douglas D. Nebert > > Clearinghouse Coordinator > > FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 > > Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html > > -- > Douglas D. Nebert > Clearinghouse Coordinator > FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 > Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html -- Douglas D. Nebert Clearinghouse Coordinator FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html From bfraser at geoanalytic.com Thu Nov 4 12:41:35 1999 From: bfraser at geoanalytic.com (Brent Fraser) Date: Thu, 4 Nov 1999 13:41:35 -0700 Subject: Image Cache References: <3821DE8A.4C534EBE@keyspanenergy.com> Message-ID: <00f801bf2704$fc80b8b0$390002c0@servo> Steve's just kidding (you gotta love that Unix humor). I'll be putting it thru the NT blender as soon as he releases the source.... As for the caching problem, I noticed that back in May, and after much investigation (see attached email thread) we came up with the solution of adding a timestamp value to the file names. Hopefully, Steve will have that option in the soon-to-be-released version... Brent ----- Original Message ----- From: KIERAN AMES To: Sent: Thursday, November 04, 1999 12:29 PM Subject: Re: Image Cache > I've waited for more than a year to be able to do the things I've done in > just the past few days! By all means, "Carry on!" . > (I just worry about the "assuming it'll compile on NT" part of your reply. > Brent has been great help. Dare I ask for more???) > > > shiver, shiver; worry, worry. Then, what'll I do?? > > > Kieran > > Stephen Lime wrote: > > > You could hack mapserv.c and have it spit out > > the tag you mention. Another way would be to > > come up with a more unique naming convention. > > Version 3.3 now uses time + pid for what should > > be a truly unique name. If you can hold out for a > > few more days your problem should be solved, > > assuming it'll compile on NT. ;-) > > > > Steve > > > > <<< "KIERAN AMES" 11/ 4 1:04p >>> > > I've installed a port of Mapserv onto a NT4.0 machine and am now > > experimenting. I've run across an implementation problem with regard to > > images being cached. > > > > I believe that image names are created with the map name concatenated to > > the processID. In NT, process IDs don't run very high and are re-used. > > Therefore, when a new image is created, the client browser sees an image > > name and if it finds it in its local cache, it doesn't fetch the revised > > image that was just created. > > > > I can control this in regular cgi (Perl) by sending non-parsed headers > > and delivering a "Pragma:No-cache" line in the http headers. Is there an > > equivalent solution with MapServ on an NT platform? > > > > Thanks very much. > > Kieran Ames > > > > PS. I'm new to MapServ, but I think its GREAT! > > -------------- next part -------------- An embedded message was scrubbed... From: "Stephen Lime" Subject: Re: caching at browser Date: Tue, 18 May 1999 10:06:04 -0500 Size: 10605 URL: From bfraser at geoanalytic.com Thu Nov 4 13:03:26 1999 From: bfraser at geoanalytic.com (Brent Fraser) Date: Thu, 4 Nov 1999 14:03:26 -0700 Subject: mouse-over "map tips" Message-ID: <010a01bf2708$0a033ff0$390002c0@servo> Steve, (and all) I ran across http://www.imapper.com/ and saw that they were showing a GIF with "map tips" when the mouse passes over road features. Looking at the HTML source, I see that they are using client-side image maps with "area" tags with polygons and mouse-over text (in the "alt" portion of the tag?): Calle Burgos Might be an interesting enhancement to MapServer (version 4.0?) Of course since most of us are using Steve's spiffy Java mapimage.class to interact with the image, it might not be that useful. Brent Fraser GeoAnalytic Inc. 1150 , 633 - 6th Avenue SW Calgary, AB T2P 2Y5 Tel: (403)213-2700 Fax: (403)213-2707 bfraser at geoanalytic.com www.geoanalytic.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bowenj at gaiaenv.com Thu Nov 4 15:38:41 1999 From: bowenj at gaiaenv.com (Jim T. Bowen (GAIA Consultants Inc.)) Date: Thu, 04 Nov 1999 16:38:41 -0700 Subject: mouse-over "map tips" References: <010a01bf2708$0a033ff0$390002c0@servo> Message-ID: <38221901.612CD721@gaiaenv.com> Brentford, If you check out: http://user.cs.tu-berlin.de/~eserte/bbbike/cgi/bbbike.cgi or if you don't want to navigate, try: http://user.cs.tu-berlin.de/~eserte/bbbike/cgi/bbbike.cgi?startname=Oranienburger+Str.+%28Mitte%29&via=&viacharimg.x=&viacharimg.y=&viamapimg.x=&viamapimg.y=&ziel=&zielcharimg.x=&zielcharimg.y=&zielmapimg.x=86&zielmapimg.y=105 The approach you describe is used at this site as well. This location was posted to the mapserver-users mailing list with reference to a 'shortest path algorithm' question. The boys in our shop thought the imagemap approach was pretty slick (certainly creative!). Still of interest to those who want to avoid the use of Java. :) Cheers, Jim > Brent Fraser wrote: > > Steve, (and all) > > I ran across http://www.imapper.com/ and saw that they were showing > a > GIF with "map tips" when the mouse passes over road features. > > Looking at the HTML source, I see that they are using client-side > image maps with > "area" tags with polygons and mouse-over text (in the "alt" portion of > the tag?): > > Calle Burgos href="imsql.asp?Layer=Eje_de_v?a&Label=Calle_Burgos" shape="poly" > coords="-41,74,2,77,46,88,46,92,2,81,-41,78"> > Might be an interesting enhancement to MapServer (version 4.0?) > Of course since most of us are using Steve's spiffy Java > mapimage.class to > interact with the image, it might not be that useful. > > Brent Fraser > GeoAnalytic Inc. > 1150 , 633 - 6th Avenue SW Calgary, AB T2P 2Y5 > Tel: (403)213-2700 Fax: (403)213-2707 > bfraser at geoanalytic.com > www.geoanalytic.com -- ___________________________________ GGG G AAA III AAA | Jim T. Bowen, M.Sc., President | G GG A I A | | G G A A I A A |Suite 306, 822-11th Ave. S.W. | G G A A I A A |Calgary, Alberta, Canada T2R 0E5 | G A A I A A |Ph: 403-571-7213 Fax: 403-571-7211| G GGGG A A I A A |_______bowenj at gaiaenv.com__________| G G AAAAA I AAAAA ICQ: 15567315 G G A A I A A http://www.gaiaenv.com G G A A I A A GGGG AAA AAA III AAA AAA From TBanister at SpaceImaging.com Thu Nov 4 16:35:03 1999 From: TBanister at SpaceImaging.com (Banister Trevor) Date: Thu, 4 Nov 1999 17:35:03 -0700 Subject: Conditional "Legends" Message-ID: The way I would do it is to create a different map and/or template file for the different zoom levels. If you need both a new map and template, you'll have to construct a URL with the CGI tags [layers], [mapext] etc. Hopefully you don't have too many or it might be a lot of work. Use the maxtemplate and mintemplate functions to automagically change the map and template without the user noticing. >From http://mapserver.gis.umn.edu/mapfile.html maxtemplate [filename|url]: Template file or url to use in presenting the results to the user when above the maxscale. Useful for nesting interfaces. mintemplate [filename|url]: Template file or url to use in presenting the results to the user when below the minscale. Useful for nesting interfaces. Hope this helps. Trevor -----Original Message----- From: Doug Nebert [mailto:ddnebert at usgs.gov] Sent: Thursday, November 04, 1999 11:58 AM To: Mapserver Users Subject: Conditional "Legends" I have a series of base maps that are being used to present a world to local view. At different levels of zoom (or surrogate scale) I would like to display different items in the legend as declared in the _template.html file. It would seem that a scale variable could be accessible to JavaScript based on the current extent, yes? Thus I would not even show roads as an option on a global view and could switch layers and labels at a high level of zoom. I need to not use Zoom level but the derived scale being used for the current image. Example javaScript solutions appreciated! -- Douglas D. Nebert Clearinghouse Coordinator FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html From pgallen at randomlogic.com Thu Nov 4 17:21:18 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Thu, 04 Nov 1999 17:21:18 -0800 Subject: mouse-over "map tips" References: <010a01bf2708$0a033ff0$390002c0@servo> Message-ID: <3822310E.C7FBD46A@randomlogic.com> Brent Fraser wrote: > Steve, (and all) I ran across http://www.imapper.com/ and saw that they > were showing aGIF with "map tips" when the mouse passes over road > features. Looking at the HTML source, I see that they are using client-side > image maps with"area" tags with polygons and mouse-over text (in the "alt" > portion of the tag?): Calle Burgos href="imsql.asp?Layer=Eje_de_v?a&Label=Calle_Burgos" shape="poly" > coords="-41,74,2,77,46,88,46,92,2,81,-41,78">Might be an interesting > enhancement to MapServer (version 4.0?)Of course since most of us are using > Steve's spiffy Java mapimage.class tointeract with the image, it might not be > that useful. With the exception of myself. When attempting to get the mapimage.class to work, I did something to my system so that now I can't even get Steve's example (http://www.dnr.state.mn.us/mis/gis/gislis99/example1.html , Example #5) to work. My browser says the applet is running, but I get no map displayed, only the interface. I can't draw a box either. :( PGA From pgallen at randomlogic.com Thu Nov 4 17:27:20 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Thu, 04 Nov 1999 17:27:20 -0800 Subject: A couple MapServer suggestions Message-ID: <38223278.D4AA28FA@randomlogic.com> Maybe some of this is in the works already. 1. I'd like to be able to display multiple scale bars so that I could have one in miles and one in kilometers for example. 2. I'd like to be able to change the map image size from the users browser so that the user can adjust the map size to fit their screen. Currently doing this messes up the reference image and zoom/pan calculations. 3. One of my colleagues would like the ability to scale the map image using the scale bar - change the scale on the scale bar and the map adjusts to the corresponding scale. There were a couple others, but I don't recall what they were at the moment (no, I didn't write them down :) PGA From TBanister at SpaceImaging.com Thu Nov 4 18:16:07 1999 From: TBanister at SpaceImaging.com (Banister Trevor) Date: Thu, 4 Nov 1999 19:16:07 -0700 Subject: A couple MapServer suggestions Message-ID: 1. Borderless frames with different maps/templates is all I can think of, probably need some "onload" JavaScript too. 2. I was able to do this with some success, create a new hyperlink URL with the map size in it. Pitfall: since you have to hard code the center point for non map clicks, the "refresh" button doesn't work right for all but 1 of the maps. I've considered editing the C and adding a new tag like [mappixelcenter] to solve this, but haven't gotten around to it yet. Maybe we can talk Steve into it? A kludge would be to make new map/template combinations for each map size. Example at: http://www2.spaceimaging.com/maps/ choose the "All Scenes" or "Recent Cloud free" to see what I'm talking about. Once you're off of the 600x400 size, the requery button sends you further and further Southeast since it's returning 300 200 as the "clicked" point rather than 200 150 or 100 75. This site is pre-Alpha, so please be gentle. Scene data is available, but most of the product imagery is still behind the firewall, and won't be available. Let me know what you think. 3. Build a static scale bar and use it as a clickable map. You'll probably have to hard code URLs for different levels on the scale bar, but it might work. ---------------------------------------------------------------------------- Trevor Banister, Sr. Application Designer Space Imaging 12076 Grant Street Thornton, CO 80241 Phone: (303) 254-2175 Fax: (303) 254-2211 ---------------------------------------------------------------------------- "All the glossy brochures and PR budgets in the world can't disguise the fact that nobody has solved the automatic programming problem. There is no program that can take an English description of what you want done and turn that into software." --Philip Greenspun -----Original Message----- From: Paul G. Allen [mailto:pgallen at randomlogic.com] Sent: Thursday, November 04, 1999 6:27 PM To: MapServer Users List Subject: A couple MapServer suggestions Maybe some of this is in the works already. 1. I'd like to be able to display multiple scale bars so that I could have one in miles and one in kilometers for example. 2. I'd like to be able to change the map image size from the users browser so that the user can adjust the map size to fit their screen. Currently doing this messes up the reference image and zoom/pan calculations. 3. One of my colleagues would like the ability to scale the map image using the scale bar - change the scale on the scale bar and the map adjusts to the corresponding scale. There were a couple others, but I don't recall what they were at the moment (no, I didn't write them down :) PGA From bfraser at geoanalytic.com Thu Nov 4 18:49:06 1999 From: bfraser at geoanalytic.com (Brent Fraser) Date: Thu, 4 Nov 1999 19:49:06 -0700 Subject: Broken Java (was Re: mouse-over "map tips") References: <010a01bf2708$0a033ff0$390002c0@servo> <3822310E.C7FBD46A@randomlogic.com> Message-ID: <001a01bf2738$5563a9f0$030102c0@cghh1.ab.wave.home.com> Paul, Well that happened to me too. I had compiled the Java code with JDK 1.2 (aka Java 2), then accessed my page from a machine with the Java 1.1 runtime engine. I got the results you described. I put Steve's mapimage.class file (Java 1.1?) back on the server and things began to work again. But if your client and server machine are the same, then I dunno what's wrong... Brent ----- Original Message ----- From: Paul G. Allen To: MapServer Users List Sent: Thursday, November 04, 1999 6:21 PM Subject: Re: mouse-over "map tips" Brent Fraser wrote: > Steve, (and all) I ran across http://www.imapper.com/ and saw that they > were showing aGIF with "map tips" when the mouse passes over road > features. Looking at the HTML source, I see that they are using client-side > image maps with"area" tags with polygons and mouse-over text (in the "alt" > portion of the tag?): Calle Burgos href="imsql.asp?Layer=Eje_de_v?a&Label=Calle_Burgos" shape="poly" > coords="-41,74,2,77,46,88,46,92,2,81,-41,78">Might be an interesting > enhancement to MapServer (version 4.0?)Of course since most of us are using > Steve's spiffy Java mapimage.class tointeract with the image, it might not be > that useful. With the exception of myself. When attempting to get the mapimage.class to work, I did something to my system so that now I can't even get Steve's example (http://www.dnr.state.mn.us/mis/gis/gislis99/example1.html , Example #5) to work. My browser says the applet is running, but I get no map displayed, only the interface. I can't draw a box either. :( PGA From pgallen at randomlogic.com Thu Nov 4 19:14:14 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Thu, 04 Nov 1999 19:14:14 -0800 Subject: Broken Java (was Re: mouse-over "map tips") References: <010a01bf2708$0a033ff0$390002c0@servo> <3822310E.C7FBD46A@randomlogic.com> <001a01bf2738$5563a9f0$030102c0@cghh1.ab.wave.home.com> Message-ID: <38224B86.84F8F1D7@randomlogic.com> Brent Fraser wrote: > Paul, > > Well that happened to me too. I had compiled the Java > code with JDK 1.2 (aka Java 2), then accessed my page > from a machine with the Java 1.1 runtime engine. I got the > results you described. I put Steve's mapimage.class file > (Java 1.1?) back on the server and things began to work > again. > > But if your client and server machine are the same, > then I dunno what's wrong... > Yes, my server and browser are running on the same machine (nice thing about UNIX, I can develop stuff using a GUI called X, on the same machine as the web server, and not worry about a GUI crash bringing down the web server :) I may have to install Java again to see if that fixes the problem. In my case, the only thing I did was add the CLASSPATH env. variable to my login environment. Netscape reported to me as soon as I tried to use it that there was already a CLASSPATH defined. I removed my CLASSPATH, but I still can't get the example page to work. I haven't tried Steve's mapimage.class again yet, but I did move it into one of the paths indicated by Netscape. PGA From imap at chesapeake.net Thu Nov 4 23:13:27 1999 From: imap at chesapeake.net (imap at chesapeake.net) Date: Fri, 05 Nov 1999 02:13:27 -0500 Subject: mouse-over "map tips" References: <010a01bf2708$0a033ff0$390002c0@servo> Message-ID: <38228397.C6AD0029@chesapeake.net> This "mouse-over" thing was something I spoke with Steve about just the other day... If the data required for the "mouse-over" were derived from a Shapefile/DBF or a database, and the polygonal/line/point data were stored in the map coordinates, the map engine would have to *return* the data required to construct the client-side imagemap. Perhaps there could be an argument that could be passed to mapserv to generate this type of output which can be passed to the front-end java or CGI. This task is best handled by mapserv because the front-end needs the x/y values which would be difficult to derive externally. For the java front-end ---------------------- The thought for the java version of mapimage.class (or whatever you might call your java front-end) is to handle the appropriate modal functions of: ZOOM-IN, ZOOM-OUT, RECENTER, QUERY and the various Mouse events in conjunction with the state of a radio button or checkboxes and ALSO have that same applet handle the MOUSEOVER of the output of the client-side imagemap output. I will need to look at the java book to see what is available to handle this. Maybe someone has already done this?? For the CGI front-end --------------------- I am not completely sure about this... but can you use a tag in conjunction with a client-side imagemap? I think the answer is no, and someone set me straight if I am wrong about that. But anyway, you would want to be able to handle the navigational modes ZOOM-IN, ZOOM-OUT, RECENTER, QUERY and at the same time... handle a client-side imagemap to do the mouseover link. I am at a loss as to how you do this with a CGI only setup. If there are any ideas, I'd like to hear about it. IMHO, This is a feature that very much needed and mapserv should be enhanced to perform this task in the form of a "client-side imagemap" at a minimum. Perhaps solving the client aspect is out of scope. There are 3 pieces of mapserv output I would like to see. (1) a map image (2) a client side imagemap if specified (3) label cache information Somehow we WILL get the client-side imagemap part work on the front-end. The label cache would be invaluable for post-processing the images, so that you could programmatically enforce the collision avoidance of the mapserv execution for subsequent image manipulation. Follow me? If it is possible to get that information in some machine readable format, that would be wonderful! Regards, Chris Stuber (mapsurfer) Silicon Mapping Solutions, Inc. > Brent Fraser wrote: > > Steve, (and all) > > I ran across http://www.imapper.com/ and saw that they were showing a > GIF with "map tips" when the mouse passes over road features. > > Looking at the HTML source, I see that they are using client-side image maps > with > "area" tags with polygons and mouse-over text (in the "alt" portion of the > tag?): > > Calle Burgos href="imsql.asp?Layer=Eje_de_v?a&Label=Calle_Burgos" shape="poly" > coords="-41,74,2,77,46,88,46,92,2,81,-41,78"> > Might be an interesting enhancement to MapServer (version 4.0?) > Of course since most of us are using Steve's spiffy Java mapimage.class to > interact with the image, it might not be that useful. > > Brent Fraser > GeoAnalytic Inc. > 1150 , 633 - 6th Avenue SW Calgary, AB T2P 2Y5 > Tel: (403)213-2700 Fax: (403)213-2707 > bfraser at geoanalytic.com > www.geoanalytic.com From mapadm at polsl.gliwice.pl Fri Nov 5 00:32:59 1999 From: mapadm at polsl.gliwice.pl (Grzegorz Myrda) Date: Fri, 5 Nov 1999 09:32:59 +0100 Subject: Image Cache Message-ID: <001e01bf2768$6f7565b0$0900000a@pc-9.ispik.pl> You need to replace all references to map images with for example: sprintf(substr, "%s/%s%d%ld.gif", imgpath, Map->name, UserID,uniqueNumber); where: uniqueNumber = time(NULL); I use it for a long time and it works. -- Grzegorz -----Original Message----- From: KIERAN AMES To: mapserver-users at lists.gis.umn.edu Date: 4 listopada 1999 20:09 Subject: Image Cache >I've installed a port of Mapserv onto a NT4.0 machine and am now >experimenting. I've run across an implementation problem with regard to >images being cached. > >I believe that image names are created with the map name concatenated to >the processID. In NT, process IDs don't run very high and are re-used. >Therefore, when a new image is created, the client browser sees an image >name and if it finds it in its local cache, it doesn't fetch the revised >image that was just created. > >I can control this in regular cgi (Perl) by sending non-parsed headers >and delivering a "Pragma:No-cache" line in the http headers. Is there an >equivalent solution with MapServ on an NT platform? > >Thanks very much. >Kieran Ames > >PS. I'm new to MapServ, but I think its GREAT! > > From pgallen at randomlogic.com Fri Nov 5 05:37:10 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Fri, 05 Nov 1999 05:37:10 -0800 Subject: A couple MapServer suggestions References: <38223278.D4AA28FA@randomlogic.com> Message-ID: <3822DD86.78525A1B@randomlogic.com> "Paul G. Allen" wrote: > > Maybe some of this is in the works already. > > 1. I'd like to be able to display multiple scale bars so that I could have one > in miles and one in kilometers for example. > 2. I'd like to be able to change the map image size from the users browser so > that the user can adjust the map size to fit their screen. Currently doing this > messes up the reference image and zoom/pan calculations. > 3. One of my colleagues would like the ability to scale the map image using the > scale bar - change the scale on the scale bar and the map adjusts to the > corresponding scale. > > There were a couple others, but I don't recall what they were at the moment (no, > I didn't write them down :) I knew there were more: 4. I'd like to be able to scale images so that they fit text. For example, my Interstate Freeways have the standard (USA) Intersate symbol on them, but I have to place the Interstate name ABOVE the symbol or in some cases the name will extend beyond the symbol boarder (see my Philadelphia map for examples). PGA From steve.lime at dnr.state.mn.us Fri Nov 5 05:40:19 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Fri, 05 Nov 1999 07:40:19 -0600 Subject: Image Cache Message-ID: Again, this is done in 3.3 so no need to hack the code. s. <<< "Grzegorz Myrda" 11/ 5 2:35a >>> You need to replace all references to map images with for example: sprintf(substr, "%s/%s%d%ld.gif", imgpath, Map->name, UserID,uniqueNumber); where: uniqueNumber = time(NULL); I use it for a long time and it works. -- Grzegorz -----Original Message----- From: KIERAN AMES To: mapserver-users at lists.gis.umn.edu Date: 4 listopada 1999 20:09 Subject: Image Cache >I've installed a port of Mapserv onto a NT4.0 machine and am now >experimenting. I've run across an implementation problem with regard to >images being cached. > >I believe that image names are created with the map name concatenated to >the processID. In NT, process IDs don't run very high and are re-used. >Therefore, when a new image is created, the client browser sees an image >name and if it finds it in its local cache, it doesn't fetch the revised >image that was just created. > >I can control this in regular cgi (Perl) by sending non-parsed headers >and delivering a "Pragma:No-cache" line in the http headers. Is there an >equivalent solution with MapServ on an NT platform? > >Thanks very much. >Kieran Ames > >PS. I'm new to MapServ, but I think its GREAT! > > From pgallen at randomlogic.com Fri Nov 5 05:44:38 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Fri, 05 Nov 1999 05:44:38 -0800 Subject: Scripts and C source available Message-ID: <3822DF46.97115BE4@randomlogic.com> Due to several requests, I have quickly placed the scripts and C source for the utilities I wrote for my MapServer applications. They can be found via links on my Philadelphia map - http://24.5.14.144/phframe.html. I will be working on making these links more "user friendly" as time permits as well as cleaning up the code a bit. I have also updated the same map to be my latest experiment using frames to display map and query data. Some functions are a little rough as I'm still learning HTML, Java, Javascript, and Perl. PGA From steve.lime at dnr.state.mn.us Fri Nov 5 08:06:29 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Fri, 05 Nov 1999 10:06:29 -0600 Subject: A couple MapServer suggestions Message-ID: To expand on Trevors comments. 1. You can do this now, but you need a second small (very small) map file to house the second scalebar definition. Then you call the second map file like this in the template: You may also need to add the map size (rows and columns) although if static you can set that in the second mapfile. With 3.3 you won't need the second file as you can change scalebar units via a url. I'll add this as an example to the mapserv demo suite. 2. My support for this is a bit of a hack. I always knew people might want to do it but I haven't used it myself so it's admittedly poorly tested. I'll add a template substitution for the image center so you can set imgxy like this: or something similar. I'll also add x and y components for this and for mapsize so embeding in a URL is easier. To me a template substitution makes more sense than a new CGI param. The CGI is there it just needs the right value. 3. You'll have to show me what the scalebar element looks like. Is it like MapBlast uses? You can call the mapserver with a point and a scale to create a map. You can have scale dependent URLs or you could use javascript to adjust the scale element to match what's just been displayed. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> Banister Trevor 11/04/99 08:16PM >>> 1. Borderless frames with different maps/templates is all I can think of, probably need some "onload" JavaScript too. 2. I was able to do this with some success, create a new hyperlink URL with the map size in it. Pitfall: since you have to hard code the center point for non map clicks, the "refresh" button doesn't work right for all but 1 of the maps. I've considered editing the C and adding a new tag like [mappixelcenter] to solve this, but haven't gotten around to it yet. Maybe we can talk Steve into it? A kludge would be to make new map/template combinations for each map size. Example at: http://www2.spaceimaging.com/maps/ choose the "All Scenes" or "Recent Cloud free" to see what I'm talking about. Once you're off of the 600x400 size, the requery button sends you further and further Southeast since it's returning 300 200 as the "clicked" point rather than 200 150 or 100 75. This site is pre-Alpha, so please be gentle. Scene data is available, but most of the product imagery is still behind the firewall, and won't be available. Let me know what you think. 3. Build a static scale bar and use it as a clickable map. You'll probably have to hard code URLs for different levels on the scale bar, but it might work. ---------------------------------------------------------------------------- Trevor Banister, Sr. Application Designer Space Imaging 12076 Grant Street Thornton, CO 80241 Phone: (303) 254-2175 Fax: (303) 254-2211 ---------------------------------------------------------------------------- "All the glossy brochures and PR budgets in the world can't disguise the fact that nobody has solved the automatic programming problem. There is no program that can take an English description of what you want done and turn that into software." --Philip Greenspun -----Original Message----- From: Paul G. Allen [mailto:pgallen at randomlogic.com] Sent: Thursday, November 04, 1999 6:27 PM To: MapServer Users List Subject: A couple MapServer suggestions Maybe some of this is in the works already. 1. I'd like to be able to display multiple scale bars so that I could have one in miles and one in kilometers for example. 2. I'd like to be able to change the map image size from the users browser so that the user can adjust the map size to fit their screen. Currently doing this messes up the reference image and zoom/pan calculations. 3. One of my colleagues would like the ability to scale the map image using the scale bar - change the scale on the scale bar and the map adjusts to the corresponding scale. There were a couple others, but I don't recall what they were at the moment (no, I didn't write them down :) PGA From kames at erols.com Fri Nov 5 09:50:56 1999 From: kames at erols.com (Kieran Ames) Date: Fri, 05 Nov 1999 12:50:56 -0500 Subject: Scale and Map Units Message-ID: <38231900.9209925@erols.com> Hello again. Kieran here (from my home address, not work!). I have a question regarding scale and when to render layers and labels. The data I work with is consistently in decimal degrees. For data I've received that was in some type of projection, I converted those files to dec degs. The data I've seen in the examples around the list use image _coordinates_. So, a map file entry like EXTENT 74000 4775000 798000 5500000 might have another line like MINSCALE 400000 and MAXSCALE 400000 for different layers. (www.dnr.state.mn.us/mis/gis/gislis99/example4) I've set my extent information in Decimal degrees like EXTENT -74.257 40.496 -71.857 41.292 (Long Island, NY) Questions: 1. What is the proper way of implementing MINSCALE and MAXSCALE functionality using decimal degrees? 2. My scale bar works, but gives a range like 0.0000 to 0.0002 miles when I'm looking at a layer that's more than 100 miles across... (Extent above) Many thanks. Kieran From kames at erols.com Fri Nov 5 11:05:18 1999 From: kames at erols.com (Kieran Ames) Date: Fri, 05 Nov 1999 14:05:18 -0500 Subject: mouse-over "map tips" Message-ID: <38232A6D.C3DC6FEF@erols.com> Brent Fraser wrote... > ... > Of course since most of us are using Steve's spiffy Java mapimage.class to > interact with the image, it might not be that useful. Is that mapimage.class available? Where would I find it? Thanks Kieran From mjacquin at geosys-inc.com Fri Nov 5 13:32:00 1999 From: mjacquin at geosys-inc.com (Marc JACQUIN - GEOSYS Inc - Minneapolis) Date: Fri, 05 Nov 1999 13:32:00 -0800 Subject: Transparent polygons Message-ID: <38234CD0.5969C25A@geosys-inc.com> Hi everyone, Trying to display a polygon shape layer over another one. I would like to see the underlying layer through those polygons. I could tranform the layer into lines but on another hand I need those polygons in the CGI. What should I put in the map file ? Thanks, Marc -------------- next part -------------- A non-text attachment was scrubbed... Name: mjacquin.vcf Type: text/x-vcard Size: 416 bytes Desc: Card for Marc JACQUIN - GEOSYS Inc - Minneapolis URL: From steve.lime at dnr.state.mn.us Fri Nov 5 11:44:53 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Fri, 05 Nov 1999 13:44:53 -0600 Subject: Transparent polygons Message-ID: Use TYPE POLYLINE instead of POLYGON. That'll just draw the polygons as lines, but label them as polygons. Queries are handled based on the inherent shapefile type not the type set in the mapfile. s. Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> Marc JACQUIN - GEOSYS Inc - Minneapolis 11/05/99 03:32PM >>> Hi everyone, Trying to display a polygon shape layer over another one. I would like to see the underlying layer through those polygons. I could tranform the layer into lines but on another hand I need those polygons in the CGI. What should I put in the map file ? Thanks, Marc From TBanister at SpaceImaging.com Fri Nov 5 11:41:53 1999 From: TBanister at SpaceImaging.com (Banister Trevor) Date: Fri, 5 Nov 1999 12:41:53 -0700 Subject: Transparent polygons Message-ID: Polygon shapes can be treated as lines or even points. The documentation has a nice section on this technique. -----Original Message----- From: Marc JACQUIN - GEOSYS Inc - Minneapolis [mailto:mjacquin at geosys-inc.com] Sent: Friday, November 05, 1999 2:32 PM To: MapServer Users List Subject: Transparent polygons Hi everyone, Trying to display a polygon shape layer over another one. I would like to see the underlying layer through those polygons. I could tranform the layer into lines but on another hand I need those polygons in the CGI. What should I put in the map file ? Thanks, Marc From steve.lime at dnr.state.mn.us Fri Nov 5 13:04:04 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Fri, 05 Nov 1999 15:04:04 -0600 Subject: Scale and Map Units Message-ID: As of 3.2.19 decimal degree scale computations are supported. Regardless, you must set the UNITS parameter to the units of your coordinate system. In your case use "UNITS DD". MINSCALE and MAXSCALE then work like always athough you may have to experiment a bit more to figure out the right values. Remember that the DD support is based on the assumption that x values are constant everywhere which is obviously false. So DD based scalebars must be used cautiously as they are only valid on the equator. If possible, best to use a localized projection and coordinate system. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> Kieran Ames 11/05/99 11:50AM >>> Hello again. Kieran here (from my home address, not work!). I have a question regarding scale and when to render layers and labels. The data I work with is consistently in decimal degrees. For data I've received that was in some type of projection, I converted those files to dec degs. The data I've seen in the examples around the list use image _coordinates_. So, a map file entry like EXTENT 74000 4775000 798000 5500000 might have another line like MINSCALE 400000 and MAXSCALE 400000 for different layers. (www.dnr.state.mn.us/mis/gis/gislis99/example4) I've set my extent information in Decimal degrees like EXTENT -74.257 40.496 -71.857 41.292 (Long Island, NY) Questions: 1. What is the proper way of implementing MINSCALE and MAXSCALE functionality using decimal degrees? 2. My scale bar works, but gives a range like 0.0000 to 0.0002 miles when I'm looking at a layer that's more than 100 miles across... (Extent above) Many thanks. Kieran From ddnebert at usgs.gov Fri Nov 5 14:14:41 1999 From: ddnebert at usgs.gov (Doug Nebert) Date: Fri, 05 Nov 1999 17:14:41 -0500 Subject: Forms within forms? Message-ID: <382356D1.E4C97573@usgs.gov> I have been experimenting with continued success in adding layers to be viewed via the mapimage applet with the controls and reference map displayed alongside in HTML. The communication between the HTML and the mapserver seems to be done with JavaScript within a form. Thus a redraw map request is a form action. This is all very nice if that is the only event I want to do, but I have the need to use the resulting coordinates from the current window (the search rectangle, not the map extent) and pass them to another process to do search with. It first seems that I would need more than one form to do this but I am lost as to how this is done or what alternatives there would be, other than folding all the functions inside the applet. Example solutions, please! -- Douglas D. Nebert Clearinghouse Coordinator FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html From steve.lime at dnr.state.mn.us Fri Nov 5 14:47:47 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Fri, 05 Nov 1999 16:47:47 -0600 Subject: Forms within forms? Message-ID: Doug: If I understand correctly. You want to zoom/pan until the user has a view that make sense for them. Then they draw one more box to define a query area (or use the entire area, correct? At that point the area of interest needs to be passed off to another package. There are several ways to do it. One elegant way would be to add a control to the form, a check box, that when checked would apply the aoi. When checked a little function would do the conversion from imgbox to a search extent (or if no box is on the sceen use the whole image extent) and with that extent it could call the other search app using a URL and replace the browser contents with that page. I can provide you with the code to go from pixels to image coordinates, no problem. The whole solution is about 20 lines of .js code. Cool huh. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> Doug Nebert 11/05/99 04:14PM >>> I have been experimenting with continued success in adding layers to be viewed via the mapimage applet with the controls and reference map displayed alongside in HTML. The communication between the HTML and the mapserver seems to be done with JavaScript within a form. Thus a redraw map request is a form action. This is all very nice if that is the only event I want to do, but I have the need to use the resulting coordinates from the current window (the search rectangle, not the map extent) and pass them to another process to do search with. It first seems that I would need more than one form to do this but I am lost as to how this is done or what alternatives there would be, other than folding all the functions inside the applet. Example solutions, please! -- Douglas D. Nebert Clearinghouse Coordinator FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html From pgallen at randomlogic.com Fri Nov 5 19:34:40 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Fri, 05 Nov 1999 19:34:40 -0800 Subject: Label issues Message-ID: <3823A1D0.8D090D23@randomlogic.com> I've noticed no response to my label problem. Did my question somehow get dropped into the bit bucket? The question was: I have a set of points that were created using my utilities (data extracted from a table, formatted, and placed into a shapefile). When I try to label these points, it seems if I have too many displayed on the map, I get an Internal Server Error. Here's the entry in the Apache error_log file: [Wed Nov 3 06:20:32 1999] [error] [client 216.120.6.10] Premature end of script headers: /home/httpd/cgi-bin/mapserv What's up with this? This is a pretty big issue for me, maybe it's something I did wrong, maybe not, but I'm stuck. PGA From bfraser at digitalscience.com Fri Nov 5 19:46:41 1999 From: bfraser at digitalscience.com (Brent Fraser) Date: Fri, 5 Nov 1999 20:46:41 -0700 Subject: Label issues References: <3823A1D0.8D090D23@randomlogic.com> Message-ID: <002601bf2809$8c1c8800$030102c0@cghh1.ab.wave.home.com> I'm grasping at straws, but try setting LABELCACHE to OFF. Brent ----- Original Message ----- From: Paul G. Allen To: MapServer Users List Sent: Friday, November 05, 1999 8:34 PM Subject: Label issues > I've noticed no response to my label problem. Did my question somehow get > dropped into the bit bucket? > > The question was: I have a set of points that were created using my utilities > (data extracted from a table, formatted, and placed into a shapefile). When I > try to label these points, it seems if I have too many displayed on the map, I > get an Internal Server Error. Here's the entry in the Apache error_log file: > > [Wed Nov 3 06:20:32 1999] [error] [client 216.120.6.10] Premature end of script > headers: /home/httpd/cgi-bin/mapserv > > What's up with this? This is a pretty big issue for me, maybe it's something I > did wrong, maybe not, but I'm stuck. > > PGA > From pgallen at randomlogic.com Fri Nov 5 20:59:40 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Fri, 05 Nov 1999 20:59:40 -0800 Subject: Label issues References: <3823A1D0.8D090D23@randomlogic.com> <002601bf2809$8c1c8800$030102c0@cghh1.ab.wave.home.com> Message-ID: <3823B5BC.2920688A@randomlogic.com> Brent Fraser wrote: > > I'm grasping at straws, but try setting LABELCACHE to OFF. > I may have done that, also grasping, but I'll try it and see what happens. PGA From pgallen at randomlogic.com Fri Nov 5 21:01:37 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Fri, 05 Nov 1999 21:01:37 -0800 Subject: Label issues References: <3823A1D0.8D090D23@randomlogic.com> <002601bf2809$8c1c8800$030102c0@cghh1.ab.wave.home.com> Message-ID: <3823B631.425C5E49@randomlogic.com> Brent Fraser wrote: > > I'm grasping at straws, but try setting LABELCACHE to OFF. > I seem to be getting every message from this list twice, except my own. What's up with that? PGA From imap at chesapeake.net Fri Nov 5 22:08:10 1999 From: imap at chesapeake.net (imap at chesapeake.net) Date: Sat, 06 Nov 1999 01:08:10 -0500 Subject: Label issues References: <3823A1D0.8D090D23@randomlogic.com> Message-ID: <3823C5CA.C8D78F75@chesapeake.net> Paul, I am just curious to know which version of mapserv you are using??? That internal server error and the entry in the log file dont tell you shit about *where* mapserv is choking. I think Brent or someone on the list was able to debug mapserv thru the front-end, but I have never had any luck doing that. What I do is, fix up the mapfile to match the URL equivilent... make the layers you want "DEFAULT" and use "shp2gif" to recreate the problem from the command line... When the program dumps core, you can then use "gdb" (GNU debugger) to isolate where the actual problem is occurring. I have label point shapefiles that have tens of thousands of points have never seen mapserv dump core on a label cache problem. I *suspect* there is bad data in the file you are creating, that gives mapserv problems?? Maybe try rebuilding the point file with fewer (or a subset of) points to see if you still have that trouble. When things get *real* serious... I try to boil down the problem to a specific layer/shapefile and I strip everything else out of the mapfile to make sure the problem is completely isolated.... then I usually just send the shapefile and mapfile to Steve to deal with. haha ;) At least we need to be able to easily reproduce the problem. Hey Steve man... I still want to be able to run mapserv from the command line too! That should be doable, right? Paul, I saw your subsequent email about getting duplicate messages... I am not having that problem. Are you on the majordomo list twice maybe?? I think if this were happening to everyone... we would *all* be raising hell about it. Off topic... Paul, Are you still working with the Tiger data? I am in the process of building the Tiger '98 shapefiles now... I got the new TGR2SHP 3.11 upgrade from Bruce Ralston at GISTOOLS last night. Anyone else using that? It is pretty good stuff. For converting Tiger data, it is much easier to use than the ESRI automation toolkit... (I would not recommend that to anyone) Regards, Chris Stuber (mapsurfer) Silicon Mapping Solutions, Inc. "Paul G. Allen" wrote: > > I've noticed no response to my label problem. Did my question somehow get > dropped into the bit bucket? > > The question was: I have a set of points that were created using my utilities > (data extracted from a table, formatted, and placed into a shapefile). When I > try to label these points, it seems if I have too many displayed on the map, I > get an Internal Server Error. Here's the entry in the Apache error_log file: > > [Wed Nov 3 06:20:32 1999] [error] [client 216.120.6.10] Premature end of script > headers: /home/httpd/cgi-bin/mapserv > > What's up with this? This is a pretty big issue for me, maybe it's something I > did wrong, maybe not, but I'm stuck. > > PGA From ddnebert at usgs.gov Sat Nov 6 06:11:20 1999 From: ddnebert at usgs.gov (Doug Nebert) Date: Sat, 06 Nov 1999 09:11:20 -0500 Subject: Forms within forms? References: Message-ID: <38243708.729DFA8E@usgs.gov> Stephen Lime wrote: > > Doug: If I understand correctly. You want to zoom/pan until the user > has a view that make sense for them. Then they draw one more box > to define a query area (or use the entire area, correct? At that point > the area of interest needs to be passed off to another package. There > are several ways to do it. One elegant way would be to add a control > to the form, a check box, that when checked would apply the aoi. When > checked a little function would do the conversion from imgbox to a > search extent (or if no box is on the sceen use the whole image extent) > and with that extent it could call the other search app using a URL and > replace the browser contents with that page. I can provide you with the > code to go from pixels to image coordinates, no problem. The whole > solution is about 20 lines of .js code. Cool huh. > > Steve > Yes, that is precisely what needs to be done, but my 830 page JavaScript book isn't very instructive ;) I was experimenting with the presentation of common variables like [scale] and [mapext] yesterday and I can display them in the current screen. Two questions: 1) can I use these variables anywhere on the HTML page, i.e. can I use them to set a hidden for a different FORM, like a common variable? and 2) how does one dissect the variables such as [mapext]? I was assuming that one could imply [mapext.xmin] but that doesn't work. Doug. -- Douglas D. Nebert Clearinghouse Coordinator FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html From pgallen at randomlogic.com Sat Nov 6 06:53:29 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Sat, 06 Nov 1999 06:53:29 -0800 Subject: Real time shapefile creation Message-ID: <382440E9.6A64B67A@randomlogic.com> I have a couple of things I want to do and a couple of questions resulting from them. 1. I would like to be able to allow a user to enter some text into a text box. This text would then be used as a query string for a database or large shapefile and create a map that included only the items and extents covering the items matching the string. Example: The user enters a date, a map page is returned for all items found in the database with an attribute matching that date. Is this currently possible and how? 2. Given a map, I'd like the user to be able to enter a query string into a text box and have all the attribute data for all items or the first item with an attribute matching the string returned. Similar to above only a query is done instead of a new map drawn. 3. How exactly do the itemnquery and itemquery modes work? What is meant by "an item/value" pair? 4. Similar to (1) above. I'd like to be able to create shapefiles from existing data at the request of the web user, then have the resulting shapes displayed on a map. Can this be done by calling a CGI script that (1) creates the shapefile, (2) calls mapserv to create the map, (3) returns the resulting page to the user? (possibly this is exactly the same as (1), but I've been up all night working and things are a little cloudy :) PGA From TBanister at SpaceImaging.com Sat Nov 6 10:17:12 1999 From: TBanister at SpaceImaging.com (Banister Trevor) Date: Sat, 6 Nov 1999 11:17:12 -0700 Subject: Forms within forms? Message-ID: 1) Yes, you can even use them more than once. 2) Already a feature. Variables called minx,miny,maxx,maxy exist do to what you need. You could also write a Javascript snippet to parse out all 4 values, if you are a masochist. :-) Trevor > ---------- > From: Doug Nebert[SMTP:ddnebert at usgs.gov] > Sent: Saturday, November 06, 1999 7:11 AM > To: Stephen Lime > Cc: mapserver-users at lists.gis.umn.edu > Subject: Re: Forms within forms? > > > > Stephen Lime wrote: > > > > Doug: If I understand correctly. You want to zoom/pan until the user > > has a view that make sense for them. Then they draw one more box > > to define a query area (or use the entire area, correct? At that point > > the area of interest needs to be passed off to another package. There > > are several ways to do it. One elegant way would be to add a control > > to the form, a check box, that when checked would apply the aoi. When > > checked a little function would do the conversion from imgbox to a > > search extent (or if no box is on the sceen use the whole image extent) > > and with that extent it could call the other search app using a URL and > > replace the browser contents with that page. I can provide you with the > > code to go from pixels to image coordinates, no problem. The whole > > solution is about 20 lines of .js code. Cool huh. > > > > Steve > > > > Yes, that is precisely what needs to be done, but my 830 page > JavaScript book isn't very instructive ;) > > I was experimenting with the presentation of common variables > like [scale] and [mapext] yesterday and I can display them in > the current screen. Two questions: 1) can I use these variables > anywhere on the HTML page, i.e. can I use them to set a hidden > for a different FORM, like a common variable? and 2) how does > one dissect the variables such as [mapext]? I was assuming that > one could imply [mapext.xmin] but that doesn't work. > > Doug. > > -- > Douglas D. Nebert > Clearinghouse Coordinator > FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 > Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html > From steve.lime at dnr.state.mn.us Sat Nov 6 22:07:55 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Sun, 07 Nov 1999 00:07:55 -0600 Subject: MapServer 3.3 Message-ID: Hi folks: An initial release of 3.3 is available at http://mapserver.gis.umn.edu/dist/ms_3.3.tar.gz This is not what I'd like to consider the formal release. There are still a few things to be ironed out and documentation will not be ready until early next week. Still, the code is stable enough to be test compiled on NT and other environments. 3.3 contains thousands of changes from 3.2. Many are subtle and were implemented to support MapScript, others are a bit more major. In all only 2 keywords were depricated, actually removed, from the map file syntax- labeloverlap is no longer recognized and index is now tileindex. Other than that old files should require little modification. Again, don't make a switch to 3.3 for production work. I need sometime to get docs online and to add the last couple features I had planned. For now I'd be happy to learn than it builds ok and 3.2 mapfiles, with little modification, run fine. The MapServer test suite, 3.3 docs and a MapScript doc will be online in the next day or two. Steve From kames at erols.com Sun Nov 7 13:32:39 1999 From: kames at erols.com (Kieran Ames) Date: Sun, 07 Nov 1999 16:32:39 -0500 Subject: Label Orientation Message-ID: <3825EFF6.3A12CB80@erols.com> Have I missed something in the documentation? Is there any option for having labels drawn along the same orientation as the line. I'm trying to map some streets and when they run North-South, the image rendered is confusing. Thanks much. Kieran Ames From pgallen at randomlogic.com Mon Nov 8 07:30:59 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Mon, 08 Nov 1999 07:30:59 -0800 Subject: Street labels Message-ID: <3826ECB3.786EDBF2@randomlogic.com> Someone last week posted a message about street labels. I too would like (actually NEED is the word) the ability to display labels parallel to a line. Can this be done? PGA From steve.lime at dnr.state.mn.us Mon Nov 8 07:55:23 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Mon, 08 Nov 1999 09:55:23 -0600 Subject: Street labels Message-ID: Yup, 3.3 supports this although the quality of the labeling is highly dependent on the quality of the roads data. Surious nodes, unneed vertices and so on can have a dramatic impact on how segements are labeled. I added several control features just for labeling lines. Steve <<< "Paul G. Allen" 11/ 8 9:32a >>> Someone last week posted a message about street labels. I too would like (actually NEED is the word) the ability to display labels parallel to a line. Can this be done? PGA From rchavez at perseus.tufts.edu Mon Nov 8 10:17:44 1999 From: rchavez at perseus.tufts.edu (Robert Chavez) Date: Mon, 08 Nov 1999 13:17:44 -0500 Subject: graduated color symbols and mapserver Message-ID: <382713C8.D85BCEC1@perseus.tufts.edu> You are right about the expressions, I haven't been able to come up with anything that works. Pre/Re classification would be possible, but the files I'm working with are between 30 and 80 meg -- the dbf files are just too large to pre/re classify easily with the tools I have at hand. I'm toying with the idea about fooling around with the code to add numeric expressions -- to handle >,<,<=,>=, etc expressions. I'm not sure how useful this would be to the majority of map server users, but maybe it's something that could be incorporated into a future version? Rob >That's what classes are for. Each class has it's >own symbolization. The hard part is the expression to use with ranges of numbers. One easy thing to do is to pre-classify each shape in arcview and then >use that column in mapserver class expressions. >Steve From pgallen at randomlogic.com Mon Nov 8 11:37:13 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Mon, 08 Nov 1999 11:37:13 -0800 Subject: MapServer Suggestions Message-ID: <38272669.4FCCFD27@randomlogic.com> I know that some of these things MapServer will already do, but in order to cover all the bases, it occurred to me to provide the following. If MapServer could do everything Map Quest can do, then it would cover everything I need. www.mapquest.com for info on Map Quest, including a few on-line interactive demos, etc. PGA From bfraser at geoanalytic.com Mon Nov 8 11:38:52 1999 From: bfraser at geoanalytic.com (Brent Fraser) Date: Mon, 8 Nov 1999 12:38:52 -0700 Subject: MapServer 3.3 References: Message-ID: <00bf01bf2a20$e36cc660$390002c0@servo> Looks good so far. I've compiled it on NT, except for MapScript which will take some head scratching (Perl on NT, what a concept!) I'll be testing MapServer.exe over the next few days, but so far I've gotten good looking GIFs out of it! Brent ----- Original Message ----- From: Stephen Lime To: Sent: Saturday, November 06, 1999 11:07 PM Subject: MapServer 3.3 > Hi folks: An initial release of 3.3 is available > at http://mapserver.gis.umn.edu/dist/ms_3.3.tar.gz > > > This is not what I'd like to consider the formal release. There are still a few things to be ironed > out and documentation will not be ready until > early next week. Still, the code is stable enough > to be test compiled on NT and other environments. > > 3.3 contains thousands of changes from 3.2. Many > are subtle and were implemented to support MapScript, others are a bit more major. In all only 2 keywords were depricated, actually removed, > from the map file syntax- labeloverlap is no longer recognized and index is now tileindex. Other than that old files should require little modification. > > Again, don't make a switch to 3.3 for production work. I need sometime to get docs online and to > add the last couple features I had planned. For now I'd be happy to learn than it builds ok and > 3.2 mapfiles, with little modification, run fine. > > The MapServer test suite, 3.3 docs and a MapScript > doc will be online in the next day or two. > > Steve > From imap at chesapeake.net Mon Nov 8 13:14:29 1999 From: imap at chesapeake.net (imap at chesapeake.net) Date: Mon, 08 Nov 1999 16:14:29 -0500 Subject: MapServer 3.3 References: <00bf01bf2a20$e36cc660$390002c0@servo> Message-ID: <38273D35.4E7ACD24@chesapeake.net> PERL on NT is a breeze.. Just download build 522 from http://www.activestate.com/ActivePerl/ and it should install and set up with no problem Chris (mapsurfer) Brent Fraser wrote: > > Looks good so far. I've compiled it on NT, > except for MapScript which will take some > head scratching (Perl on NT, what a concept!) > > I'll be testing MapServer.exe over the next few > days, but so far I've gotten good looking GIFs > out of it! > > Brent > > ----- Original Message ----- > From: Stephen Lime > To: > Sent: Saturday, November 06, 1999 11:07 PM > Subject: MapServer 3.3 > > > Hi folks: An initial release of 3.3 is available > > at http://mapserver.gis.umn.edu/dist/ms_3.3.tar.gz > > > > > > This is not what I'd like to consider the formal release. There are still > a few things to be ironed > > out and documentation will not be ready until > > early next week. Still, the code is stable enough > > to be test compiled on NT and other environments. > > > > 3.3 contains thousands of changes from 3.2. Many > > are subtle and were implemented to support MapScript, others are a bit > more major. In all only 2 keywords were depricated, actually removed, > > from the map file syntax- labeloverlap is no longer recognized and index > is now tileindex. Other than that old files should require little > modification. > > > > Again, don't make a switch to 3.3 for production work. I need sometime to > get docs online and to > > add the last couple features I had planned. For now I'd be happy to learn > than it builds ok and > > 3.2 mapfiles, with little modification, run fine. > > > > The MapServer test suite, 3.3 docs and a MapScript > > doc will be online in the next day or two. > > > > Steve > > From steve.lime at dnr.state.mn.us Mon Nov 8 14:28:10 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Mon, 08 Nov 1999 16:28:10 -0600 Subject: MapServer Suggestions Message-ID: I'll get right on it... <<< "Paul G. Allen" 11/ 8 1:38p >>> I know that some of these things MapServer will already do, but in order to cover all the bases, it occurred to me to provide the following. If MapServer could do everything Map Quest can do, then it would cover everything I need. www.mapquest.com for info on Map Quest, including a few on-line interactive demos, etc. PGA From TBanister at SpaceImaging.com Mon Nov 8 15:47:30 1999 From: TBanister at SpaceImaging.com (Banister Trevor) Date: Mon, 8 Nov 1999 16:47:30 -0700 Subject: graduated color symbols and mapserver Message-ID: I was able to solve this to some extent by using the following expressions. I'm not a regex guru, so some of these could sub optimal. Suppose your range of numbers is 0-59 and you want 3 zones Some of these expressions overlap, but it looks like the code is written so the first matching expression encountered is enforced. Zone 1: 2 classes to handle 0-19 [0-9] Matches numbers from 0 to 9 [1-1][0-9] Matches numbers from 10 to 19 Zone 2: 1 class to handle 20-39 [2-3][0-9] Zone 3: 1 class to handle 40-59 [4-5][0-9] -----Original Message----- From: Robert Chavez [mailto:rchavez at perseus.tufts.edu] Sent: Monday, November 08, 1999 11:18 AM To: mapserver-users at lists.gis.umn.edu Subject: re: graduated color symbols and mapserver You are right about the expressions, I haven't been able to come up with anything that works. Pre/Re classification would be possible, but the files I'm working with are between 30 and 80 meg -- the dbf files are just too large to pre/re classify easily with the tools I have at hand. I'm toying with the idea about fooling around with the code to add numeric expressions -- to handle >,<,<=,>=, etc expressions. I'm not sure how useful this would be to the majority of map server users, but maybe it's something that could be incorporated into a future version? Rob >That's what classes are for. Each class has it's >own symbolization. The hard part is the expression to use with ranges of numbers. One easy thing to do is to pre-classify each shape in arcview and then >use that column in mapserver class expressions. >Steve From kenboss at dilbert.dnr.state.mn.us Tue Nov 9 06:05:54 1999 From: kenboss at dilbert.dnr.state.mn.us (kenboss at dilbert.dnr.state.mn.us) Date: Tue, 9 Nov 1999 08:05:54 -0600 (CST) Subject: graduated color symbols and mapserver Message-ID: <199911091405.IAA20574@philbert.dnr.state.mn.us> List-- > I was able to solve this to some extent by using the following expressions. > I'm not a regex guru, so some of these could sub optimal. > > > > Suppose your range of numbers is 0-59 and you want 3 zones > Some of these expressions overlap, but it looks like the code is written so > the first matching expression encountered is enforced. > > > Zone 1: 2 classes to handle 0-19 > [0-9] Matches numbers from 0 to 9 > [1-1][0-9] Matches numbers from 10 to 19 If you want to match 0-9, you might try ^[0-9]$ to be on the safe side. Plain old [0-9] might match any number _containing_ 0-9 (I'm not sure just how the mapserver parses these, but that would be the case in most regex implementations). You can get 0-19 with ^[0,1][0-9]$. Here are some commented examples for situations where the values you want to match are not clean, rounded ranges. The examples all address a 2-digit integer field. EXPRESSION "^[1-9]$|^[1-7]|81" # 1-9 or anything that begins with 1-7 or 81 EXPRESSION "^8[2-9]|^9" # 82-89 or anything that begins with 9 EXPRESSION "^[1-9]$|^[1-4]|^7[8,9]" # 1-9 or anything that begins with 1-4 or 78 or 79 EXPRESSION "^[5,6]|^7[1-4]|^81" # Anything that begins with 5 or 6; 71-74 or 81 EXPRESSION "^7[5-7]" # 75-77 EXPRESSION "8[2-9]|9[1-5]" # 82-89 or 91-95 EXPRESSION "12|78" # 12 or 78 EXPRESSION "13" # 13 EXPRESSION "^6$" # 6 EXPRESSION "71|74|75" # 71 or 74 or 75 EXPRESSION "^1[0-9]$" # 10-19 EXPRESSION "^[5,6][0-9]$|^7[0-4]" # 50-74 EXPRESSION "^7[5-9]$|^[8,9][1-9]" # 75-99 EXPRESSION "^1[0,1][0-9]|^12[0-4]" # 100-124 EXPRESSION "^12[5-9]|^1[3,4][0-9]" # 125-149 EXPRESSION "^1[5-9][0-9]|^2[0-9][0-9]" # 150-299 Have fun! --Ken ============================================================================ Ken Boss Digital Image Analysis / Web Stuff Forestry Resource Assessment kenboss at dilbert.dnr.state.mn.us Minnesota Dept. of Natural Resources Voice: 218 327 4449 ext. 237 413 SE 13th Street Fax: 218 327 4517 Grand Rapids, MN 55744 USA ============================================================================ From mapadm at polsl.gliwice.pl Tue Nov 9 07:09:20 1999 From: mapadm at polsl.gliwice.pl (Grzegorz Myrda) Date: Tue, 9 Nov 1999 16:09:20 +0100 Subject: development suggestion Message-ID: <000f01bf2ac4$74cecdd0$0900000a@pc-9.ispik.pl> I think an option allowing to give not only _exact_ values in item/value pairing while item(n)query would be useful. Present possibilities are very powerful but not always "user friendly" ;-) For example to find an object on the map by its name, user could give only substring of the "proper" name (from *.dbf) and MapServer would add all needed special characters (for example "( |^)" at the begining and .*( |$)"at the end, and replace all spaces by "( |$)|( |^)"). It can exist as an option in mapfile's query object. When checked - querying as above, no check - exact querying. Or this parameter can be set to one of more sophisticated kinds of querying to support different types of fields and its values and expected results. Grzegorz From steve.lime at dnr.state.mn.us Tue Nov 9 07:29:00 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 09 Nov 1999 09:29:00 -0600 Subject: graduated color symbols and mapserver Message-ID: One thing to note is the mapserver uses the first match it finds in a series of class expressions. Your expressions can overlap but be aware that the first match is used. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> 11/09/99 08:05AM >>> List-- > I was able to solve this to some extent by using the following expressions. > I'm not a regex guru, so some of these could sub optimal. > > > > Suppose your range of numbers is 0-59 and you want 3 zones > Some of these expressions overlap, but it looks like the code is written so > the first matching expression encountered is enforced. > > > Zone 1: 2 classes to handle 0-19 > [0-9] Matches numbers from 0 to 9 > [1-1][0-9] Matches numbers from 10 to 19 If you want to match 0-9, you might try ^[0-9]$ to be on the safe side. Plain old [0-9] might match any number _containing_ 0-9 (I'm not sure just how the mapserver parses these, but that would be the case in most regex implementations). You can get 0-19 with ^[0,1][0-9]$. Here are some commented examples for situations where the values you want to match are not clean, rounded ranges. The examples all address a 2-digit integer field. EXPRESSION "^[1-9]$|^[1-7]|81" # 1-9 or anything that begins with 1-7 or 81 EXPRESSION "^8[2-9]|^9" # 82-89 or anything that begins with 9 EXPRESSION "^[1-9]$|^[1-4]|^7[8,9]" # 1-9 or anything that begins with 1-4 or 78 or 79 EXPRESSION "^[5,6]|^7[1-4]|^81" # Anything that begins with 5 or 6; 71-74 or 81 EXPRESSION "^7[5-7]" # 75-77 EXPRESSION "8[2-9]|9[1-5]" # 82-89 or 91-95 EXPRESSION "12|78" # 12 or 78 EXPRESSION "13" # 13 EXPRESSION "^6$" # 6 EXPRESSION "71|74|75" # 71 or 74 or 75 EXPRESSION "^1[0-9]$" # 10-19 EXPRESSION "^[5,6][0-9]$|^7[0-4]" # 50-74 EXPRESSION "^7[5-9]$|^[8,9][1-9]" # 75-99 EXPRESSION "^1[0,1][0-9]|^12[0-4]" # 100-124 EXPRESSION "^12[5-9]|^1[3,4][0-9]" # 125-149 EXPRESSION "^1[5-9][0-9]|^2[0-9][0-9]" # 150-299 Have fun! --Ken ============================================================================ Ken Boss Digital Image Analysis / Web Stuff Forestry Resource Assessment kenboss at dilbert.dnr.state.mn.us Minnesota Dept. of Natural Resources Voice: 218 327 4449 ext. 237 413 SE 13th Street Fax: 218 327 4517 Grand Rapids, MN 55744 USA ============================================================================ From steve.lime at dnr.state.mn.us Tue Nov 9 07:44:38 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 09 Nov 1999 09:44:38 -0600 Subject: Street labels Message-ID: Here's how to use the auto rotation feature for line labeling. All of the listed parameters are defined in the LABEL object. Try using ANGLE AUTO for layers of TYPE LINE to turn it on. You'll want to tune it using the MINDISTANCE, MINFEATURESIZE, BUFFER and OFFSET label options. ANGLE a|auto - angle in degrees, can be set to auto. MINDISTANCE d - Minimum distance in pixels between duplicate labels. MINFEATURESIZE d|auto - Minimum feature (i.e. line) size in pixels. Can be set to auto which only labels segments longer than the label. BUFFER d - Space (in pixels) to reserve around a label. OFFSET dx dy - Offset in pixels from the feature in pixels. Enter values assuming horizontal annotation and rotation will be correctly accounted for. I've attached a sample image showing what can be achieved. Note that street labeling is highly dependent on having decent line data. Extra nodes and vertices can really affect things. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 -------------- next part -------------- A non-text attachment was scrubbed... Name: test.gif Type: image/gif Size: 10396 bytes Desc: not available URL: From steve.lime at dnr.state.mn.us Tue Nov 9 09:23:43 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 09 Nov 1999 11:23:43 -0600 Subject: development suggestion Message-ID: I think you will see some change in how expressions are handled. For example, we might require /'s around expressions to signal the use of regex. Expressions not using that would be evalulated using strcmp or strcasecmp. May add the logical expression support suggested by Rob in a previous thread. This would also speed things up- why use regex with simple, exact paterns. More thinking is needed on this topic. s. Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> "Grzegorz Myrda" 11/09/99 09:09AM >>> I think an option allowing to give not only _exact_ values in item/value pairing while item(n)query would be useful. Present possibilities are very powerful but not always "user friendly" ;-) For example to find an object on the map by its name, user could give only substring of the "proper" name (from *.dbf) and MapServer would add all needed special characters (for example "( |^)" at the begining and .*( |$)"at the end, and replace all spaces by "( |$)|( |^)"). It can exist as an option in mapfile's query object. When checked - querying as above, no check - exact querying. Or this parameter can be set to one of more sophisticated kinds of querying to support different types of fields and its values and expected results. Grzegorz From ddnebert at usgs.gov Tue Nov 9 11:46:39 1999 From: ddnebert at usgs.gov (ddnebert) Date: Tue, 09 Nov 1999 14:46:39 -0500 Subject: JavaScript buttons Message-ID: <38287A1F.A9B217F@usgs.gov> I would like to augment the zoom options to also zoom to full extent. I can't do this in the current OR
The first option seems to do nothing. The second one keep the mapext set to full no matter what. Ideas? Doug Nebert From pgallen at randomlogic.com Tue Nov 9 15:40:57 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Tue, 09 Nov 1999 15:40:57 -0800 Subject: Street labels References: Message-ID: <3828B109.18AF49D0@randomlogic.com> Stephen Lime wrote: > > Cool, send a sample when you get a chance. > > s. > > Stephen Lime > Internet Applications Analyst > > Minnesota DNR > 500 Lafayette Road > St. Paul, MN 55155 > 651-297-2937 > > >>> "Paul G. Allen" 11/09/99 04:25PM >>> > IIIIIII Like it! :) > I'm working on upgrading to 3.3 now. I should have it ready soon and will be using it on my web site. The two pages that I'm trying to keep up to date are San Diego and Philadelphia, but the only one accessible will be the Philly map. Feel free to take a screen shot of whatever view tickles your fancy. ;) (I'm thinking maybe I'll make a secong San Diego map without the proprietary data in it for the general public.) PGA From kames at erols.com Tue Nov 9 15:49:16 1999 From: kames at erols.com (Kieran Ames) Date: Tue, 09 Nov 1999 18:49:16 -0500 Subject: Shape file creation?? Message-ID: <3828B2FB.79C14B9F@erols.com> I'm shooting from the hip here... Does anyone know if there is anything like "txt2shp.exe" that could take a text file (or ODBC result) that contains points and looks like this: NAME LONG LAT ATTR_1 ATTR_2 ATTR_3 etc..... and convert it to the appropriate shp, dbf, shx files? TIA Kieran From mjacquin at geosys-inc.com Tue Nov 9 18:03:48 1999 From: mjacquin at geosys-inc.com (Marc JACQUIN - GEOSYS Inc - Minneapolis) Date: Tue, 09 Nov 1999 18:03:48 -0800 Subject: Shape file creation?? References: <3828B2FB.79C14B9F@erols.com> Message-ID: <3828D284.CC4C8438@geosys-inc.com> Kieran, I did something like this in Borland C++ Builder as long as it is only for Point shapes. If you have an ODBC DB I may send you the executable. You will need to install Borland Database Engine. Tell me ... Kieran Ames wrote: > I'm shooting from the hip here... > Does anyone know if there is anything like "txt2shp.exe" that could take > a text file (or ODBC result) that contains points and looks like this: > > NAME LONG LAT ATTR_1 ATTR_2 ATTR_3 etc..... > > and convert it to the appropriate shp, dbf, shx files? > > TIA > > Kieran -------------- next part -------------- A non-text attachment was scrubbed... Name: mjacquin.vcf Type: text/x-vcard Size: 416 bytes Desc: Card for Marc JACQUIN - GEOSYS Inc - Minneapolis URL: From pgallen at randomlogic.com Tue Nov 9 16:33:00 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Tue, 09 Nov 1999 16:33:00 -0800 Subject: Shape file creation?? References: <3828B2FB.79C14B9F@erols.com> Message-ID: <3828BD3C.4E2573BF@randomlogic.com> Kieran Ames wrote: > > I'm shooting from the hip here... > Does anyone know if there is anything like "txt2shp.exe" that could take > a text file (or ODBC result) that contains points and looks like this: > > NAME LONG LAT ATTR_1 ATTR_2 ATTR_3 etc..... > > and convert it to the appropriate shp, dbf, shx files? > > TIA > > Kieran I have a set of utilities written in Perl and C for just this purpose. The code uses Shapelib 1.2.5 for shapefile creation and was written and compiled under Red Hat Linux 6.0 (Kernel 2.2.5-15). Right now it only works with POINT types, but it would be a fairly simple matter to add other shape types as well. The source can be found here: http://24.5.14.144/phframe.html I can send the C binaries if you'd like. The code is also easily compiled for M$ platforms, but note that I modified a portion of the Shapelib library due to problems with the GNU* and egcs compilers. I plan to get the entire source tree and biinaries on an ftp site soon. PGA From cshorte2 at csc.com Tue Nov 9 17:44:04 1999 From: cshorte2 at csc.com (cshorte2 at csc.com) Date: Wed, 10 Nov 1999 11:44:04 +1000 Subject: Shape file creation?? Message-ID: <85256825.00085419.00@csc.com> It would be good if there was a central web page which described all the scripts that people have written that relate to mapserver. It could possibly go even further and provide a location to store these scripts, or provide a CVS repository to develope them. Cameron. "Paul G. Allen" on 11/10/99 10:33:00 AM To: MapServer Users List cc: (bcc: Cameron Shorter/AUST/SUBCONTRACTOR/CSC) Subject: Re: Shape file creation?? Kieran Ames wrote: > > I'm shooting from the hip here... > Does anyone know if there is anything like "txt2shp.exe" that could take > a text file (or ODBC result) that contains points and looks like this: > > NAME LONG LAT ATTR_1 ATTR_2 ATTR_3 etc..... > > and convert it to the appropriate shp, dbf, shx files? > > TIA > > Kieran I have a set of utilities written in Perl and C for just this purpose. The code uses Shapelib 1.2.5 for shapefile creation and was written and compiled under Red Hat Linux 6.0 (Kernel 2.2.5-15). Right now it only works with POINT types, but it would be a fairly simple matter to add other shape types as well. The source can be found here: http://24.5.14.144/phframe.html I can send the C binaries if you'd like. The code is also easily compiled for M$ platforms, but note that I modified a portion of the Shapelib library due to problems with the GNU* and egcs compilers. I plan to get the entire source tree and biinaries on an ftp site soon. PGA From steve.lime at dnr.state.mn.us Tue Nov 9 18:32:59 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 09 Nov 1999 20:32:59 -0600 Subject: Shape file creation?? Message-ID: The mapserver home page is a likely candidate. Perhaps someone at the U will chime in with possibilities. Steve <<< 11/ 9 7:35p >>> It would be good if there was a central web page which described all the scripts that people have written that relate to mapserver. It could possibly go even further and provide a location to store these scripts, or provide a CVS repository to develope them. Cameron. "Paul G. Allen" on 11/10/99 10:33:00 AM To: MapServer Users List cc: (bcc: Cameron Shorter/AUST/SUBCONTRACTOR/CSC) Subject: Re: Shape file creation?? Kieran Ames wrote: > > I'm shooting from the hip here... > Does anyone know if there is anything like "txt2shp.exe" that could take > a text file (or ODBC result) that contains points and looks like this: > > NAME LONG LAT ATTR_1 ATTR_2 ATTR_3 etc..... > > and convert it to the appropriate shp, dbf, shx files? > > TIA > > Kieran I have a set of utilities written in Perl and C for just this purpose. The code uses Shapelib 1.2.5 for shapefile creation and was written and compiled under Red Hat Linux 6.0 (Kernel 2.2.5-15). Right now it only works with POINT types, but it would be a fairly simple matter to add other shape types as well. The source can be found here: http://24.5.14.144/phframe.html I can send the C binaries if you'd like. The code is also easily compiled for M$ platforms, but note that I modified a portion of the Shapelib library due to problems with the GNU* and egcs compilers. I plan to get the entire source tree and biinaries on an ftp site soon. PGA From steve.lime at dnr.state.mn.us Tue Nov 9 18:38:52 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 09 Nov 1999 20:38:52 -0600 Subject: Shape file creation?? Message-ID: If you've got perl or awk you could simply write calls to the shpadd and dbfadd utilities in the shapelib directory in the distribution. You'd have to call shpcreate and dbfcreate to initialize the files, but this should be very straight forward. This should work on NT or unix. Steve <<< Kieran Ames 11/ 9 5:50p >>> I'm shooting from the hip here... Does anyone know if there is anything like "txt2shp.exe" that could take a text file (or ODBC result) that contains points and looks like this: NAME LONG LAT ATTR_1 ATTR_2 ATTR_3 etc..... and convert it to the appropriate shp, dbf, shx files? TIA Kieran From pgallen at randomlogic.com Tue Nov 9 20:10:08 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Tue, 09 Nov 1999 20:10:08 -0800 Subject: MapServer 3.3 problems Message-ID: <3828F020.FA9C2A53@randomlogic.com> Not really a bug, more like something I liked about 3.2.x that 3.3 doesn't seem to do. It seems if a layer is defined in the .map file, but the shapefile does not exist, MapServer 3.3 bombs with an error message saying it can't open the shapefile in question. The previous version would simply ignore the layer with the missing file. The reason I like it better when MapServer ignores the missing file is that all my maps will have basically the same data and the same .map file. My .map files are quite large (a few hundred lines at a minimum). By making a single .map file, duplicating it, and doing a simple global replace of data file names, I can quickly create a .map file for all my maps. If any given map does not have data for any given layer, then the missing data is simply ignored. Other than that, so far so good. :) PGA From imap at chesapeake.net Tue Nov 9 20:43:29 1999 From: imap at chesapeake.net (imap at chesapeake.net) Date: Tue, 09 Nov 1999 23:43:29 -0500 Subject: MapServer 3.3 problems References: <3828F020.FA9C2A53@randomlogic.com> Message-ID: <3828F7F1.E2F17B50@chesapeake.net> Thanks for the warning on this problem w/ 3.3 I haven't gotten 3.3 running on my machines yet, but if this problem exists, I will have a problem with it also. Does the same problem exist under the tiling scheme if a shapefile does not exist in one of the directories? Chris Stuber (mapsurfer) Silicon Mapping Solutions, Inc. "Paul G. Allen" wrote: > > Not really a bug, more like something I liked about 3.2.x that 3.3 doesn't seem > to do. It seems if a layer is defined in the .map file, but the shapefile does > not exist, MapServer 3.3 bombs with an error message saying it can't open the > shapefile in question. The previous version would simply ignore the layer with > the missing file. > > The reason I like it better when MapServer ignores the missing file is that all > my maps will have basically the same data and the same .map file. My .map files > are quite large (a few hundred lines at a minimum). By making a single .map > file, duplicating it, and doing a simple global replace of data file names, I > can quickly create a .map file for all my maps. If any given map does not have > data for any given layer, then the missing data is simply ignored. > > Other than that, so far so good. :) > > PGA -- Chris Stuber (mapsurfer) 287 Southland Ct Dunkirk, MD 20754 From pgallen at randomlogic.com Tue Nov 9 20:36:50 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Tue, 09 Nov 1999 20:36:50 -0800 Subject: MapServer 3.3 Problem Message-ID: <3828F662.7C9A7B2A@randomlogic.com> This one I think IS a problem. I used to have US Interstate symbols (the blue and red shield things) on my maps for all the freeways. Since I've upgraded to 3.3, they are not displayed anymore. PGA From steve.lime at dnr.state.mn.us Tue Nov 9 20:48:17 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 09 Nov 1999 22:48:17 -0600 Subject: MapServer 3.3 Problem Message-ID: May well be. Like I said, 3.3 isn't ready for primetime quite yet, but it's real close. I can check this one in the morning. You'll likely see a couple of more 3.3 alphas before the initial 3.3 release is stable enough for general use. As for missing layers. It's an easy switch to ignore them. The reason I made this an fatal error was that so many users where getting stuck on this while they were getting going. Steve <<< "Paul G. Allen" 11/ 9 10:37p >>> This one I think IS a problem. I used to have US Interstate symbols (the blue and red shield things) on my maps for all the freeways. Since I've upgraded to 3.3, they are not displayed anymore. PGA From cshorte2 at csc.com Tue Nov 9 22:10:04 1999 From: cshorte2 at csc.com (cshorte2 at csc.com) Date: Wed, 10 Nov 1999 16:10:04 +1000 Subject: MapServer 3.3 Problem Message-ID: <85256825.001E2D5C.00@csc.com> Maybe a better way to handle this is to put a descriptive message in the logs instead, and follow up with documentation explaining what each error log means, and what to do about it. As for missing layers. It's an easy switch to ignore them. The reason I made this an fatal error was that so many users where getting stuck on this while they were getting going. From marin at here.is Wed Nov 10 03:54:18 1999 From: marin at here.is (Ma) Date: Wed, 10 Nov 1999 11:54:18 +0000 Subject: MapServer 3.3 References: Message-ID: <38295CEA.F814111D@here.is> Is there anybody who can send me one valid map file with layers (point, line, poly) whit labels for MapServer 3.3? Thanks in advance. -- Ma From ddnebert at usgs.gov Wed Nov 10 05:52:03 1999 From: ddnebert at usgs.gov (Doug Nebert) Date: Wed, 10 Nov 1999 08:52:03 -0500 Subject: Shape file creation? An example! References: <3828B2FB.79C14B9F@erols.com> Message-ID: <38297883.AE882CAA@usgs.gov> Kieran: Yesterday, ironically, I did just this kind of thing based on the simple script example in the shapelib directory as a script. I wrote a perl script to receive the output from an earthquake checker program (finger quake at gldfs.cr.usgs.gov) -- a fixed column format file and fed it to the shapelib executables. It does use the "system" invocations but this should work with perl on either UNIX or NT since the invocations are the same in shapelib. Here is the little script. One thing to note is that you need to enter coordinates and attributes in the same order. (Something I could not make work was the ability to load numeric fields so I loaded all fields as text fields. -n option is either poorly documented or broken.): #!/usr/bin/perl # Assign location of shapelib executables $qd = "/var/quakes"; # Assign location of mapserver data $dd = "/var/mapserver/global/data"; system("rm -f $dd/quake.*"); system("$qd/shpcreate $dd/quakes point"); # This line creates 4 DBF text fields with lenghts 8, 8, 5, and 3 system("$qd/dbfcreate $dd/quakes.dbf -s Date 8, -s Time 8, -s Depth 5, -s Mag 3"); while (<>) { if (/^99/) { $dat = substr($_,0,8); $tim = substr($_,9,8); $lat = substr($_,18,5); if ( substr($_,24,1) eq 'S' ) { $lat = $lat * -1 ; } $long = substr($_,26,6); if ( substr($_,32,1) eq 'W' ) { $long = $long * -1 ; } $depth = substr($_,34,5); $mag = substr($_,40,3); $place = substr($_,49,28); # print "$place $lat $long\n"; # This line pushes the point coordinates into the shapefile system("$qd/shpadd $dd/quakes $long $lat"); # This line pushes the four attributes into the DBF file system("$qd/dbfadd $dd/quakes.dbf $dat, $tim, $depth, $mag"); } } exit; Kieran Ames wrote: > > I'm shooting from the hip here... > Does anyone know if there is anything like "txt2shp.exe" that could take > a text file (or ODBC result) that contains points and looks like this: > > NAME LONG LAT ATTR_1 ATTR_2 ATTR_3 etc..... > > and convert it to the appropriate shp, dbf, shx files? > > TIA > > Kieran -- Douglas D. Nebert Clearinghouse Coordinator FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html From mdh20 at axe.humboldt.edu Wed Nov 10 11:41:51 1999 From: mdh20 at axe.humboldt.edu (Michael Hass) Date: Wed, 10 Nov 1999 11:41:51 -0800 (PST) Subject: multiple layer queries Message-ID: Hi all I have the query the layer one at a time using a unique template for each query down. Is there a way to combine a query for multiple layers into one template, so that by clicking on a point backed by a poly you could get the results from both in one shot. I have tried coding it in the mapfile/page but it ignores one and answers the other. thanks Mike Hass From steve.lime at dnr.state.mn.us Wed Nov 10 11:45:15 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Wed, 10 Nov 1999 13:45:15 -0600 Subject: new version 3.3... Message-ID: I've posted another alpha version of 3.3 at the main MapServer web site. URL for the archive is: http://mapserver.gis.umn.edu/dist/ms_3.3.tar.gz I fixed a number of reported bugs including some simple query problems and a legend labeling issue. Again, this is alpha code, expect bugs and report them. I've made the MapServer test suite live, although it won't be completely working until tonite when I copy a few missing shapefiles to the servers here. Eventually this will be distributed in lieu of the old demo. You can see it at: http://arachnid.dnr.state.mn.us/ms_test I also ported our DNR Recreation Compass to use 3.3 for testing purposes. Only a couple of gotchas (see http://arachnid.dnr.state.mn.us/compass) - 1) Queries initiated from maps DO take scale into account. 2) Font sizes are much more true than the previous version, size=12 gets you 12 pixel high text. This comes from the integration of changes made by the GD developers to the TrueType font handling and rendering. Otherwise I had to change only 1 line in the map file- removed labeloverlap. You can build MapServer with newer versions of GD, including the PNG only version. To do this edit Makefile and gdft/Makefile (look for the GD sections) and build normally. Of course, you must install the version of GD you want on your system. With GD-1.7.3, don't worry about compiling in FreeType support, I don't use their stuff anyway. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 From steve.lime at dnr.state.mn.us Wed Nov 10 11:52:05 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Wed, 10 Nov 1999 13:52:05 -0600 Subject: multiple layer queries Message-ID: Sure, you can do this. Key is to use mode=nquery rather than simply query. You also have to how the mapserver builds a page when multiple query results are present. - sends web- header (if defined) for each layer with query results - sends layer- header (if defined) for each result within a layer - sends query- template next result - sends layer- footer (if defined) next layer - sends web- footer (if defined) Sorta like building a sandwich. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> Michael Hass 11/10/99 01:41PM >>> Hi all I have the query the layer one at a time using a unique template for each query down. Is there a way to combine a query for multiple layers into one template, so that by clicking on a point backed by a poly you could get the results from both in one shot. I have tried coding it in the mapfile/page but it ignores one and answers the other. thanks Mike Hass From pgallen at randomlogic.com Wed Nov 10 22:46:16 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Wed, 10 Nov 1999 22:46:16 -0800 Subject: Street labels References: Message-ID: <382A6638.20AAD556@randomlogic.com> Stephen Lime wrote: > > Only truetype fonts. Bitmap fonts generally don't > rotate very well. > > Steve > > <<< "Paul G. Allen" 11/ 9 11:09p >>> > Does this work with bitmap fonts or only TrueType Fonts or both? > Got 'em working on my Philadelphia and San Diego maps. Check them out, you'll have zoom in to get anything other than freeways (Interstates) because I disable all other streets for larger map areas to save my poor slow computer from having to plot all that data! :) I'm going to try out the latest 3.3 alpha soon. PGA From pgallen at randomlogic.com Wed Nov 10 23:35:04 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Wed, 10 Nov 1999 23:35:04 -0800 Subject: Shape file creation? An example! References: <3828B2FB.79C14B9F@erols.com> <38297883.AE882CAA@usgs.gov> <382A7155.418518A3@randomlogic.com> Message-ID: <382A71A8.6B7F0EC4@randomlogic.com> This was supposed to go to the list the first time, not privately to Doug. :) PGA "Paul G. Allen" wrote: > > Doug Nebert wrote: > > > > Kieran: > > > > Yesterday, ironically, I did just this kind of thing based on > > the simple script example in the shapelib directory as a script. > > I wrote a perl script to receive the output from an earthquake > > checker program (finger quake at gldfs.cr.usgs.gov) -- a fixed column > > format file and fed it to the shapelib executables. It does use > > the "system" invocations but this should work with perl on either > > UNIX or NT since the invocations are the same in shapelib. Here > > is the little script. One thing to note is that you need to enter > > coordinates and attributes in the same order. (Something I could > > not make work was the ability to load numeric fields so I loaded > > all fields as text fields. -n option is either poorly documented > > or broken.): > > > > My scripts and binaries use the 1.2.5 version of Shapelib and the numeric field > types work BUT they are acually stored as text. The field itself is tagged in > the DBASE file header as numeric (N), but the data in the filed is ASCII text. > > PGA From pgallen at randomlogic.com Thu Nov 11 01:20:27 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Thu, 11 Nov 1999 01:20:27 -0800 Subject: Label issues Message-ID: <382A8A5B.991A7E2E@randomlogic.com> You may recall I had a problem with displaying labels for a bunch of point shapes that were generated by me. Basically, if I tried to display too many of these points - more than a dozen or so - with labels ON, MapServer would generate an error. I'm happy to report that with the latest version of 3.3, this problem seems to be gone. Whatever you did Steve, THANKS! :) PGA From pgallen at randomlogic.com Thu Nov 11 02:00:14 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Thu, 11 Nov 1999 02:00:14 -0800 Subject: MapServer 3.3 nQuery problems Message-ID: <382A93AE.E1941C30@randomlogic.com> nquery no longer seems to work. Whenever I try it, I get an error in my data frame: An error has occurred in msQueryUsingPoint(): Search returned no results. No matching record(s) found. If I switch back to 3.2.21, using the same .map file, templates, etc., it works fine. PGA From kames at erols.com Thu Nov 11 08:40:35 1999 From: kames at erols.com (Kieran Ames) Date: Thu, 11 Nov 1999 11:40:35 -0500 Subject: Somewhat Off-Topic Javascript question Message-ID: <382AF183.ABB1EB80@erols.com> I see in the example advanced templates that JavaScript is being used to set/validate some of the form variables that are sent to MapServ. I'd like to capitalize on this (if I can) by defining some layers as a function of the user's identity. Example: My users have to authenticate when they connect to my server. In the cgi world, their username is available to my Perl scripts as "$ENV{'REMOTE_USER'}". In my case, $ENV{'REMOTE_USER'}would translate to "kieran". Let's say that I include in the HTML template, a form that allows the user to kick-off a process that retreives data from an external data source (ODBC) and that I use the shaplib utilities to create the associated shp, shx and dbf files. I'd want to specify the username ($ENV{'REMOTE_USER'}) as part of the shape file naming conventions so that one user wouldn't over-write the data created by another. (In cgi/Perl, I'd say something like $filename = "shape_" . $ENV{'REMOTE_USER'} and then create $filename.shp, $filename.dbf . I'd then have files like shape_kieran.shp, shape_kieran.dbf) Issues: 1. Can JavaScript access the $ENV{'REMOTE_USER'}variable? 2. The layer I would just have created was not defined in the map file. How could I accomplish this substitution? The functional result I'm trying to achieve would be something like this..... LAYER NAME "ODBC_data" DATA shape_$ENV{'REMOTE_USER'} #This would resolve to shape_kieran STATUS DEFAULT TYPE POINT CLASS NAME "Point Results" COLOR 0 0 0 END # Class END # Layer I might reaching for the sky with this one! TIA for any thoughts. Kieran PS. I've been looking for shapelib utilities that work in an NT world. Doug Nebert provided me with a wonderful Perl script and I got a friend of mine to compile the shapelib c code for me. I tried out a revised version of Doug's script with the resulting executables and got what I needed! I still need to do some more testing, but thought I'd pass this info on to the group. ...K From steve.lime at dnr.state.mn.us Thu Nov 11 09:21:51 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Thu, 11 Nov 1999 11:21:51 -0600 Subject: Somewhat Off-Topic Javascript question Message-ID: I don't think you can get REMOTE_USER, but you can use cookies to accomplish something similar. When the user logs in you could set a username cookie and retrieve it when needed. 3.3 gives you the ability to modify just about any mapserver variable via a form. So let's say you can get the username from a cookie, you could do something like this: in the form you'd have a hidden variable like: The syntax map:odbc_data:data defines an object in the mapfile. I used :'s as seperators hoping they would work ok with javascript for just such an occasion. This is untested though. I assume then you have some other process generating the user shapefiles. Without knowing much about the actual app this might be a case where mapscript might be real useful. That is if you could use perl to do the ODBC/SQL queries. Steve <<< Kieran Ames 11/11 10:43a >>> I see in the example advanced templates that JavaScript is being used to set/validate some of the form variables that are sent to MapServ. I'd like to capitalize on this (if I can) by defining some layers as a function of the user's identity. Example: My users have to authenticate when they connect to my server. In the cgi world, their username is available to my Perl scripts as "$ENV{'REMOTE_USER'}". In my case, $ENV{'REMOTE_USER'}would translate to "kieran". Let's say that I include in the HTML template, a form that allows the user to kick-off a process that retreives data from an external data source (ODBC) and that I use the shaplib utilities to create the associated shp, shx and dbf files. I'd want to specify the username ($ENV{'REMOTE_USER'}) as part of the shape file naming conventions so that one user wouldn't over-write the data created by another. (In cgi/Perl, I'd say something like $filename = "shape_" . $ENV{'REMOTE_USER'} and then create $filename.shp, $filename.dbf . I'd then have files like shape_kieran.shp, shape_kieran.dbf) Issues: 1. Can JavaScript access the $ENV{'REMOTE_USER'}variable? 2. The layer I would just have created was not defined in the map file. How could I accomplish this substitution? The functional result I'm trying to achieve would be something like this..... LAYER NAME "ODBC_data" DATA shape_$ENV{'REMOTE_USER'} #This would resolve to shape_kieran STATUS DEFAULT TYPE POINT CLASS NAME "Point Results" COLOR 0 0 0 END # Class END # Layer I might reaching for the sky with this one! TIA for any thoughts. Kieran PS. I've been looking for shapelib utilities that work in an NT world. Doug Nebert provided me with a wonderful Perl script and I got a friend of mine to compile the shapelib c code for me. I tried out a revised version of Doug's script with the resulting executables and got what I needed! I still need to do some more testing, but thought I'd pass this info on to the group. ...K From pgallen at randomlogic.com Thu Nov 11 14:24:38 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Thu, 11 Nov 1999 14:24:38 -0800 Subject: Attribute data with no associated .shp and .shx file Message-ID: <382B4226.9EC2326E@randomlogic.com> At the risk of sounding stupid... I just realized the my Street Address and Zip code .dbf files have no associated .shp and .shx file - the streets themselves have a separate shapefile. The only reference that ties the two (address/zip code and street) together is a matching ID number in each .dbf file. How would I go about placing the addresses on a map in the correct places? How would I go about placing the addresses in a set of query results of a street(s)? Thanks, PGA From steve.lime at dnr.state.mn.us Fri Nov 12 07:38:10 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Fri, 12 Nov 1999 09:38:10 -0600 Subject: Attribute data with no associated .shp and .shx file Message-ID: Depending on what you really need to do the answer is you can and you can't. MapServer supports simple joins, one-to-one and one-to-many BUT only for query output. So, you can't label features with text in another .dbf file. You can present the joined attributes in a set of query results. With 3.3 yet another possiblity exists. You can define features on-the-fly. So, after a query you could produce a map with an address(s) marked on it (I think). The key, is after a query. You might then be able to make those features persistant using javascript and custom form variables, but I'd have to think about that a bit. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> "Paul G. Allen" 11/11/99 04:24PM >>> At the risk of sounding stupid... I just realized the my Street Address and Zip code .dbf files have no associated .shp and .shx file - the streets themselves have a separate shapefile. The only reference that ties the two (address/zip code and street) together is a matching ID number in each .dbf file. How would I go about placing the addresses on a map in the correct places? How would I go about placing the addresses in a set of query results of a street(s)? Thanks, PGA From kenboss at dilbert.dnr.state.mn.us Fri Nov 12 08:16:37 1999 From: kenboss at dilbert.dnr.state.mn.us (kenboss at dilbert.dnr.state.mn.us) Date: Fri, 12 Nov 1999 10:16:37 -0600 (CST) Subject: Attribute data with no associated .shp and .shx file Message-ID: <199911121616.KAA03151@philbert.dnr.state.mn.us> You might consider merging the .dbf files based on that matching ID number, so that the Street Address and Zip codes become attributes of the shapes. The Perl DBI::XBase module is a handy tool for such purposes if you don't have ArcView or DBase or some other suitable GUI tool laying around... --Ken ============================================================================ Ken Boss Digital Image Analysis / Web Stuff Forestry Resource Assessment kenboss at dilbert.dnr.state.mn.us Minnesota Dept. of Natural Resources Voice: 218 327 4449 ext. 237 413 SE 13th Street Fax: 218 327 4517 Grand Rapids, MN 55744 USA www.ra.dnr.state.mn.us ============================================================================ > >>> "Paul G. Allen" 11/11/99 04:24PM >>> > At the risk of sounding stupid... > > I just realized the my Street Address and Zip code .dbf files have no associated > .shp and .shx file - the streets themselves have a separate shapefile. The only > reference that ties the two (address/zip code and street) together is a matching > ID number in each .dbf file. How would I go about placing the addresses on a map > in the correct places? How would I go about placing the addresses in a set of > query results of a street(s)? > > Thanks, > > PGA > > From steve.lime at dnr.state.mn.us Fri Nov 12 11:59:10 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Fri, 12 Nov 1999 13:59:10 -0600 Subject: Another 3.3 update... Message-ID: This one fixes a few unpublicized features such as url calls to change map file parameters. Seperator is '_' instead of a ':' which should help with using javascript (for Kieran). Also changes all structure member names to match names published as part of the map file ducumentation. This should help users when using mapscript. Keywords will be the same everywhere (map file, perl, urls) although some restrictions on case will be required. - http://mapserver.gis.umn.edu/dist/ms_3.3.tar.gz Again, examples are running at http://arachnid.dnr.state.mn.us/ms_test/index.html . Hope to have a mapscript example running yet this afternoon. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 From kames at erols.com Sat Nov 13 19:37:06 1999 From: kames at erols.com (Kieran Ames) Date: Sat, 13 Nov 1999 22:37:06 -0500 Subject: Plotting Symbols Message-ID: <382E2E62.F4058220@erols.com> Hi again, Could someone please give me a quick overview on the use of symbols for identifying points? The shape file I'm using has a text field in its .dbf that is a Yes/No/Other flag. ("Y", "N", and blank). How might I plot these points as symbols based on the contents of this flag field so that users could tell the difference when the data is put onto the gif output? Thanks much to all. Kieran From bfraser at geoanalytic.com Sun Nov 14 10:24:34 1999 From: bfraser at geoanalytic.com (Brent Fraser) Date: Sun, 14 Nov 1999 11:24:34 -0700 Subject: Plotting Symbols References: <382E2E62.F4058220@erols.com> Message-ID: <002f01bf2ecd$81483670$030102c0@cghh1.ab.wave.home.com> Kieran (and others), Below is a typical set of entries for symbolizing based on an attribute value stored in the shapefile. The CLASSITEM points to the column in the DBF file, while the EXPRESSION entry indicates the DBF value for the CLASS. The CLASS entry defines SYMBOL value to use in the symbol set. LAYER NAME Rivers TYPE POLYLINE STATUS ON DATA Alberta/psu/dnnetln_10TM CLASSITEM DNLNTYPE CLASS NAME "Rivers" EXPRESSION "1" SYMBOL 0 COLOR 130 130 255 END CLASS NAME "Other Rivers" EXPRESSION "5" SYMBOL 1 COLOR 210 210 255 END END # Layer Your entries in your map file might look like: LAYER NAME "My Points" TYPE POINT STATUS ON DATA mypoints CLASSITEM ynflag CLASS NAME "Yes" EXPRESSION "Y" SYMBOL 0 END CLASS NAME "No" EXPRESSION "N" SYMBOL 1 END END # Layer Brent ----- Original Message ----- From: Kieran Ames To: Sent: Saturday, November 13, 1999 8:37 PM Subject: Plotting Symbols > Hi again, > Could someone please give me a quick overview on the use of symbols for > identifying points? > The shape file I'm using has a text field in its .dbf that is a > Yes/No/Other flag. ("Y", "N", and blank). > How might I plot these points as symbols based on the contents of this > flag field so that users could tell the difference when the data is put > onto the gif output? > > Thanks much to all. > > Kieran > > From steve.lime at dnr.state.mn.us Mon Nov 15 14:19:25 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Mon, 15 Nov 1999 16:19:25 -0600 Subject: more 3.3... Message-ID: Another version, same place. This one fixes an obscure bug with drawing raster GIF images. A class color of -1 is now valid for shade and marker symbols if you have an outlinecolor defined. Since lines don't use outlines a color of -1 causes the line not to be drawn. Will have a mapscript example up this evening that draws earthquakes pulled from the USGS quake finger servers in real-time. The current 3.3 alpha release contains the version of mapscript used to build the demo. In case anyone is wondering, to build mapscript on a UNIX host: cd mapscript (if using proj.4 you'll have to edit Makefile.PL and add include and lib paths for proj) perl Makfile.PL make make install Depending on your setup you may need to install mapscript as root. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 From Ross.Searle at dnr.qld.gov.au Mon Nov 15 15:40:49 1999 From: Ross.Searle at dnr.qld.gov.au (Searle Ross) Date: Tue, 16 Nov 1999 09:40:49 +1000 Subject: mapserv3.3 Message-ID: Steve, Any idea when you might have the docs for 3.3 ready Thanks Ross Ross Searle Natural Resource Information Management Officer Department of Natural Resources PO Box 1143 Bundaberg QLD 4670. Australia Ph : 0741 537 888 Fax : 0741 537 823 From pgallen at randomlogic.com Mon Nov 15 16:33:21 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Mon, 15 Nov 1999 16:33:21 -0800 Subject: mapserv3.3 References: <3830A5E4.7EB2BC99@randomlogic.com> Message-ID: <3830A651.53A4C62D@randomlogic.com> Ooppss, I meant to reply to the list. :) PGA "Paul G. Allen" wrote: > Searle Ross wrote: > > > Steve, > > > > Any idea when you might have the docs for 3.3 ready > > > > Ditto. > > :) > > PGA From kames at erols.com Mon Nov 15 17:59:58 1999 From: kames at erols.com (Kieran Ames) Date: Mon, 15 Nov 1999 20:59:58 -0500 Subject: Query Object Message-ID: <3830BA9D.61929E89@erols.com> Could someone please post a brief overview on the use of a query object? I've looked at the template files and the example pages, but don't have a clue on a starting point. Many thanks. Kieran From marin at here.is Mon Nov 15 18:07:29 1999 From: marin at here.is (Ma) Date: Tue, 16 Nov 1999 02:07:29 +0000 Subject: search and zoom Message-ID: <3830BC61.36950DBD@here.is> Dear All, I need to serach a name (for example; of the place) and if the system find it - to zoom on it: How to this in mapserver3.3. Any help? -- Ma From marin at here.is Mon Nov 15 18:28:34 1999 From: marin at here.is (Ma) Date: Tue, 16 Nov 1999 02:28:34 +0000 Subject: search and zoom - II Message-ID: <3830C152.C81FA1FC@here.is> Dear All, I need to search a name (for example of a place) and if the system find it - to zoom on it: How to this in mapserver3.3? I mean search and zoom of small objects - points, short lines, small polygons, etc. It will be good idea the scale factor of the zoom to be fixed for all queries, i.e. it will be good if the scale factor doesn't depend of the size of the object, i.e. shape extend (for example - not this: "mapext=shapes") Any help? -- Ma From steve.lime at dnr.state.mn.us Mon Nov 15 20:30:20 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Mon, 15 Nov 1999 22:30:20 -0600 Subject: search and zoom - II Message-ID: This can be done a couple of ways. 3.2 and 3.3 support and itemquery mode (also itemnquery) in which you supply two form vars one called "item" which is the name of an attribute and another called "value" which is a regex to use for matching. Often a 3rd variable, "qlayer" is used to identify the layer to be searched although this is not required. As with any query, individual shape bounding boxes and centroids (box center, not the actual centroid) are available to the query template. It's easy to use these to generate new maps specific to a shapes extent or by using the centroid and a scale. In 3.2, this is the only way to do this. 3.3 extends this capability by introducing what are termed querymaps, that is visualization of a query. They allow you to zoom in on selected features using extents or centroids, you can highlite selected features in a special color, can draw just the selected features. Lots of potential here but it's a new feature and one I'm still finishing. It's pretty much fully supported for the itemquery modes. Mapext=shapes is a brand new option for generating extents based on selected features. All of this will be in the test suite. Steve <<< Ma 11/15 8:26p >>> Dear All, I need to search a name (for example of a place) and if the system find it - to zoom on it: How to this in mapserver3.3? I mean search and zoom of small objects - points, short lines, small polygons, etc. It will be good idea the scale factor of the zoom to be fixed for all queries, i.e. it will be good if the scale factor doesn't depend of the size of the object, i.e. shape extend (for example - not this: "mapext=shapes") Any help? -- Ma From pgallen at randomlogic.com Mon Nov 15 22:56:31 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Mon, 15 Nov 1999 22:56:31 -0800 Subject: search and zoom - II References: Message-ID: <3831001F.81CE3A98@randomlogic.com> Stephen Lime wrote: > > This can be done a couple of ways. 3.2 and 3.3 support and itemquery mode (also itemnquery) in which you supply two form vars one called "item" which is the name of an attribute and another called "value" which is a regex to use for matching. Often a 3rd variable, "qlayer" is used to identify the layer to be searched although this is not required. As with any query, individual shape bounding boxes and centroids (box center, not the actual centroid) are available to the query template. It's easy to use these to generate new maps specific to a shapes extent or by using the centroid and a scale. In 3.2, this is the only way to do this. > > 3.3 extends this capability by introducing what are termed querymaps, that is visualization of a query. They allow you to zoom in on selected features using extents or centroids, you can highlite selected features in a special color, can draw just the selected features. Lots of potential here but it's a new feature and one I'm still finishing. It's pretty much fully supported for > the itemquery modes. Mapext=shapes is a brand new option for generating extents based on selected features. All of this will be in the test suite. Not to pressure you, but all of this is what I am waiting for and salavating over. ;-) PGA From rchavez at perseus.tufts.edu Tue Nov 16 05:11:59 1999 From: rchavez at perseus.tufts.edu (Robert Chavez) Date: Tue, 16 Nov 1999 08:11:59 -0500 (EST) Subject: mapserver Redraw/Refresh problems In-Reply-To: <3830C152.C81FA1FC@here.is> Message-ID: I have a template file that allows users to add layers to a map view, to make the layer visible in the map view I put a simple redraw/refresh button in the map view: All the map extents, layer info, and other values that mapserver has embedded in the template should get sent back and the map should redraw with the same extent view, but with new layers added. Unfortunately it doesn't work. The layers get added, but strangely, the map view jumps back the original state of the map when it is first initialized (imgext=-31.265800+-38.940385+89.902700+82.059685) but the imgext info is completely off in the CGI call. Here's what gets sent: http://../cgi-bin/mapserv2?map=%2Fhome%2Frchavez%2Fwww%2Fweb%2Fdocs%2Fmapdemo%2F ancient.map&imgext=-38.446905+-19.245048+82.721595+101.755022&mode=browse&zoom=10&img.x=299&img.y=318 Here's what I get back: http://psyche.perseus.tufts.edu/cgi-bin/mapserv2?map=%2Fhome%2Frchavez%2Fwww%2Fweb%2Fdocs%2Fmapdemo%2F ancient.map&imgext=15.977778+31.467920+28.094628+43.567927&mode=browse&refresh=refresh&layer=BodiesOfWater&zoom=10 Here's the extent I'm actually seeing in the map view: imgext=-31.265800+-38.940385+89.902700+82.059685 Oddly enough, if I hardcode a CGI call to refresh the map in the map template, ../cgi-bin/mapserv2?map=[map]&mapext=[minx]+[miny]+[maxx]+[maxy].. everything works fine, but the new layer(s) won't be displayed, of course. I thought the problem might be related to the extents in my map file, but they check out OK with shpdmp. I also thought the problem might be due to the fact that I'm my data is unprojected (Decimal Degrees) and I'm using DD as map units, but I tried this with projected data and meters units and got the same results. I can't figure out what I'm overlooking. Any ideas? (I'm using mapserver 3.2.21) Thanks Robert Chavez Programmer Perseus Project rchavez at perseus.tufts.edu From kenboss at dilbert.dnr.state.mn.us Tue Nov 16 06:01:54 1999 From: kenboss at dilbert.dnr.state.mn.us (kenboss at dilbert.dnr.state.mn.us) Date: Tue, 16 Nov 1999 08:01:54 -0600 (CST) Subject: mapserver Redraw/Refresh problems Message-ID: <199911161401.IAA16072@philbert.dnr.state.mn.us> Robert-- Do you have one of these in the mapserv form in your template file? If not, I think you need one. You likely also need to set imgxy at .5 less than half the width and height of your map (in pixels), e.g., if your map is 300 x 200 pixels, do: imgxy will emulate a mouse click at the center of your map when you're not clicking in the map to submit it (i.e., when you submit via a "submit" button). Just a couple of shots in the dark... --Ken ============================================================================ Ken Boss Digital Image Analysis / Web Stuff Forestry Resource Assessment kenboss at dilbert.dnr.state.mn.us Minnesota Dept. of Natural Resources Voice: 218 327 4449 ext. 237 413 SE 13th Street Fax: 218 327 4517 Grand Rapids, MN 55744 USA www.ra.dnr.state.mn.us ============================================================================ > I have a template file that allows users to add layers to a map view, to > make the layer visible in the map view I put a simple redraw/refresh > button in the map view: > > > > All the map extents, layer info, and other values that mapserver has > embedded in the template should get sent back and the map should redraw > with the same extent view, but with new layers added. > > Unfortunately it doesn't work. The layers get added, but strangely, the > map view jumps back the original state of the map when it is first > initialized (imgext=-31.265800+-38.940385+89.902700+82.059685) but the > imgext info is completely off in the CGI call. > > Here's what gets sent: > > http://../cgi-bin/mapserv2?map=%2Fhome%2Frchavez%2Fwww%2Fweb%2Fdocs%2Fmapdemo%2F > ancient.map&imgext=-38.446905+-19.245048+82.721595+101.755022&mode=browse&zoom=1 0&img.x=299&img.y=318 > > Here's what I get back: > > http://psyche.perseus.tufts.edu/cgi-bin/mapserv2?map=%2Fhome%2Frchavez%2Fwww%2Fw eb%2Fdocs%2Fmapdemo%2F > ancient.map&imgext=15.977778+31.467920+28.094628+43.567927&mode=browse&refresh=r efresh&layer=BodiesOfWater&zoom=10 > > Here's the extent I'm actually seeing in the map view: > imgext=-31.265800+-38.940385+89.902700+82.059685 > > Oddly enough, if I hardcode a CGI call to refresh the map in the map > template, > > ../cgi-bin/mapserv2?map=[map]&mapext=[minx]+[miny]+[maxx]+[maxy].. > > everything works fine, but the new layer(s) won't be displayed, of course. > > I thought the problem might be related to the extents in my map file, but > they check out OK with shpdmp. I also thought the problem might be due to > the fact that I'm my data is unprojected (Decimal Degrees) and I'm using > DD as map units, but I tried this with projected data and meters units and > got the same results. I can't figure out what I'm overlooking. Any > ideas? (I'm using mapserver 3.2.21) > > Thanks > Robert Chavez > Programmer > Perseus Project > rchavez at perseus.tufts.edu > From rchavez at perseus.tufts.edu Tue Nov 16 08:10:53 1999 From: rchavez at perseus.tufts.edu (Robert Chavez) Date: Tue, 16 Nov 1999 11:10:53 -0500 (EST) Subject: mapserver Redraw/Refresh problems In-Reply-To: <199911161401.IAA16072@philbert.dnr.state.mn.us> Message-ID: Your second suggestion did the trick, I didn't have an imgxy value set. It's always the small things isn't it. Thanks very much for your help. Robert Chavez Programmer Perseus Project rchavez at perseus.tufts.edu On Tue, 16 Nov 1999 kenboss at dilbert.dnr.state.mn.us wrote: > Robert-- > > Do you have one of these in the mapserv form in your template file? > > > > If not, I think you need one. > > You likely also need to set imgxy at .5 less than half the width and height of > your map (in pixels), e.g., if your map is 300 x 200 pixels, do: > > > > imgxy will emulate a mouse click at the center of your map when you're not > clicking in the map to submit it (i.e., when you submit via a "submit" button). > > Just a couple of shots in the dark... > > --Ken > > ============================================================================ > Ken Boss > Digital Image Analysis / Web Stuff Forestry Resource Assessment > kenboss at dilbert.dnr.state.mn.us Minnesota Dept. of Natural Resources > Voice: 218 327 4449 ext. 237 413 SE 13th Street > Fax: 218 327 4517 Grand Rapids, MN 55744 USA > www.ra.dnr.state.mn.us > ============================================================================ > > > > > I have a template file that allows users to add layers to a map view, to > > make the layer visible in the map view I put a simple redraw/refresh > > button in the map view: > > > > > > > > All the map extents, layer info, and other values that mapserver has > > embedded in the template should get sent back and the map should redraw > > with the same extent view, but with new layers added. > > > > Unfortunately it doesn't work. The layers get added, but strangely, the > > map view jumps back the original state of the map when it is first > > initialized (imgext=-31.265800+-38.940385+89.902700+82.059685) but the > > imgext info is completely off in the CGI call. > > > > Here's what gets sent: > > > > > http://../cgi-bin/mapserv2?map=%2Fhome%2Frchavez%2Fwww%2Fweb%2Fdocs%2Fmapdemo%2F > > > ancient.map&imgext=-38.446905+-19.245048+82.721595+101.755022&mode=browse&zoom=1 > 0&img.x=299&img.y=318 > > > > Here's what I get back: > > > > > http://psyche.perseus.tufts.edu/cgi-bin/mapserv2?map=%2Fhome%2Frchavez%2Fwww%2Fw > eb%2Fdocs%2Fmapdemo%2F > > > ancient.map&imgext=15.977778+31.467920+28.094628+43.567927&mode=browse&refresh=r > efresh&layer=BodiesOfWater&zoom=10 > > > > Here's the extent I'm actually seeing in the map view: > > imgext=-31.265800+-38.940385+89.902700+82.059685 > > > > Oddly enough, if I hardcode a CGI call to refresh the map in the map > > template, > > > > ../cgi-bin/mapserv2?map=[map]&mapext=[minx]+[miny]+[maxx]+[maxy].. > > > > everything works fine, but the new layer(s) won't be displayed, of course. > > > > I thought the problem might be related to the extents in my map file, but > > they check out OK with shpdmp. I also thought the problem might be due to > > the fact that I'm my data is unprojected (Decimal Degrees) and I'm using > > DD as map units, but I tried this with projected data and meters units and > > got the same results. I can't figure out what I'm overlooking. Any > > ideas? (I'm using mapserver 3.2.21) > > > > Thanks > > Robert Chavez > > Programmer > > Perseus Project > > rchavez at perseus.tufts.edu > > > From steve.lime at dnr.state.mn.us Tue Nov 16 12:00:00 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 16 Nov 1999 14:00:00 -0600 Subject: MapServer 3.3 Image Support Message-ID: Try and convince someone on a 28.8 modem to spend 8 hours downloading the new releases. I wish the would, but many won't. They're a vocal minority. We visited this issue a couple of months ago on the mailing list. Most users were in favor of seeing png supported, but most also wanted to see LZW GIF remain. The University is talking to Unisys about a freebie license for non-commercial use. I'm not sure the status of those discussions. I'll forward this to the list for general discussion. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> Frank Koormann 11/16/99 01:06PM >>> Hi Steve, * Stephen Lime (steve.lime at dnr.state.mn.us) [991116 16:43]: > Png is a *big* drawback in my opinion. The most common browser on our > sites is still Netscape 3.0 so going to png is problematic, at least > for now. I know that there are some reasons to keep using Netscape 3.0 instead one of the never versions gratis available. However, I think there are many more reasons to upgrade netscape. Only one of this is png support. > I distribute MapServer with 1.2 cause it's about the only > place you can find it these days. Yes. As the authors explain this is due to some licence problems with Unisys, the company which owns the patent for lzw image compression. Although they did not require licencing or fees in former years they now changed (again) their opinion: > In all cases, a written license agreement or statement signed by an > authorized Unisys representative is required from Unisys for all use, > sale or distribution of any software (including so-called "freeware") > and/or hardware providing LZW conversion capability. (excerpt from http://corp2.unisys.com/LeadStory/lzwfaq.html) They claim that for "certain cases" no licence fees may be required, but only on a bilateral agreement. Not enough, Unisys now claims to demand licence fees for web sites if they use gif-images created by a programm not covered by an appropriate licence. Hence there is a lot of confusion around and web masters (also at the University of Osnabrueck) are starting to ban gifs from the servers. Read the complete story at http://burnallgifs.org (Ok, this sounds quite radical, but it IS a big issue.) > Newer versions are readily available > and since it's easy to build with the new stuff instead I see no problem. I really would like to see your distribution of mapserver with png support (and telling the people how to generate images of a different format, e.g. gif). Otherwise you should put a clear disclaimer in your distribution to recommend changing the format generation from gif to png and point out the problems for the users. Hope this all sounds not too agressive. To my mind mapserer is an excellent application but a free software not telling the users what issues might come up by using the software is a problem. Greetings, Frank -- Frank Koormann http://intevation.de/~frank Intevation GmbH http://intevation.net/ Institute of Environmental Systems Research http://www.usf.uos.de/ From steve.lime at dnr.state.mn.us Tue Nov 16 13:08:58 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 16 Nov 1999 15:08:58 -0600 Subject: MapScript example... Message-ID: Got a simple MapScript example running at http://arachnid.dnr.state.mn.us/ms_test. It's a perl script that uses remote data from the USGS (gathered using the perl Net::Finger module) to plot the last 21 semi-major earth quakes around the world. I swiped the world DEM from Doug Nebert's prototype, pretty image. Everything is handled in perl using a few MapScript calls to manipulate map file settings, draw the basemap, map the quake locations and to add a timestamp. It may be slow depending on how busy the USGS servers are cause each pan or zoom executes a finger request. In a production mode you'd probably nab the data every hour or so and work from the copy, still no need to create a shapefile. I'll glady share any details of this script. Yes, documentation is in the works. I hope to have at least some up tonite at the main MapServer site. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 From pgallen at randomlogic.com Tue Nov 16 15:11:49 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Tue, 16 Nov 1999 15:11:49 -0800 Subject: MapScript example... References: Message-ID: <3831E4B4.CB602E26@randomlogic.com> Stephen Lime wrote: > Got a simple MapScript example running at http://arachnid.dnr.state.mn.us/ms_test. It's > a perl script that uses remote data from the USGS (gathered using the perl Net::Finger > module) to plot the last 21 semi-major earth quakes around the world. I swiped the world > DEM from Doug Nebert's prototype, pretty image. Everything is handled in perl using > a few MapScript calls to manipulate map file settings, draw the basemap, map the quake > locations and to add a timestamp. It may be slow depending on how busy the USGS servers > are cause each pan or zoom executes a finger request. In a production mode you'd probably > nab the data every hour or so and work from the copy, still no need to create a shapefile. I'll > glady share any details of this script. > > Yes, documentation is in the works. I hope to have at least some up tonite at the main > MapServer site. > You the man! :-) From marin at here.is Tue Nov 16 15:47:42 1999 From: marin at here.is (Ma) Date: Tue, 16 Nov 1999 23:47:42 +0000 Subject: An example labeling contours. Message-ID: <3831ED1E.3D7FACFC@here.is> Dear All This is very nice example, but in most countries the labeling on the contour lines has a rule: This is CORRECT: ------------- 900 --------- ---------- 850 ------------- ------------- 800 --------- This is NOT CORRECT: ------------- 006 --------- --------- 850 ------------- ------------- 008 --------- which means that it is enough to see only one contour line label and you know where is up and where is down, i.e. if we have one contour line like: the label "800" means - this is higher ------ 800 --------- the label "800" means - and this is lower Does anybody have an idea how to do this labeling in mapserver? -- Ma From bfraser at geoanalytic.com Wed Nov 17 14:32:24 1999 From: bfraser at geoanalytic.com (Brent Fraser) Date: Wed, 17 Nov 1999 15:32:24 -0700 Subject: Query Object References: <3830BA9D.61929E89@erols.com> Message-ID: <004a01bf314b$9f1a1c60$390002c0@servo> Kieran (and all), Attached is a portion of a document I'm working on, regarding queries Hope it helps. Brent ----- Original Message ----- From: Kieran Ames To: Sent: Monday, November 15, 1999 6:59 PM Subject: Query Object > Could someone please post a brief overview on the use of a query object? > > I've looked at the template files and the example pages, but don't have > a clue on a starting point. > > Many thanks. > Kieran > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ddnebert at usgs.gov Fri Nov 19 12:12:36 1999 From: ddnebert at usgs.gov (Doug Nebert) Date: Fri, 19 Nov 1999 15:12:36 -0500 Subject: Raster formats Message-ID: <3835AF34.CB303384@usgs.gov> All: I am seeing strange moire patterns in the global elevation data images (TIFF) as rendered through the mapserver, although the data itself does not seem to exhibit these checkerboard patterns. I am not sure where the pattern is being introduced but it is so regular that it seems like a resampling artifact when presented. I was wondering if use of JPEG or PNG might change this and if 3.3 will be allowing specification of image type. If I could switch the format (should be one of the get parameters [hint: this will be expected in OpenGIS WMT specs]) in the GET request then I can view the same data side by side... Anyone else experience these kinds of patterns or finding solutions to them? -- Douglas D. Nebert Clearinghouse Coordinator FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755 Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html From steve.lime at dnr.state.mn.us Sat Nov 20 07:16:03 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Sat, 20 Nov 1999 09:16:03 -0600 Subject: Opinions Needed - Point Labeling Message-ID: I'm messing around with labeling layers of type POINT. When processed all points are rendered regardless of overlap. This is how it was done in previous versions as well and that won't change. The change is related to how labels are placed for these layers. The idea is that for point layers with labels, no other text from any layer should overlap with those labels. This is similar to how annotation layers are handles, but the difference is with annotation the marker is drawn after any collision avoidance has been done so markers don't overlap either. Does this make sense? This only applies to POINT layers that are being labeled. It's not practical to avoid collisions with all points (or other features for that matter) as there wouldn't be any room for labels. The earthquake demo I did uses POINT and got me into trying this. Any comments appreciated. Steve From kames at erols.com Sat Nov 20 11:14:01 1999 From: kames at erols.com (Kieran Ames) Date: Sat, 20 Nov 1999 14:14:01 -0500 Subject: Mapscript Message-ID: <3836F2F9.A4EB3D53@erols.com> I've tried to compile and run the makefile for the mapscript Perl module on my NT machine without success. Can anyone please post or forward the appropriate file(s) for installing mapscript.pm on NT? Thanks much! Kieran From bfraser at geoanalytic.com Sat Nov 20 15:52:51 1999 From: bfraser at geoanalytic.com (Brent Fraser) Date: Sat, 20 Nov 1999 16:52:51 -0700 Subject: Mapscript References: <3836F2F9.A4EB3D53@erols.com> Message-ID: <000d01bf33b2$5c81d0f0$030102c0@cghh1.ab.wave.home.com> I'm working on it, but it will likely be a couple of weeks... Brent ----- Original Message ----- From: Kieran Ames To: Sent: Saturday, November 20, 1999 12:14 PM Subject: Mapscript > I've tried to compile and run the makefile for the mapscript Perl module > on my NT machine without success. > Can anyone please post or forward the appropriate file(s) for installing > mapscript.pm on NT? > > Thanks much! > > Kieran > > From pgallen at randomlogic.com Sun Nov 21 23:06:01 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Sun, 21 Nov 1999 23:06:01 -0800 Subject: MapServer and Alpha Message-ID: <3838EB59.CA4AD295@randomlogic.com> Just purchased an Alpha. Are there any issues regarding MapServer and Alpha? Will it compile and run on Alpha Linux? PGA From ncarr at guideguide.com Tue Nov 23 05:49:44 1999 From: ncarr at guideguide.com (Nathan Carr) Date: Tue, 23 Nov 1999 13:49:44 +0000 Subject: street labeling References: Message-ID: <383A9B78.73905A70@guideguide.com> I am presently struggling to display arcs(roads in Lyon,Fr) with vector symbol scaling and label orientation. Could somebody describe the definitions that are needed for this. For example how can I define a railway or motorway in the line symbol file and have this line and label scaled at different levels. I have tried various combinations of the defs in the map file Also the MAXSCALE and MINSCALE definitions seem to break the display Also should I make a layer up of points for displaying as an 'annotation' layer instead of labels. Stephen Lime wrote: This is similar to how annotation layers are handles, but the difference is with annotation the marker is drawn after any collision avoidance has been done so markers don't overlap either. -- Nathan Carr ncarr at guideguide.com From mjacquin at geosys-inc.com Tue Nov 23 08:27:08 1999 From: mjacquin at geosys-inc.com (Marc JACQUIN - GEOSYS Inc - Minneapolis) Date: Tue, 23 Nov 1999 10:27:08 -0600 Subject: Labels for timezones layer Message-ID: <383AC05C.C16E6B7A@geosys-inc.com> Hi everyone, I am using the timezones layer (ESRI) and I would like to display the number of the zone. The problem is to display them at the top and the bottom of the map at any zoom factor, in other words not at the center of the polygon. I would like to avoid generating a specific point layer dynamically. Any idea ? Thanks, Marc -------------- next part -------------- A non-text attachment was scrubbed... Name: mjacquin.vcf Type: text/x-vcard Size: 416 bytes Desc: Card for Marc JACQUIN - GEOSYS Inc - Minneapolis URL: From steve.lime at dnr.state.mn.us Tue Nov 23 09:01:50 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 23 Nov 1999 11:01:50 -0600 Subject: street labeling Message-ID: Nathan and all: I'll address symbol scaling and line labeling here. Symbol scaling requires 3 things: - map UNITS to be set - layer SYMBOLSCALE to be set - a scaleable symbol (only image symbols are not scalable) UNITS are the units of a projection/coordinate system and are needed to calculate scale. SYMBOLSCALE is the scale at which a symbol or font should appear full size (eg. the defined size). Note that only truetype fonts are scalable. Scaling works fine for shade and marker symbols, but poorly for line symbols. About the only luck I've had with scalable lines is using ellipse symbols for drawing stroked lines (http://www.dnr.state.mn.us/fish_and_wildlife/trout_fishing/se_trout_init.html is an example that uses scaled lines). Beyond that your best off using multiple definitions of the layer valid at different scales and creating custom line symbols for each. If anyone is aware of some good line scaling algorithms let me know. Currently I'm working with the constraints of the GD library. There are two ways to label streets (or any lines for that matter) using MapServer. I'll describe them using the more advanced control found in version 3.3. 1) Labeling with text. MapServer can use text from a .dbf attribute to label streets with names. The label angles can be fixed, pulled from an item or calculated automatically. Rotated text is only available with truetype fonts. There are several other parameters that allow you to fine tune label placement. All of these are properties of a label object. MINFEATURESIZE - given in pixels. Sets the smallest feature to be labeled. This can also be set to AUTO which forces labels to be the same size (width) as the segment they are labeling. MINDISTANCE - given in pixels. Sets the minimum distance between duplicate pixels. BUFFER - given in pixels. Reserves space around labels so text isn't so dense. OFFSET - x and y values given in pixels. Label offset relative to a horizontal feature. Rotation is taken into account. In general labeling with text can accompany the defintion of the line drawing. However, you can also use it as annotation drawn later in the map. Here's an example layer from the contour labeling example at http://arachnid.dnr.state.mn.us/ms_test: LAYER NAME test TYPE LINE STATUS DEFAULT DATA "../../data/contours" LABELITEM "elev1" SYMBOLSCALE 10000 LABELMAXSCALE 24000 CLASS COLOR 255 0 0 LABEL TYPE TRUETYPE ANTIALIAS FONT times COLOR 0 0 0 BACKGROUNDCOLOR 255 255 230 SIZE 8 MINSIZE 4 MAXSIZE 8 ANGLE AUTO POSITION CC MINFEATURESIZE 100 END END END 2) Labeling with text and a marker symbol. This is generally used for placing things like highway symbols and numbers. You must use annotation layers to do this. The label point is generated from a line shapefile, but only the label point is actually rendered. The key here is that you get your label size to match your marker size. For the stuff I've done the markers are GIF images created to match a certain font size. Rotation most likey is useless here (marker is NOT rotated). Also since the marker is centered on the label point a label POSITION of CC should be used. The BUFFER, MINDISTANCE and MINFEATURE size options all apply here. Here's a sample from our recreation compass (http://www.dnr.state.mn.us/compass): LAYER NAME interstate STATUS DEFAULT DATA interstate TYPE annotation LABELITEM "road_name" CLASS COLOR 255 255 255 SYMBOL 1 LABEL MINFEATURESIZE 50 MINDISTANCE 150 POSITION CC SIZE TINY COLOR 255 255 255 END END END # interstates Annotation of this type is always drawn after the highway itself is drawn. I have a very small collection of highway markers that I'll share if anybody wants them. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> Nathan Carr 11/23/99 07:49AM >>> I am presently struggling to display arcs(roads in Lyon,Fr) with vector symbol scaling and label orientation. Could somebody describe the definitions that are needed for this. For example how can I define a railway or motorway in the line symbol file and have this line and label scaled at different levels. I have tried various combinations of the defs in the map file Also the MAXSCALE and MINSCALE definitions seem to break the display Also should I make a layer up of points for displaying as an 'annotation' layer instead of labels. Stephen Lime wrote: This is similar to how annotation layers are handles, but the difference is with annotation the marker is drawn after any collision avoidance has been done so markers don't overlap either. -- Nathan Carr ncarr at guideguide.com From steve.lime at dnr.state.mn.us Tue Nov 23 09:18:11 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 23 Nov 1999 11:18:11 -0600 Subject: Labels for timezones layer Message-ID: Can't be done, at least not without some custom coding. You might be able to create an interesting effect by stacking 3 maps on top of each other where: - top map is narrow and displays only the timezone labels (centered) - main map is defined as normal - bottom map is narrow and displays only the timezone labels (centered) ---------------------------------------------------- | | ---------------------------------------------------- | | | | | | | | | | | | | | ---------------------------------------------------- | | ---------------------------------------------------- Extents would need to be constant between the 3 maps but that shouldn't be that hard to do. You'll need some javascript to do this unless you're developing a custom client. This is a sneaky way to add all sorts of effects to interfaces. Just an idea... Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> Marc JACQUIN - GEOSYS Inc - Minneapolis 11/23/99 10:27AM >>> Hi everyone, I am using the timezones layer (ESRI) and I would like to display the number of the zone. The problem is to display them at the top and the bottom of the map at any zoom factor, in other words not at the center of the polygon. I would like to avoid generating a specific point layer dynamically. Any idea ? Thanks, Marc From mjacquin at geosys-inc.com Tue Nov 23 10:10:34 1999 From: mjacquin at geosys-inc.com (Marc JACQUIN - GEOSYS Inc - Minneapolis) Date: Tue, 23 Nov 1999 12:10:34 -0600 Subject: Labels for timezones layer References: Message-ID: <383AD89A.6D36CA13@geosys-inc.com> Steve, Already tried to do that but it is nt so obvious. To have the label display at the center of the polygon the top and bottom 'little' maps must cover the equator area and very often, at equator, timezones differ from what they are at a different latitude. I did told you I was displaying the limits of the TZ. So limits would not match. Unless MapServer displays labels centered on the displayed area of the polygon (not exactly at the center of the polygon). Stephen Lime wrote: > Can't be done, at least not without some custom coding. You might be able to > create an interesting effect by stacking 3 maps on top of each other where: > > - top map is narrow and displays only the timezone labels (centered) > - main map is defined as normal > - bottom map is narrow and displays only the timezone labels (centered) > > ---------------------------------------------------- > | | > ---------------------------------------------------- > | | > | | > | | > | | > | | > | | > | | > ---------------------------------------------------- > | | > ---------------------------------------------------- > > Extents would need to be constant between the 3 maps but that shouldn't be > that hard to do. You'll need some javascript to do this unless you're developing > a custom client. This is a sneaky way to add all sorts of effects to interfaces. > > Just an idea... > > Steve > > Stephen Lime > Internet Applications Analyst > > Minnesota DNR > 500 Lafayette Road > St. Paul, MN 55155 > 651-297-2937 > > >>> Marc JACQUIN - GEOSYS Inc - Minneapolis 11/23/99 10:27AM >>> > Hi everyone, > > I am using the timezones layer (ESRI) and I would like to display the > number of the zone. The problem is to display them at the top and the > bottom of the map at any zoom factor, in other words not at the center > of the polygon. I would like to avoid generating a specific point layer > dynamically. Any idea ? > > Thanks, > > Marc -------------- next part -------------- A non-text attachment was scrubbed... Name: mjacquin.vcf Type: text/x-vcard Size: 416 bytes Desc: Card for Marc JACQUIN - GEOSYS Inc - Minneapolis URL: From steve.lime at dnr.state.mn.us Tue Nov 23 10:42:57 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 23 Nov 1999 12:42:57 -0600 Subject: Labels for timezones layer Message-ID: I see, good point. Presently only lines are labeled at their visable center. I suppose that is possible with polygons as well but I've had some concerns about the affects of clipping on area calculations and knowing whether a shape part was an internal or external ring so I haven't persued it. Ideally I'd like to use MINFEATURESIZE in conjunction with polygons and lines. That would help control slivers. I need to do some testing before this could be implemented. steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> Marc JACQUIN - GEOSYS Inc - Minneapolis 11/23/99 12:10PM >>> Steve, Already tried to do that but it is nt so obvious. To have the label display at the center of the polygon the top and bottom 'little' maps must cover the equator area and very often, at equator, timezones differ from what they are at a different latitude. I did told you I was displaying the limits of the TZ. So limits would not match. Unless MapServer displays labels centered on the displayed area of the polygon (not exactly at the center of the polygon). Stephen Lime wrote: > Can't be done, at least not without some custom coding. You might be able to > create an interesting effect by stacking 3 maps on top of each other where: > > - top map is narrow and displays only the timezone labels (centered) > - main map is defined as normal > - bottom map is narrow and displays only the timezone labels (centered) > > ---------------------------------------------------- > | | > ---------------------------------------------------- > | | > | | > | | > | | > | | > | | > | | > ---------------------------------------------------- > | | > ---------------------------------------------------- > > Extents would need to be constant between the 3 maps but that shouldn't be > that hard to do. You'll need some javascript to do this unless you're developing > a custom client. This is a sneaky way to add all sorts of effects to interfaces. > > Just an idea... > > Steve > > Stephen Lime > Internet Applications Analyst > > Minnesota DNR > 500 Lafayette Road > St. Paul, MN 55155 > 651-297-2937 > > >>> Marc JACQUIN - GEOSYS Inc - Minneapolis 11/23/99 10:27AM >>> > Hi everyone, > > I am using the timezones layer (ESRI) and I would like to display the > number of the zone. The problem is to display them at the top and the > bottom of the map at any zoom factor, in other words not at the center > of the polygon. I would like to avoid generating a specific point layer > dynamically. Any idea ? > > Thanks, > > Marc From Robin.Ellis at dnr.qld.gov.au Tue Nov 23 18:32:37 1999 From: Robin.Ellis at dnr.qld.gov.au (Ellis Robin (Bundaberg)) Date: Wed, 24 Nov 1999 12:32:37 +1000 Subject: targetting named frames Message-ID: Any ideas on how to send qeury results to a named frame in a new window? I can currently return results in a new window by themselves, but I would like to return this information in a "main" frame, with the same "header" frame at the top. I've tried to specify a named frame within the QUERY TEMPLATE section of the map file but have had no success. All help is appreciated. Rob. Robin Ellis Land Resources Officer Department of Natural Resources Burnett District ph: 07 4153 7843 fax: 07 4153 7823 Robin.Ellis at dnr.qld.gov.au From steve.lime at dnr.state.mn.us Wed Nov 24 06:04:36 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Wed, 24 Nov 1999 08:04:36 -0600 Subject: targetting named frames Message-ID: You have to use a touch of javascript to do this. Basically when submitting the form you need to check the setting of mode and set the form target appropriately and then submit the form. Steve <<< "Ellis Robin (Bundaberg)" 11/23 8:33p >>> Any ideas on how to send qeury results to a named frame in a new window? I can currently return results in a new window by themselves, but I would like to return this information in a "main" frame, with the same "header" frame at the top. I've tried to specify a named frame within the QUERY TEMPLATE section of the map file but have had no success. All help is appreciated. Rob. Robin Ellis Land Resources Officer Department of Natural Resources Burnett District ph: 07 4153 7843 fax: 07 4153 7823 Robin.Ellis at dnr.qld.gov.au From bfraser at geoanalytic.com Wed Nov 24 07:35:04 1999 From: bfraser at geoanalytic.com (Brent Fraser) Date: Wed, 24 Nov 1999 08:35:04 -0700 Subject: Opinions Needed - Point Labeling References: Message-ID: <003101bf3691$7aa7fa50$390002c0@servo> Sounds OK. Generally my needs are 1. Geographic point entities must be symbolized, regardless of overlap (eg Oil wells). The labels that related to these points should be in the same relative location (eg above-center), but if they overlap with other labels, try to place them in other locations, and as a last resort don't label if the labels overlap. In the case of a map of oils wells, I would not want labels from any other layer overlapping the well symbols or their labels. and (of much less importance): 2. Symbolize points in a cartographically pleasing manner (eg populated places markers), but it's ok to not symbolize if they overlap, and it's OK not to label if the labels overlap. Brent Fraser ----- Original Message ----- From: Stephen Lime To: Sent: Saturday, November 20, 1999 8:16 AM Subject: Opinions Needed - Point Labeling > I'm messing around with labeling layers of type > POINT. When processed all points are rendered regardless of overlap. This is how it was done in previous versions as well and that won't change. The change is related to how labels are placed for these layers. The idea is that for point layers with labels, no other text from any layer should overlap with those labels. This is similar to how annotation layers are handles, but the difference is with annotation the marker is drawn after any collision avoidance has been done so markers don't overlap either. Does this make sense? > > This only applies to POINT layers that are being labeled. It's not practical to avoid collisions with all points (or other features for that matter) as there wouldn't be any room for labels. > > The earthquake demo I did uses POINT and got me into trying this. Any comments appreciated. > > Steve From steve.lime at dnr.state.mn.us Wed Nov 24 07:47:51 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Wed, 24 Nov 1999 09:47:51 -0600 Subject: Opinions Needed - Point Labeling Message-ID: You've described what is currently supported 1. describes point layers and 2. describes annotation. Only remaining issue is buffered labels and their interaction with placed markers. With annotation this is handled fine, but with points you only want the raw label bbox tested against placed markers, not the buffered bbox. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> "Brent Fraser" 11/24/99 09:35AM >>> Sounds OK. Generally my needs are 1. Geographic point entities must be symbolized, regardless of overlap (eg Oil wells). The labels that related to these points should be in the same relative location (eg above-center), but if they overlap with other labels, try to place them in other locations, and as a last resort don't label if the labels overlap. In the case of a map of oils wells, I would not want labels from any other layer overlapping the well symbols or their labels. and (of much less importance): 2. Symbolize points in a cartographically pleasing manner (eg populated places markers), but it's ok to not symbolize if they overlap, and it's OK not to label if the labels overlap. Brent Fraser ----- Original Message ----- From: Stephen Lime To: Sent: Saturday, November 20, 1999 8:16 AM Subject: Opinions Needed - Point Labeling > I'm messing around with labeling layers of type > POINT. When processed all points are rendered regardless of overlap. This is how it was done in previous versions as well and that won't change. The change is related to how labels are placed for these layers. The idea is that for point layers with labels, no other text from any layer should overlap with those labels. This is similar to how annotation layers are handles, but the difference is with annotation the marker is drawn after any collision avoidance has been done so markers don't overlap either. Does this make sense? > > This only applies to POINT layers that are being labeled. It's not practical to avoid collisions with all points (or other features for that matter) as there wouldn't be any room for labels. > > The earthquake demo I did uses POINT and got me into trying this. Any comments appreciated. > > Steve From bill at bransonlive.com Wed Nov 24 08:32:43 1999 From: bill at bransonlive.com (Bill Stephenson) Date: Wed, 24 Nov 1999 10:32:43 -0600 Subject: Mapserv Message-ID: <199911241631.JAA02786@secureshopper.com> Hi All, I thought I'd introduce myself to the list. I'll be attempting to set up mapserv on a linux system here at my office and on a virtual server at iserver.com. I'm a complete beginner at compiling and using C code but I think I should be able to get the demo up and running. I have done some perl work on a few map applications that be found at: http://www.bransonlive.com/maps/maps.html The coolest of these is a "Live Traffic Map". I am hoping to see how I might use Mapserv as the image engine to accomplish the same features as those I've written in perl. You all have accomplished so much here, I'd like to extend my thanks now and I really look forward to learning from everyone on the list. Thanks you, and have a great holiday! -- Bill Stephenson From steve.lime at dnr.state.mn.us Wed Nov 24 08:53:33 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Wed, 24 Nov 1999 10:53:33 -0600 Subject: mapserv.ini file going away. Message-ID: Greetings: This is just a heads up. I've come to the conclusion that using the .ini file is basically useless. New versions of 3.3 will no longer require mapserv.ini. Rarely changed options such as expressions for legal map and template file are moving into map.h and be changed at compile time. Contact_email goes away since you can create your own error pages anyway. Other parameters get moved into the map file itself (in the web object primarily). This should make managing apps easier as each one can have it's own log, temporary image directory, etc... This also makes mapscript not quite as clunky, blah, blah, blah... You wll have to ALWAYS include symbol and font set info though. From what I've seen most users are doing that anyway. Steve Stephen Lime Internet Applications Analyst Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 From kenboss at dilbert.dnr.state.mn.us Wed Nov 24 09:43:40 1999 From: kenboss at dilbert.dnr.state.mn.us (kenboss at dilbert.dnr.state.mn.us) Date: Wed, 24 Nov 1999 11:43:40 -0600 (CST) Subject: mapserv.ini file going away. Message-ID: <199911241743.LAA20013@philbert.dnr.state.mn.us> The one thing that I've really liked about the .ini file is that it > Greetings: This is just a heads up. I've come to the conclusion that using the .ini file is basically useless. > New versions of 3.3 will no longer require mapserv.ini. Rarely changed options such as expressions for > legal map and template file are moving into map.h and be changed at compile time. Contact_email goes > away since you can create your own error pages anyway. Other parameters get moved into the map file > itself (in the web object primarily). This should make managing apps easier as each one can have it's own log, > temporary image directory, etc... This also makes mapscript not quite as clunky, blah, blah, blah... You wll > have to ALWAYS include symbol and font set info though. From what I've seen most users are doing that > anyway. > > Steve > > > Stephen Lime > Internet Applications Analyst > > Minnesota DNR > 500 Lafayette Road > St. Paul, MN 55155 > 651-297-2937 > From pgallen at randomlogic.com Sun Nov 28 11:14:18 1999 From: pgallen at randomlogic.com (Paul G. Allen) Date: Sun, 28 Nov 1999 11:14:18 -0800 Subject: MapServer on Alpha Message-ID: <38417F0A.756A4B21@randomlogic.com> Well, I'd like to say that it works under Alpha Linux, but it doesn't seem to. I've compiled MapServer, PROJ.4, and libtiff on my Alpha under Red Hat Linux 6.0. During the compile I noticed many "cast from pointer to integer of different size" and "cast to pointer from integer of different size" warnings. I ignored them in the hopes that it would work anyway. When I run my MapServer Demo pages under Apache on the Alpha, I get "premature end of script" errors in the log files and "Internal Server Error" in the browser. I believe this indicates a problem with the mapserv CGI, probably due to unaligned pointers. I have looked at part of the code and the warnings, and have found that some of the warnings deal with malloc(), realloc(), and calloc() function calls where an int type is used as an argument. Alpha pointers are 64 bits in size and an integer can not be used as a pointer unless it is type cast first. The same holds true when casting a pointer to an integer, except that you only lose bits doing this, instead of causing a core dump. I have begun "fixing" these problems by adding a preprocessor directive and a macro as follows: /* File shapefil.h */ #ifdef __alpha__ #define POINTER (long) #else #define POINTER (int) #endif /* end shapefil.h */ This macro is used wherever a type mismatch as defined above occurs. For example: return ((void *) malloc(nNewSize)); becomes return ((void *)POINTER malloc(nNewSize)); which, after preprocessing, looks like return ((void *)(long) malloc(nNewSize)); // For Alpha processors return ((void *)(int) malloc(nNewSize)); // For all other processors By doing this, the 32-bit value returned by malloc is cast to a 64-bit pointer if the processor type is __alpha__, and it remains 32-bit for anything else. So far I have not gotten far enough to test the code, but it does compile without the pointer cast warnings. I am also seeing warnings about type mismatches with functions memcpy(), strcpy(), etc. I don't know what this is about yet. PGA From steve.lime at dnr.state.mn.us Mon Nov 29 22:57:02 1999 From: steve.lime at dnr.state.mn.us (Stephen Lime) Date: Tue, 30 Nov 1999 00:57:02 -0600 Subject: Last 3.3 Alpha Message-ID: Howdy: I posted what I hope will be the last alpha release of 3.3. In addition I posted updated docs (including one for mapscript) on the web site. This new version bulks out mapscript a bit by adding methods for drawing legends, scalebars and reference maps. In addition I added read access to shapefiles. So now you can write a script to dump a shapefile like this: #!/usr/bin/perl use mapscript; %types = ( '1' => 'point', '3' => 'arc', '4' => 'polygon', '5' => 'multipoint' ); $shapefile = new shapefileObj('railroad') or die 'Unable to open shapefile'; print "Shapefile opened (type=". $types{$shapefile->{type}} .") with ". $shapefile->{numshapes} ." shape(s)\n"; $shape = new shapeObj(); for($i=0; $i<$shapefile->{numshapes}; $i++) { $shapefile->get($i, $shape); print "Shape $i has ". $shape->{numlines} ." part(s)\n"; for($j=0; $j<$shape->{numlines}; $j++) { $part = $shape->get($j); print "Part $j has ". $part->{numpoints} ." point(s)\n"; for($k=0; $k<$part->{numpoints}; $k++) { $point = $part->get($k); print "$k: ". $point->{x} .", ". $point->{y} ."\n"; } } } Write access will be coming soon. Meanwhile, the C code is stabilizing rather nicely. There is still a bit to do with certain types of queries and querymaps but I hope to iron that out yet this week. Have fun. Steve