<div dir="ltr"><div><div><div><div>Hello,<br></div><br>I still cannot get the full image, using shp2img or mapserv commands.<br></div><br>I have uploaded the mapfile, the original image, the result image and the expected image (got from gdalwarp) here : <a href="ftp://ftp.meteo.fr/pub/CMS/mapserver/">ftp://ftp.meteo.fr/pub/CMS/mapserver/</a><br><br></div>Does someone has got an idea on how to work around it ?<br></div>Thanks !<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-13 10:25 GMT+02:00 fred p <span dir="ltr"><<a href="mailto:mapoubelle22@gmail.com" target="_blank">mapoubelle22@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Thanks again for your advices.<br></div><br>Unfortunately, I get the same image with shp2img :<br>shp2img -m mapfile.map -o /tmp/foo -e -179.99 -89.99 179.99 89.99 -s 800 400 -l polar_orbiting_avhrr4 -i image/png -all_debug<br></div>Nothing special in the debug massages.<br><div><div><br>No change about the projection error message with a corrected projection string or with projection auto. I activate the epsg:4326 (though this is not exactly the projection of my data) definition to actually have a projection defined into the layer without any error message.<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-12 17:28 GMT+00:00 Jeff McKenna <span dir="ltr"><<a href="mailto:jmckenna@gatewaygeomatics.com" target="_blank">jmckenna@gatewaygeomatics.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2015-08-12 11:43 AM, fred p wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks to Jeff for the answer.<br>
<br>
I simplified the mapfile to make it easier to read.<br>
<br>
Below I give the mapfile with these additional elements. I do not have<br>
warnings anymore with a GetCapabilities request but the image I get<br>
whith a GetMap request is still incomplete.<br>
<br>
Note that I get an error (/msProcessProjection(): Projection library<br>
error. proj error "projection not named" for ""/) with a projection<br>
block in the layer section if I declare the real projection definition<br>
(/"+proj=longlat +a=6378160 +b=6356775 +no_defs "/). No error with<br>
/"+init=epsg:4326"/ which is closed to the real projection definition.<br>
As I have read somewhere that if not present the projection is read in<br>
the data file, I have removed it (the image I get is the same).<br>
<br>
<br>
<br>
MAP<br>
STATUS ON<br>
NAME "foo"<br>
CONFIG "MS_ERRORFILE" "stderr"<br>
IMAGETYPE "agg"<br>
MAXSIZE 8192<br>
EXTENT -180 -90 180 90<br>
PROJECTION<br>
"init=epsg:4326"<br>
END<br>
OUTPUTFORMAT<br>
NAME "agg"<br>
DRIVER "AGG/PNG"<br>
MIMETYPE "image/png8"<br>
IMAGEMODE "PC256"<br>
EXTENSION "png"<br>
END<br>
WEB<br>
METADATA<br>
"ows_enable_request" "*"<br>
"ows_sld_enabled" "true"<br>
"wms_feature_info_mime_type" "text/html"<br>
"ows_onlineresource" "<a href="http://127.0.0.1:8080/wms" rel="noreferrer" target="_blank">http://127.0.0.1:8080/wms</a>"<br>
"wms_title" "WMS"<br>
"wms_srs" "epsg:4326"<br>
END<br>
END<br>
LAYER<br>
STATUS ON<br>
TYPE RASTER<br>
NAME "polar_orbiting_avhrr4"<br>
DATA "/tmp/polar_orbiting_avhrr4.tiff"<br>
OFFSITE 0 0 0<br>
PROCESSING "RESAMPLE=NEAREST"<br>
METADATA<br>
"wms_title" "foo"<br>
END<br>
#PROJECTION<br>
# "init=epsg:4326"<br>
#END<br>
#PROJECTION<br>
# "+proj=longlat +a=6378160 +b=6356775 +no_defs"<br>
#END<br>
END<br>
END<br>
<br>
<br>
</blockquote>
<br>
Give a good read to the projection page for MapServer (<a href="http://www.mapserver.org/mapfile/projection.html" rel="noreferrer" target="_blank">http://www.mapserver.org/mapfile/projection.html</a>), take note of the Example#1, how to define the PROJ.4 parameters (I believe your error is because you've included the "+" by mistake), and then add in your projection block to your layer. And never assume that MapServer can magically read your projection and then announce that to all of your WMS users: always define each layer's actual projection. You can also experiment with the "PROJECTION AUTO" use, as described on that page, but I honestly avoid that and set all accurate projection definitions for each layer.<br>
<br>
If this was my situation, I'd test this first without WMS, just with the shp2img commandline tool, by modifying my output project (see the "Important Notes" at <a href="http://www.mapserver.org/mapfile/projection.html#important-notes" rel="noreferrer" target="_blank">http://www.mapserver.org/mapfile/projection.html#important-notes</a>) and making sure that this layer is reprojected correctly; once that works, and I'm satisfied with the map image, I'd start testing the WMS reprojection.<br>
<br>
-jeff<br>
<br>
<br>
<br>
<br>
-- <br>
Jeff McKenna<br>
MapServer Consulting and Training Services<br>
<a href="http://www.gatewaygeomatics.com/" rel="noreferrer" target="_blank">http://www.gatewaygeomatics.com/</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</blockquote></div><br></div>
</blockquote></div><br></div>