[mapserver-users] Σχετ: Σχετ: Mapserver can't read mapfile
Hi Steve, yes they are bot set. The whole mapfile looks like this. MAP NAME Dasarxeia UNITS DD SIZE 800 600 IMAGECOLOR 255 255 255 IMAGETYPE JPEG SHAPEPATH /home/mapdata/data/dasarxeia EXTENT 17.00 33.00 32.00 42.00 WEB TEMPLATE /usr/local/apache2/htdocs/dasarxeia.html IMAGEPATH /usr/local/apache2/htdocs/tmp IMAGEURL /tmp/ END LAYER NAME Dasarxeia DATA dasarxeia STATUS default TYPE polygon LABELCACHE on LABELITEM POIST CLASS STYLE COLOR 0 0 0 END LABEL COLOR 0 0 0 SIZE SMALL END END END END Στις 11:48 μ.μ. Κυριακή, 1 Ιουνίου 2014, ο/η Stephen Woodbridge wood...@swoodbridge.com έγραψε: Are your MAP UNITS DD Set? -Steve On 6/1/2014 3:31 PM, Stefanos Anastasiou wrote: Hi Jeff, I came to this old post once again and I tried the above mentioned. shp2img still produces an image which is blank or whatever the color of the mapfile is defined. On the other hand I checked the EXTENT once again and it was wrong so I changed to the appropriate one (EXTENT 17.00 33.00 32.00 42.00) which I checked on QGIS in WGS84 so it should be fine. If STATUS is set to default or On there's no difference. I also changed TYPE to line and polygon just to be sure but nothing. My shapefile is a polygon with boundaries. Why wouldn't it appear on the browser? Thanks again and I'm sorry for writing about it so late. Stefanos Στις 7:15 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Jeff McKenna jmcke...@gatewaygeomatics.com έγραψε: Hi sorry long thread and I bet this has already been said, but here were my thoughts when I read your problems: - always test your mapfile at the commandline first, using the shp2img utility (http://mapserver.org/utilities/shp2img.html). Once your layers look find there in the generated map image then move to your application - if using MapServer CGI (mode=map), a blank map often means you are not specifically telling MapServer to turn on layers; try adding LAYERS=all - or setting each of your layer's STATUS values to DEFAULT might work (but this can cause lots of trouble later, so this is not often recommended) -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2/10/2014, 11:15 AM, Stefanos Anastasiou wrote: Hello!! I'am having my mapfile place in /home/mapdata folder whereas I also keep a couple of other mapfiles too. I'm trying to load it in the following form on the browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map and all I get is a blank page. No errors no nothing. Then I created an html template in order to click it from there by creating a simple link (and not a from) in the following hyperlink: a href=http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/mapmode=map This link /a And I get the following error: msLoadMap(): Unable to access file. Last time this happened I was invoking Mapserver through a form but this time it's just a simple link. Why is it happening ? The weird thing is that all the other mapfiles that are seem to be working are are having the same permission settings with the current: -rw-r--r-- Thanks a lot! ___ mapserver-users mailing list mapserver-users@lists.osgeo.org mailto: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
[mapserver-users] Σχετ: Σχετ: Mapserver can't read mapfile
Hi Jeff, thanks for your reply. - I indeed used the ogrinfo utility and I gave me the extent in GCS_GGRS_1987. So I transformed the coordinates to WGS84. - I also had my moved my data one folder up (that is also my Shapepath /home/mapdata/data/) just to make sure. -The output of shp2img -m dasarxeia.map -o test.png -all_debug 3 gives me the following: [Mon Jun 2 18:48:09 2014].50643 msLoadMap(): 0.001s [Mon Jun 2 18:48:09 2014].54233 msDrawMap(): rendering using outputformat named jpeg (AGG/JPEG). [Mon Jun 2 18:48:09 2014].54749 msDrawMap(): Layer 0 (Dasarxeia), 0.000s [Mon Jun 2 18:48:09 2014].54951 msDrawMap(): Drawing Label Cache, 0.000s [Mon Jun 2 18:48:09 2014].55124 msDrawMap() total time: 0.004s [Mon Jun 2 18:48:09 2014].75257 msSaveImage(test.png) total time: 0.020s [Mon Jun 2 18:48:09 2014].75714 shp2img total time: 0.026s Another weird thing I noticed is that if I try to run the mapfile itself on the browser (http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/dasarxeia.mapmode=map) it gives me an error - msLoadMap(): Unable to access file. (/home/stefanos/mapdata/dasarxeia.map) The permissions that are set for the mapfile are: -rw-rw-rw- I was also wondering if it is some kind of a configuration in Apache's http.conf Thanks -Stefanos Στις 3:57 μ.μ. Δευτέρα, 2 Ιουνίου 2014, ο/η Jeff McKenna jmcke...@gatewaygeomatics.com έγραψε: Hi Stefanos, Some comments: - the best way to get the exact extent is to use the ogrinfo commandline utility with the -summary switch: ogrinfo dasarxeia.shp dasarxeia -summary - be careful with your SHAPEPATH, if your file is /home/mapdata/data/dasarxeia.shp then I would put for your SHAPEPATH /home/mapdata/data/ - when using shp2img, at the end of the command add -all_debug 3 to see more useful error messages/notices - sometimes extent values in QGIS can be confusing, because sometimes it can display the data in a different projection without you knowing it (Project Properties/CRS/Enable 'on the fly' transformation)...so be careful -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2014-06-01, 4:31 PM, Stefanos Anastasiou wrote: Hi Jeff, I came to this old post once again and I tried the above mentioned. shp2img still produces an image which is blank or whatever the color of the mapfile is defined. On the other hand I checked the EXTENT once again and it was wrong so I changed to the appropriate one (EXTENT 17.00 33.00 32.00 42.00) which I checked on QGIS in WGS84 so it should be fine. If STATUS is set to default or On there's no difference. I also changed TYPE to line and polygon just to be sure but nothing. My shapefile is a polygon with boundaries. Why wouldn't it appear on the browser? Thanks again and I'm sorry for writing about it so late. Stefanos Στις 7:15 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Jeff McKenna jmcke...@gatewaygeomatics.com έγραψε: Hi sorry long thread and I bet this has already been said, but here were my thoughts when I read your problems: - always test your mapfile at the commandline first, using the shp2img utility (http://mapserver.org/utilities/shp2img.html). Once your layers look find there in the generated map image then move to your application - if using MapServer CGI (mode=map), a blank map often means you are not specifically telling MapServer to turn on layers; try adding LAYERS=all - or setting each of your layer's STATUS values to DEFAULT might work (but this can cause lots of trouble later, so this is not often recommended) -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2/10/2014, 11:15 AM, Stefanos Anastasiou wrote: Hello!! I'am having my mapfile place in /home/mapdata folder whereas I also keep a couple of other mapfiles too. I'm trying to load it in the following form on the browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map and all I get is a blank page. No errors no nothing. Then I created an html template in order to click it from there by creating a simple link (and not a from) in the following hyperlink: a href=http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/mapmode=map This link /a And I get the following error: msLoadMap(): Unable to access file. Last time this happened I was invoking Mapserver through a form but this time it's just a simple link. Why is it happening ? The weird thing is that all the other mapfiles that are seem to be working are are having the same permission settings with the current: -rw-r--r-- Thanks a lot! ___ 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
Re: [mapserver-users] Σχετ: Σχετ: Mapserver can't read mapfile
On 2014-06-02, 12:56 PM, Stefanos Anastasiou wrote: Hi Jeff, thanks for your reply. - I indeed used the ogrinfo utility and I gave me the extent in GCS_GGRS_1987. So I transformed the coordinates to WGS84. I'm not sure what you mean here by I transformed the coordinates. Literally copy/paste the extents from ogrinfo into your EXTENT parameter in your mapfile. -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] Σχετ: Σχετ: Mapserver can't read mapfile
Yeah sorry... I guess you're right. This is my mapfile: MAP NAME Peloponisos MAP UNITS dd SIZE 640 480 IMAGECOLOR 255 255 255 IMAGETYPE png SHAPEPATH /home/mapdata/data EXTENT -5.00 0.00 0.00 5.00 WEB TEMPLATE '/usr/local/apache2/htdocs/pelop.html' IMAGEPATH '/usr/local/apache2/htdocs/tmp' IMAGEURL '/tmp/' END LAYER NAME 'geodata' DATA aisthitika_dash STATUS default TYPE polygon LABELCACHE on LABELITEM 'TEXTSTRING' CLASS NAME Dasi STYLE COLOR 212 192 100 END LABEL COLOR 0 0 0 SIZE small END #Label END #Class END #layer END #mapfile Στις 6:00 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Fawcett, David (MNIT) david.fawc...@state.mn.us έγραψε: To further diagnose this, it would be useful to see the contents of you mapfile. If no errors are being thrown, it is quite possible that there is an issue with spatial reference systems, bounding boxes, or class expressions. David. From:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stefanos Anastasiou Sent: Monday, February 10, 2014 9:50 AM To: j...@mapmedia.de; mapserver-users@lists.osgeo.org Subject: [mapserver-users] Σχετ: Mapserver can't read mapfile Sorry fellows... indeed there is a typo but in this e-mail... I checked my files again and they seem correct... If I type on my browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map all I get is a blank page. The data folder has full permissions: drwxrwxrwx All other shapefiles are working correctly but yesterday I just added two more in the folder and all I get is a blank screen... (?) Στις 5:37 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Jörg Thomsen j...@mapmedia.de έγραψε: Hi, please have a look at your path: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.map and http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/map I guess the first one is correct and that's why you get the error-msg with the 2nd one. So, what exactly is the result of the request http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map ? it sounds like a white image, not nothing. In this case you should check the bboxes and srs first. regards, Jörg Am 10.02.2014 16:15, schrieb Stefanos Anastasiou: Hello!! I'am having my mapfile place in /home/mapdata folder whereas I also keep a couple of other mapfiles too. I'm trying to load it in the following form on the browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map and all I get is a blank page. No errors no nothing. Then I created an html template in order to click it from there by creating a simple link (and not a from) in the following hyperlink: a href=http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/mapmode=map This link /a And I get the following error: msLoadMap(): Unable to access file. Last time this happened I was invoking Mapserver through a form but this time it's just a simple link. Why is it happening ? The weird thing is that all the other mapfiles that are seem to be working are are having the same permission settings with the current: -rw-r--r-- Thanks a lot! ___ 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] Σχετ: Σχετ: Mapserver can't read mapfile
Hi Stefanos, thanks for the mapfile. Here are some points I would check: - you habe MAP two times in your file (might be ok, though) - you don't have a projecten defined In which projection are your data? The white color you see in your browser come from the IMAGECOLOR. So MapServer is actually creating a image without objects rendered. I would enable the debugging to check in the logfile whether MapServer is getting any data out of your data source. If this is not the case than you need to check your GetMap request if the srs and bbox is matching your data source projection. You also defined the EXTENT with -5.00 0.00 0.00 5.00. Is this the correct extent of your source data? Lars with the help of Jörg :) On 10.02.2014 17:10, Stefanos Anastasiou wrote: Yeah sorry... I guess you're right. This is my mapfile: MAP NAME Peloponisos MAP UNITS dd SIZE 640 480 IMAGECOLOR 255 255 255 IMAGETYPE png SHAPEPATH /home/mapdata/data EXTENT -5.00 0.00 0.00 5.00 WEB TEMPLATE '/usr/local/apache2/htdocs/pelop.html' IMAGEPATH '/usr/local/apache2/htdocs/tmp' IMAGEURL '/tmp/' END LAYER NAME 'geodata' DATA aisthitika_dash STATUS default TYPE polygon LABELCACHE on LABELITEM 'TEXTSTRING' CLASS NAME Dasi STYLE COLOR 212 192 100 END LABEL COLOR 0 0 0 SIZE small END #Label END #Class END #layer END #mapfile Στις 6:00 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Fawcett, David (MNIT) david.fawc...@state.mn.us έγραψε: To further diagnose this, it would be useful to see the contents of you mapfile. If no errors are being thrown, it is quite possible that there is an issue with spatial reference systems, bounding boxes, or class expressions. David. *From:*mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Stefanos Anastasiou *Sent:* Monday, February 10, 2014 9:50 AM *To:* j...@mapmedia.de; mapserver-users@lists.osgeo.org *Subject:* [mapserver-users] Σχετ: Mapserver can't read mapfile Sorry fellows... indeed there is a typo but in this e-mail... I checked my files again and they seem correct... If I type on my browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map all I get is a blank page. The data folder has full permissions: drwxrwxrwx All other shapefiles are working correctly but yesterday I just added two more in the folder and all I get is a blank screen... (?) Στις 5:37 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Jörg Thomsen j...@mapmedia.de mailto:j...@mapmedia.de έγραψε: Hi, please have a look at your path: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.map and http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/map I guess the first one is correct and that's why you get the error-msg with the 2nd one. So, what exactly is the result of the request http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map ? it sounds like a white image, not nothing. In this case you should check the bboxes and srs first. regards, Jörg Am 10.02.2014 16:15, schrieb Stefanos Anastasiou: Hello!! I'am having my mapfile place in /home/mapdata folder whereas I also keep a couple of other mapfiles too. I'm trying to load it in the following form on the browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map and all I get is a blank page. No errors no nothing. Then I created an html template in order to click it from there by creating a simple link (and not a from) in the following hyperlink: a href=http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/mapmode=map This link /a And I get the following error: msLoadMap(): Unable to access file. Last time this happened I was invoking Mapserver through a form but this time it's just a simple link. Why is it happening ? The weird thing is that all the other mapfiles that are seem to be working are are having the same permission settings with the current: -rw-r--r-- Thanks a lot! ___ mapserver-users mailing list mapserver-users@lists.osgeo.org mailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org mailto: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] Σχετ: Σχετ: Mapserver can't read mapfile
Stefanos, It looks like you have a duplicate MAP line in there. You are also specifying an extent that is from 5 deg west longitude to 0 deg longitude and from the equator to 5 deg north latitude. Does your data fall in that part of the world? David. From: Stefanos Anastasiou [mailto:emperor_s...@yahoo.gr] Sent: Monday, February 10, 2014 10:10 AM To: Fawcett, David (MNIT); j...@mapmedia.de; mapserver-users@lists.osgeo.org Subject: Σχετ: [mapserver-users] Σχετ: Mapserver can't read mapfile Yeah sorry... I guess you're right. This is my mapfile: MAP NAME Peloponisos MAP UNITS dd SIZE 640 480 IMAGECOLOR 255 255 255 IMAGETYPE png SHAPEPATH /home/mapdata/data EXTENT -5.00 0.00 0.00 5.00 WEB TEMPLATE '/usr/local/apache2/htdocs/pelop.html' IMAGEPATH '/usr/local/apache2/htdocs/tmp' IMAGEURL '/tmp/' END LAYER NAME 'geodata' DATA aisthitika_dash STATUS default TYPE polygon LABELCACHE on LABELITEM 'TEXTSTRING' CLASS NAME Dasi STYLE COLOR 212 192 100 END LABEL COLOR 0 0 0 SIZE small END #Label END #Class END #layer END #mapfile Στις 6:00 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Fawcett, David (MNIT) david.fawc...@state.mn.usmailto:david.fawc...@state.mn.us έγραψε: To further diagnose this, it would be useful to see the contents of you mapfile. If no errors are being thrown, it is quite possible that there is an issue with spatial reference systems, bounding boxes, or class expressions. David. From: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stefanos Anastasiou Sent: Monday, February 10, 2014 9:50 AM To: j...@mapmedia.demailto:j...@mapmedia.de; mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: [mapserver-users] Σχετ: Mapserver can't read mapfile Sorry fellows... indeed there is a typo but in this e-mail... I checked my files again and they seem correct... If I type on my browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map all I get is a blank page. The data folder has full permissions: drwxrwxrwx All other shapefiles are working correctly but yesterday I just added two more in the folder and all I get is a blank screen... (?) Στις 5:37 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Jörg Thomsen j...@mapmedia.demailto:j...@mapmedia.de έγραψε: Hi, please have a look at your path: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.map and http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/map I guess the first one is correct and that's why you get the error-msg with the 2nd one. So, what exactly is the result of the request http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map ? it sounds like a white image, not nothing. In this case you should check the bboxes and srs first. regards, Jörg Am 10.02.2014 16:15, schrieb Stefanos Anastasiou: Hello!! I'am having my mapfile place in /home/mapdata folder whereas I also keep a couple of other mapfiles too. I'm trying to load it in the following form on the browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map and all I get is a blank page. No errors no nothing. Then I created an html template in order to click it from there by creating a simple link (and not a from) in the following hyperlink: a href=http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/mapmode=map This link /a And I get the following error: msLoadMap(): Unable to access file. Last time this happened I was invoking Mapserver through a form but this time it's just a simple link. Why is it happening ? The weird thing is that all the other mapfiles that are seem to be working are are having the same permission settings with the current: -rw-r--r-- Thanks a lot! ___ 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.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