Re: [mapserver-users] Problem with attribute query, multiple attributes
Since OGR accesses the GDB via ESRI's API/Library, it may (should) take advantage of attribute indexes built on the data with ArcMap. You should make sure that the feature classes in the GDB have attribute indexes on any column that you want to use as query criteria and that they have good spatial indexes as well. If you don't have access to ESRI tools, you will likely want to pre-process the data by dumping it from the GDB to shapefiles or PostGIS, where you can create all of the indexes that you need. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bistrais, Bob Sent: Thursday, November 29, 2012 8:45 AM To: Jeff McKenna; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Problem with attribute query, multiple attributes Thanks Jeff. That link shows how to build an index on a shapefile. Is there an equivalent for File GDB? I'm looking at the GDAL document for GDB now, not seeing an index description. -Original Message- From: Jeff McKenna [mailto:jmcke...@gatewaygeomatics.com] Sent: Wednesday, November 28, 2012 6:41 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Problem with attribute query, multiple attributes On 12-11-28 5:43 PM, Bistrais, Bob wrote: I am trying to set up an attribute query for a large parcel dataset (about 550,000 polygons). I am having trouble with the query exceeding the 30 second limit. I am trying to query on the map_bk_lot and town attributes. I can query on either one separately and get results, but I need to query on both at the same time. Here is my query expression: $queryExp = ('[TOWN]' == '007-042') AND ('[TOWN]' == 'Acton')); ---Hardcoded for testing now, will eventually use variables $pLayer-queryByAttributes(MAP_BK_LOT,$queryExp,MS_SINGLE); Query statement The data is in an ESRI File GDB. I am using MS4w 3.0.4m MapServer 6.0.2, MapScript 6.1 for PHP One other thing worth mentioning- if I use a small subset of features (such as a town), the query will work without timing out. But I'm no longer convinced that dataset size is the problem since it will query on one attribute. Any ideas what's going wrong here? A tip that might come in handy someday, if not in this case, could be to create an attribute index on your vector field (see example in http://www.gdal.org/ogr/drv_shapefile.html); I've done this before and it's improved attribute queries in MapServer significantly. You can generate one through an ogrinfo command with the sql switch. Sorry I cannot provide exact FileGDB examples at the moment. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] SDE Connection
With earlier versions like 9.2, ESRI put the SDK install files out on their Web site. With some of the later versions, you need to have the install CDs. You didn't say what service pack version you are running with 9.2, but here is a page with the SDK for 9.2 sp2: http://support.esri.com/en/downloads/patches-servicepacks/view/productid/66/metaid/1269 If you are on a different version, Google found this page in about 5 seconds. You may also have an issue with supported platforms, they usually have a page listing supported Linux disros and versions. In the past, they have listed Red Hat, but not CentOS. That doesn't mean that it won't work, I just don't know. If this doesn't work, or doesn't perform well, you might want to think about a simple ESRI Python script that pulls the data out of the production SDE database and push it into a PostGIS database or even shapefiles for use by MapServer. You could script it to run on some set time period. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mike Saunt Sent: Tuesday, September 11, 2012 3:25 AM To: Michele De Santis Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] SDE Connection I'm not aware of them being publicly available. They should be in the esri media pack that comes with arcsde On Sep 11, 2012 9:23 AM, Michele De Santis tap...@virgilio.itmailto:tap...@virgilio.it wrote: Dear list, I want to connect Mapserver 6.0.3 to SDE 9.2. MapServer is on a Linux Centos Machine while SDE is on Windows Machine. I have just read that I must have the SDE client librairies at my disposition, and have them installed on the machine running MapServer. Are this client librairies available for public download? Thanks to all ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] retrieve map coordinates with different EPSG
I looked at the documentation because I haven't used in a while. The docs aren't clear, but seem to imply that MAPXY should return coordinates in the same spatial reference system as the layer that you are querying. I kind of think that they should be in the spatial reference system of the map. Either way, try setting the map projection to the SRS that you want to get the coordinates back in. You will also have to change the extent values. David. http://mapserver.org/cgi/controls.html From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Andrea Peri Sent: Friday, September 07, 2012 4:18 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] retrieve map coordinates with different EPSG Hi, Usign the templating capabilities of mapserver. I need the parameters [mapx] and [mapy] will return the coordinate of a clicked point. I possible in the templates set semothing to have this coordinates [mapx], [mapy] in a different SRS ? I see there is the [maplon] and [maplat] parameter. But I need have the coords in another projected EPSG system rather than geographic 4326. Thx -- - Andrea Peri . . . . . . . . . qwerty àèìòù - ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] label MINSCALEDENOM, MAXSCALEDENOM usage
You may want to read the mapfile documentation. Here is the page for layers: http://mapserver.org/mapfile/layer.html I would also suggest only sending messages to one of the mapserver lists at a time. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of ?? Sent: Thursday, August 30, 2012 10:24 AM To: mapserver-users@lists.osgeo.org Cc: mapserver-...@lists.osgeo.org Subject: [mapserver-users] label MINSCALEDENOM, MAXSCALEDENOM usage Hi. I use basemaps to generated the .mapfile for my osm postgis data. But I found some lable in the mapfile such asMINSCALEDENOM,MAXSCALEDENOM. I am not very understand these labels. If use these labels,when enlarge ,will make the image disappear. If I delete the labels in th emapfile, enlage will no problem. I mean enlarge is I using a link like this:http://127.0.0.1/cgi-bin/mapserv?map=/home/jack/osm-demo/basemaps/osm-google.maplayer=alltemplate=openlayers;, then click the enlarge. Can anyone give some guide? Also I use the mafile which basemaps generated automaticlly, using the above do not show any content, but if I move the MINSCALEDENOM,MAXSCALEDENOM label , it will show some content. -- Yang Li GIS Developer P.R.China ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver user can not make the shapefile data correctly show in the browser
Yang Li, You may want to try to use a relative URL for the IMAGEURL. Try changing it from: IMAGEURL /output/ To: IMAGEURL output/ David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of ?? Sent: Wednesday, August 22, 2012 11:50 AM To: mapserver-users@lists.osgeo.org Cc: mapserver-...@lists.osgeo.org Subject: [mapserver-users] mapserver user can not make the shapefile data correctly show in the browser Hello, respected everyone, I have a problem when using Mapserver. I just using Maperver to rend an shapefile on ubuntu 12.04. but the expect image is not correctly showing, i think there maybe some problem with my mapfile set, especially with IMAGEURL define? I use a guide in the link :http://www.gistutor.com/mapserver/3-beginner-mapserver-tutorials/7-how-to-generate-a-simple-map-using-mapserver-and-a-shapefile.html I assign the mapfile template.htmlstart.html in my www DIR, which is like this: mapfiel.map: MAP NAME parcels_map STATUS ON SIZE 420 300 EXTENT 489885 5450946 490904 5451637 UNITS METERS SHAPEPATH shapefiles IMAGECOLOR 255 255 255 WEB TEMPLATE template.html IMAGEPATH /var/www/output/ IMAGEURL /output/ END LAYER NAME parcel_boundaries DATA parcels STATUS DEFAULT TYPE POLYGON CLASS NAME parcels_color COLOR 255 215 0 END END # end of map file END starrtmap.html: html headtitleCreating a simple image using Mapserver and a Shapefile/title/head body bgcolor=#FF h2Creating a simple image using Mapserver and a Shapefile/h2 phrp This page simply contains a link which sends a set of instructions to the Mapserver application using a mapfile.br / The information stored within the mapfile tells the Mapserver application how to draw the map.p !-- The following link sends the local file structure path of the mapfile to the web location of the mapserver executable file -- A HREF=http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map; Click on this link/A to view a map generated using a Shapefile. phrp /body /html template.html: !-- MapServer Template -- html headtitleSimple Mapserver Template HTML Document/title/head body bgcolor=#AA h2The image below was illustrated based on the instructions sent in the mapfile./h2 !-- When using Mapserver with a template, the Mapserver application looks for the [img] tag within the template document to place the map -- img src=/[img] border=1 /body /html when I run the “http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map” in my address colum. The expect map is not shown. The page is showing content of template.html expectly, but there is only a image icon , but with no picture. And the status bar in the firefox brower is showing : conecting to output .. I notice that in the var/www/output DIR, there have been some png file generated. And is the png containing the polygon in the shapefile. Every time when I click the “http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map” link, a new png file is generated in output DIR. I want to know if the IMAGEURL in the mapfile is set wrongly? Why the png is genrated correctly but not showing in the browser? Any one can help me? -- Yang Li GIS Developer P.R.China ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] validation block
I do something like the second example in one of my applications. I send the comma-delimited string for use as part of the IN statement. This basically allows you to symbolize features from your spatial data set based on data passed in through the URL. I pass these URL vars: group1=129,119,041,005,159,051,011,147,097,015,067,171,081,063,025,093,009,149,079,049,065,003,143,027,039,007,099,121,151,135,107,047,033,031,023,089,001,013,161,109,139,061,055,101,045,127,113,117,167,085,133,073,071,157,105,083,165,077,111,059,115,019,153,125,169,087,043,145,017,131,021,173,035,095,091,155,057,103,075,029,069group2=137,163,037,141,123group3=group4=053 Here is the layer definition: LAYER NAME airdata STATUS DEFAULT DATA 'county_thin' TYPE POLYGON TEMPLATE templates/emiss_imap_template.html VALIDATION group1 ^[0-9\,]+$ group2 ^[0-9\,]+$ group3 ^[0-9\,]+$ group4 ^[0-9\,]+$ END CLASS NAME group1 EXPRESSION ('[county_fip]' IN '%group1%') STYLE COLOR 241 238 246 END END CLASS NAME group2 EXPRESSION ('[county_fip]' IN '%group2%') STYLE COLOR 189 201 225 END END CLASS NAME group3 EXPRESSION ('[county_fip]' IN '%group3%') STYLE COLOR 116 169 207 END END CLASS NAME group4 EXPRESSION ('[county_fip]' IN '%group4%') STYLE COLOR 5 112 176 END END END David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Tuesday, August 21, 2012 1:16 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] validation block Typically the SQL syntax is column in (a,b,c,d) So based on this [id_bassin] in '%ID_BASSIN%' would be problematic I think because your syntax is: column in 'string' Which is not valid. Also what is your validation for %ID_BASSIN%? Is something like this? ^\([0-9]+(,[0-9]+)*\)$ where ID_BASSIN=(123,234,345) or do you want something like: [id_bassin] in (%ID_BASSIN%) with a valdiation like: ^[0-9]+(,[0-9]+)*$ where ID_BASSIN=123,234,345 -Steve W On 8/21/2012 1:33 PM, Marc-André Trottier wrote: here is an example of two class in 'adn_station_max_v.map' : CLASS NAME Information non disponible (grande échelle) EXPRESSION ( '[etat]' = 'GRIS' AND [id_bassin] in '%ID_BASSIN%') GROUP BASSIN MINSCALEDENOM 0 MAXSCALEDENOM 15 STYLE SYMBOL 'circle' COLOR 128 128 128 OUTLINECOLOR 0 0 0 SIZE 9 END LABEL COLOR 0 0 0 OUTLINECOLOR255 255 255 ANTIALIAS FALSE TYPETRUETYPE FONTubuntu SIZE14 POSITION auto FORCE TRUE END END CLASS NAME Seuil d\'inondation majeure EXPRESSION ( '[etat]' = 'ROUGE' AND [region_admin_id] in '%ID_REG%') GROUP REG_ADMIN MINSCALEDENOM 11 STYLE SYMBOL 'circle' COLOR 255 0 0 OUTLINECOLOR 0 0 0 SIZE 14 END LABEL WRAP! ALIGN CENTER COLOR 0 0 0 OUTLINECOLOR255 255 255 ANTIALIAS FALSE TYPETRUETYPE FONTubuntu SIZE14 FORCE TRUE OFFSET 0 12 END END if i understant this meant that for a layer, i must validate all variables of all class even if i don't use them all. My include of 'adn_station_max_v.map' contains X substitutions in X class so i must have X validations even if i don't use all X class. In my example, i include many class with 'adn_station_max_v.map' but i'm using only one variable at a time. All class in CLASSGROUP 'REG_ADMIN' only use 'ID_REG'. 2012/8/21 Stephen Woodbridge wood...@swoodbridge.com mailto:wood...@swoodbridge.com You probably need to quote: 'ID_BASSIN' '[[a-zA-Z0-9]{0,10},??]*' #ID_REG' '[[a-zA-Z0-9]{0,10},??]*' And I would be very suspicious that '#ID_REG' is a value identifier because of the '#' character. -Steve W On 8/21/2012 11:38 AM, Marc-André Trottier wrote: there is my layer's definition : LAYER VALIDATION ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*' #ID_REG '[[a-zA-Z0-9]{0,10},??]*' END INCLUDE ../layers/bd/adn_station_max___v.map CLASSGROUP BASSIN NAME adn_station_bassin END LAYER VALIDATION #ID_BASSIN
Re: [mapserver-users] Reading a custom GDAL raster format via MapServer...
Is MapServer using the same GDAL as the commandline GDAL that can successfully open the file? From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Shri I Sent: Thursday, August 09, 2012 9:49 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Reading a custom GDAL raster format via MapServer... Hello All, I have been trying to read a custom GDAL raster format via MapServer. (Unfortunately, I'm unable to share the file itself here, as it is a proprietary format). MapServer is unable to read the raster and display it. However, GDAL is able to read (gdalinfo, etc), translate (gdal_translate), transform (gdalwarp) the raster. Any ideas how to solve this? MapServer is compiled with GDAL support and everything looks OK. The gdalinfo --formats command shows the format is supported. Here are the errors in my log: msDrawMap(): rendering using outputformat named png (AGG/PNG). msDrawMap(): WMS/WFS set-up and query, 0.000s msDrawRasterLayerLow(testLayer): entering. msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or missing file '/path/to/myfile.ext' for layer 'testLayer'. Image handling error. Failed to draw layer named 'testLayer'. msFreeMap(): freeing map at 0xf8b8f0. And here's the MapServer error included in the image or shown on the command prompt (when ran using mapserv command): msDrawMap(): Image handling error. Failed to draw layer named 'testLayer'. msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or missing file '/path/to/myfile.ext' for layer 'testLayer'. GDAL: GDALDeregister_GTiff() called. Here's how my layer definition looks like: LAYER NAME testLayer TYPE RASTER DATA /path/to/myfile.ext # -- Tested with realtive path from shapepath and also direct path, as in this case. STATUS ON END Thank you for your helpful pointers. Regards, Shri. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] World File's
Maybe convert to planar coordinates, calculate the other corners based on distance and then convert back to LCC? David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jeff Lake Sent: Tuesday, June 19, 2012 1:51 PM To: MapServer Subject: [mapserver-users] World File's Heres a trick question for anybody that wants to tackle it .. I have ... Lower Left Lat/Long Upper Right Lat/Long Center Lat/Long and the LCC Projection Angles I am attempting to create a World File for each of these maps (8 in total) all the calculations I have found require Upper Left and Lower Right well you can't just use the pairings I have as it will change being projected and not grid anybody got any idea's ??? -- -Jeff Lake MichiganWxSystem.com WeatherMichigan.net TheWeatherCenter.net GRLevelXStuff.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] elevation profile
Thanks Puneet. Very nice looking app. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet Kishor Sent: Saturday, May 05, 2012 1:15 PM To: mapserver Subject: Re: [mapserver-users] elevation profile The elevation profile widget is finally implemented at http://earth-base.org/geomaps Click on the fourth button from the top on the left, then draw a line on the map to see the profile. As with all my apps, the values themselves can be retrieved by querying for them directly from the browser or from the command line. For example http://earth-base.org/geomaps/elevation.json?linestring=LINESTRING(-118.706+37.933%2C-109.477+42.494) This one is dedicated to Steve Woodbridge, Brent Wood and David Fawcett. .. -- Puneet Kishor___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] No map in preview
If you are really trying to get a Geoserver instance running, I would suggest the Geoserver mailing list.. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Dott. Scolavino Alessandro Sent: Wednesday, March 28, 2012 3:22 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] No map in preview Hi, i just finished loading in postgis the global data. I tryed to display layer with geoserver but i see only white map. It's a common problem? If someone have 5 minutes to take a fast look on my geoserver to see if i made a mistake or if i have to rebuild the db (maybe something went wrong with the population i had to run it in background since it take more than 3 days...) i'll give the server address and login data (pvm) thanx!!! -- - -- Ai sensi del DL 196/2003 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse pervenuto per errore, la Preghiamo di eliminarlo senza copiarlo e di non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie. Cordiali saluti - Dott. Alessandro Scolavino - http://www.webair.it - http://www.clerk.it ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] RE: HI
I haven't tested it, but try something like this: LAYER NAME 'gtroads' TYPE LINE DUMP false EXTENT -143.208273 40.614882 -50.461099 84.297613 DATA '../Data/gtroads.shp' METADATA 'ows_title' 'gtroads' END STATUS DEFAULT #TRANSPARENCY 100 # TRANSPARENCY is deprecated, use OPACITY if you want to create a semi-opaque layer. PROJECTION 'proj=longlat' 'datum=WGS84' 'no_defs' END CLASS NAME 'expressway' EXPRESSION '[ROADTYPE]' = 'expressway' # substitute your column name and data value here STYLE WIDTH 3.5 COLOR 255 0 0 END END CLASS NAME 'primary' EXPRESSION '[ROADTYPE]' = 'primary' # substitute your column name and data value here STYLE WIDTH 2.5 COLOR 0 255 0 END END END From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Özgür Arslan Sent: Tuesday, March 20, 2012 10:32 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] RE: HI Hi All, I am working on a project and I am trying to split a roads layer called gtroads. Roads layer should be split into two classes Expressway and Primary highway based on the TYPE field. How can I split the layer? Could someone help me about the problem? Thanks. The code line like below: LAYER NAME 'gtroads' TYPE LINE DUMP false EXTENT -143.208273 40.614882 -50.461099 84.297613 DATA '../Data/gtroads.shp' METADATA 'ows_title' 'gtroads' END STATUS DEFAULT TRANSPARENCY 100 PROJECTION 'proj=longlat' 'datum=WGS84' 'no_defs' END CLASS NAME 'gtroads' STYLE WIDTH 3.5 COLOR 0 0 0 END END END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Aligning labels within a polygon
If you are storing the data in PostGIS, you could possibly take advantage of ST_Azimuth(). http://www.postgis.org/docs/ST_Azimuth.html It takes two point objects as the args, but you could potentially use the start and end points of your linestring. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jan Hartmann Sent: Tuesday, February 21, 2012 10:23 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Aligning labels within a polygon Hi, I'm inputting lots of street address points in PostGIS, and try to generate labels for the streets. The convex hull of the points of a street approximate the course of the street, and I would like to position the streetname in the middle of the convex hull polygon, aligned to its dominant angle (the polygons are generally quite narrow). Is there a way of doing this with MapServer? Perhaps by thinning out the polygon to a line, for then I can use angle follow. Jan ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Aligning labels within a polygon
Several years ago, I wrote some Python code to roughly georeference air photos. As part of that, I needed to come up with the best approximation of the heading of the airplane. What worked pretty well was to do a really simple line fitting based on the points. My samples were points from an airplane that was attempting to fly in a straight line, with vertices generated by a camera taking pictures at regular intervals, so that helped. I simply split the vertices of the line into three groups by dividing the total number of points by 3. I averaged the x and y values in each group and then created a line from the average coord from group1 to the average coord from group3. Street data will likely be more variable (curved), but you may want to explore something like this. Of course, you would likely want to calculate these label angles using pre-processing to speed up rendering time. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jan Hartmann Sent: Tuesday, February 21, 2012 11:18 AM To: Fawcett, David (MPCA) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Aligning labels within a polygon Going a step further: st_longestline(st_collect(the_geom),st_collect(the_geom)) gives the longest line segment that can be drawn within the cluster of street address points. Works for non-curved streets. I'm still looking for a more intelligent way to thin out a polygon to a (multi)line. Jan On 02/21/2012 05:27 PM, Fawcett, David (MPCA) wrote: If you are storing the data in PostGIS, you could possibly take advantage of ST_Azimuth(). http://www.postgis.org/docs/ST_Azimuth.html It takes two point objects as the args, but you could potentially use the start and end points of your linestring. David. From: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jan Hartmann Sent: Tuesday, February 21, 2012 10:23 AM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: [mapserver-users] Aligning labels within a polygon Hi, I'm inputting lots of street address points in PostGIS, and try to generate labels for the streets. The convex hull of the points of a street approximate the course of the street, and I would like to position the streetname in the middle of the convex hull polygon, aligned to its dominant angle (the polygons are generally quite narrow). Is there a way of doing this with MapServer? Perhaps by thinning out the polygon to a line, for then I can use angle follow. Jan ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Does Mapserver utilise Spatialite spatial index correctly?
Great work Jukka (and Even). Thanks for pursuing this!! David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka Sent: Tuesday, February 14, 2012 2:24 AM To: 'mapserver-users@lists.osgeo.org' Subject: Re: [mapserver-users] Does Mapserver utilise Spatialite spatial index correctly? Rahkonen Jukka wrote: Even Rouault wrote: I've commited improvements in GDAL trunk for both points ( http://trac.osgeo.org/gdal/changeset/23944 and http://trac.osgeo.org/gdal/changeset/23945 ) that make the above request go from 1.7 sec to 0.54 sec . I don't think there's any more significant speed gain to expect now (at least on OGR side). Actually, I found a new improvement (committed in http://trac.osgeo.org/gdal/changeset/23946) that make the query time go down to 0.07 sec (*) ! There was a slowness when opening the layer due to the presence of an ORDER BY clause in the DATA string, that was evaluated before setting the spatial filter. (*) For comparison, I translated your database to Postgis, and set-up the connection mapfile to use that Postgis database (still through OGR, not the MapServer Postgis backend). The same request with OGR PG is run in 0.18 sec. Awesome! About 25 times faster in the evening than it was in the morning. My opinion is that because Spatialite seems to be, at least in this case, more that two times faster backend for Mapserver than PostGIS it should lead to some intensive and controlled testing now. I updated the cgi-bin directory of my MS4W 3.0.4beta1 with the mapserv.exe and dll files taken from the brand new binaries from http://www.gisinternals.com/sdk/ (contains Mapserver and GDAL revisions r13144, r23972, respectively). As a result Mapserver is really serving me 10, or 25 or even 40 times faster than it did before the update measured as WMS throughput (images/minute). The times include rendering times and all the lags in the system so the difference tells exactly how the end user feels it. Greatest enhancement is with close zooms because then the apatial index bites hardest. And at least with my computer Spatialite backend is clearly faster than PostGIS with the same data and it may be even faster than shapefiles but it is too early to say that really. But this is absolutely something worth more testing. My test database is moderately sized and contains 10 points, 9 lines and 149000 polygons from OpenStreetMap data. I will myself do next trials with ten times bigger Spatialite database with something like million points, lines, and polygons. We do not have much bigger tables in our production. However, I do not believe we are changing from Oracle to SQLite/Spatialite very rapidly in our core business :) -Jukka Rahkonen- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Does Mapserver utilise Spatialite spatial index correctly?
A pretty good story to tell when talking about the advantages of OpenSource software... -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka Sent: Saturday, February 11, 2012 3:43 PM To: Even Rouault; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Does Mapserver utilise Spatialite spatial index correctly? Even Rouault wrote: I've commited improvements in GDAL trunk for both points ( Awesome! About 25 times faster in the evening than it was in the morning. My opinion is that because Spatialite seems to be, at least in this case, more that two times faster backend for Mapserver than PostGIS it should lead to some intensive and controlled testing now. Regards, -Jukka Rahkonen-___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Shapefiles not rendered
Juan, The projection block at the map level specifies 4326 as the spatial reference system, but the units of your extent look like they are in meters, not decimal degrees. This may be involved in the issue, or maybe not, but it would screw up a regular MapServer CGI request if you don't specify a bbox. The use of a '.' Character in a layer name may be valid in MapServer and the OGC WMS spec, but it looks funky to me. Again, probably not the problem. I would simplify your map file by commenting out the MINSCALE, MAXSCALE, and TRANSPARENCY lines. I am guessing that one of these is causing your problem. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Juan Jesús Cremades Monserrat Sent: Friday, January 13, 2012 5:50 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Shapefiles not rendered Hi, I want execute the getMap method with an URL like this: http://localhost:9000/cgi-bin/mapserv.exe?LAYERS=COMACOM.SHPFORMAT=image/pngTRANSPARENT=trueMAP=/ms4w/apps/demo-cv/demoCV.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=EXCEPTIONS=application/vnd.ogc.se_inimageSRS=EPSG:4326BBOX=-180,-90,180,90WIDTH=551HEIGHT=356 But the result is always a white page. Where the error may be? My MapServer is the MS4W. Thanks My MapFile is this: MAP NAME map_generated_by_gvsig EXTENT 626679.4375 4191039.75 797868.9375 4519396.0 SYMBOLSET demoCV.sym FONTSET fonts.txt LEGEND IMAGECOLOR -1 -1 -1 LABEL FONT vera ANGLE FOLLOW COLOR 0 0 0 ENCODING UTF-8 TYPE truetype SIZE 8 END STATUS ON TRANSPARENT ON END SIZE 800 800 OUTPUTFORMAT NAME PNG24 DRIVER AGG/PNG IMAGEMODE RGB END WEB METADATA wms_encoding UTF-8 wms_title Mapserver WMS wms_abstract wms_srs EPSG:4326 wms_onlineresource http://localhost:9000/cgi-bin/mapserv.exe?map=E%3A%5Cms4w%5Capps%5Cdemo-cv%5CdemoCV.map; ows_enable_request * wms_feature_info_mime_type text/html END END PROJECTION init=epsg:4326 END LAYER NAME COMACOM.SHP STATUS ON DUMP true TEMPLATE templates/provincias.html TYPE POLYGON DATA E:\COMACOM.SHP MAXSCALE -1.0 MINSCALE -1.0 TRANSPARENCY 100 SIZEUNITS pixels PROJECTION init=epsg:4326 END CLASS STYLE COLOR 104 108 2 OUTLINECOLOR 72 75 1 WIDTH 1 END NAME default END METADATA wms_title COMACOM.SHP wms_abstract generated by gvSIG wms_extent 626679.4375 4191039.75 797868.9375 4519379.0 gml_include_items all ows_enable_request * END END # Layer END # Map File ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] ticket for 'trimlast'?
Steve Lime has narrowed this bug down to the parsing of single quotes in template tags. The trimlast functionality will work if you use double quotes on the character to be trimmed. e.g. This works: [feature trimlast=,] This doesn't: [feature trimlast=','] I will file a ticket for a change in the documentation at: http://mapserver.org/output/template_output.html David. -Original Message- From: Puneet Kishor [mailto:punk.k...@gmail.com] Sent: Thursday, October 20, 2011 4:15 PM To: Fawcett, David (MPCA) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] ticket for 'trimlast'? On Oct 20, 2011, at 4:06 PM, Fawcett, David (MPCA) wrote: I also can't get trimlast=',' to remove the trailing comma in a json formatted query result. [resultset layer=stations] { stations: [ [feature trimlast=','] { name: [NAME], stationId: [STATION_ID }, [/feature] ] } [/resultset] http://lists.osgeo.org/pipermail/mapserver-users/2011-September/070298.html I searched for a trac ticket, but didn't see one. I will file one if someone can confirm that this is still a real issue and that a ticket doesn't exist. I can confirm that I experienced it as well. -- Puneet Kishor ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Attribute query at geographic coordinate
If you didn't need to use WFS and just wanted to do MapServer queries, you could put together a template that would build you a list. Take a look at the examples on this page: http://mapserver.org/output/template_output.html The JSON example is probably the most applicable. Like others have mentioned, 500 data layers won't be efficient, so you may want to explore other data organization ideas. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Robert Sanson Sent: Sunday, November 13, 2011 6:34 PM To: mapserver-users@lists.osgeo.org; Peter Weilandt Subject: Re: [mapserver-users] Attribute query at geographic coordinate Hi Peter You will have to write some of the server-side code for saving the results into a list, but the spatial query is called a GetFeatureInfo request, which is part of the WMS spec, which Mapserver can do well. Here is the format of a request: http://myserver/cgi-bin/mapserve.exe?service=WMSversion=1.1.1request=GetFeatureInfoLAYERS=mapsheetQUERY_LAYERS=mapsheetINFO_FORMAT=text/plainSRS=EPSG:27200BBOX=2435500,5843425,2437500,5845425WIDTH=256HEIGHT=256X=128Y=128 Kind regards, Robert Sanson Peter Weilandt peterweila...@shaw.ca 14/11/2011 1:07 p.m. I stumbled across MapServer in my search for a tool to use in a website. I want to develop a website that will use a coordinate (lat long), which is easily obtained from a user on the client side by clicking on a Google map, and then transferring this coordinate to the server side where it will be used to sequentially query many (500+) shapefile polygon layers, extracting the values from 2 fields from each layer at this coordinate, saving these values in a list (Excel, textfile?), and then using this list to return values to the user on the client side. This sounds simple in concept, but is MapServer a tool that can accomplish this and, if so, are there any examples showing the code to use for such a query? This email and any attachments are confidential and intended solely for the addressee(s). If you are not the intended recipient, please notify us immediately and then delete this email from your system. This message has been scanned for Malware and Viruses by Websense Hosted Security. www.websense.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] subsetted output, but I don't want that
Is the raster georeferenced? It kind of sounds like it is using pixel coordinates instead of coordinates from a spatial reference system. What do you get if you run gdalinfo on the image file? David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of kablukiw Sent: Wednesday, November 09, 2011 1:33 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] subsetted output, but I don't want that I am new to mapserver and am experiencing difficulty with the output being generated by mapserv.exe (using OSGeo4W). The output I am getting is showing a subset of the original image even though I am not specifying any extents that would indicate I want anything other than the full image. The source file is a global image 1440x720 and the output I get is also 1440x720 but is showing only the bottom left 180x90 pixels of the source image resized to 720x360 and placed in the upper right of the output image. http://osgeo-org.1803224.n2.nabble.com/file/n6979235/test.png example output It seems as if the EXTENT is affecting the extent of the output but I'm not sure how. I am currently testing this from the cmd line with the following (I have seen the same issue when testing this mapfile with OpenLayers): mapserv.exe -nh QUERY_STRING=map=c:/OSGeo4W/apache/htdocs/kevin/lst.mapmode=map test.png My map file: MAP NAME LST SIZE 1440 720 EXTENT -180 -90 180 90 UNITS DD SHAPEPATH c:/OSGeo4W/apache/htdocs/kevin/ IMAGECOLOR 255 255 255 IMAGETYPE PNG STATUS ON DEBUG ON LAYER NAME LST TYPE RASTER STATUS DEFAULT DATA lst_1440.png OFFSITE 0 0 0 END # LAYER END # MAP Any suggestions would be greatly appreciated. Thanks, Kevin -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/subsetted-output-but-I-don-t-want-that-tp6979235p6979235.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] subsetted output, but I don't want that
Kevin, You could create a world file. Here is a reference for the world file format: http://www.gdal.org/frmt_various.html#WLD According to the gdal docs, a world file with an extension of .pgw, .pngw, or .wld will be read. http://www.gdal.org/frmt_various.html#PNG As an example, the world file associated with this global raster from Natural Earth II http://www.naturalearthdata.com/downloads/50m-natural-earth-2/50m-natural-earth-ii-with-shaded-relief-and-water/ Contains the below text: 0.03 0.00 0.00 -0.03 -179.98 89.98 David. -Original Message- From: Kevin Ward [mailto:kablu...@gmail.com] Sent: Wednesday, November 09, 2011 1:47 PM To: Fawcett, David (MPCA) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] subsetted output, but I don't want that No, it's just a plain PNG. I was operating under the assumption that the EXTENT and UNITS parameters in the mapfile would define the coordinates of the source image but perhaps that is only constraining the output? If that is the case, how can I go about providing georeference for an image such as that? Kevin On Wed, Nov 9, 2011 at 11:35 AM, Fawcett, David (MPCA) david.fawc...@state.mn.us wrote: Is the raster georeferenced? It kind of sounds like it is using pixel coordinates instead of coordinates from a spatial reference system. What do you get if you run gdalinfo on the image file? David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of kablukiw Sent: Wednesday, November 09, 2011 1:33 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] subsetted output, but I don't want that I am new to mapserver and am experiencing difficulty with the output being generated by mapserv.exe (using OSGeo4W). The output I am getting is showing a subset of the original image even though I am not specifying any extents that would indicate I want anything other than the full image. The source file is a global image 1440x720 and the output I get is also 1440x720 but is showing only the bottom left 180x90 pixels of the source image resized to 720x360 and placed in the upper right of the output image. http://osgeo-org.1803224.n2.nabble.com/file/n6979235/test.png example output It seems as if the EXTENT is affecting the extent of the output but I'm not sure how. I am currently testing this from the cmd line with the following (I have seen the same issue when testing this mapfile with OpenLayers): mapserv.exe -nh QUERY_STRING=map=c:/OSGeo4W/apache/htdocs/kevin/lst.mapmode=map test.png My map file: MAP NAME LST SIZE 1440 720 EXTENT -180 -90 180 90 UNITS DD SHAPEPATH c:/OSGeo4W/apache/htdocs/kevin/ IMAGECOLOR 255 255 255 IMAGETYPE PNG STATUS ON DEBUG ON LAYER NAME LST TYPE RASTER STATUS DEFAULT DATA lst_1440.png OFFSITE 0 0 0 END # LAYER END # MAP Any suggestions would be greatly appreciated. Thanks, Kevin -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/subsetted-output-but-I-don-t-want-that-tp6979235p6979235.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] subsetted output, but I don't want that
In MapServer, if you set a MAP level projection and extent and don't specify a projection for a layer, MapServer assumes that the layer has the same projection as the MAP. David. -Original Message- From: Kevin Ward [mailto:kablu...@gmail.com] Sent: Wednesday, November 09, 2011 1:47 PM To: Fawcett, David (MPCA) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] subsetted output, but I don't want that No, it's just a plain PNG. I was operating under the assumption that the EXTENT and UNITS parameters in the mapfile would define the coordinates of the source image but perhaps that is only constraining the output? If that is the case, how can I go about providing georeference for an image such as that? Kevin ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] OpenLayers JSONP getFeatureInfo
I posted a similar question to the OpenLayers list, but know that there isn't complete overlap. Can anyone point me to an example that uses JSONP to get around the same origin policy when making a getFeatureInfo request from OpenLayers to MapServer? Is it possible? Thanks, David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] default values if not provided in the URL
Two hackish thoughts: 1. Utilize a pair of mapfiles. The first one has all of the classes on by default. The second one has all of the class with STATUS OFF. On the client side, you determine if you have any class args and route the request to the appropriate mapfile. If the client has a request with class args, you append one of these for each class 'map.layer[0].class[3]=status on' (specifying the correct layer and class index values) If you only had a few classes, you could easily manage this with one mapfile (without running up against the character limits on GET requests) 2. What are you really trying to do? It seem like classes are for selecting and symbolizing/formatting data for output. Do you really want to filter out the data using a filter at the layer level. If you can avoid running all of your data through the expressions for each class, it should perform better too. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Puneet Kishor Sent: Thursday, October 27, 2011 10:50 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] default values if not provided in the URL the fine manual says http://mapserver.org/cgi/runsub.html Since version 5.6, you can provide a default value for any substitution parameter, that will be applied if the parameter was not found in the url. You do this by providing special entries inside the layer metadata : METADATA 'default_sound' 'yes' 'default_nseats' '5' 'default_multimedia' 'yes' END In this example, the mapfile will be created as if the url contained sound=yesnseats=5multimedia=yes Right then. Except, I want *all* my classes to be drawn if no class has been provided. And, if one or more classes have been provided, then I want only those to be drawn. So, http://server/mapfile?mode=map should return a map with all the 100+ classes in a layer. And http://server/mapfile?mode=mapclasses=Foo,Bar (or some other variation of the above) should return a map with only the requested classes in the layer. I can't think of anyway of doing the above without resorting to scripting, and I still have had no luck with WMS returned from Perl MapScripting. Suggestions. -- Puneet Kishor___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] MS template file extensions
At the same time, I don't believe that a template will get handed off to the php, java, etc. engine after processing by MapServer. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Puneet Kishor Sent: Wednesday, October 26, 2011 8:48 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] MS template file extensions On Oct 26, 2011, at 8:33 AM, ni...@maich.gr wrote: Hello, Is there a way to allow ms templates with an arbitrary file extension? I see support in the template doc's for html, xml, jso... WHat if someone wanted to use a jsp page a php page or a tml page as a template to gain server substitutin as well? I believe there is no restriction (I use .mtt for map server template). You can choose whatever extension you like, or even have no extension if you wish. -- Puneet Kishor ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] qlayer for multiple layers
I know that this is a simple question, but I can't find any confirmation. If I want to do a point query on multiple layers, I know that I can set all layer STATUS to DEFAULT. Is it possible to query some of the layers (status=ON) by identifying them in the URL. For example, something like qlayer=layer1,layer2 or qlayerS=layer1+layer2? I would like to be able to select a combination of layers ad hoc. Thanks, David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] ticket for 'trimlast'?
I also can't get trimlast=',' to remove the trailing comma in a json formatted query result. [resultset layer=stations] { stations: [ [feature trimlast=','] { name: [NAME], stationId: [STATION_ID }, [/feature] ] } [/resultset] http://lists.osgeo.org/pipermail/mapserver-users/2011-September/070298.html I searched for a trac ticket, but didn't see one. I will file one if someone can confirm that this is still a real issue and that a ticket doesn't exist. David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Chart Layers
I am guessing that this person is looking at layers of TYPE CHART. http://mapserver.org/output/dynamic_charting.html#dynamic-charting I don't see any discussion of querying CHART layers in the above URL or in the section on TYPE in the LAYER docs: http://mapserver.org/mapfile/layer.html David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jeff McKenna Sent: Friday, October 14, 2011 7:11 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Chart Layers On 11-10-13 6:29 PM, Eric Weisbender wrote: Is it possible to label and query a chart layer. If so how and is there documentation on this. Thanks EW You can find s57 display notes for MapServer at: http://www.mapserver.org/input/vector/S57.html -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] gradient display of raster DEM data
John, Take a look at the gdaldem utility. http://www.gdal.org/gdaldem.html You likely already have it on your machine already. Aside from being able to generate data products like slope grids, it can produce hillshade images or color relief maps. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of John Callahan Sent: Friday, October 14, 2011 3:56 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] gradient display of raster DEM data I know this has been asked before but I thought I'd ask to see if anything changed. I'm looking to display a raster digital elevation model in mapserver. My data is in flat files, img and tiff. I'd like to display this data as a continuous gradient color range, rather than using CLASS categories/bins for specific colors. Is it still tru ethat this is not possible, easily? One method (passed to me on this list) was too generate the colored image I want in another program, using GMT or similar tool, then use that in mapserver. This seems like the best option but is non-trivial to someone who hasn't done this before. (though not terribly difficult.) I also read about the use of DATARANGE and COLORRANGE in mapserver. However, these are not in the documentation. Are these available in trunk only? A ticket was generated that seems to say this will be included with MS 6.2. (http://trac.osgeo.org/mapserver/ticket/1305) Any insight on whether this is still the plan? Thanks for your help and advice. - John *** John Callahan, Research Scientist Delaware Geological Survey, University of Delaware URL: http://www.dgs.udel.edu * ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Expressions on Cluster Objects
I have been playing around with the new cluster functionality a little bit. I am looking for way to classify the clusters based on their feature counts. E.g. larger circles for clusters of 10 features and even larger circles for clusters of 100 features. Because Cluster:FeatureCount returns a string, the below expression can evaluate to True for values like 109 ([Cluster:FeatureCount] 11) Does anyone have any suggestions? Maybe I am just misusing Clusters... Thanks, David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Expressions on Cluster Objects
Thanks Tamas. Here is the layer snippet: LAYER NAME sites STATUS default DATA 'sites' TYPE POINT CLUSTER MAXDISTANCE 50 REGION ellipse END LABELITEM Cluster:FeatureCount CLASS NAME small EXPRESSION ([Cluster:FeatureCount] 11) STYLE COLOR 255 0 0 SYMBOL circle SIZE 20 END LABEL FONT arial TYPE TRUETYPE SIZE 8 COLOR 255 255 255 END END CLASS NAME medium EXPRESSION ([Cluster:FeatureCount] 100) STYLE COLOR 255 0 0 SYMBOL circle SIZE 35 END LABEL FONT arial TYPE TRUETYPE SIZE 8 COLOR 255 255 255 END END CLASS NAME large STYLE COLOR 255 0 0 SYMBOL circle SIZE 50 END LABEL FONT arial TYPE TRUETYPE SIZE 8 COLOR 255 255 255 END END END From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Tamas Szekeres Sent: Wednesday, October 12, 2011 2:53 PM To: Fawcett, David (MPCA) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Expressions on Cluster Objects David, I think that option should indeed work in the class expressions. Do you have a more complete example (map file)? Best regards, Tamas 2011/10/12 Fawcett, David (MPCA) david.fawc...@state.mn.usmailto:david.fawc...@state.mn.us I have been playing around with the new cluster functionality a little bit. I am looking for way to classify the clusters based on their feature counts. E.g. larger circles for clusters of 10 features and even larger circles for clusters of 100 features. Because Cluster:FeatureCount returns a string, the below expression can evaluate to True for values like 109 ([Cluster:FeatureCount] 11) Does anyone have any suggestions? Maybe I am just misusing Clusters... Thanks, David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Using a Symbol instead of text for a label
Matt, I haven't fully thought it through, but maybe the new Cluster functionality might work for this. You could have a generic park symbol for the cluster symbol. http://mapserver.org/mapfile/cluster.html David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Matt McClelland Sent: Tuesday, September 27, 2011 6:15 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Using a Symbol instead of text for a label Hi I have a bunch of symbols that overlap on a map. EG at a park where I want to show an symbol for playground, toilet and picnic tables. The data for each of these items are individual point data items. I would like to ask mapserver, very kindly, to 'tile' nearby symbols into a group OR Use the main symbol like a label. So that I could have a dot where the play equipment is, then nearby have the symbol for the play equipment. This is obviously very easy to do with text, but is it possible with a symbol?? I have tried this CLASS EXPRESSION /play|playground/ NAME Children's Playground STYLE SYMBOL 'waypoint' color 255 0 0 SIZE 5 END LABEL STYLE SYMBOL '/var/www/osm/kml/icons/play.png' Size 10 END ...text styleing info END END I get my 'waypoint' dot and the play.png in the same location. I would like the play.png to be positioned AUTO like I can with text. Any ideas?? Thanks Matt :) ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] File Geodatabase - Feature Dataset
Craig, Do you have an instance of OGR that can read ESRI's proprietary File Geodatabase format? David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Craig Anderson Sent: Friday, September 23, 2011 9:52 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] File Geodatabase - Feature Dataset I have MANY ArcGIS 10 File Geodatabases whose data is organized into Feature Datasets and I'd liketo be able to serve them upo as WMS/WFS services using Mapserver: How do I path to these vector data that are stored in feature datasets? Niether of these work: CONNECTIONTYPE OGR CONNECTION ../data/HillsboroughBase.gdb/Cadastral DATA Parcels or CONNECTIONTYPE OGR CONNECTION ../data/HillsboroughBase.gdb DATA Cadastral/Parcels Any help would be appreciated. Craig -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/File-Geodatabase-Feature-Dataset-tp6824494p6824494.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Re: passing values to mapfile
http://mapserver.org/mapfile/class.html?highlight=validation You need to set up a validation block with an expression that will match the value of the variable that you are passing through the GET request. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of jjwang Sent: Wednesday, September 21, 2011 2:17 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Re: passing values to mapfile I think I found out the problem. It seems not see the value in the url at all. Because if I give it a default value. The default value will work. But I still don't know why and how to solve it. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6815106.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Image Pyramid with gdal_retile and two UTM zones
The problem is that both images are showing up in the same UTM Zone. A quick glance at the gdal_retile.py doc page indicates that all of the input tiles need to be in the same spatial reference system. http://www.gdal.org/gdal_retile.html I assume that you could reproject one of your tiles into the adjacent UTM Zone and then run gdal_retile, but I don't know if that would cause any distortion. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of aphunter Sent: Tuesday, September 20, 2011 11:11 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Image Pyramid with gdal_retile and two UTM zones Hello. I have a large raster mosaic and it is currently split into two zones. UTM 10N and UTM 11N (Northern and Southern California). Currently, when I use gdal_retile, the two zones sit next to each other. Is there some way I can tile things so that the zones are on top of each other, and the state looks complete? http://osgeo-org.1803224.n2.nabble.com/file/n6812832/noalpha_m_3211401_ne_11_1_20090525_1_1.png -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812832.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] RE: Image Pyramid with gdal_retile and two UTM zones
For performance, you will want the imagery pre-warped into one spatial reference system. (The same SRS as your output SRS.) I don't know if you will want the output SRS to be one of the two UTM Zones, or if you want to choose a different SRS. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of aphunter Sent: Tuesday, September 20, 2011 11:41 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] RE: Image Pyramid with gdal_retile and two UTM zones Thanks for the reply. Would it make more sense to create two pyramids and then show two layers at the same time in mapserver? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812947.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] MapScript WMS request
Puneet, As far as I know, OpenLayers still has support for a layer based on MapServer CGI. Because MapServer can also serve up WMS well, this layer type isn't necessarily recommended or as well supported. http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet Kishor Sent: Thursday, September 08, 2011 9:32 PM To: Daniel Morissette Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] MapScript WMS request On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote: On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: Maybe call $map-save(/tmp/my.map) in your script after the map and layer have been populated and paste the result... that may give us a hint... wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. I was able to reproduce the issue with the copy of the mapfile you sent off-list. It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to always return {minx = -2500, miny = -2500, maxx = 2500, maxy = 2500} ...and then it returns MS_SUCCESS. I think this function should either be left unimplemented (this way MapServer would fallback on other mechanisms), or return MS_FAILURE to indicate to the calling code that it didn't do anything useful. A quick search indicates an open ticket about the issue: http://trac.osgeo.org/mapserver/ticket/3585 You could bump the ticket and hope someone works on it at the FOSS4G code sprint next week. The short term fix for you would be to set the ows_extent metadata in your layer: METADATA ows_extent -180 -90 180 90 ... END Thanks Daniel. I will bump the ticket. For now, see below -- Using the my.map file I sent you, with no further modifications to it, I am able to successfully get an image back via [http://localhost.local/cgi-bin/gmna?SERVICE=WMSVERSION=1.1.1REQUEST=GetMapBBOX=-180,-90,180,90SRS=EPSG:4326WIDTH=1200HEIGHT=600LAYERS=gmnaSTYLES=FORMAT=image/pngTRANSPARENT=true] Note, no further modifications is required, that is, not even the ows_extent -180 -90 180 90 bit in the layer METADATA. and I still get a good image. However, if I use the following program to access the same map file, I get the spurious minx = -2500, miny = -2500, maxx = 2500, maxy = 2500 in the GetCapabilities. Finally, if I add the ows_extent -180 -90 180 90 line in the layer METADATA in the my.map file, the GetCapabilities returns the correct bounds now, however, the image is still blank. #!/opt/local/bin/perl use strict; use mapscript; my $wms = new mapscript::OWSRequest(); $wms-setParameter(SERVICE, WMS ); $wms-setParameter(VERSION, 1.1.1 ); $wms-setParameter(REQUEST, GetMap ); $wms-setParameter(BBOX, -180,-90,180,90 ); $wms-setParameter(LAYERS, gmna); $wms-setParameter(SRS, EPSG:4326); $wms-setParameter(WIDTH, 1200); $wms-setParameter(HEIGHT, 600); $wms-setParameter(FORMAT, image/png); $wms-setParameter(TRANSPARENT, true); my $map = new mapscript::mapObj(/Users/punkish/Sites/test/mapscript/my.map); if(!$map) { warn New mapObj() error: $mapscript::ms_error-{message}\n; } my $io = mapscript::msIO_installStdoutToBuffer(); my $dispatch_out = $map-OWSDispatch( $wms ); printf %s\n, mapscript::msIO_getStdoutBufferString(); I have now spent an enormous amount of time on this, and for now, I have to move on. This is just not working out. Maybe I will try some other technique, perhaps this mode=tile to see if I can get MapServer powered maps in my apps. Thanks much for your help. If you (or anyone else) can come up with a bright idea, I will be happy to try it. Puneet. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] MapScript WMS request
Puneet, Using MapServer CGI and layer.MapServer would not set you up well for other client libraries, so I see your point. It can be viable though. In this app (just an imagemap, not OL), there are no attribute values associated with the spatial data. The classes are generated on-the-fly and the county id's for each class are passed in as URL vars. Same thing for the legend. This allows flexibility for compounds who's emissions may vary from tens of pounds to millions of pounds. This approach may not work for your case, but it is another way to slice it... http://www.pca.state.mn.us/index.php/topics/environmental-data/eda-environmental-data-access/eda-air-quality-searches/eda-air-quality-search-emissions-by-county-data.html David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet Kishor Sent: Friday, September 09, 2011 9:35 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] MapScript WMS request On Sep 9, 2011, at 8:39 AM, Fawcett, David (MPCA) wrote: Puneet, As far as I know, OpenLayers still has support for a layer based on MapServer CGI. Because MapServer can also serve up WMS well, this layer type isn't necessarily recommended or as well supported. http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html Indeed David. Because, going by the docs, the MapServer CGI calls are discouraged (or so it seems), I'd rather not invest in that path. This is a long term project that I am working on, so the foundations have to be very robust. Besides, I may or may not use OL. While I like OL a lot, I am also looking at other frameworks (Gmaps, Leaflet, Polymaps), and it would be wise to decouple the backend from the front-end as much as possible. I have no issues with using WMS, but I just am unable to get MapServer WMS to work via MapScript. And, yes, I do have to use MapScript if I can help it -- my layer classification is generated on demand, and MapScript is the easiest way I can think of for doing that. I did find yesterday that `mode=tile` works really well, but I am trying to make that work with MapScript. A separate email thread for that question. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet Kishor Sent: Thursday, September 08, 2011 9:32 PM To: Daniel Morissette Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] MapScript WMS request On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote: On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: Maybe call $map-save(/tmp/my.map) in your script after the map and layer have been populated and paste the result... that may give us a hint... wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. I was able to reproduce the issue with the copy of the mapfile you sent off-list. It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to always return {minx = -2500, miny = -2500, maxx = 2500, maxy = 2500} ...and then it returns MS_SUCCESS. I think this function should either be left unimplemented (this way MapServer would fallback on other mechanisms), or return MS_FAILURE to indicate to the calling code that it didn't do anything useful. A quick search indicates an open ticket about the issue: http://trac.osgeo.org/mapserver/ticket/3585 You could bump the ticket and hope someone works on it at the FOSS4G code sprint next week. The short term fix for you would be to set the ows_extent metadata in your layer: METADATA ows_extent -180 -90 180 90 ... END Thanks Daniel. I will bump the ticket. For now, see below -- Using the my.map file I sent you, with no further modifications to it, I am able to successfully get an image back via [http://localhost.local/cgi-bin/gmna?SERVICE=WMSVERSION=1.1.1REQUEST=GetMapBBOX=-180,-90,180,90SRS=EPSG:4326WIDTH=1200HEIGHT=600LAYERS=gmnaSTYLES=FORMAT=image/pngTRANSPARENT=true] Note, no further modifications is required, that is, not even the ows_extent -180 -90 180 90 bit in the layer METADATA. and I still get a good image. However, if I use the following program to access the same map file, I get the spurious minx = -2500, miny = -2500, maxx = 2500, maxy = 2500 in the GetCapabilities. Finally, if I add the ows_extent -180 -90 180 90 line in the layer METADATA in the my.map file, the GetCapabilities returns the correct bounds now, however, the image is still blank. #!/opt/local/bin/perl use strict; use mapscript; my $wms = new mapscript::OWSRequest(); $wms-setParameter(SERVICE, WMS ); $wms
RE: [mapserver-users] MapScript WMS request
DNS issue, should be fixed by Monday... ; (' -Original Message- From: Mr. Puneet Kishor [mailto:punk.k...@gmail.com] Sent: Friday, September 09, 2011 10:00 AM To: Fawcett, David (MPCA) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] MapScript WMS request David, On Sep 9, 2011, at 9:47 AM, Fawcett, David (MPCA) wrote: Puneet, Using MapServer CGI and layer.MapServer would not set you up well for other client libraries, so I see your point. It can be viable though. In this app (just an imagemap, not OL), there are no attribute values associated with the spatial data. The classes are generated on-the-fly and the county id's for each class are passed in as URL vars. Same thing for the legend. This allows flexibility for compounds who's emissions may vary from tens of pounds to millions of pounds. This approach may not work for your case, but it is another way to slice it... Possibly. See, it is crucially important for me to be able to generate classes on the fly, and with a lot of flexibility. Not just that, the criteria for generating the classes can change. So, what I am doing actually is setting up a separate application that does nothing but respond with class information. The mapping application (and, any other application, for that matter), would query this class generating application and make the classes as per the latest information. Hence, my need for MapScripting. Well, there are other reasons as well, but this is an important one. http://www.pca.state.mn.us/index.php/topics/environmental-data/eda-environmental-data-access/eda-air-quality-searches/eda-air-quality-search-emissions-by-county-data.html By the way, the app above is not working. I get broken images, and the following errors in the web inspector (that might help you troubleshoot) GET http://www.pca.state.mn.us/oea/css/master.css 404 (Not Found) emissions.cfm:28 ReferenceError: Can't find variable: urchinTracker GET http://maps.pca.state.mn.us/cgi-bin/mapserv? ..snipped.. A server with the specified hostname could not be found. GET http://maps.pca.state.mn.us/cgi-bin/mapserv? ..snipped.. A server with the specified hostname could not be found. GET http://cf.pca.state.mn.us/data/edaAir/artwork/edaP2results_edaAmbientResultsPollutantsJuly_04.gif 404 (Not Found) master-print.cssGET http://www.pca.state.mn.us/oea/css/master-print.css 404 (Not Found) David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet Kishor Sent: Friday, September 09, 2011 9:35 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] MapScript WMS request On Sep 9, 2011, at 8:39 AM, Fawcett, David (MPCA) wrote: Puneet, As far as I know, OpenLayers still has support for a layer based on MapServer CGI. Because MapServer can also serve up WMS well, this layer type isn't necessarily recommended or as well supported. http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html Indeed David. Because, going by the docs, the MapServer CGI calls are discouraged (or so it seems), I'd rather not invest in that path. This is a long term project that I am working on, so the foundations have to be very robust. Besides, I may or may not use OL. While I like OL a lot, I am also looking at other frameworks (Gmaps, Leaflet, Polymaps), and it would be wise to decouple the backend from the front-end as much as possible. I have no issues with using WMS, but I just am unable to get MapServer WMS to work via MapScript. And, yes, I do have to use MapScript if I can help it -- my layer classification is generated on demand, and MapScript is the easiest way I can think of for doing that. I did find yesterday that `mode=tile` works really well, but I am trying to make that work with MapScript. A separate email thread for that question. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet Kishor Sent: Thursday, September 08, 2011 9:32 PM To: Daniel Morissette Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] MapScript WMS request On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote: On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: Maybe call $map-save(/tmp/my.map) in your script after the map and layer have been populated and paste the result... that may give us a hint... wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. I was able to reproduce the issue with the copy of the mapfile you sent off-list. It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to always return {minx = -2500, miny
RE: [mapserver-users] how to define the CLASSITEM and EXPRESSION in this case?
Have you looked at this page in the documentation? http://mapserver.org/mapfile/expressions.html#arithmetic-operations-and-functions-that-return-a-number You should be able to do this. You wouldn't use a CLASSITEM, just an expression. Create individual classes for green, yellow, and red. The expression for green would be something like: EXPRESSION ([PopulationOver65] / [PopulationTotal] * 100 10) David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of jjwang Sent: Thursday, September 08, 2011 12:47 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] how to define the CLASSITEM and EXPRESSION in this case? I want to define classes according to the proportion between two attributes of the feature. How to do this? For example: feature has two attributes 'PopulationOver65' and 'PopulationTotal'. They are both numbers. I want the color of this feature: green if PopulationOver65/PopulationTotal 10%, yellow if 10% -30%, red if 30%. Anyway to do this? JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-define-the-CLASSITEM-and-EXPRESSION-in-this-case-tp6770598p6770598.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Map size question?
Chris, If you are in tile mode, I assume that you probably don't want an embedded legend on each tile. Have you thought about doing a separate call/request/object for the legend? If you were doing this via CGI, I would recommend doing a separate mode=legend request. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Green Sent: Thursday, August 18, 2011 12:04 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Map size question? After quite a while thinking I could not produce a legend I have realised that the legend is actually there, just off the edge of my map. Now I see that although my map file specifies a map size of 640 x 480 pixels, if in single tile mode the map image being produced is actually 1110 x 660 pixels. Alternatively with multiple tiles I get 12 tiles of 250 x 250 pixels which is 1024 x 768 pixels. It seems that the size parameter in the map file is being ignored (even setting the values to 0 0 or omitting the SIZE parameter altogether makes no difference). MAXSIZE doesn't seem to help either. I can't find a way to get the image size that I want, can anyone help? Chris From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Green Sent: 18 August 2011 08:02 To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] mapsript legend Hi all I have a map created via Mapscript under Mapserver 6.0 but I can't find a way to add a legend. Recent examples are hard to find but I found the following dating from 2002 which seemed simple enough: $legend = $map-legend; $legend-set(width,40); $legend-set(height,100); $legend-imagecolor-setRGB(240,220,200); # tan $legend-outlinecolor-setRGB(1,1,1); # black $legend-set(status, MS_EMBED); $legend-set(position, MS_UL); // SET LEGEND LABEL PROPERTIES $lg_label = $legend-label; $lg_label-set(font, arial); $lg_label-set(type, MS_TRUETYPE); $lg_label-set(size, 10); $lg_label-set(minsize, 6); $lg_label-set(maxsize, 12); $lg_label-color-setRGB(100,100,100); $legend-set(postlabelcache, MS_TRUE); // DRAW LEGEND $legendImage=$map-drawLegend(); Unfortunately this produces no output. Can anyone give me any clues why? Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] free multilayer GIS data
For data at a smaller scale, you may also want to look at the Natural Earth data sets. Raster and vector, clean data, with attributes, liberal (Public Domain) license. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Wim Vanbelle Sent: Wednesday, August 17, 2011 7:25 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] free multilayer GIS data I'd start here: http://downloads.cloudmade.com/ And then look for additional data in the OpenStreetMap project. On top of those, googling around for 'open data' also comes up with a lot of info :). On 17 August 2011 12:55, Esmin Gracić esmin.gra...@gmail.commailto:esmin.gra...@gmail.com wrote: Hi all, I need to make a presentation on free gis stack (apache phpmapscript pg pgrouting) to some interested party. My question is do you know where I could get some nice free GIS data with multiple layers like roads (to build pgrouting stuff on), houses, objects, gasline, powerline, optical cables, water etc... This is for demo only, so area does not have to more than 1km2. Pointing in right direction, would be helpful, too. Thanks, Esmin. ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] PDF Generation - file suffix?
I don't want to pollute Jukka's thread about large .pdf creation, so I am forking it. The .pdf file generated by his request renders fast and looks nice, but the file doesn't have a .pdf suffix. This confused my browser and didn't automatically associate the file with Acrobat Reader. This isn't a huge issue for me as a user, but if I am developing something for a more general audience, it will be a problem. Is there a way to ensure that the generated .pdf has the correct file suffix? http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=864HEIGHT=662LAYERS=defaultTRANSPARENT=TRUEFORMAT=application/x-pdfBBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395SRS=EPSG:2393STYLES= David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Web application error. Malformed template name
Dara, Can you share the part of your mapfile that describes this layer? David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Dara Olson Sent: Tuesday, August 16, 2011 9:01 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Web application error. Malformed template name Good morning. I am having some problems identifying a layer through MapServer and I seem to be stuck. I have a flat table of harvest by waterbody by year by individual in PostgreSQL/PostGIS. I created a temporary view of the sum harvested by waterbody by year and joined in geometry which I then made into a crosstab so that each lake would be listed and columns across with harvest by year. It draws successfully in my web mapping application (and view looks fine in postgres), but when I try to use the Identify feature on the website (Mapserver GET URL request) I get the following error in MapServer, [Fri Aug 12 09:57:33 2011].687000 msReturnPage(): Web application error. Malformed template name (). [Fri Aug 12 09:57:33 2011].703000 msQueryByPoint(): Search returned no results. No matching record(s) found. Before doing the crosstab I was getting this error, but I assumed that it didn't like the multiple records linked to the same geometry and that's why I did the crosstab. But still nothing works. Does anyone have any idea of where to begin to debug? Any help would be greatly appreciated. Thanks! Dara Olson, GLIFWC ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Web application error. Malformed template name
Dara, I am pretty sure that relative paths work for templates, but for testing purposes, try using the absolute path to the template. David. From: Dara Olson [mailto:dol...@glifwc.org] Sent: Tuesday, August 16, 2011 10:03 AM To: Fawcett, David (MPCA); mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Web application error. Malformed template name It is below. I am running a web mapping site with GeoMoose(2.0) and MapServer(5.2.1), but I can't seem to find a way to figure out what I am doing wrong or why I am ending up with the error. Any help would be greatly appreciated. Miigwech! Dara MAP SIZE 1920 1920 MAXSIZE 1 EXTENT -20614760.777156 1751325.1919492 -1927436.1053437 7915207.1517617 UNITS meters SYMBOLSET ..\symbols\glifwc_symbol.sym FONTSET ..\fonts\fonts.list CONFIG MS_ERRORFILE d:/Logs/Mapserver/MapServerDEVELSITE.log OUTPUTFORMAT NAME 'agg/png' DRIVER AGG/PNG IMAGEMODE RGBA FORMATOPTION TRANSPARENT=TRUE END IMAGETYPE AGG/PNG TRANSPARENT ON IMAGECOLOR -1 -1 -1 DEBUG 3 ### LEGEND ### LEGEND STATUS on TRANSPARENT on END ### Map projection ### PROJECTION init=epsg:900913 END ### LAYERS ### LAYER # MN Ogaa Harvest LBS NAME mn_ogaa_harvest_lbs TYPE POLYGON CONNECTIONTYPE postgis CONNECTION host=zzz user=zz password=zz dbname=zz PROCESSING CLOSE_CONNECTION=DEFER DATA the_geom900913 from inland.mn_ogaa_harvest_lbs_spatial using unique new_id using srid=900913 PROJECTION init=epsg:900913 END METADATA wms_title MN Ogaa Harvest Lakes END CLASS NAME MN Ogaa Harvest Lakes STYLE SYMBOL 0 SIZE 6 OUTLINECOLOR -1 -1 -1 COLOR 182 177 145 END TEMPLATE ../identify/ogaa_harvest/mn_ogaa_harvest_lbs_identify.html END END # MN Ogaa Harvest LBS END #map file My HTML identify template used to display results is, !-- MapServer Template-- tbody tr th colspan=2MN Ogaa Harvest in Pounds/th /tr tr td align=leftLake:/td td[lake]/td /tr tr td align=left2011 Harvest:/td td[_2011_harvest]/td /tr ... /tbody trtd colspan=2hr/td/tr - Original Message - From: Fawcett, David (MPCA)mailto:david.fawc...@state.mn.us To: Dara Olsonmailto:dol...@glifwc.org ; mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Sent: Tuesday, August 16, 2011 9:42 AM Subject: RE: [mapserver-users] Web application error. Malformed template name Dara, Can you share the part of your mapfile that describes this layer? David. From: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Dara Olson Sent: Tuesday, August 16, 2011 9:01 AM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: [mapserver-users] Web application error. Malformed template name Good morning. I am having some problems identifying a layer through MapServer and I seem to be stuck. I have a flat table of harvest by waterbody by year by individual in PostgreSQL/PostGIS. I created a temporary view of the sum harvested by waterbody by year and joined in geometry which I then made into a crosstab so that each lake would be listed and columns across with harvest by year. It draws successfully in my web mapping application (and view looks fine in postgres), but when I try to use the Identify feature on the website (Mapserver GET URL request) I get the following error in MapServer, [Fri Aug 12 09:57:33 2011].687000 msReturnPage(): Web application error. Malformed template name (). [Fri Aug 12 09:57:33 2011].703000 msQueryByPoint(): Search returned no results. No matching record(s) found. Before doing the crosstab I was getting this error, but I assumed that it didn't like the multiple records linked to the same geometry and that's why I did the crosstab. But still nothing works. Does anyone have any idea of where to begin to debug? Any help would be greatly appreciated. Thanks! Dara Olson, GLIFWC ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] runtime substitution - class name
Is it still possible to runtime-sub a class name in 6.0.1? I used to do it like this in 4.x: http://myserver/cgi-bin/mapserv?mode=legendmap=mymap.mapmap_basemap_class_0_name=fitger I am trying to do it like this in 6.0.1: http://myserver/cgi-bin/mapserv?mode=mapmap=/web/mymap.mapmap.layer[0].class[1]=NAME+%27fitger%27 I get this error message: loadClass(): Unknown identifier. Parsing error near (NAME):(line 1) I have attempted to use a validation block also, but can't find an example of what key name to use for map objects (e.g. class name) Thanks, David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: runtime substitution - class name
OK, As usual, the best method in debugging is to post to the list and then give it one last try... At 6.X, you can't change the name properties of classes, layers, etc. Steve Lime documents this pretty clearly in this email message: http://lists.osgeo.org/pipermail/mapserver-users/2011-April/068560.html The TITLE property is now accessible though. I had tried this, but not apparently at the same time that I was applying a validation pattern. This URL works: http://myserver/cgi-bin/mapserv?mode=legendmap=mymap.mapmap.layer[0].class[1]=TITLE+%27fitger%27 I have a layer-level validation block. The expression is a little more generous than my test case needs, but fits the real data. VALIDATION 'title' '^[a-zA-Z0-9\, ]+$' END David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Fawcett, David (MPCA) Sent: Tuesday, August 16, 2011 3:05 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] runtime substitution - class name Is it still possible to runtime-sub a class name in 6.0.1? I used to do it like this in 4.x: http://myserver/cgi-bin/mapserv?mode=legendmap=mymap.mapmap_basemap_class_0_name=fitger I am trying to do it like this in 6.0.1: http://myserver/cgi-bin/mapserv?mode=mapmap=/web/mymap.mapmap.layer[0].class[1]=NAME+%27fitger%27 I get this error message: loadClass(): Unknown identifier. Parsing error near (NAME):(line 1) I have attempted to use a validation block also, but can't find an example of what key name to use for map objects (e.g. class name) Thanks, David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] WFS Spatial Filter Problem
Bryan, For testing, I would enable debugging at the MAP or LAYER level. If you set DEBUG 5, I think that you should be able to see the query that MapServer is crafting. More on debugging here: http://mapserver.org/optimization/debugging.html#debugging David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bryan Hempen Sent: Tuesday, August 09, 2011 4:15 AM Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] WFS Spatial Filter Problem Dear Kai and Assefa, After you two guys requested me to send you my setup, I exported the content in the databasetable to a shapefile so you can test it. When I tested the spatial filter right after that, it suddenly worked ! This narrows down the possibilities: - The request I send is definitely not the problem anymore. It works with MapServer + shapefile and with GeoServer. - I exported only the geometries to the shapefile in the table with geometrytype = POLYGON because from ~8000 geometries ~10 are linestrings. So I investigated possible problems with the linestring geometries by telling the MapServer not to serve them using a subquery in the mapfile: DATA the_geom from (select * from alldata where geometrytype(the_geom) = 'POLYGON') as subquery using unique product_id using SRID=4326 Error 500 still occured. Therefore, the data can't be the problem neither, right? - Since I didn't change anything else MapServer must have problems communicating with the PostGIS database, but why Error 500 then? Here is my mapfile: MAP NAME WFS Server STATUS ON SIZE 600 400 SYMBOLSET /var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym EXTENT -180 -90 180 90 UNITS DD SHAPEPATH /var/www/html/psa/bhempen/mapservertest/data/ IMAGECOLOR 255 255 255 FONTSET /var/www/html/psa/bhempen/mapservertest/fonts/fonts.list MAXSIZE 4096 # needs to be set because otherwise an error will appear when rendering images on large screens #IMAGECOLOR 200 200 200 #commented out for WFS PROJECTION 'init=epsg:4326' END WEB TEMPLATE '/var/www/html/psa/bhempen/mapservertest/template.html' IMAGEPATH '/var/www/html/psa/bhempen/tmp/' IMAGEURL '/psa/bhempen/tmp/' METADATA wfs_title WFS Demo Server for MapServer ## REQUIRED wfs_onlineresource http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map;http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map; ## Recommended wfs_srsEPSG:4326 ## Recommended wfs_abstract This text describes my WFS service. ## Recommended END END LAYER NAME omega STATUS DEFAULT TYPE POLYGON METADATA wfs_title omega footprints ##REQUIRED wfs_srs EPSG:4326 ## REQUIRED gml_include_items all ## Optional (serves all attributes for layer) gml_featureid product_id ## REQUIRED END PROJECTION init=epsg:4326 END CONNECTIONTYPE POSTGIS CONNECTION host=localhost port=xxx dbname=xxx user=xxx password=xxx DATA the_geom from alldata using unique product_id using SRID=4326 CLASS STYLE OUTLINECOLOR125 0 0 END END DUMP TRUE ## REQUIRED END # layer END Does anyone see a problem with the setup? Many thanks to Kai and Assefa for the help so far! I am going to send you the shapefile (which you could import into the database with pgsql2shp), the mapfile, and my client. Kind regards, Bryan This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. = ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Plotting points as a line from sqlite database
Ian, Take a look at 2.4.0-RC5 http://www.gaia-gis.it/spatialite-2.4.0-5/spatialite-sql-2.4-5.html#p5 Look under SQL utility functions [non-standard] for geometric objects David. -Original Message- From: Ian Walberg [mailto:ian.walb...@airborne.aero] Sent: Thursday, July 28, 2011 12:41 PM To: Fawcett, David (MPCA); Stephen Woodbridge; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Plotting points as a line from sqlite database Gents, Thanks for these ideas, however I cannot seem to find a MakeLine function in spatialite 2.4.0. Where should I be looking? Thanks Ian -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Fawcett, David (MPCA) Sent: Thursday, June 30, 2011 6:44 AM To: Stephen Woodbridge; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Plotting points as a line from sqlite database ST_MAKELINE() does exist in recent versions of Spatialite. It doesn't appear to have made it in to the docs, but it can be seen in this example from the cookbook. http://www.gaia-gis.it/spatialite-2.4.0-4/spatialite-cookbook/html/pp-ad jacent.html Another example is in this thread from the Spatialite list: http://groups.google.com/group/spatialite-users/browse_thread/thread/002 0f8e907ae9226 You will likely need recent versions of both Spatialite and OGR to make it work. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Wednesday, June 29, 2011 10:49 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Plotting points as a line from sqlite database On 6/29/2011 10:13 PM, Ian Walberg wrote: I hope this isn't too stupid a question. Would like to display a list of positions in an sqlite database as a line, to show the flight path of an aircraft. The data is in the db as Lat, Long and point (lat, long) We can display the positions as individual dots but not as a line, I fear the problem is that the data is a point. As the data is being accumulated we would prefer not to create a new line in the database each time if possible. Any suggestions to what options we have would be appreciated. Hi Ian, In postgis there is an aggregrate function makeline() that you can feed points to. I think there may be an equivalent function in SpatiaLite. In sqlite, you might be able to use a group_concat() something like: select 'LINESTRING('|| group_concat(lat||' '||long, ',') ||')' from points; But I think the issue will be that this is not a format that mapserver understands. You might be able to access this via GDAL/OGR but I'm not sure on that. -Steve W ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] diffferent map image size for different layer
I assume that you could handle it on the client side by adjusting your calls to mapserver based on which layers you have selected. e.g. layer=riversimgsize=200+200 or layer=lakesimgsize=1000+1000 David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of ahmet temiz Sent: Thursday, July 21, 2011 7:05 AM To: mapserver-users Subject: [mapserver-users] diffferent map image size for different layer hello I was wondering if I could use different map image size for different layer. Such as : layer1 size 600*400 layer2 size 1200*800 Is it possible ? regards -- Ahmet Temiz Jeoloji Müh. Afet ve Acil Durum Yönetimi Başkanlığı Planlama ve Zarar Azaltma Dairesi Başkanlığı Bilgi ve CBS grubu Eskişehir Yolu 10. km. Lodumlu / Ankara Tel : 0 312 2872680 / 1535 Ahmet Temiz Geological Eng. Information Systems - GIS Group Disaster and Emergency Management of Presidency ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Plotting points as a line from sqlite database
ST_MAKELINE() does exist in recent versions of Spatialite. It doesn't appear to have made it in to the docs, but it can be seen in this example from the cookbook. http://www.gaia-gis.it/spatialite-2.4.0-4/spatialite-cookbook/html/pp-adjacent.html Another example is in this thread from the Spatialite list: http://groups.google.com/group/spatialite-users/browse_thread/thread/0020f8e907ae9226 You will likely need recent versions of both Spatialite and OGR to make it work. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Wednesday, June 29, 2011 10:49 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Plotting points as a line from sqlite database On 6/29/2011 10:13 PM, Ian Walberg wrote: I hope this isn't too stupid a question. Would like to display a list of positions in an sqlite database as a line, to show the flight path of an aircraft. The data is in the db as Lat, Long and point (lat, long) We can display the positions as individual dots but not as a line, I fear the problem is that the data is a point. As the data is being accumulated we would prefer not to create a new line in the database each time if possible. Any suggestions to what options we have would be appreciated. Hi Ian, In postgis there is an aggregrate function makeline() that you can feed points to. I think there may be an equivalent function in SpatiaLite. In sqlite, you might be able to use a group_concat() something like: select 'LINESTRING('|| group_concat(lat||' '||long, ',') ||')' from points; But I think the issue will be that this is not a format that mapserver understands. You might be able to access this via GDAL/OGR but I'm not sure on that. -Steve W ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Query-wrong results in IE8 if zoomsize is not 100%
This sounds like a client issue, not a MapServer issue. What client are you using? David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Tipatino Sent: Wednesday, June 29, 2011 1:26 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Query-wrong results in IE8 if zoomsize is not 100% Hi folks, a query at a point-shapefile gives unexpected results such as msQueryByPoint(): Search returned no results. No matching record(s) found if the zoom size of the Internet Explorer (8) is different then 100%. It seems like the coordinates you hit are different to the ones the MapServer is processing. This does not occur with Browsers like firefox. Any possibilities to avoid that ? Sorry if this is posted before - I just didn't find it. I use version 5.6.1 -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Query-wrong-results-in-IE8-if-zoomsize-is-not-100-tp6530144p6530144.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] RE: Query-wrong results in IE8 if zoomsize is not 100%
I can reproduce it in both IE8 and FF3. Not sure what the issue is. I switched to the townships layer to make sure that it wasn't a tolerance issue in querying a point feature. Obviously, they guy who built this page knows nothing about MapServer ; / David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Tipatino Sent: Wednesday, June 29, 2011 2:12 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] RE: Query-wrong results in IE8 if zoomsize is not 100% Hi David thanks for the message, its just within a simple html page. However, the same things happens for example with the airports in the well known ITASCA example (http://maps.dnr.state.mn.us/cgi-bin/mapserv54?img.x=332img.y=130mode=browselayer=airportszoomdir=0zoomsize=2imgxy=300.0+300.0imgext=388201.781900+5200193.595290+500990.486520+5312982.299910map=%2Fusr%2Flocal%2Fwww%2Fdocs_maps%2Fmapserver_demos%2Fworkshop-5.4%2Fitasca.maproot=%2Fmapserver_demos%2Fworkshop-5.4savequery=trueprogram=%2Fcgi-bin%2Fmapserv54map_web=+TEMPLATE+itasca_basic.html) I would be curious to know if you can reproduce it ... -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Query-wrong-results-in-IE8-if-zoomsize-is-not-100-tp6530144p6530337.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] color standards in layers
You may also want to look at ColorBrewer: http://colorbrewer2.org/ It is very useful in helping you decide on color themes for maps. It will also provide you with the color codes (RGB or Hex) that you can use directly in MapServer. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Thursday, June 23, 2011 7:03 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] color standards in layers On 6/23/2011 6:27 PM, Paul Alarcon wrote: Hello evryone i'm a mapserver user, i love the way i work, but i have a question i'm not a GIS Specialyst, but i want to know if there is color ruler for the representation of the layers,because i want to follow the goegraphic rules, some information about it i really apreciate. Hi Paul, There has been a lot written on this subject and there is probably not simple answer because to a large extent it depends on what you are trying to show with you map. A lot of people like the Google maps or Virtual Earth maps as color schemes. You might also find the following interesting reading: http://www.google.com/#q=cartographic+color+standards+for+maps There are some very good books on the subject that discuss this in detail you can enter gis cartography into amazon book search to a good sample of them. Hope this helps, -Steve W ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Mapserver 6.0 WMS
Chris, I can't find that ticket either, but this should help. Look at: http://mapserver.org/MIGRATION_GUIDE.html#ogc-web-services And this: http://mapserver.org/development/rfc/ms-rfc-67.html David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Green Sent: Thursday, June 16, 2011 1:43 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Mapserver 6.0 WMS Hi List I am in the process of upgrading from Mapserver 5.4 to 6.0 , running under Ubuntu 10.04. However I am struggling with the more stringent requirements in Mapserver 6.0 when running as a WMS server. I can see the principles applied in http://mapserver.org/MIGRATION_GUIDE.html#migration, but can't find ticket 1088 or any other documentation to show me how to ensure that the various parameters like FORMAT and STYLES are delivered in the way that Mapserver 6.0 now requires before it will accept a GetMap request. As things stand I can't get past the error message msWMSGetCapabilities(): WMS server error. WMS request not enabled. Check wms/ows_enable_request settings Can someone point me in the right direction here? Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Simple mapserver HTML template file?
If you aren't querying, you shouldn't need a template. All that you should need is a map/layer that can be served as a WMS. OpenLayers and the HTML page that you create to contain the OpenLayers map handle the layout. You could start with a really simple example like this and point it at your WMS. http://dev.openlayers.org/releases/OpenLayers-2.10/examples/lite.html David. -Original Message- From: Gerry Creager [mailto:gerry.crea...@tamu.edu] Sent: Thursday, June 09, 2011 10:50 AM To: Fawcett, David (MPCA) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Simple mapserver HTML template file? I'm looking at that now. I need to understand the TEMPLATE element in the LAYER section, though. I created the basic mapfile using Qgis, and it's got a dummy value there. gc Fawcett, David (MPCA) wrote: Gerry, I would really look at OpenLayers on the client side and MapServer WMS on the server side. You could probably tweak one of the basic examples and have it up and running in about 15 minutes. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Gerry Creager Sent: Thursday, June 09, 2011 9:38 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Simple mapserver HTML template file? I've been away from Mapserver for awhile and I'm having trouble wrapping my head, quickly, around a template file for a simple application that requires panning and zooming but no queries. Can anyone help a guy out on short notice? I can likely flesh a an example out but I'm really having trouble getting started. Thanks, Gerry -- Gerry Creager -- gerry.crea...@tamu.edu Texas Mesonet -- AATLT, Texas AM University Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.862.3983 Office: 1700 Research Parkway Ste 160, TAMU, College Station, TX 77843 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] purchasing satellite imagery
Where on the globe is this municipality? That may determine the availability, resolution, cost of the imagery. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Esmin Gracic Sent: Thursday, June 09, 2011 12:35 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] purchasing satellite imagery Hi all. We're in process of developing robust eGov solution including GIS (using mapserver/postgis/pgrouting :) ). This municipality has 1.059 km2. Do you have any recommendation on where to purchase satellite imagery, and which scale/resolution do you recommend. Basic GIS usage is TAX calculation based on more than 70 parameters (mostly including distances to important institutions and road types etc...). This is based on vector data, but great imagery is also in client's interest. Some estimated prices per km2 would be nice, too, 'cause I need to give some numbers to the client. I've googled around, but would like some info from firsthand users. Quickbird has a resolution of 0,6 meter, but I guess that would be overkill (and overpriced for client) Thanks! ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Hwy Shields
Does anyone have a highway shield example map file and symbol set that they are willing to share? Thanks, David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: VS: [mapserver-users] Mapserver search performance
I was thinking the same thing... You could either just import the shapefiles or use the virtual shape functionality. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Korver Sent: Tuesday, May 03, 2011 4:06 PM To: Varun saraf Cc: mapserver-users@lists.osgeo.org Subject: Re: VS: [mapserver-users] Mapserver search performance Spatialite jumps into my mind. http://www.gaia-gis.it/spatialite/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Parameterized MapFile using CGI variable
One potential way to do it would be with the use of 'include's. http://mapserver.org/mapfile/Include.html The primary mapfile wouldn't have a connection object, but it would contain: INCLUDE connect_info.map Then on each machine, you would have a different version of connect_info.map that contained the correct connection object for that machine. This wouldn't give you the flexibility of changing it through the CGI interface, but would allow you to use the same exact mapfile on both machines. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Nicolas BOUTET Sent: Friday, April 29, 2011 8:57 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Parameterized MapFile using CGI variable Dear All, I have 2 MapServer servers. One for Production use, and the other for Validation use. The MAP files placed on those servers are similar except that each server has a different Oracle database as datasource. For now, I have some different CONNECTION values depending if the map file is on the Production or on the Validation server. So finally I must have different MAP files. Is there a way to have exactly the same map files on the 2 servers, and to use a variable to parameterize the CONNECTION. For example, I would like to set the CONNECTION of my layers to %ORACLECONNECTIONSTRING% and to set a CGI Environment variable named ORACLECONNECTIONSTRING to the correct value on each server. Nicolas ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Parameterized MapFile using CGI variable
Nicolas, I didn't have a mapfile that utilizes connection handy, but I did test using INCLUDE to substitute the value for DATA in an individual layer. Here is part of the layer definition: LAYER NAME watersheds STATUS DEFAULT #DATA 'majclip' INCLUDE inc_data_majclip.map TYPE POLYGON The file inc_data_majclip.map contains: DATA majclip Based on this, I would assume that you should be able to do the same with the CONNECTION for each of your layers. David. From: Nicolas BOUTET [mailto:nicolas.bou...@geosys.com] Sent: Friday, April 29, 2011 9:49 AM To: Fawcett, David (MPCA); mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Parameterized MapFile using CGI variable Thank you David, Yes, using INCLUDE should be a good solution. But as I know in MapServer 5.6, CONNECTION is a parameter of my LAYER objects, and not an object itself. So I cannot have a CONNECTION object declared in a separate map file... And I prefer to not have to duplicate the layers in different map files. Nicolas De : Fawcett, David (MPCA) [mailto:david.fawc...@state.mn.us] Envoyé : vendredi 29 avril 2011 16:37 À : nicolas.bou...@geosys.com; mapserver-users@lists.osgeo.org Objet : RE: [mapserver-users] Parameterized MapFile using CGI variable One potential way to do it would be with the use of 'include's. http://mapserver.org/mapfile/Include.html The primary mapfile wouldn't have a connection object, but it would contain: INCLUDE connect_info.map Then on each machine, you would have a different version of connect_info.map that contained the correct connection object for that machine. This wouldn't give you the flexibility of changing it through the CGI interface, but would allow you to use the same exact mapfile on both machines. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Nicolas BOUTET Sent: Friday, April 29, 2011 8:57 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Parameterized MapFile using CGI variable Dear All, I have 2 MapServer servers. One for Production use, and the other for Validation use. The MAP files placed on those servers are similar except that each server has a different Oracle database as datasource. For now, I have some different CONNECTION values depending if the map file is on the Production or on the Validation server. So finally I must have different MAP files. Is there a way to have exactly the same map files on the 2 servers, and to use a variable to parameterize the CONNECTION. For example, I would like to set the CONNECTION of my layers to %ORACLECONNECTIONSTRING% and to set a CGI Environment variable named ORACLECONNECTIONSTRING to the correct value on each server. Nicolas ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] multiple layers in a class
Mukesh, If you want to symbolize SMALL PIG and BIG PIG differently, you will need two classes. A class is used to select features that match the (optional) class expression. You can have multiple styles within a class, but they would be applied equally to all of the features in that class. One example might be stacking symbols for a feature. The docs don’t say that you can have multiple ‘layers’ within a class, but that you can have multiple ‘styles’ applied within a class. http://mapserver.org/mapfile/style.html In your description below, you are conceptually talking about having different classes within a layer, but just using different words. Is there a reason that you have an aversion to using multiple classes? You can group classes if there is a need for it. http://mapserver.org/mapfile/class.html David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mukesh Subedee Sent: Wednesday, April 27, 2011 2:06 PM To: mapserver mailing list Subject: [mapserver-users] multiple layers in a class Hi, In the STYLE documentation, it is mentioned that it is possible to have multiple layers within a class. I could not find any example how it can be implemented. I was checking an example in http://lists.osgeo.org/pipermail/mapserver-users/2010-August/066303.html where SMALL PIG and BIG PIG are in two different classes. However I am wondering if it is possible to implement it within a same class but representing with different styles. It means representing two different PIG in a same class but with different coloring mechanisms. Thanks, Mukesh ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] multiple layers in a class
No. That is what classes are for. What is your concern about using multiple classes? From: Mukesh Subedee [mailto:msube...@yahoo.com] Sent: Wednesday, April 27, 2011 3:41 PM To: Fawcett, David (MPCA); mapserver mailing list Subject: Re: [mapserver-users] multiple layers in a class Oops, my bad...I meant multiple styles within a class. Does that mean I cannot use different color scheme for symbolizing SMALL PIG and BIG PIG within a same class? Is there any way to categorize each PIG with different EXPRESSION and give different STYLE for each within a class? Mukesh From: Fawcett, David (MPCA) david.fawc...@state.mn.us To: Mukesh Subedee msube...@yahoo.com; mapserver mailing list mapserver-users@lists.osgeo.org Sent: Wednesday, April 27, 2011 12:35:44 Subject: RE: [mapserver-users] multiple layers in a class Mukesh, If you want to symbolize SMALL PIG and BIG PIG differently, you will need two classes. A class is used to select features that match the (optional) class expression. You can have multiple styles within a class, but they would be applied equally to all of the features in that class. One example might be stacking symbols for a feature. The docs don’t say that you can have multiple ‘layers’ within a class, but that you can have multiple ‘styles’ applied within a class. http://mapserver.org/mapfile/style.html In your description below, you are conceptually talking about having different classes within a layer, but just using different words. Is there a reason that you have an aversion to using multiple classes? You can group classes if there is a need for it. http://mapserver.org/mapfile/class.html David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mukesh Subedee Sent: Wednesday, April 27, 2011 2:06 PM To: mapserver mailing list Subject: [mapserver-users] multiple layers in a class Hi, In the STYLE documentation, it is mentioned that it is possible to have multiple layers within a class. I could not find any example how it can be implemented. I was checking an example in http://lists.osgeo.org/pipermail/mapserver-users/2010-August/066303.html where SMALL PIG and BIG PIG are in two different classes. However I am wondering if it is possible to implement it within a same class but representing with different styles. It means representing two different PIG in a same class but with different coloring mechanisms. Thanks, Mukesh ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Problem with cascading WMS reprojection
Should the MAP PROJECTION block be in the MAP object? -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of William Hudspeth Sent: Thursday, March 24, 2011 12:50 PM To: mapserver-users@lists.osgeo.org Cc: w...@unm.edu Subject: [mapserver-users] Problem with cascading WMS reprojection Hello, I am trying to reproject a cascaded NASA MODIS NDVI raster. The original raster is served as epsg:4326 from the NASA servers. It is using version=1.3.0 and CRS-CRS:84. I am cascading it through my own mapserver client/server and trying to reproject as epsg:26913 (utm zone13), where the MAP projection and extents are in 26913. My MAP projection looks like this: MAP . EXTENT 93549 3464749 694099 4065299 UNITS METERS . END #END MAP OBJECT PROJECTION init=epsg:26913 #UTM-Zone 13N END #END MAP PROJECTION OBJECT and, my LAYER definition looks like this: LAYER NAME MOD13A2_E_NDVI TYPE RASTER CONNECTION http://neowms.sci.gsfc.nasa.gov/wms/wms?; CONNECTIONTYPE WMS STATUS ON METADATA wms_nameMOD13A2_E_NDVI wms_server_version 1.1.1 wms_srs EPSG:4326 wms_format image/jpeg wms_latlonboundingbox -180 -90 180 90 wms_transparent FALSE END #METADATA PROJECTION init=epsg:4326 #WGS84 Decimal Degrees END #PROJECTION END #LAYER Interestingly, even though the MAP projection is NOT set to EPSG:4326, I can make a successful request using epsg:4326. In all cases, the LAYER metadata uses EPSG:4326. So, while this request is successful: http://edacwms.unm.edu/cgi-bin/mapfiles/epht_environment/epht_enviro_wms?version=1.1.1SERVICE=WMSREQUEST=GetMapFORMAT=image/jpegSTYLES=SRS=EPSG:4326BBOX=-120.000,26.000,-97.000,44.000Width=600Height=470Layers=MOD13A2_E_NDVI This one is NOT successful: http://edacwms.unm.edu/cgi-bin/mapfiles/epht_environment/epht_enviro_wms?version=1.1.1SERVICE=WMSREQUEST=GetMapFORMAT=image/jpegSTYLES=SRS=EPSG:26913BBOX=93549,3464749,694099,4065299Width=600Height=470Layers=MOD13A2_E_NDVI where I get an error: msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be valid for all requested layers. Any insight would be greatly appreciated... Bill ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Spherical Mercator Projection Problem
Sergey, If your data is in epsg:4326 and you want to publish the data as epsg:3785, you will need to projection blocks to your layers. Something like: PROJECTION init=epsg:4326 END The Projection block in the MAP section defines your output projection. Because your data is not in the same projection, you will need to define a projection block in each layer section. Those projection blocks define the 'input' projection. They tell MapServer what projection the data exists in. This allows MapServer (with proj4 support) to re-project your data to the output projection. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Sergey Kraev Sent: Wednesday, February 23, 2011 5:01 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Spherical Mercator Projection Problem Hi, I'm running MS4W v3.0 (including MapServer 5.6.5) on Windows. My data source are PostGIS multipolygon countries' borders. I have successfully got MapServer to render the world map in WGS84 projection using these settings: Request: http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.mapmode=mapmapsize=256+256mapext=-180+-90+180+90 world.map: MAP EXTENT -180 -90 180 90 #EXTENT -20037508 -20037508 20037508 20037508 SIZE 256 256 IMAGECOLOR 153 179 204 FONTSETc:\MS4W\fonts\fonts.list RESOLUTION96 MAXSIZE5000 PROJECTION init=epsg:4326 #init=epsg:3785 END ... layers don't have PROJECTION sections I would like MapServer to render the same data into a Web (spherical) Mercator projected map (epsg:3785), but I don't know how to modify my request and mapfile in order to get the correct map. With the following settings I just receive a picture without any polygons. \ms4w\proj\nad\epsg: ... 3785 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs ... Request (only mapext is different): http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.mapmode=mapmapsize=256+256mapext=-20037508+-20037508+20037508+20037508http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.mapmode=mapmapsize=256+256mapext=-180+-90+180+90 world.map (only EXTENT and PROJECTION are different): MAP #EXTENT-180 -90 180 90 EXTENT -20037508 -20037508 20037508 20037508 SIZE 256 256 IMAGECOLOR 153 179 204 FONTSETc:\MS4W\fonts\fonts.list RESOLUTION96 MAXSIZE5000 PROJECTION #init=epsg:4326 init=epsg:3785 END ... layers don't have PROJECTION sections I'm assuming that -20037508 -20037508 20037508 20037508 is correct extent for the whole world map, since Google uses that and they also have Mercator projection. Thanks for your help. Sergey ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Clip Raster with a Polygon
I have done this with static mask images. It wouldn't be hard to pass the ID of the feature that you want to be the 'hole' in the URL and then use that url variable in an expression for that layer/class . David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka Sent: Friday, February 18, 2011 6:02 AM To: Gabe Codina; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Clip Raster with a Polygon Hi, I have been thinking sometimes that there could be a huge polygon that is always drawn on top of the raster layer. 'Area of interest' polygons should be converted into holes in the mask polygon. I have never tried it in practice, though. -Jukka Rahkonen- Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Gabe Codina Lähetetty: 18. helmikuuta 2011 7:05 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [mapserver-users] Clip Raster with a Polygon Hi I would like to serve a raster layer that is spatially filtered - ie the raster should show through where it overlaps with 1 or more polygons. Is mapserver capable of doing this ? Gabe Codina ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: polygon tool
You might want to look at OpenLayers. www.openlayers.orghttp://www.openlayers.org Here is a basic example that allows you to draw some vector features and then select them by drawing a box. http://dev.openlayers.org/releases/OpenLayers-2.10/examples/select-feature.html David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bistrais, Bob Sent: Thursday, February 17, 2011 8:18 AM To: mapserver-users Subject: [mapserver-users] polygon tool I am trying to create a polygon tool with PHP MapScript and JavaScript. I'd like to allow the user to draw a polygon which will eventually be used to select map features. This kind of thing probably has been done before. Can anyone direct me to some code samples? ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Looking for mobile WebMapping-Applications
Kai, Take a look at this page. http://wiki.osgeo.org/wiki/Mobile_Solutions Near the bottom of the page is list of current projects. I don't know how current it is, but it is a pretty good start. David -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Kai Behncke Sent: Thursday, February 17, 2011 8:22 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Looking for mobile WebMapping-Applications Dear users, for a dissertation and an article I´m looking for mobile WebMapping-applications (means: WebMapping/WebGIS-Applications that work ob mobile handheld devices (e.g. PDAs, Smartphones)). Does anyone know such an application and send me the link please? Thank you very much, Kai -- Schon gehört? GMX hat einen genialen Phishing-Filter in die Toolbar eingebaut! http://www.gmx.net/de/go/toolbar ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: polygon tool
I assume that with php and MapScript you still need to have some client-side code (javascript or flash/Silverlight) for the draw and select tool. David. From: Bistrais, Bob [mailto:bob.bistr...@maine.gov] Sent: Thursday, February 17, 2011 8:58 AM To: Fawcett, David (MPCA); mapserver-users Subject: RE: polygon tool That looks like what I'm after. But at this time we're not using Open Layers. Can this be adapted to a PHP/MapScript app? From: Fawcett, David (MPCA) [mailto:david.fawc...@state.mn.us] Sent: Thursday, February 17, 2011 9:41 AM To: Bistrais, Bob; mapserver-users Subject: RE: polygon tool You might want to look at OpenLayers. www.openlayers.orghttp://www.openlayers.org Here is a basic example that allows you to draw some vector features and then select them by drawing a box. http://dev.openlayers.org/releases/OpenLayers-2.10/examples/select-feature.html David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bistrais, Bob Sent: Thursday, February 17, 2011 8:18 AM To: mapserver-users Subject: [mapserver-users] polygon tool I am trying to create a polygon tool with PHP MapScript and JavaScript. I'd like to allow the user to draw a polygon which will eventually be used to select map features. This kind of thing probably has been done before. Can anyone direct me to some code samples? ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] capability to reproject to 2 different projections within the map object of the map file
I believe that in CGI mode, you can only have one output projection, so your approach won't work. You can support multiple SRS/projection in WMS mode. To do this, you put multiple SRS codes in the wms_srs metadata for a layer. You might be able to change the map projection on the fly by changing the parameters via the URL, I assume that you would also need to change the extent values to match the projection. (I can't verify that map.projection is something that you can change via URL). David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of John Mitchell Sent: Friday, January 21, 2011 3:13 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] capability to reproject to 2 different projections within the map object of the map file If I want all the layers within a map file no matter the layers own projection to have the capability to reproject to 2 different projections would I within the map object of the map file replace: PROJECTION init=epsg:4326 END With: PROJECTION init=epsg:4326 init=epsg:102113 END Thanks, John ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] ArcGIS Server layer
For Option #2, you need to have a MapServer instance that is built with SDE support. SDE support isn't there 'by default', so if you want to make direct SDE connections, you will want to take this into account when you are installing MapServer. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Robert Sanson Sent: Tuesday, January 11, 2011 7:56 PM To: qazi iqbal; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] ArcGIS Server layer Yes - two ways: 1. Connect to a WMS service on ArcGIS Server: LAYER NAME nz50ktm GROUP Toposcans TYPE RASTER STATUS ON CONNECTION http://myserver/arcgis/services/mapservice_topography_raster/MapServer/WMSServer?; CONNECTIONTYPE WMS MAXSCALE 6 MINSCALE 1 METADATA # OGC:WMS specific tags ows_titleNZ 1:50k scale NZTM ows_abstractThis layer came from the LINZ Topo50 series maps in NZTM WMS_FORMAT image/png wms_server_version 1.1.1 wms_opaque1 wms_group_title Toposcans wms_resx 4.233 wms_resy 4.233 ows_extent 1083997.88 4722000.45 2092003.23 6234002.12 wms_srs EPSG:2193 WMS_NAME 3 wms_exceptions_format application/vnd.ogc.se_xml END END 2. Direct connection to the underlying ArcSDE database: LAYER NAME farm GROUP CRS TYPE POLYGON STATUS ON # actual data pointer CONNECTIONTYPE SDE CONNECTIONTYPE PLUGIN CONNECTION server,port:,cadastre,user,passwd DATA CADASTRE.SDEADMIN.VW_FARM_PARCEL_SP,SHAPE PLUGIN c:/ms4w/apache/specialplugins/msplugin_sde_92.dll CLASS NAME Farm STYLE WIDTH 3 OUTLINECOLOR 255 0 0 COLOR 255 140 0 END END #CLASS METADATA ows_titleFarm ows_abstractThis shows land parcels linked to a given farm_id in NZTM ows_keywordlistAgriBase,LINZ,farm_id,PARCELS wms_opaque1 wms_group_title CRS ows_extent 773500 4615000 2602100 6324500 wms_srs EPSG:2193 wms_exceptions_format application/vnd.ogc.se_xml END END Regards, Robert S qazi iqbal qazi.iq...@gmail.com 12/01/2011 2:13 p.m. I want to know if there is any way to add ArcGIS server layer to mapserver mapfile? Click herehttps://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg== to report this email as spam. This email and any attachments are confidential and intended solely for the addressee(s). If you are not the intended recipient, please notify us immediately and then delete this email from your system. This message has been scanned for Malware and Viruses by Websense Hosted Security. www.websense.comhttp://www.websense.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] DATA and SUBSET keywords
Stephan, This might be some newer syntax that I haven’t seen before, but I would try it a different way: DATA “'locaux_etj6_poly” FILTER (“[unite]” == “SCTA” AND “[dur_occ]” == “permanent”) Note: This is no longer using LIKE, but because you didn’t have any wildcards in your original expression, I am guessing that you just wanted the exact values. I am not aware of a ‘LIKE’ comparison in MapServer logical expressions, but you could definitely cook up a regular expression if you needed one. You don’t want to use the ‘smart quotes’ like my email client inserted. Just use plain double quotes. Case sensitivity may apply to the column names, it will definitely apply to the values. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephan Legere Sent: Monday, December 20, 2010 8:17 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] DATA and SUBSET keywords Hi everyone, I’m a newbie using MapServer and, writing my map file, I come to a problem which seems unsolvable to me: I would like to represent only some features from a shapefile, based on a simple SQL statement between the attributes of the respective shapefile. I tried to use the map file exported from Qgis which looks like: … LAYER NAME 'SCTA_perm_6' TYPE POLYGON DUMP true DATA 'locaux_etj6_poly.shp'|layerid=0|subset=unite LIKE 'SCTA' AND dur_occ LIKE 'permanent'' STATUS OFF TRANSPARENCY 100 … but it is not working: loadLayer(): Unknown identifier. Parsing error near (|):(line 464) I tried to find some detailed information or examples using DATA and(or) SUBSET keywords but I didn’t found something useful. So, can anyone explain me what is wrong, how to do this or where to find some documentation on this. Thank you in advance. Stephan ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Mapserver Google Maps
Rashad, The short answer is, you can't do it. (That might be the long answer too.) From a technical standpoint MapServer can't consume tiles directly from Google and from a legal standpoint, when you accept Google's terms of service, you agree to not do something like this. If you want to display your own personal data with Google's data, do it on the client side. Most people do it using OpenLayers. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mohammed Rashad Sent: Monday, December 20, 2010 10:30 AM To: mapserver-users@lists.osgeo.org Cc: mapserver-...@lists.osgeo.org Subject: [mapserver-users] Mapserver Google Maps Sorry for cross posting. I am stuck for two days... How to render a google map as a WMS layer using Mapserver? -- Rashad ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] OGR data layer type - points and lines
It took 4 whole days, but thanks to Sandro, Spatialite now has a MakeLine() function. http://groups.google.com/group/spatialite-users/browse_thread/thread/20f8e907ae9226 The feature is in SVN, I am not sure if it will make it into the pending 2.4.0 release. I am also not sure how the OGR driver works and if it can accept geometries created on-the-fly, or if they need to come from a geometry column. David. -Original Message- From: Fawcett, David (MPCA) Sent: Friday, December 17, 2010 10:23 AM To: 'Stephen Woodbridge'; Ian Walberg Cc: mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] OGR data layer type - points and lines Ian, I thought that there was a pretty simple answer to this, but it seems as though I have imagined some non-existing functionality. Assuming that you have a Spatialite db containing a point data set, and you have a MapServer layer that draws this, I think that I have a solution for you. (This also assumes that OGR supports reading linestrings from Spatialite). PostGIS has the ST_MakeLine() function that allows you to create linestrings out of point geometries. The current version of Spatialite doesn't have anything like this (although since I have mentioned it on the Spatialite list, it could be there soon...) So, this SQL employs some workarounds, but may work: SELECT LineFromText('LINESTRING(' || group_concat(X(geometry) || ' ' || Y(geometry), ',') || ')') FROM datapoints ORDER BY fix_date; If performance is a problem, I would build a Spatialite line dataset and rebuild it every time your point dataset changes. David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] OGR data layer type - points and lines
Ian, I thought that there was a pretty simple answer to this, but it seems as though I have imagined some non-existing functionality. Assuming that you have a Spatialite db containing a point data set, and you have a MapServer layer that draws this, I think that I have a solution for you. (This also assumes that OGR supports reading linestrings from Spatialite). PostGIS has the ST_MakeLine() function that allows you to create linestrings out of point geometries. The current version of Spatialite doesn't have anything like this (although since I have mentioned it on the Spatialite list, it could be there soon...) So, this SQL employs some workarounds, but may work: SELECT LineFromText('LINESTRING(' || group_concat(X(geometry) || ' ' || Y(geometry), ',') || ')') FROM datapoints ORDER BY fix_date; If performance is a problem, I would build a Spatialite line dataset and rebuild it every time your point dataset changes. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Thursday, December 16, 2010 10:44 AM To: Ian Walberg Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] OGR data layer type - points and lines On 12/16/2010 10:51 AM, Ian Walberg wrote: Ah, ok let us look at that. I do believe the data source we have has data in the format POINT (-118.55000305194 34.0141239). What is the format for line data? I'm not sure, I have not used the OGR connection. Assuming it is returning WKT where points are: POINT(-118.55000305194 34.0141239) then lines would be: LINESTRING(-118.55000305194 34.0141239,-118.56000305194 34.0141239,...) -Steve Thanks Ian -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Thursday, December 16, 2010 6:57 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] OGR data layer type - points and lines I do not believe that this is possible. If you want to draw lines you have to create a data source the returns lines not points. The problem is that mapserver draws features and each point is a feature. It does not have a mechanism that can read a data source and aggregate the point features into a single line feature. I have seen posts on the PostGIS list for SQL that can do this. You might ask on the GDAL list if there is a way to do this. Or if you can use PostGIS, then you can find the SQL in the archives or ask again. -Steve W On 12/16/2010 1:00 AM, Ian Walberg wrote: Hello list, Using an OGR connection to an sqlite data file we can get point and labels to draw successfully. However when we try and draw a line using the point data we do not get anything drawn. Layer details below. Thanks Ian LAYER NAME ogr_points STATUS DEFAULT TYPE point CONNECTIONTYPE OGR CONNECTION points.sqlite DATA DataPoints CLASS NAME From OGR COLOR 255 0 0 STYLE SYMBOL 'City' SIZE 5 COLOR 0 255 255 END LABEL COLOR 255 255 255 OUTLINECOLOR 0 0 0 TYPE truetype FONT Unicode SIZE 16 ANTIALIAS TRUE POSITION AUTO END # end of label END END LAYER NAME ogr_line STATUS OFF TYPE line CONNECTIONTYPE OGR CONNECTION points.sqlite DATA DataPoints CLASS STYLE COLOR 255 22 22 WIDTH 2 END END END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] OGR data layer type - points and lines
I guess I spoke a little too soon... When I attempted to test this data definition, I got a mapserv.exe crash. I am using a recent version of MSW4. Also, in looking a little bit at the OGR driver page for sqlite: http://www.gdal.org/ogr/drv_sqlite.html, I am guessing that the driver can't use spatialite's native binary geometry storage format when it is used to build a geom on the fly. Based on that, I think that creating a wkt geom may be the way to go. Something like this (which still crashes mapserv.exe). DATA select 'LINESTRING(' || group_concat(X(geometry) || ' ' || Y(geometry), ',') || ')' AS wkt_geometry from turtle_points This sample is also very simple in that the line vertices aren't being ordered and the assumption is that you want one line from all of the points in your dataset. David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] OGR data layer type - points and lines
Steve, I need to do some more testing before I can report a bug. I have both OSGEO4W and MS4W installed on this machine and I was actually using the MapServer (5.4) from MS4W. I want to get a clean install and test before reporting this as a bug. I have a Spatialite point layer (turtle_points) that that draws using an OGR connection. In an attempt to simplify the problem of drawing a line layer that is generated on the fly, I tried to flop my point data to WKB and draw that. When I use this SQL for my data statement, I get a MapServer crash too. select AsBinary(geometry) from turtle_points I have playing with Spatialite for some time now, but hadn't yet combined my interests in MapServer and Spatialite. I will continue to play with this over time when I can. If anyone else has been experimenting with Spatialite dbs as data sources for MapServer, I would love to hear about it. David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Join from SHP file to PostgreSQL table
Flavio, Take a look at this page if you haven't: http://mapserver.org/mapfile/join.html Under 'Description', it mentions that you can't use joined data to 'affect the look of a map'. I am pretty sure that this rules out your case. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of flaviocarmo Sent: Monday, November 29, 2010 8:44 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Join from SHP file to PostgreSQL table Hi, I need to make a layer with a join between a shapefile and a non-spatial table, stored on PostgreSQL. I've found this documentation (http://mapserver.org/mapfile/join.html) but i could make it work, so, can u guys help me looking at this configuration and tell me whats wrong? LAYER NAME join_shape TYPE POLYGON STATUS DEFAULT DATA join_shapefile.shp CLASS NAME Joined Shapes STYLE OUTLINECOLOR 120 120 120 COLOR 0 30 255 END END TOLERANCE 20 JOIN NAME teste CONNECTION dbname='testdb' host=GSERVER1 port=5432 user='test' password='test' sslmode=disable CONNECTIONTYPE ogr TABLE 'test.nonspatial' FROM code TO code TYPE ONE-TO-ONE END END # layer In this layer, i want to show only the geometrys in the shapefile join_shapefile.shp that have a CODE column that is the same the CODE column in the test.nonspatial table, stored on Postgre. That is possible? Thanks again Regards, Flavio Carmo -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Join-from-SHP-file-to-PostgreSQL-table-tp5784531p5784531.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Re: Raster Data from PostGIS
If I remember correctly, you can use a PostGIS data set as a tileindex. Perhaps it would be possible to have a PostGIS polygon layer that serves as the tileindex with a where clause that only includes the footprint polygons for the rasters that a particular user should be able to see. Has anyone done this? David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of florencia.bujan Sent: Monday, November 29, 2010 10:12 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Re: Raster Data from PostGIS Stephen, Carlos Thanks for your response again. My problem is that the group of rasters not always the same (dinamic). For example, rasters show according to the user logged (some users can see some rasters but no all), everything depends on the user. With the other types of layers (polygon, line, point, etc) I can do that using the param (%param%) on the data layer. Then, I will investigate the TILEINDEX in the LAYER and the solution with GROUP (but should be dynamic). If anyone finds an example please let me know. Thank you very much for your cooperation! and sorry for my poor english Florencia from Uruguay -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-Data-from-PostGIS-tp5784362p5784894.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Re: Join from SHP file to PostgreSQL table
Your client has some pretty custom requirements. How current does the data published by the Web server need to be? Could it be refreshed nightly or hourly, or do changes to the data have to be immediately reflected in on the Web? From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Flavio Carmo Sent: Monday, November 29, 2010 1:49 PM To: Stephen Woodbridge Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: Join from SHP file to PostgreSQL table Hi, Sorry, but i cant upload the shapes to postgres. The shapefiles are modified using arcview and the data in the postgres is modified using a custom desktop software that my client uses for about 5 years. The software open the shapefiles, then using a ODBC connection with postgres, make the join in memory and shows the information for each geometry. I cant undo this situation, so, my client propose to me to uses a opensource solution to also make this join in a WMS service. He knows Geoserver and Mapserver. Geoserver cant do this too, so i've hoped that mapserver could be a solution. Regards, Flávio Carmo On Mon, Nov 29, 2010 at 16:35, Stephen Woodbridge wood...@swoodbridge.commailto:wood...@swoodbridge.com wrote: On 11/29/2010 2:21 PM, flaviocarmo wrote: Hi, Thanks all for your responses. Im a novice in Mapserver so, after reading, now i know that: - I cant use a JOIN to shown only geometrys with the CODE field stored on Postgres (or another Database) because joins cannot modify the look of a map; - I need to use a template always to show the queries results; - Case-sensitive fields can be a problem in a query with mapserver; - The PG: string for was my mistake. I missed in the mail, but was in my MAP file. Sorry. Now what? There isnt a way to solve my issue? My client needs a opensource solution to deliver his data. His current solution (ESRI ArcGIS Server) is too expensive to buy another license, so he asked for a solution with the same quality, but opensource. There is a way to workaround this? Favlio, I would put all the data in a postgres/postgis database and display it from there. There is a simple shapefile loader: shp2pgsql. In this setup you can easily join tables, create inherited tables if you are working with data like streets.shp for multiple countries so the parent table can be used to seamlessly display the multiple streets tables as a single layer in mapserver. He may have to rethink his work flow a little because the tools are different, but this would be the case regardless if he is changing the software that he is using. -Steve W ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Compiling Trunk - problems with gifs
I am working on compiling a pretty stripped down mapserv binary based on trunk (11/25) on CentOS 5. I successfully compiled GD with jpeg, png, and freetype support. Gdlib-config --features returns GD_JPEG, GD_FREETYPE, GD_PNG, GD_GIF, GD_GIFANIM, GD_OPENPOLYGON. When I try to compile MapServer using the basic ./configure --with-gd=/usr/, I get a bunch of messages saying that MapServer can't find the gif stuff configure: checking where GIF is installed... checking for DGifOpenFileHandle in -lgif... no checking gif_lib.h usability... no checking gif_lib.h presence... no checking for gif_lib.h... no configure: error: cannot find gif headers in system path I noticed a recent post on mapserver-dev about adding an additional flag to configure for gifs. But, when I try ./configure --with-gd=/usr/ --with-gif=/usr/ or (./configure --with-gd=/usr/ --with-gif=/usr) I get an error message telling me that MapServer can't find the gif stuff. configure: checking where GIF is installed... configure: error: cannot find gif lib in /usr/ I didn't compile gif_lib and don't see it anywhere in /usr. Do I need to compile a gif lib before or after compiling GD, or can MapServer just use the gif support in GD? Any help is greatly appreciated. David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Label backgroundcolor
Thanks Michael. BUFFER just does what I expected it to do. The labels are farther apart and one of them doesn't get drawn because there isn't room for it. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Michael Schulz Sent: Friday, November 19, 2010 4:35 AM To: Fawcett, David (MPCA) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Label backgroundcolor Hi David, not sure, but have you tried using/increasing the BUFFER value of the label? Cheers, Michael 2010/11/18 Fawcett, David (MPCA) david.fawc...@state.mn.us: I know that you can set a shadow for the backgroundcolor (billboard). Can you increase the size of the billboard? E.g. 5 pixels all of the way around? Thanks, David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- --- Michael Schulz msch...@webgis.de in medias res Gesellschaft für Informationstechnologie mbH Schwimmbadstraße 2 D-79100 Freiburg i. Br. Tel: +49 (0)761 705798-102 Tel: +49 (0)761 705798-0 Fax: +49 (0)761 705798-09 http://www.webgis.de / http://www.zopecms.de -- Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: querying multiple features in a layer
If you are saying that you are getting multiple querymaps back, try moving the querymap to the query header or footer template. (Or maybe outside of the [feature] block if you are using a modern MapServer query template) David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jackson, John Sent: Friday, November 19, 2010 12:41 PM To: Lime, Steve D (DNR); mapserver-users@lists.osgeo.org Subject: [mapserver-users] RE: querying multiple features in a layer That works, but is there a way to get the map one time only? From: Lime, Steve D (DNR) [steve.l...@state.mn.us] Sent: Friday, November 19, 2010 1:36 PM To: Jackson, John; mapserver-users@lists.osgeo.org Subject: RE: querying multiple features in a layer You'd do something like: ...mode=itemnqueryqlayer=schoolsqitem=idqstring=/id1|id2|id3/... Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jackson, John Sent: Friday, November 19, 2010 11:59 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] querying multiple features in a layer Hello all. I have a layer of school district polygons that I am trying to query. I can successfully do an itemquery on a single value and get a map with the chosen district highlighted. What I'm stumped on is how to query for multiple districts... I saw the documentation for Mapserver expressions, but I don't see how to use them to do this. I tried embedding an OR expression into the qstring, but mapserver wouldn't take it. From what I gather, qstring must be a regular expression. Thanks in advance for your help. --John Jackson --Deputy Auditor --Franklin County Ohio___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Label Position Binding?
I am just wishing here, but I don't suppose that attribute binding is supported for label position is it? (and the docs just haven't been updated...) David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Label backgroundcolor
I know that you can set a shadow for the backgroundcolor (billboard). Can you increase the size of the billboard? E.g. 5 pixels all of the way around? Thanks, David. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] RE: Real life sample of a Mapfile for shp files on WMS
Matt, It looks like Steve Lime's regular expression example will get you what you are looking for. One strategy to think about with MapServer (and any other Web map server) is that when you are looking for the best performance, you want to pre-process your data as much as possible. This means pre-classifying your data if complicated expressions are necessary, projecting your data to get it all in the same spatial reference system, etc. MapServer can do on-the-fly projection, complicated expressions, etc. pretty efficiently. But, if you can do these tasks once in pre-processing, they won't have to be done every time someone makes a map request. In your case, if performance matters, I would consider creating a new column in your data source and splitting out the two 'tags'. An expression that is an exact string match will be faster than a more complicated expression. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of wildcolour Sent: Monday, November 08, 2010 5:29 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] RE: Real life sample of a Mapfile for shp files on WMS Thanks, this looks great. I will try it tonight, but I think is looking just right. One more related question. The column we are using is called 'Tag' and the seemed to have grouped the 'class' and the 'title' in the one column. For example all secondary roads have the tag TVOP2 but roads with the name 'smith st' will look like this TVOP2,SMITH ST So my question is in the expression can I do a 'is like' query?? I am guessing somthing like this EXPRESSION 'TVOP2%' Thanks for the great support Matt :) -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Real-life-sample-of-a-Mapfile-for-shp-files-on-WMS-tp5718787p5719102.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Real life sample of a Mapfile for shp files on WMS
Matt, It sounds like you have several different line layers and they are all currently being displayed in the default style (and that looks kind of crappy)... To make your data look better, you can use classes and styles within your layers. If you want all of the features within a layer to look the same, you just define one class within that layer. If you want to use different symbology based on an attribute of the data, you use multiple classes in the same layer. Individual classes have expressions that determine which features 'fall into' that class. Here is an example of a line layer with only one class. If you uncomment the first style, you 'stack' the styles and you get a colored line with an outline of a different color: LAYER NAME simple line TYPE LINE STATUS DEFAULT DATA 'rail_linesln3' CLASS #STYLE #WIDTH 6 #COLOR 120 120 120 #END STYLE WIDTH 4 COLOR 242 191 36 END END END In this case, if you had a column in your shapefile called ROAD_TYPE, you will get different symbology depending on the value of that column for that feature: LAYER NAME my roads TYPE LINE STATUS DEFAULT DATA 'roads' CLASSITEM ROAD_TYPE CLASS NAME 'Asphalt' EXPRESSION 'asphalt' STYLE WIDTH 6 COLOR 212 212 212 END END CLASS NAME 'Gravel' EXPRESSION 'gravel' STYLE WIDTH 4 COLOR 242 191 34 END END CLASS NAME 'Other' #any feature that doesn't match the above expressions gets caught by this class STYLE COLOR 255 51 51 WIDTH 3 END END Does this get you started? David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of wildcolour Sent: Monday, November 08, 2010 3:38 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Real life sample of a Mapfile for shp files on WMS Hi All I am a newbie, so sorry if it seems like I have no idea (it is probably because I really do have no idea). We have got mapserver up and running, and the WMS is working fine. I have read through the documentation, but I am lost without an more detailed example of a mapfile. I have about 6 shp files. Each file has different features that I want to make into different WMS layers. The data is for a topographical map. For example a file contains roads, power-lines and walking tracks. Each type of road, power-line etc have different tags (some also have the name of the road after a comma). I am assuming this is fairly normal so far. What I want to be able to do is apply a different class (not sure this is the right term) to the roads, the power-lines and the walking tracks. Looks like I need to do some kind of query in the map file. At this stage we have only each file acting as layer. Does anyone have an example mapfile (that splits a SHP file into different layers) that they would be happy to send? I am fairly confident the penny will drop for me if I can see a working example. Thanks Matt :) -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Real-life-sample-of-a-Mapfile-for-shp-files-on-WMS-tp5718787p5718787.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Tiger line file and mapserver
Adam, There was a TIGER import into OSM, but many of the ways have been edited since the original import. From the display standpoint, the spatial reference system (SRS) of the input data set is not very important. It is the output SRS that is important. I think that you will want to set your output projection to world Mercator (epsg:900913 or epsg:3785) http://spatialreference.org/ref/epsg/3785/ If you use 900913, make sure that there is an entry in your epsg database for it, you may need to add it. With MapServer, you can re-project on the fly, so your data doesn't need to be in the output SRS, but you can make your map rendering more efficient by pre-projecting the data to the output SRS. David. From: Adam Eskreis [mailto:aeskr...@gmail.com] Sent: Friday, November 05, 2010 12:12 PM To: Fawcett, David (MPCA) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Tiger line file and mapserver So would that mean that they converted the entire tiger line file to a different projection? I will give that a try. Thank you for the suggestion. On Fri, Nov 5, 2010 at 1:08 PM, Fawcett, David (MPCA) david.fawc...@state.mn.usmailto:david.fawc...@state.mn.us wrote: It could be that your data is in a geographic spatial reference system and that the OSM tiles are in a World Mercator spatial reference system (epsg:900913). David. From: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis Sent: Friday, November 05, 2010 11:54 AM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: [mapserver-users] Tiger line file and mapserver Hello everyone. I'm having a problem with the Tiger line file in mapserver that I can't seem to work out. I am using mapserver as my backend and openlayers as my frontend. I'm not sure if my configuration is off, but I put on the layer in openlayers, and the angle of the lines seems to be a bit off. If you look at, for instance, openstreetmaps.orghttp://openstreetmaps.org (who also uses the tiger file) in the area of new york city, all the blocks are perfect rectangles. However, in my map, these same boxes seem to represent more of a shape similar to a parallelogram with acute and obtuse angles at the corners. I inspected the code of openstreetmaps.orghttp://openstreetmaps.org, and looked at their openlayers code. They have something similar to this for their map declaration: map = new OpenLayers.Map('map', { controls: [ new OpenLayers.Control.PanZoomBar() ], units: m, maxResolution: 156543.0339, numZoomLevels: 20, displayProjection: new OpenLayers.Projection(EPSG:4326) }); I tried using this on my map (which also uses the tiger file), but I cannot get it to scale properly. On the most zoomed in level, new york city is just a tiny dot, and if I zoom out I can't see anything. Here is my mapfile code: MAP NAME basemap STATUS on SIZE 800 600 EXTENT -180 -90 180 90 IMAGECOLOR 250 250 250 IMAGETYPE 'AGGA' CONFIG MS_ERRORFILE /var/tmp/ms.log DEBUG 5 WEB METADATA wms_srs EPSG:4326 wms_onlineresource http://mydomain.com/cgi-bin/mapserv?map=/var/www/htdocs/dev/modules/maps/basemap.map; END END PROJECTION init=epsg:4326 END FONTSET fonts.txt OUTPUTFORMAT NAME AGGA MIMETYPE image/png DRIVER AGG/PNG IMAGEMODE RGBA TRANSPARENT TRUE EXTENSION PNG FORMATOPTION INTERLACE=FALSE END LAYER name lines GROUP basemap TYPE LINE PROJECTION init=epsg:4326 END STATUS on CONNECTIONTYPE postgis CONNECTION [removed] DATA the_geom from tiger_lines CLASS style color 131 139 131 width 24 antialias true end style color 200 200 200 width 22 antialias true end END END END Does anyone see anything that might be the reason why I cannot get my map to scale properly using the same exact file and openlayers code as openstreetmap.orghttp://openstreetmap.org? Thanks, -Adam ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: DEM display
I would pre-render all of my hillshades and then add them as simple raster layers. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of David Hildebrand Sent: Wednesday, November 03, 2010 6:25 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] DEM display I have an SRTM file in TIF format which I want to display in a shaded relief but I'm not sure of the approach I should take. Do I need to define classes and symbols for the layer (that would not help for the hillshade) or should I execute a script (PERL) on the server to create the image I need on the fly? Thanks for the tips. === David V. Hildebrand Agriculture Financial Services Corporation (403) 782-8239 www.afsc.caabout:www.afsc.ca http://www.afsc.cahttp://www.afsc.ca/ This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal and/or privileged information. Please contact Agriculture Financial Services Corporation immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communication received in error, or subsequent reply, should be deleted or destroyed. Please consider the environment before printing this email. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: Tool for configure mapfile
One approach is to create files for each layer or chunk of code and then use includes to pull them into a master map file. http://mapserver.org/mapfile/Include.html David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Julian Wiersbitzki Sent: Wednesday, November 03, 2010 2:26 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Tool for configure mapfile Hi! Is there a good tool (besides Emacs, vi, etc.pp.) for configuring a mapfile? Our mapfile gets bigger and bigger and it's getting very unhandlich. ;-) Perhaps there is already a faq for this? TIA, Julian __ Hamburger Berater Team GmbH Handelsregister: HRB 31629 Stadthausbrücke 3 (Fleethof) Amtsgericht Hamburg 20355 Hamburg Geschäftsführer: Fon: 040/369779-43 Ilse Habermann Fax: 040/369779-99 Hans-Joachim Habermann Mail: mailto:j...@hbt.de Daniel Hoffmann __ Internet: http://www.hbt.de http://www.geofox.dehttp://www.geonetwatch.de __ DIN EN ISO 9001:2000: DQS-Zertifikat Nr.5206 QM Diese Email wurde mit ständig aktualisierten Virenscannern geprüft __ Diese Email einschließlich eventuell angehängter Dateien enthält vertrauliche Informationen und ist ausschließlich für den bezeichneten Adressaten bestimmt. Wenn Sie nicht der richtige Adressat oder dessen Vertreter sind, verständigen Sie bitte sofort den Absender und löschen Sie dann diese Email und eventuell angehängte Dateien. Vielen Dank! Beachten Sie: Jede Form der Nutzung, Vervielfältigung oder Weitergabe des Inhalts fehlgeleiteter Emails ist unzulässig. __ This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. __ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] postgis to spatile-ogr
I looks like with gdal 1.7, spatialite support has improved. If you need to support layers based on queries that link geometry tables with attribute tables, spatialite could still potentially work. I haven't tested out a spatialite layer yet though. http://www.gdal.org/ogr/drv_sqlite.html there is also a new QGIS plugin that allows you to check data out of a PostGIS db and put it into a spatialite db. It looks like it requires the trunk version of QGIS. http://www.sourcepole.com/2010/9/29/offline-editing-plugin-for-qgis David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Sebastian E. Ovide Sent: Thursday, October 21, 2010 5:35 PM To: ni...@maich.gr Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] postgis to spatile-ogr if you need only to display geometries with mapserver u can simply use shapes files... anything that can be read by gdal can be read by mapserver On Thu, Oct 21, 2010 at 2:38 PM, ni...@maich.grmailto:ni...@maich.gr wrote: Hello, Was wondering if an application that is currently set up with postgis data sources can work directly by changing only the data source, e.g change the DATA string to ogr in the mapfile. Have to setup a demo remotely and don't really want to drag pgsql along only for the demo. If, so, would ogr2ogr be the most direct way to dump the postgis tables into sqlite? regards, nicolas boretos ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] The order of Classes in A Layer
You could try putting an ORDER BY in your PostGIS layer definition to order it by area descending. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Ibrahim Saricicek Sent: Wednesday, October 20, 2010 9:47 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] The order of Classes in A Layer Hi List, I have several polygons in a postgis table. Some bigger polygons cover the smaller ones. How can I prevent bigger polygons drawn on smaller ones? On this case smaller ones cant be seen only labels are drawn. I don't know the problem is about drawing order but I think so. As you can see on the screenshots, the small polygons can be seen but when I zoom in some of them can't be drawn. The images are purple because a bigger one covers all... Thanks in advance.. http://osgeo-org.1803224.n2.nabble.com/file/n5655194/zoomOut.png http://osgeo-org.1803224.n2.nabble.com/file/n5655194/zoomIn.png And this is my class definition; The bigger and smaller objects are in different visibility ranges and different classes!!! CLASS EXPRESSION ('[visibility_range]' = '1000-5000') MAXSCALEDENOM 5000 MINSCALEDENOM 1000 NAME GID_S STYLE COLOR [color] END STYLE OUTLINECOLOR 20 20 20 WIDTH 3 END LABEL COLOR 0 0 0 FONT arial TYPE truetype SIZE 8 POSITION LC PARTIALS FALSE BUFFER 5 OUTLINECOLOR 255 255 255 END END -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/The-order-of-Classes-in-A-Layer-tp5655194p5655194.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] WMS Request for a single point?
Robert, This is an example of changing mapfile parameters via the request URL. It is documented on this page: http://mapserver.org/cgi/controls.html If Steve's example using 'mapsize' doesn't work, I would try 'map_size'. You are just setting/changing the values for the SIZE and EXTENT properties in the MapFile. See the documentation here: http://mapserver.org/mapfile/map.html Also, I haven't tested it, but you could try specifying the map extent, which it sounds like you want to set to the same extent (bbox) as your image. I would try something like map_extent=-97+43+-92+49 where the coords in the snippet match the bbox of your image. Note, you will want to make sure that the aspect ratio of your map_size matches the aspect ratio of your extent. If not, MapServer will adjust the extent to fill the image. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Robert Hicks Sent: Tuesday, October 12, 2010 8:06 AM To: Lime, Steve D (DNR) Cc: mapserver-users@lists.osgeo.org; Fawcett, David (MPCA) Subject: Re: [mapserver-users] WMS Request for a single point? Ok after some sleuthing, I'm going to assume the bounding box of the image is that specified in the map file. Is there a way to specify it in the call? Also so more immediate questions: What kind of request is this? Is there a spec available? I'm really only used to GetMap requests so this is a little new to me. On Fri, Oct 8, 2010 at 2:30 PM, Robert Hicks rob...@gmail.com wrote: Ok great! So that gave me an image with a push pin on it. So here is another question: what is the bounding box of the requested image, and can I specify it? I need to be able to merge this image together with another GeoTiff (preferably using gdalmerge) so that the point lands on the same geographic location in the base image. The original image is in EPSG 4326, and I'm not sure what units of measurement this call is using. I tried requesting the point layer as a tif but I think it just gave me a regular non geotiff, which is fine because I can update the header using gdal_translate but I need to know the bounding box in 4326. On Fri, Oct 8, 2010 at 12:41 PM, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: I think you need: mapsize=1000+500 Or set it in the mapfile and mapserver will use that. Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Robert Hicks Sent: Friday, October 08, 2010 11:40 AM To: Fawcett, David (MPCA) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] WMS Request for a single point? Great, thanks for all the help everyone! I tried that command: http://10.0.11.54:8008/cgi-bin/mapserv.exe?map=/ms4w/apps/ms_ogc_workshop/client/wms/reference.mapmode=mapmap_layer[0]=FEATURE+POINTS+27+696000+END+ENDWIDTH=1000HEIGHT=500 (I had to change a few things), and I get this error: msDrawMap(): Image handling error. Unable to initialize image. msPrepareImage(): General error message. Image dimensions not specified. msCalculateScale(): General error message. Invalid image width or height. Any ideas? On Fri, Oct 8, 2010 at 12:14 PM, Fawcett, David (MPCA) david.fawc...@state.mn.us wrote: This example works: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/offset.mapmode=mapmap_layer[0]=FEATURE+POINTS+27+696000+END+END You can access your layer through the layer name or it's (zero-based) index. The simple example layer is below with a simple circle symbol defined in the map file. LAYER NAME 'singlepoint' TYPE point STATUS DEFAULT CLASS STYLE COLOR 255 0 0 SIZE 15 symbol circle END END END SYMBOL NAME circle TYPE ellipse FILLED true POINTS 1 1 END END -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Robert Hicks Sent: Friday, October 08, 2010 11:07 AM To: thomas bonfort Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] WMS Request for a single point? Ok, that looks extremely promising. I'm going to go ahead and try it on my local Mapserver. On Fri, Oct 8, 2010 at 12:03 PM, thomas bonfort thomas.bonf...@gmail.com wrote: have a look at http://www.mail-archive.com/mapserver-us...@lists.umn.edu/msg05881.html the syntax for cgi commands has changed since then, you'd have to use something like map.layer[site]=feature+points+582248.23+4841497.11+end+end or map.layer[site].feature.points=582248.23+4841497.11 (I cant remember what syntax is correct) -- regards, thomas On Fri, Oct 8, 2010 at 17:10, Robert Hicks rob...@gmail.com wrote: Hello all! Ok, this is probably a long shot but, is there a way to request an image from Mapserver that is just a point? The idea is I
RE: [mapserver-users] WMS Request for a single point?
This example works: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/offset.mapmode=mapmap_layer[0]=FEATURE+POINTS+27+696000+END+END You can access your layer through the layer name or it's (zero-based) index. The simple example layer is below with a simple circle symbol defined in the map file. LAYER NAME 'singlepoint' TYPE point STATUS DEFAULT CLASS STYLE COLOR 255 0 0 SIZE 15 symbol circle END END END SYMBOL NAME circle TYPE ellipse FILLED true POINTS 1 1 END END -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Robert Hicks Sent: Friday, October 08, 2010 11:07 AM To: thomas bonfort Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] WMS Request for a single point? Ok, that looks extremely promising. I'm going to go ahead and try it on my local Mapserver. On Fri, Oct 8, 2010 at 12:03 PM, thomas bonfort thomas.bonf...@gmail.com wrote: have a look at http://www.mail-archive.com/mapserver-us...@lists.umn.edu/msg05881.html the syntax for cgi commands has changed since then, you'd have to use something like map.layer[site]=feature+points+582248.23+4841497.11+end+end or map.layer[site].feature.points=582248.23+4841497.11 (I cant remember what syntax is correct) -- regards, thomas On Fri, Oct 8, 2010 at 17:10, Robert Hicks rob...@gmail.com wrote: Hello all! Ok, this is probably a long shot but, is there a way to request an image from Mapserver that is just a point? The idea is I have another larger (reference) map image and I want to place a push pin on top of it in a specified point. It has to be a WMS call so that I can take the image and merge it with the other larger map into one so that it can be put into a PDF. Any help would be appreciated. Thanks! -- web http://www.hyxspace.com aim hyx1138 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- web http://www.hyxspace.com aim hyx1138 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Get the legend of a layer .map file
If your request URL string currently includes mode=map, change it to mode=legend From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of michele pierri Sent: Thursday, September 23, 2010 10:12 AM To: Bob Basques; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Get the legend of a layer .map file Can you take me an example,please? I'm sorry but I am not very expert. And after how I can do the request via CGI? CLASS EXPRESSION ([pixel] = 0 AND [pixel] 20 ) NAME === IS IT WRIGHT? STYLE COLOR 0 255 255 END END Thanks again. --- Gio 23/9/10, Bob Basques bob.basq...@ci.stpaul.mn.us ha scritto: Da: Bob Basques bob.basq...@ci.stpaul.mn.us Oggetto: Re: [mapserver-users] Get the legend of a layer .map file A: mapserver-users@lists.osgeo.org, michele pierri pierm...@yahoo.it Data: Giovedì 23 settembre 2010, 17:06 Just add in a NAME parameter inside of each CLASS tag set. You'll need to request the LEGEND object via CGI or orther method, but the NAME vales are used to describe the Legend Chips in the mapserver output. bobb michele pierri pierm...@yahoo.it wrote: Hi, I have a file.map like this: MAP NAMEdistribution CONFIG PROJ_LIB /usr/share/proj/ STATUS ON SHAPEPATH ./ PROJECTION init=epsg:4326 END CONFIG MS_ERRORFILE /tmp/mapserver.log DEBUG 5 LAYER NAME tif DATA /var/www/tmp/a5e1ddfb-6dec-40d0-94e1-ded12f41397e/out/distribution.tiff STATUS DEFAULT TYPE RASTER CLASSITEM [pixel] CLASS EXPRESSION ([pixel] = 0 AND [pixel] 20 ) STYLE COLOR 0 255 255 END END CLASS EXPRESSION ([pixel] = 20 AND [pixel] 40) STYLE COLOR 0 255 0 END END CLASS EXPRESSION ( [pixel] = 40 AND [pixel] 60) STYLE COLOR 255 255 0 END END CLASS EXPRESSION ([pixel] = 60 AND [pixel] 80) STYLE COLOR 255 127 0 END END CLASS EXPRESSION ([pixel] = 80 AND [pixel] 100) STYLE COLOR 255 0 0 END END CLASS EXPRESSION ([pixel] = 100 ) STYLE COLOR 255 123 0 END END END END Can I have returned with the image, the legend that describes the meaning of the colors? Thanks in advance. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] CGI returning a 502 error
According to the docs, starting with MapServer 5.0, there is no limit to the number of layers in a mapfile. http://mapserver.org/introduction.html#layer-object I am guessing that you are running into a different issue. Have you captured the post request string and examined it to make sure that it is valid? Are you running into a string length limit for your post request? The URL for your post request would be limited to ~2k char for IE, but this only includes the URL to the server, not the key:value pairs. There could be a size limit for post requests set on your Web server to help prevent DOS attacks. I don't know where this would be set in IIS. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli Sent: Monday, September 20, 2010 6:18 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] CGI returning a 502 error I'm using the ms4w binaries (5.6.3) under IIS 7. My application sends (via http POST) a lot of parameters to modify the .map file. Mostly to add features to layers that are turned off by default and then make them visible. When my parameters cause the map to show over 50 layers, the IIS returns a 502 error. I realize that the max layers are set to 100 in the default map.h file, but like I said, I am using the compiled binaries from ms4w. Does anyone know if they change that to 50 when they compile, or should I look elsewhere to find my problem? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p5552675.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
FW: [mapserver-users] Symbology
Apologies for the dup, my original response got embargoed due to the large image included… From: Fawcett, David (MPCA) Sent: Tuesday, September 21, 2010 9:13 AM To: 'Jay Kapalczynski'; 'Bob Basques'; mapserver-users@lists.osgeo.org; 'adams' Subject: RE: [mapserver-users] Symbology I think that someone else pointed out that the path to your symbol image is relative to the location of your map file. A quick test would be to drop bike.png in the same folder as your map file. Looking at your dir tree, I would move your symbol stuff out of the htdocs branch and into the area where your map files are. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jay Kapalczynski Sent: Tuesday, September 21, 2010 8:53 AM To: 'Bob Basques'; mapserver-users@lists.osgeo.org; 'adams' Subject: RE: [mapserver-users] Symbology I added a few things to my sym file and got a few to work I can now call circle and get a circle….BUT for some reason the image will not work, maybe an issue with the image? You have any test images that are known to work? I have the image like this IMAGE 'bike.png' because the images are in the same folder as the .sym file Any other thoughts….greatly appreciated….thanks THIS WORKS CLASS NAME 'Last Week' STYLE SYMBOL circle COLOR 0 0 0 OUTLINECOLOR 0 0 0 #SIZE 12 END # STYLE END # CLASS THIS DOES NOT WORK CLASS NAME 'Last Week' STYLE SYMBOL bike COLOR 0 0 0 OUTLINECOLOR 0 0 0 #SIZE 12 END # STYLE END # CLASS .SYM FILE Symbol Name 'circle' Type ELLIPSE FILLED TRUE Points 1 1 END END SYMBOL NAME 'circle-dashed' TYPE ELLIPSE FILLED TRUE POINTS 1 1 END STYLE 5 5 END END SYMBOL NAME 'bike' TYPE pixmap IMAGE 'bike.png' END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Could not read data from MySQL database
I don't know if this applies to your case at all. In other cases where people have had mysql connections fail, it has sometimes been due to the lack of mysql support in ogr. One question to figure out is whether the ogr being used by MapServer is the same ogr that you are hitting when you run ogrinfo. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Murat Beyhan Sent: Thursday, September 16, 2010 5:18 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Could not read data from MySQL database Dear Friends, I was succeeded to read and draw data from MySQL database using OGR connection until upgrade mapserver and gdal. Now I use the same codes but could not read data form MySql database. I have created tables using ogr2ogr again. but still When I open webpage the following error message occurred. msDrawMap(): Image handling error. Failed to draw layer named 'sea'. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `sea'. File not found or unsupported format. What is wrong for that, please help. When I try ogrinfo as follows it works [mu...@localhost mapdata]$ ogrinfo MySQL:testogr,user=root,password=mysql_123 INFO: Open of `MySQL:testogr,user=root,password=mysql_pass' using driver `MySQL' successful. 1: deniz (Polygon) 2: il_merkezleri (Point) 3: il_sinirlari (Polygon) 4: ilce_merkezleri (Point) 5: ilce_sinirlari (Polygon) 6: iller (Polygon) 7: iller_sil (Polygon) 8: komsular (Polygon) [mu...@localhost mapdata]$ AND my mapserver version info as follows [mu...@localhost mapdata]$ mapserv -v MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE and [mu...@localhost mapdata]$ ogrinfo --formats Supported Formats: - ESRI Shapefile (read/write) - MapInfo File (read/write) - UK .NTF (readonly) - SDTS (readonly) - TIGER (read/write) - S57 (read/write) - DGN (read/write) - VRT (readonly) - REC (readonly) - Memory (read/write) - BNA (read/write) - CSV (read/write) - GML (read/write) - GPX (read/write) - KML (read/write) - GeoJSON (read/write) - Interlis 1 (read/write) - Interlis 2 (read/write) - GMT (read/write) - SQLite (read/write) - ODBC (read/write) - PGeo (readonly) - OGDI (readonly) - MySQL (read/write) - PCIDSK (readonly) - XPlane (readonly) - AVCBin (readonly) - AVCE00 (readonly) - DXF (read/write) - GRASS (readonly) - Geoconcept (read/write) - GeoRSS (read/write) - GPSTrackMaker (read/write) - VFK (readonly) -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Symbology
You can put the symbol definition in your map file, or in a symbols file (e.g. symbols.sym) and then set SYMBOLSET at the MAP level to point to your symbols.sym file. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jay Kapalczynski Sent: Thursday, September 16, 2010 9:45 AM To: 'Michael Schulz' Cc: mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Symbology Ok that seems to make sense...but where do I place the image SYMBOL (your example below)? DO I place that in the map file as well? Little confused there Thanks Michael and Adam for your return replys. -Original Message- From: mandsch...@googlemail.com [mailto:mandsch...@googlemail.com] On Behalf Of Michael Schulz Sent: Thursday, September 16, 2010 9:27 AM To: Jay Kapalczynski Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Symbology Hi, yes, you have to define an image symbol in your symbolset and use that: SYMBOL NAME 'church' TYPE pixmap IMAGE 'church.gif' TRANSPARENT 5 END then use SYMBOL 'church' in your style. Cheers, Michael 2010/9/16 Jay Kapalczynski jkapalczyn...@ci.maple-grove.mn.us: In a map file...Is there a way to use an image (jpg, bmp, png) instead of a marker symbol (star, circle etc) when symbolizing points LAYER DUMP TRUE NAME 'Firestations' DATA 'firestations' TYPE POINT STATUS ON CLASS NAME 'Fire Stations' COLOR 254 0 0 INSTEAD OF STAR PLACE AN IMAGE SYMBOL star SIZE 8 END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ~ Aufwind durch Wissen! Qualifizierte Open Source Schulungen bei der http://www.foss-academy.eu/ ~ --- Michael Schulz msch...@webgis.de in medias res Gesellschaft für Informationstechnologie mbH Schwimmbadstraße 2 D-79100 Freiburg i. Br. Tel: +49 (0)761 705798-102 Tel: +49 (0)761 705798-0 Fax: +49 (0)761 705798-09 http://www.webgis.de / http://www.zopecms.de -- Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Dynamically draw different sized ellipses on map
It sounds like you really want to define polygons in an orthogonal projection and then re-project them to geographic to show the distortion. Unless you calculate the appropriate distortion for a particular coordinate and then can pass in the x and y radii for an ellipse symbol, I think that you will need to use polygon features instead of points. You have probably already seen the symbol construction page, but here it is: http://mapserver.org/mapfile/symbology/construction.html#sym-construction Matt Perry wrote kind of a cool example Python script that creates the kind of polygons that you are looking for. This won't work with the way that you are doing things, but it might give you some concepts and ideas. http://www.perrygeo.net/wordpress/?p=4 David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli Sent: Tuesday, September 07, 2010 5:00 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Dynamically draw different sized ellipses on map Was hoping on some guidance as to the best way to attack this... My app uses the cgi interface. I have been succesful at drawing lines, squares and small circles on the fly by sending mods to the .map file via the URL. I have been doing this by dynamically adding points to various POINT layers with the afforementioned symbols. Up to this point, the squares and circles have been uniform in size and aspect. Now I find myself needing to add multiple ellipses of varying sizes at different locations on the map. Technically they would be circles of area, but the aspect will change as the location approaches the poles. (almost a true circle at the equator and verly long ellipse toward the poles due to map projection). Ideally the ellipses will be filled with either a hatch pattern or a transparent solid color. Any suggestions as to the best way to accomplish this? Cheers -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Dynamically-draw-different-sized-ellipses-on-map-tp5508425p5508425.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] RE: Dynamically draw different sized ellipses on map
I think that others will be able to answer this far better than I can. There are likely many ways to do this, it might help if you gave us a little bit more info about what you are doing. It sounds like the coordinates and area of the polys are determined on the client side and then need to be passed to the server for rendering? I do see an example in the comments to Matt's post where someone uses MapServer MapScript (in place of a CGI call) to build the data and add it to a dynamic map. It looks like they are writing out a shapefile and then using the shapefile as the source for a layer. I wonder if this might lead to unexpected results unless you can guarantee unique shapefile names for each map request. I believe that if you went the mapscript route, you could just build the poly features dynamically and use them in your layer without writing the features out to disk. I think that optimization will depend on your requirements. If a user starts a session, a data set is built, and then the client requests thousands of tiles based on those same features, there will likely be value in writing the features out to a shapefile or database. On the other hand, if the user hits a page and only one static map will be drawn based on the new unique features, there is likely no need to serialize the features. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli Sent: Wednesday, September 08, 2010 11:11 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] RE: Dynamically draw different sized ellipses on map Thanks David. Those are excellent references. I hadn't seen Matt Perry's site before. The Tissot Indicatrix certainly shows the distortion that I need to deal with due to map projection. I think I can work out the geometry of the ellipses. Assuming that the application needs to be capable of rendering up to 100 of these ellipses at varying locations at any given time, would you say the most efficient way to do this is to program the app to dynamically build a shape file and add it as a map layer each time a user requests the page, or create them as symbols (in which case I think I would need a different layer for each ellipse). I suppose I might run into URL length limits with the latter. Is there another possibility that I am missing? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Dynamically-draw-different-sized-ellipses-on-map-tp5508425p5511294.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users