[mapserver-users] ERS temp files from WCS
Hi all, We're using WCS to subset imagery in a variety of formats. When we request a GDAL/ERS outputformat the raw data file is returned, but we need to also access the .ers header file. We've noticed that the header file is created in our temp directory but the file name is inconvenient. e.g. 4e67272e_19c_1.img.tmp.ers We would like to be able to zip the header file up with the raw data file, so we need be able to either specify the name or predict what it will be. Can anyone provide any insight? Here's our output format: OUTPUTFORMAT NAME ERS DRIVER GDAL/ERS MIMETYPE image/ers IMAGEMODE INT16 END -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/ERS-temp-files-from-WCS-tp6766945p6766945.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] Projection of different layers
Hello I am having a mapfile with output projection set to my base layer as PROJECTION init=epsg:4326' END As long as i add a layer in the same projection, it works ok, but I added one layer with the projection PROJECTION 'init=epsg:2240' END I do not see this layer being projected on fly to output projection. I want this layer to be projected to my base layer projection on fly. What am I missing? Thanks Qazi Iqbal ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Line numbers of error messages in mapfiles with includes
Sometimes it's difficult to find the location of an error in a Mapfile, when that Mapfiles includes another Mapfile. In that case the line number is that of the combined files. Would it be possible to set the line-counter to the actual file Mapserver is parsing? Jan ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: New to mapserver. Cannot render TIFF
Thanks for the reply Frank. I adjusted the EXTENT, but still no go. The weird thing though is that when I use a PNG of the same image, things work great. I can't get any TIF, no matter how large or how small to work. In fact I tested a 200MB GeoTiff and Mapserver immediately spit out a white image with almost no disk activity. It's almost ignoring my DATA line when a TIF is provided Any other thoughts? This is really frustrating :(. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/New-to-mapserver-Cannot-render-TIFF-tp6764772p6768086.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
Re: [mapserver-users] Re: New to mapserver. Cannot render TIFF
On 11-09-07 08:00 AM, aphunter wrote: Thanks for the reply Frank. I adjusted the EXTENT, but still no go. The weird thing though is that when I use a PNG of the same image, things work great. I can't get any TIF, no matter how large or how small to work. In fact I tested a 200MB GeoTiff and Mapserver immediately spit out a white image with almost no disk activity. It's almost ignoring my DATA line when a TIF is provided Any other thoughts? This is really frustrating :(. A.P. Hunter, If you provide a mapfile + tiff + shp2img commandline you are using to me I can investigate a bit for you. Contact me off list. Nothing else obvious came to mind. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/warmerda and watch the world go round - Rush| Geospatial Software Developer ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: New to mapserver. Cannot render TIFF
Frank, I take it back. It was the extent. I modified the extent and things are good. I was confused because I had some bogus coordinates in my URL request to the mapserver CGI, but using shp2img I was able to debug it. So far the MapServer community seems pretty nice! Thanks again, Aaron -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/New-to-mapserver-Cannot-render-TIFF-tp6764772p6768142.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] character encoding
Hi all I am having some issues with special characters in my application (sure I am not the first!) and wondered what the best way is to 'clean up' the data so I know it is specifically in a given format say UTF-8 or ISO. My source data was from KML - shp using ArcGIS 10 (though who knows what the kml format was!). One would assume if using ArcMap on a UK machine would give you an ISO output Should I copy the characters back into the attribute table via ArcGIS (but what program should I use to copy the characters from - Word...). I did use the ArcGIS export registry setting to export my supposed ISO shapfile to UTF-8 format (but the label rendering is wrong). Any ideas would be much appreciated! Many thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] character encoding
On 11-09-07 12:59 PM, Chris Jackson wrote: Hi all I am having some issues with special characters in my application (sure I am not the first!) and wondered what the best way is to 'clean up' the data so I know it is specifically in a given format say UTF-8 or ISO. My source data was from KML - shp using ArcGIS 10 (though who knows what the kml format was!). One would assume if using ArcMap on a UK machine would give you an ISO output Should I copy the characters back into the attribute table via ArcGIS (but what program should I use to copy the characters from - Word...). I did use the ArcGIS export registry setting to export my supposed ISO shapfile to UTF-8 format (but the label rendering is wrong). Any ideas would be much appreciated! Hi Chris, My quick thoughts are: - use ogr2ogr (the GDAL/OGR library) to do your conversion from KML to shp (if you are on Windows, the MS4W product can help you with that http://www.maptools.org/ms4w/index.phtml?page=downloads.html) - another option is to use the KML in its native format with MapServer (http://www.mapserver.org/input/vector/kml.html), which is also possible with MS4W - if by application problems you mean map label problems with encoded characters, this howto should help you: http://www.mapserver.org/mapfile/labelencoding.html Hope that helps. -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] label problem since MS6
I have a label rendering problem since I migrated to MS6. Please see attached image generated with shp2img. See that the labels are not clear. It was fine with MS5.6 The problem is TRANSPARENT ON. If I remove it the labels are clean. I read this document http://mapserver.org/MIGRATION_GUIDE.html#mapserver-5-6-to-6-0-migration but didn't find the solution Is there something wrong with these definitions below? thank you OUTPUTFORMAT NAME gif DRIVER GD/GIF MIMETYPE image/gif IMAGEMODE PC256 EXTENSION gif TRANSPARENT ON END IMAGETYPE gif LABEL TYPE TRUETYPE FONT arialbd SIZE 7 POSITION cc COLOR 51 153 0 MINDISTANCE 10 PARTIALS FALSE ANTIALIAS true END attachment: shp2img.gif___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: label problem since MS6
I had the same problem using PC256 with the GD driver, which sounds like it isn't well supported. I was using PNG's, so switching to the AGG driver was an option (with new challenges, as I'm about to post...) but it doesn't sound like it is with GIF's. Here's the post I had earlier regarding this problem. I never did log a bug report but if other users are having the same issue maybe it's worth it to do so. http://osgeo-org.1803224.n2.nabble.com/Font-rendering-in-MapServer-6-0-td6555935.html -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/label-problem-since-MS6-tp6768768p6768934.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] Re character encoding
Hi Jeff I may well try that! The trouble is I have a stack of attributes in a Access db which I was joining onto the KML data. I need the complete dataset for an ArcGIS Server data service anyway so a shapefile seemed to be a good way to join it all and assist with that (will end up in SDE) and my mapfile dataset too. I had already read the page you mentioned and all is in place (I am using the MS4W PHP/mapscript set-up on IIS) and my original ISO flavoured version labels up nicely - it just breaks some of the query functionality (though it shouldn't - which is why I wonder if some of the characters are badly formed)! Thanks for the advice Chris Hi Chris, My quick thoughts are: - use ogr2ogr (the GDAL/OGR library) to do your conversion from KML to shp (if you are on Windows, the MS4W product can help you with that http://www.maptools.org/ms4w/index.phtml?page=downloads.html) - another option is to use the KML in its native format with MapServer (http://www.mapserver.org/input/vector/kml.html), which is also possible with MS4W - if by application problems you mean map label problems with encoded characters, this howto should help you: http://www.mapserver.org/mapfile/labelencoding.html Hope that helps. -jeff ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Rendering with a single transparent colours in MapServer 6
We need to create 8-bit PNG images in MS 6.0 that have one single colour (white) designated as transparent with all other colours as 100% opaque. Using the GD driver with PC256 works well with vectors but not with fonts (see http://osgeo-org.1803224.n2.nabble.com/Font-rendering-in-MapServer-6-0-td6555935.html ). Using the AGG driver with quantization creates nice images but with semi-transparent colours, a feature Internet Explorer 6 tends to butcher. Is there another option? As an example, right now we're using this as our output format to create the image that follows: OUTPUTFORMAT NAME png8 DRIVER AGG/PNG8 MIMETYPE image/png; mode=8bit IMAGEMODE RGBA EXTENSION png FORMATOPTION INTERLACE=off FORMATOPTION QUANTIZE_FORCE=on FORMATOPTION QUANTIZE_COLORS=256 TRANSPARENT ON END http://osgeo-org.1803224.n2.nabble.com/file/n6769109/comparingAGGQuantization.png What we need is the following image (created using GD and PC256): http://osgeo-org.1803224.n2.nabble.com/file/n6769109/comparingGDPc256.png Is this possible in MS 6.0? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Rendering-with-a-single-transparent-colours-in-MapServer-6-tp6769109p6769109.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
Re: [mapserver-users] Line numbers of error messages in mapfiles with includes
Which version are you using? For some reason I thought this was in place in the 6.0 release. Steve On Wed, Sep 7, 2011 at 8:29 AM, Jan Hartmann j.l.h.hartm...@uva.nl wrote: Sometimes it's difficult to find the location of an error in a Mapfile, when that Mapfiles includes another Mapfile. In that case the line number is that of the combined files. Would it be possible to set the line-counter to the actual file Mapserver is parsing? Jan ___ 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] Crash on Labeling
I am labeling roads. I have a class using the TEXT directive like so: TEXT 'Bus [NAME]' This is for a business loop and labels in the map correctly with the highway name in the place of [NAME]. I also have other Loops. I tried this for the other loops: TEXT 'Loop [NAME]' ...and I get the following label in the map: Loop [NAME] ...just like you see it, with brackets and all. Then I did some experimenting. When I try this in the config file: TEXT 'q [NAME]' ...the entire process crashes. Yes, that's simply a 'q'. Are there labeling issues in MapServer 6.0.1? Because, I think I may have found some. I'm using a custom built binary (MSVC 10) on Windows 7. Stuart Harlan___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] character encoding
QGIS has quite nice possibilities to select the encoding when opening and writing the various supported vector data formats (including e.g. shape and KML). armin On 07/09/2011 17:59, Chris Jackson wrote: Hi all I am having some issues with special characters in my application (sure I am not the first!) and wondered what the best way is to 'clean up' the data so I know it is specifically in a given format say UTF-8 or ISO. My source data was from KML - shp using ArcGIS 10 (though who knows what the kml format was!). One would assume if using ArcMap on a UK machine would give you an ISO output Should I copy the characters back into the attribute table via ArcGIS (but what program should I use to copy the characters from - Word...). I did use the ArcGIS export registry setting to export my supposed ISO shapfile to UTF-8 format (but the label rendering is wrong). Any ideas would be much appreciated! Many thanks Chris ___ 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] Crash on Labeling
Stuart, please open a ticket and attach a minimal mapfile/testcase that reproduces the issue. -- thomas On Wed, Sep 7, 2011 at 22:30, stuart.har...@modot.mo.gov wrote: I am labeling roads. I have a class using the TEXT directive like so: TEXT 'Bus [NAME]' This is for a business loop and labels in the map correctly with the highway name in the place of [NAME]. I also have other Loops. I tried this for the other loops: TEXT 'Loop [NAME]' ...and I get the following label in the map: Loop [NAME] ...just like you see it, with brackets and all. Then I did some experimenting. When I try this in the config file: TEXT 'q [NAME]' ...the entire process crashes. Yes, that's simply a 'q'. Are there labeling issues in MapServer 6.0.1? Because, I think I may have found some. I'm using a custom built binary (MSVC 10) on Windows 7. Stuart Harlan ___ 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] MapScript WMS request
I am trying to convert my MapScript program to a WMS responder. I create my $map where I set all the layers and classes and colors, etc, just like for a normal, non-WMS request that works perfectly correctly. my $map = undef; $map = mapObj(name = 'mymap') unless defined $map; my $req = new mapscript::OWSRequest(); $req-setParameter( SERVICE, WMS ); $req-setParameter( VERSION, 1.1.0 ); $req-setParameter( REQUEST, GetCapabilities ); mapscript::msIO_installStdoutToBuffer(); my $dispatch_out = $map-OWSDispatch( $req ); printf %s\n, mapscript::msIO_getStdoutBufferString(); Except, the above doesn't really do anything for me. I get nothing in my browser. Suggestions? -- Puneet Kishor ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Projection of different layers
Any error message? Is the layer on? How are requesting a map, WMS, straight CGI? Basically you need to be more specific... Steve Sent from my iPad On Sep 7, 2011, at 6:49 AM, qazi iqbal qazi.iq...@gmail.com wrote: Hello I am having a mapfile with output projection set to my base layer as PROJECTION init=epsg:4326' END As long as i add a layer in the same projection, it works ok, but I added one layer with the projection PROJECTION 'init=epsg:2240' END I do not see this layer being projected on fly to output projection. I want this layer to be projected to my base layer projection on fly. What am I missing? Thanks Qazi Iqbal ___ 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: MapScript WMS request
On 11-09-07 08:18 PM, Mr. Puneet Kishor wrote: I would really appreciate insight from someone well-versed in the ins and outs of WMS via MapScript. Looking at the discussion at [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` step seems to be a crucial part of drawing the image. So, I added `my $img = $map-draw();` to my code below, and indeed, the image was drawn and sent back to the browser. Is this something that should be added to the examples in the documentation? Is this the right way to do things? In any case, I am not write to STDOUT, and sending the buffer directly. Instead, my code is very much like a regular request (and it works) -- my $new_extent = $map-{extent}; my $req = new mapscript::OWSRequest(); $req-setParameter( SERVICE, WMS ); $req-setParameter( VERSION, 1.1.0 ); $req-setParameter( REQUEST, GetMap ); $req-setParameter( BBOX, -180,-90,180,90 ); $req-setParameter( LAYERS, layer_name); $req-setParameter( SRS, -1); $req-setParameter( WIDTH, 1200); $req-setParameter( HEIGHT, 600); my $dispatch_out = $map-OWSDispatch( $req ); my $img = $map-draw(); my $map_img = 'test_' . sprintf(%0.10d, rand(10)) . '.png'; $img-save(/path/to/$map_img); return send_file(/path/to/$map_img); Comments? Corrections? Puneet, I rarely use PHP and it is possible something is broken now with PHP OWS dispatching. But it should work like: http://mapserver.org/ogc/mapscript.html#php-example Alternatively if you don't install the stdout redirection the OWSDispatch call should produce the image to stdout. Note that if you want things handled properly as a WMS request you should not be calling draw(). The ticket you reference long predates the WxS MapScript services effort. I suspect you are not really setting all the environment variables needed to make the WMS handler kick in during OWSDispatch though I'd have to play around with it to be sure. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/warmerda and watch the world go round - Rush| Geospatial Software Developer ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] .MAP file for New Zealand topo50
Hi All Just wondering if anyone has a .MAP file for the New Zealand Topo50 map series I have download the shp files from their website http://www.linz.govt.nz/topography/topo-maps/topo50 I am hoping someone else has done the hard work of putting a .map file together. Thanks Matt :) ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[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