Re: [mapserver-users] Mapserver 6 WMS / PostGIS Problem
A few guesses/hints... Perhaps enable DEBUG in your postgis layer, and compare the SQL query that is generated by shp2img and by the WMS request. What are the differences? What if you try to run the same SQL query at the psql prompt or in pgadmin? Which version of MapServer are you upgrading from? Did the same WMS request work in that older version? Daniel On 11-05-20 01:35 PM, Rob McCulley wrote: I’m trying to upgrade to Mapserver 6, but I’m having some difficulty with my PostGIS layers. I’ve made all of the style / symbology changes required by Version 6, as well as adding the “wms_enable_request” “*” line to the WEB section. My raster and shapefile layers work fine. Any mapfile that has a postgis layer won’t work at all. On a GetCapabilities request, the cgi executable just churns away at 100% CPU usage, but never produces a result. A GetMap request produces the same result. I running on windows 7, and I’ve tried the binaries from both MS4W as well as the ones available from Tamas. I also tried to roll my own, but all returned the same results. It doesn’t appear to be a problem with the mapfile or the postgis access, because shp2img produces images just fine. It’s only WMS requests that don’t work. An example mapfile is below. It works fine with shp2img, but hangs on any WMS request. Thanks in advance, Rob McCulley Mapfile: MAP NAME "WMS-test" STATUS ON SIZE 800 800 SYMBOLSET symbol.sym EXTENT 497444 5856659 566947 5971683 UNITS METERS WEB IMAGEPATH "/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/tmp/" IMAGEURL "/tmp/" METADATA "ows_enable_request" "*" "wms_title" "WMS Demo Server" "wms_onlintresource" "http://localhost/cgi-bin/mapserv.exe?map=wmstest.map&"; "wms_srs" "EPSG:26912" END END CONFIG "PROJ_LIB" "C:/proj/nad/" PROJECTION "init=epsg:26912" END LAYER NAME "parcels" METADATA "wms_title" "Parcels" END TYPE POLYGON STATUS OFF CONNECTION "host=gpsserver dbname=CVR user=* password=*" CONNECTIONTYPE postgis DATA "shape FROM (SELECT id AS oid, geom AS shape FROM titles WHERE county = 1) AS foo USING UNIQUE oid USING SRID=26912" PROJECTION "init=epsg:26912" END CLASS NAME "Parcels" STYLE OUTLINECOLOR 0 0 0 END END END END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver 6 - Background color shift
Hi All, I'm hoping someone has experienced this or knows how to fix this problem. In currently running Mapserver 5.6 on Redhat Enterprise Linux 5 (compiled from source, no issues). Wanting to test version 6, I compiled the latest Mapserver 6 release on Redhat Enterprise Linus 5. I updated the required libraries (gdal, gd, png, jpg, etc) and it did compiled successfully. Running ./mapserv -v list out the usual configuration parameters. However, when creating a map from a mapfile using cgi-bin, the map is drawn correctly except for the map background. All maps are drawn with a yellow background color. It's as if the first decimal value is set to zero or is missing (e.g., version 6 is rendering IMAGECOLOR as 255 255 0 instead of the 0 255 0 I specify in the mapfile).. I've recompiled, checked the gdal, gd and png versions, tried different mapfiles, etc., but the color shift issue persists. Here are the library versions, the mapserv -v output and a mapfile snippet. gdal 2.0.24 gd 1.8.0 geos 3.2.0 proj 4.7.0 jpeg 8c png 1.5.2 tiff 3.9.2 ./mapserv6 -v MapServer version 6.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE MAP NAME "WORLD" IMAGETYPE PNG EXTENT -180 -90 180 90 SIZE 700 500 SHAPEPATH "/var/www/html/mapdata/world/" IMAGECOLOR 255 255 255 FONTSET"/var/www/html/fonts/fonts.list" CONFIG GDAL_DATA "/usr/local/share/gdal" PROJECTION "epsg:4326" "proj=longlat" "ellps=WGS84" "datum=WGS84" "no_defs" END LAYER # States polygon layer begins here NAME BASE DATA world_adm0.shp STATUS OFF TYPE POLYGON LABELITEM"NAME" CLASSITEM"GMI_CNTRY" CLASS NAME "THE_WORLD" STYLE COLOR176 255 176 OUTLINECOLOR 32 32 32 END EXPRESSION /./ LABEL MAXSCALEDENOM25 COLOR 0 0 0 TYPE POINT FONT verdana SIZE 10 ANTIALIAS TRUE POSITION CC PARTIALS FALSE MINDISTANCE 300 BUFFER 4 END END END -- Cheers, Karl ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Are dynamically generated tiles cached once generated?
Hi all, Quick question on mapserver/tilecache. Lets say a raster layer is dynamically generated with mapserver - is it cached/tiled? The next time a user loads the same area of a map at the same scale, will the tile load faster? Is this a "by default" setting or can this be configured somewhere? Let me know if you need further information! Thank you, Nicolas ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver 6 WMS / PostGIS Problem
I'm trying to upgrade to Mapserver 6, but I'm having some difficulty with my PostGIS layers. I've made all of the style / symbology changes required by Version 6, as well as adding the "wms_enable_request" "*" line to the WEB section. My raster and shapefile layers work fine. Any mapfile that has a postgis layer won't work at all. On a GetCapabilities request, the cgi executable just churns away at 100% CPU usage, but never produces a result. A GetMap request produces the same result. I running on windows 7, and I've tried the binaries from both MS4W as well as the ones available from Tamas. I also tried to roll my own, but all returned the same results. It doesn't appear to be a problem with the mapfile or the postgis access, because shp2img produces images just fine. It's only WMS requests that don't work. An example mapfile is below. It works fine with shp2img, but hangs on any WMS request. Thanks in advance, Rob McCulley Mapfile: MAP NAME "WMS-test" STATUS ON SIZE 800 800 SYMBOLSET symbol.sym EXTENT 497444 5856659 566947 5971683 UNITS METERS WEB IMAGEPATH "/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/tmp/" IMAGEURL "/tmp/" METADATA "ows_enable_request" "*" "wms_title" "WMS Demo Server" "wms_onlintresource" "http://localhost/cgi-bin/mapserv.exe?map=wmstest.map&"; "wms_srs" "EPSG:26912" END END CONFIG "PROJ_LIB" "C:/proj/nad/" PROJECTION "init=epsg:26912" END LAYER NAME "parcels" METADATA "wms_title" "Parcels" END TYPE POLYGON STATUS OFF CONNECTION "host=gpsserver dbname=CVR user=* password=*" CONNECTIONTYPE postgis DATA "shape FROM (SELECT id AS oid, geom AS shape FROM titles WHERE county = 1) AS foo USING UNIQUE oid USING SRID=26912" PROJECTION "init=epsg:26912" END CLASS NAME "Parcels" STYLE OUTLINECOLOR 0 0 0 END END END END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] opacity and outputformat
url = "blablabl/cgi-wms/mapserv?map=patate&randomnumber" + mt_rand() + "&"; layer->set("connection",url) and everything is good 2011/5/19 Marc-André Trottier > i'm using MapScript to create un mapObj. > finally a draw the image with Map->draw(); > > but the OPACITY is not good. Just one OPACITY, of my two layers, is set to > all image > > i got this for my Outputformat : > > OUTPUTFORMAT > NAME "aggpng24" > MIMETYPE "image/png; mode=24bit" > DRIVER "AGG/PNG" > EXTENSION "png" > IMAGEMODE "RGBA" > TRANSPARENT TRUE > END > > i think it's good. > > if the address is not the same in the parameter CONNECTION > it's all good. > > can i add a random number in my CONNECTION ? > with the mapscript > > Marc-André Trottier > > > > > 2011/5/12 thomas bonfort > Opacity is set as a single integer between 0 and 100 on the layer level. > There are no limitations on setting it on multiple layers, but in that > case the opacity adds up, so if you have two layers with opacity 50, > the final opacity of the image ends up being 75. > > If your final images end up with no opacity, this could be because > your are also including a layer with full opacity, or because you are > using a format which does not support an alpha channel (i.e. jpeg) > > regards, > thomas > > On Mon, May 9, 2011 at 19:18, Marc-André Trottier > wrote: > > hi! > > how can i get a output with opacity on 2 or more layers. > > with only 1 layer it's working fine but not with 2 or more. > > > > How should be written OPACITY when using IMAGEMODE RGBA ? (ALPHA) > > i tried something like OPACITY 22,22,22,22 but looks bad > > > > in all my tests, all i got was my 2 layers with full opacity (100) ... > > > > here is my mapfile : > > > > MAP > > EXTENT -8146324.306063 5632144.09953312 -8137075.425642 > 5638229.88815488 > > FONTSET "fonts" > > IMAGECOLOR 255 255 255 > > IMAGETYPE AGGA > > SIZE 732 482 > > STATUS ON > > UNITS METERS > > NAME "MS" > > > > OUTPUTFORMAT > > NAME 'AGGA' > > DRIVER AGG/PNG > > IMAGEMODE RGBA > > TRANSPARENT TRUE > > END > > > > PROJECTION > > "init=epsg:900913" > > END > > LEGEND > > IMAGECOLOR 255 255 255 > > KEYSIZE 20 10 > > KEYSPACING 5 5 > > LABEL > > ANGLE 0.00 > > ANTIALIAS TRUE > > FONT "arial" > > MAXSIZE 256 > > MINSIZE 4 > > SIZE 10 > > TYPE TRUETYPE > > BUFFER 0 > > COLOR 255 255 255 > > FORCE FALSE > > MINDISTANCE -1 > > MINFEATURESIZE -1 > > OFFSET 0 0 > > PARTIALS TRUE > > END > > OUTLINECOLOR 0 0 0 > > POSITION LR > > POSTLABELCACHE TRUE > > STATUS EMBED > > TRANSPARENT FALSE > > END > > > > QUERYMAP > > COLOR 255 255 0 > > SIZE -1 -1 > > STATUS OFF > > STYLE HILITE > > END > > > > SCALEBAR > > ALIGN CENTER > > COLOR 0 0 0 > > IMAGECOLOR 255 255 255 > > INTERVALS 4 > > LABEL > > SIZE MEDIUM > > TYPE BITMAP > > BUFFER 0 > > COLOR 0 0 0 > > FORCE FALSE > > MINDISTANCE -1 > > MINFEATURESIZE -1 > > OFFSET 0 0 > > PARTIALS TRUE > > POSITION CR > > END > > OUTLINECOLOR 0 0 0 > > POSITION LL > > SIZE 200 3 > > STATUS EMBED > > STYLE 0 > > UNITS METERS > > END > > > > WEB > > IMAGEPATH "path" > > IMAGEURL "" > > QUERYFORMAT text/html > > LEGENDFORMAT text/html > > BROWSEFORMAT text/html > > END > > > > LAYER > > CONNECTION "PATATE3" > > CONNECTIONTYPE WMS > > DEBUG 5 > > METADATA > > "wms_srs""EPSG:900913" > > "wms_name""PATATE3" > > "wms_format""image/png" > > "wms_server_version""1.1.1" > > END > > NAME "Carte" > > PROCESSING "CLOSE_CONNECTION=NORMAL" > > PROJECTION > > "init=epsg:900913" > > END > > STATUS ON > > TRANSFORM FALSE > > TYPE RASTER > > UNITS METERS > > END > > > > LAYER > > CONNECTION "PATATE2" > > CONNECTIONTYPE WMS > > DEBUG 5 > > METADATA > > "wms_srs""EPSG:900913" > > "opacity""100" > > "wms_name""PATATE2" > > "wms_format""image/png" > > "wms_server_version""1.1.1" > > END > > NAME "PATATE2" > > PROCESSING "CLOSE_CONNECTION=NORMAL" > > PROJECTION > > "init=epsg:900913" > > END > > STATUS ON > > TRANSFORM FALSE > > TYPE RASTER > > UNITS METERS > > END > > > > LAYER > > CONNECTION "PATATE" > > CONNECTIONTYPE WMS > > DEBUG 5 > > METADATA > > "wms_srs""EPSG:900913" > > "opacity""40" > > "wms_name""PATATE" > > "wms_format""image/png" > > "wms_server_version""1.1.1" > > END > > NAME "PATATE" > > PROJECTION > > "init=epsg:900913" > > END > > STATUS ON > > OPACITY 40 > > TYPE RASTER > > UNITS METERS > > END > > > > END > > > > > > ___
Re: [mapserver-users] QuadTree Index problem
On 11-05-20 10:30 AM, Forest wrote: Hello,everyone. I am using the Mapserver to deploy a webgis system.And I've used the shp2tree tool to generate .qix File. When I ZoomOut my web map,I found that,the more I zoomOut,Mapserver loads vector data more slow.Then I go to see the source code, I found that when the extent is bigger,it will search from the root to the bottom of the quadtree. Is there anyway so solve the problem?And Is this a bug? Wait for ur answers,thank you! Forest, This is the expected behavior. The typical approach to this problem is to produce a new "reduced resolution" shapefile with less refined features and less important features discarded and then use this as a distinct layer in your mapfile. The "full resolution" shapefile would be used at some scales and the simplified shapefile was be used at other scales. There are keywords you can place in Map LAYERs to restrict the layers to only be used at particular scales. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] QuadTree Index problem
Hello,everyone. I am using the Mapserver to deploy a webgis system.And I've used the shp2tree tool to generate .qix File. When I ZoomOut my web map,I found that,the more I zoomOut,Mapserver loads vector data more slow.Then I go to see the source code, I found that when the extent is bigger,it will search from the root to the bottom of the quadtree. Is there anyway so solve the problem?And Is this a bug? Wait for ur answers,thank you!___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] confused about mapscript java configuration
good catch, that's probably because of some of the recent changes in the mapserver codebase. please open a ticket and address it to me, i'll fix it asap. BR, Umberto 2011/5/20 ahmet temiz > Thank you Umberto , > > I did. > > It constructed libmapscript.so, and mapscript.jar. > > " make test" passes. > But, "make threadtests" gave > > orkun@orkun-HP:~/data/mapserver-6.0.0/mapscript/java$ make threadtests > javac -cp ./mapscript.jar -d tests/threadtest/ tests/threadtest/*.java > tests/threadtest/MapThread.java:60: cannot find symbol > symbol : method getFeature(int,int) > location: class edu.umn.gis.mapscript.layerObj >shapeObj shape=layer.getFeature(0,-1); >^ > 1 error > make: *** [threadtests] Error 1 > > how can I solve this problem ? > > regards > > > 20 Mayıs 2011 10:15 tarihinde Umberto Nicoletti > yazdı: > > Ahmet, > > you gave the wrong param to with-java-include-os-name and usually it is > not > > necessary to specify anything as it will correctly guess from the > > environment. > > Try this: > > set JAVA_HOME to point to the jdk (NOTE: a full JDK is required, JRE is > NOT > > enough) > > run ./configure (leave with-java-include-os-name out for now) > > make > > cd mapscript/java > > make clean > > make > > HTH, > > Umberto > > 2011/5/19 ahmet temiz > >> > >> hello > >> > >> I think I am confused about mapscript java configuration > >> > >> I added my configuration file > >> --with-java-include-os-name=$JAVA_HOME/include > >> > >> But It still cannot find "jni.h" > >> > >> I checked $JAVA_HOME: > >> > >> orkun@orkun-HP:~$ ls $JAVA_HOME/include/ > >> classfile_constants.h jawt.h jdwpTransport.h jni.h jvmti.h linux > >> // jni.h seems to exist. > >> > >> > >> what might have caused the problem ? > >> > >> 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 > > > > > > > > -- > 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
Re: [mapserver-users] confused about mapscript java configuration
Thank you Umberto , I did. It constructed libmapscript.so, and mapscript.jar. " make test" passes. But, "make threadtests" gave orkun@orkun-HP:~/data/mapserver-6.0.0/mapscript/java$ make threadtests javac -cp ./mapscript.jar -d tests/threadtest/ tests/threadtest/*.java tests/threadtest/MapThread.java:60: cannot find symbol symbol : method getFeature(int,int) location: class edu.umn.gis.mapscript.layerObj shapeObj shape=layer.getFeature(0,-1); ^ 1 error make: *** [threadtests] Error 1 how can I solve this problem ? regards 20 Mayıs 2011 10:15 tarihinde Umberto Nicoletti yazdı: > Ahmet, > you gave the wrong param to with-java-include-os-name and usually it is not > necessary to specify anything as it will correctly guess from the > environment. > Try this: > set JAVA_HOME to point to the jdk (NOTE: a full JDK is required, JRE is NOT > enough) > run ./configure (leave with-java-include-os-name out for now) > make > cd mapscript/java > make clean > make > HTH, > Umberto > 2011/5/19 ahmet temiz >> >> hello >> >> I think I am confused about mapscript java configuration >> >> I added my configuration file >> --with-java-include-os-name=$JAVA_HOME/include >> >> But It still cannot find "jni.h" >> >> I checked $JAVA_HOME: >> >> orkun@orkun-HP:~$ ls $JAVA_HOME/include/ >> classfile_constants.h jawt.h jdwpTransport.h jni.h jvmti.h linux >> // jni.h seems to exist. >> >> >> what might have caused the problem ? >> >> 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 > > -- 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
Re: [mapserver-users] confused about mapscript java configuration
Ahmet, you gave the wrong param to with-java-include-os-name and usually it is not necessary to specify anything as it will correctly guess from the environment. Try this: set JAVA_HOME to point to the jdk (NOTE: a full JDK is required, JRE is NOT enough) run ./configure (leave with-java-include-os-name out for now) make cd mapscript/java make clean make HTH, Umberto 2011/5/19 ahmet temiz > hello > > I think I am confused about mapscript java configuration > > I added my configuration file > --with-java-include-os-name=$JAVA_HOME/include > > But It still cannot find "jni.h" > > I checked $JAVA_HOME: > > orkun@orkun-HP:~$ ls $JAVA_HOME/include/ > classfile_constants.h jawt.h jdwpTransport.h jni.h jvmti.h linux > // jni.h seems to exist. > > > what might have caused the problem ? > > 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