[mapserver-users] raster layer from postgis table
Hi, I've loaded a bunch of GTiff files into a postgis table and actually trying to fetch tiles with a mapserver layer with a where statement in DATA definition, eg: DATA PG:host=localhost port=5432 dbname='somedb' user='someuser' password='whatever' schema='someschema' table='cooltable' where'filename=dem20.tif' mode='2' Testing with shp2img gives an error: msResampleGDALToMap(): no overlap ... no result. If I remove where condition all the rasters - different extensions - in the table are returned in the image, which is not what I want. I didn't found anything useful in the documentation about using where statement (which should be quite straightforward) and I really would prefer not to create a table for those 20 rasters... Any hints? -- « Nunc est bibendum, nunc pede libero pulsanda tellus » ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Annotation label with styleitem auto uses bitmap font
Hi all, I have some converted AutoCAD files in MapInfo format that I'm showing via MapScript (up-to-date, via apt get). To show all components, each TAB file has both a 'line' layer (styleitem auto) and an 'annotation' layer (also set to styleitem auto). This has worked fine for ages, but there are two issues: - Special characters aren't displayed - We now have a new file, which has an odd font size Because of this new file, I'm beging flooded with this message: msGetRasterTextBBox(): General error message. selected renderer does not support bitmap font size 13 Both issues obviously mean MapServer is using its built-in bitmap font. Is there a way to override this? I've tried a few options already: - Switching to PNG instead of GIF output format - Setting class.label properties; this has been removed in 6.2 - Creating a new labelObj, and adding it via class.addLabel; this manages to crash my python script (not getting caught in try/catch) without leaving any logs when styleitem is still set to auto - Adding a default and Arial entry in my fontlist file. This seems to be ignored. Furthermore, I can't seem to get ANY logging from MapScript. I've tried setting debug to MS_TRUE in the layer, mapfile, class, etc. Log file is being created (in /tmp) but remains empty. Am I doing something wrong? Missing something? Any help would be greatly appreciated! Regards, Jelmer ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Annotation label with styleitem auto uses bitmap font
Hi Jelmer, On Wed, 2014-11-05 at 15:30 +, Jelmer Baas wrote: Hi all, I have some converted AutoCAD files in MapInfo format that I'm showing via MapScript (up-to-date, via apt get). To show all components, each TAB file has both a 'line' layer (styleitem auto) and an 'annotation' layer (also set to styleitem auto). This has worked fine for ages, but there are two issues: - Special characters aren't displayed - We now have a new file, which has an odd font size Because of this new file, I'm beging flooded with this message: msGetRasterTextBBox(): General error message. selected renderer does not support bitmap font size 13 Both issues obviously mean MapServer is using its built-in bitmap font. Is there a way to override this? I've tried a few options already: - Switching to PNG instead of GIF output format - Setting class.label properties; this has been removed in 6.2 Did you try set LABEL properties: FONT to TRUETYPE and ENCODING to UTF8 or something like that? Regards, Humberto - Creating a new labelObj, and adding it via class.addLabel; this manages to crash my python script (not getting caught in try/catch) without leaving any logs when styleitem is still set to auto - Adding a default and Arial entry in my fontlist file. This seems to be ignored. Furthermore, I can't seem to get ANY logging from MapScript. I've tried setting debug to MS_TRUE in the layer, mapfile, class, etc. Log file is being created (in /tmp) but remains empty. Am I doing something wrong? Missing something? Any help would be greatly appreciated! Regards, Jelmer ___ 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] Storing GeoTIFFs in Amazon S3 for use with Mapserver?
Thanks Frank. Do you have an example of a mapfile layer section using GDAL with vsicurl to retrieve GeoTIFFs? In my case I use a tileindex to access a directory of GeoTIFFs but we want to move them into S3. Here is a layer from my mapfile: LAYER NAME sthl-075m-rural-2005-11 GROUP 'highres' TYPE RASTER STATUS ON TILEINDEX ../../data/nz/sthl-075m-rural-2005-11_ind TILEITEM Location MAXSCALE 10 METADATA 'ows_title' 'sthl-075m-rural-2005-11' 'wms_opaque' '1' 'wms_group_title' 'highres' 'wms_resx' '0.75' 'wms_resy' '0.75' 'ows_extent' '1088800.0 4743600.0 1314400.0 5089200.0' END END Thanks, Robert Frank Warmerdam warmer...@pobox.com 5/11/2014 1:45 p.m. Robert, I've done some variations on this. I'd encourage you to watch a video by Mark Korver on this topic from FOSS4G: http://vimeo.com/106833852 I used his NAIP bucket in requestor-pays mode successfully. One thing that I ended up doing when reading the metadata was to use the vsicurl driver to access the tiffs, so only the required portions were fetched. His example actually mounts the whole bucket as a file system in which case things are much easier. I will note that when using vsicurl to access GeoTIFFs in S3 I found I had to set the following configuration variables to get it working. # Various /vsicurl hackery to get it working with signed aws urls well gdal.SetConfigOption('CPL_VSIL_CURL_ALLOWED_EXTENSIONS', 'ter') gdal.SetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN', 'YES') gdal.SetConfigOption('CPL_VSIL_CURL_USE_HEAD', 'NO') I do quite a bit of stuff here with MapServer from S3, but I usually fetch from S3 and store in /tmp for serving so by the time MapServer sees the file it is completely normal. Best regards, Frank On Tue, Nov 4, 2014 at 2:56 PM, Robert Sanson robert.san...@asurequality.com wrote: Does anyone have experience with using Amazon S3 to store GeoTIffs for use as a back-end datastore accessible by Mapserver in order to create a WMS service? Thanks, Robert Sanson Robert Sanson Veterinary Epidemiologist Batchelar Centre | Tennent Drive | Palmerston North PO Box 585 | Palmerston North 4440 | New Zealand p. +64 6 351 7990 | m. +64 21 448 472 | f. +64 6 351 7919 e. robert.san...@asurequality.com Global experts in food safety and quality | www.asurequality.com 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 -- ---+-- 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 Software Developer ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Storing GeoTIFFs in Amazon S3 for use with Mapserver?
Robert, I was actually using the vsicurl support from a prep-script similar to gdaltindex, not from in mapserver directly, so I don't have a handy example. I'd also be concerned that accessing the data via /vsicurl/ would have performance problems that would make it unwise for direct access from MapServer. One benefit of the S3 file system handlers is that they cache the files locally so multiple tile renders in mapserver from the file would be fast after the first fetch. If you use /vsicurl/ then I don't think that local caching would occur between mapserver render requests. Best regards, Frank On Wed, Nov 5, 2014 at 12:07 PM, Robert Sanson robert.san...@asurequality.com wrote: Thanks Frank. Do you have an example of a mapfile layer section using GDAL with vsicurl to retrieve GeoTIFFs? In my case I use a tileindex to access a directory of GeoTIFFs but we want to move them into S3. Here is a layer from my mapfile: LAYER NAME sthl-075m-rural-2005-11 GROUP 'highres' TYPE RASTER STATUS ON TILEINDEX ../../data/nz/sthl-075m-rural-2005-11_ind TILEITEM Location MAXSCALE 10 METADATA 'ows_title' 'sthl-075m-rural-2005-11' 'wms_opaque' '1' 'wms_group_title' 'highres' 'wms_resx' '0.75' 'wms_resy' '0.75' 'ows_extent' '1088800.0 4743600.0 1314400.0 5089200.0' END END Thanks, Robert Frank Warmerdam warmer...@pobox.com 5/11/2014 1:45 p.m. Robert, I've done some variations on this. I'd encourage you to watch a video by Mark Korver on this topic from FOSS4G: http://vimeo.com/106833852 I used his NAIP bucket in requestor-pays mode successfully. One thing that I ended up doing when reading the metadata was to use the vsicurl driver to access the tiffs, so only the required portions were fetched. His example actually mounts the whole bucket as a file system in which case things are much easier. I will note that when using vsicurl to access GeoTIFFs in S3 I found I had to set the following configuration variables to get it working. # Various /vsicurl hackery to get it working with signed aws urls well gdal.SetConfigOption('CPL_VSIL_CURL_ALLOWED_EXTENSIONS', 'ter') gdal.SetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN', 'YES') gdal.SetConfigOption('CPL_VSIL_CURL_USE_HEAD', 'NO') I do quite a bit of stuff here with MapServer from S3, but I usually fetch from S3 and store in /tmp for serving so by the time MapServer sees the file it is completely normal. Best regards, Frank On Tue, Nov 4, 2014 at 2:56 PM, Robert Sanson robert.san...@asurequality.com wrote: Does anyone have experience with using Amazon S3 to store GeoTIffs for use as a back-end datastore accessible by Mapserver in order to create a WMS service? Thanks, Robert Sanson Robert Sanson Veterinary Epidemiologist Batchelar Centre | Tennent Drive | Palmerston North PO Box 585 | Palmerston North 4440 | New Zealand p. +64 6 351 7990 | m. +64 21 448 472 | f. +64 6 351 7919 e. robert.san...@asurequality.com Global experts in food safety and quality | www.asurequality.com 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 -- ---+-- 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 Software Developer -- ---+-- 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 Software Developer ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Installation of Mapserver 6.4.1
Hi Stefanos, the next is the instructions for compiling Mapserver in Arch Linux [1]: 1. cd to src mapserver 2. rm CMakeCache.txt CMakeFiles 3. mkdir build 4. cd build 5. compiling as: cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DPYTHON_EXECUTABLE=/usr/bin/python2 \ -DPYTHON_LIBRARIES=/usr/lib/python2.7 \ -DPYTHON_INCLUDE_PATH=/usr/include/python2.7 \ -DFRIBIDI_INCLUDE_DIR=/usr/include/glib-2.0;/usr/lib/glib-2.0/include;/usr/include/fribidi \ -DWITH_CAIRO=ON \ -DWITH_CLIENT_WFS=ON \ -DWITH_CLIENT_WMS=ON \ -DWITH_CSHARP=OFF \ -DWITH_CURL=ON \ -DWITH_EXEMPI=OFF \ -DWITH_FCGI=ON \ -DWITH_FRIBIDI=ON \ -DWITH_GD=OFF \ -DWITH_GDAL=ON \ -DWITH_GENERIC_NINT=OFF \ -DWITH_GEOS=ON \ -DWITH_GIF=ON \ -DWITH_ICONV=ON \ -DWITH_JAVA=OFF \ -DWITH_KML=ON \ -DWITH_LIBXML2=ON \ -DWITH_MSSQL2008=OFF \ -DWITH_MYSQL=OFF \ -DWITH_OGR=ON \ -DWITH_ORACLESPATIAL=OFF \ -DWITH_ORACLE_PLUGIN=OFF \ -DWITH_PERL=OFF \ -DWITH_PHP=ON \ -DWITH_POINT_Z_M=OFF \ -DWITH_POSTGIS=ON \ -DWITH_PROJ=ON \ -DWITH_PYTHON=ON \ -DWITH_RSVG=OFF \ -DWITH_RUBY=OFF \ -DWITH_SDE=OFF \ -DWITH_SDE_PLUGIN=OFF \ -DWITH_SOS=ON \ -DWITH_SVGCAIRO=ON \ -DWITH_THREAD_SAFETY=ON \ -DWITH_WCS=ON \ -DWITH_WFS=ON \ -DWITH_WMS=ON \ -DWITH_XMLMAPFILE=OFF \ -DFREETYPE_INCLUDE_DIR=/usr/include/freetype2 \ 6. make clean make 7. make install regards, Samuel Mesa. [1] https://aur.archlinux.org/packages/ma/mapserver/PKGBUILD 2014-11-04 17:44 GMT-05:00 Stefanos Anastasiou emperor_s...@yahoo.gr: Hello.!! I'm wondering if the installation should be made only with cmake. Can't someone just use the repos ? I'm trying to use cmake but getting a lot or errors, probably having to do with the PREFIX path. So I'm feeling pretty confused. I'm also not that good with linux file system hierarchy. Thanks Stefanos ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- --- .~. / v \ //\\ /( )\ ^`~'^ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Install MapCache
I'm trying to install the mapcache. I've downloaded the zip file from github but i got an error when i was installing : -- The C compiler identification is GNU 4.7.2 -- The CXX compiler identification is GNU 4.7.2 -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for strncasecmp -- Looking for strncasecmp - found -- Looking for symlink -- Looking for symlink - found -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version 1.2.7) -- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version 1.2.49) -- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so -- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version 7.26.0) -- Found APR: /usr/lib/libapr-1.so -- Found APU: /usr/lib/libaprutil-1.so -- Looking for apr_memcache_hash -- Looking for apr_memcache_hash - found -- Found PkgConfig: /usr/bin/pkg-config (found version 0.26) -- checking for module 'pixman' -- package 'pixman' not found -- checking for module 'pixman-1' -- found pixman-1, version 0.26.0 -- Found PIXMAN: /usr/lib/x86_64-linux-gnu/libpixman-1.so -- Found PCRE: /usr/lib/x86_64-linux-gnu/libpcre.so -- Found SQLITE: /usr/lib/x86_64-linux-gnu/libsqlite3.so -- Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (found version 3.9.6) -- * Configured options for the mapcache library -- * Mandatory components -- * png: /usr/lib/x86_64-linux-gnu/libpng.so -- * jpeg: /usr/lib/x86_64-linux-gnu/libjpeg.so -- * Curl: /usr/lib/x86_64-linux-gnu/libcurl.so -- * Apr: /usr/lib/libapr-1.so -- * Optional components -- * PIXMAN: /usr/lib/x86_64-linux-gnu/libpixman-1.so -- * SQLITE: /usr/lib/x86_64-linux-gnu/libsqlite3.so -- * Berkeley DB: disabled -- * Memcache: /usr/lib/libaprutil-1.so -- * TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so -- * GeoTIFF: disabled -- * Experimental TIFF write support: disabled -- * PCRE: /usr/lib/x86_64-linux-gnu/libpcre.so -- * Experimental mapserver support: disabled -- Found GDAL: /usr/lib/libgdal.so -- Found GEOS: /usr/lib/libgeos_c.so -- * Seeder Configuration Options: -- * GEOS: /usr/lib/libgeos_c.so -- * OGR: /usr/lib/libgdal.so -- Found FCGI: /usr/lib/libfcgi.so -- * CGI Configuration Options: -- * FastCGI: /usr/lib/libfcgi.so -- Found APACHE: /usr/include/apache2 -- * Apache Module support status: -- * Mapcache Version String: mod_mapcache/1.2.1 -- * Module will be installed to : Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1. /usr/lib/apache2/modules -- Configuring done -- Generating done -- Build files have been written to: /var/www/mapcache-1-2-1/build ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users