[mapserver-users] Can a legend graphic be scaled?
All, I would like to be able to scale the symbology in the legend differently from the map (about half scale), is there any way to do that? I played around withthe Cip sizing to try and get what I was after, but that wasn’t working out quite right. [http://gis.ci.stpaul.mn.us/datasets/PUBLIC/TRANSPORTATION/STP_CENTERLINE/centerlines_stpaul_public.map?FORMAT=image/png=TRUE=WMS=1.1.1=GetLegendGraphic&_OLSALT=0.24570807258038974=1961.2263630187094=250==all] Thanks bobb "There is no reason anyone would want a computer in their home." - Ken Olson, president, chairman and founder of Digital Equipment Corp., 1977 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapServer returns a blank image when requesting a square image
Hi Pablo, Just to note I also ran into this issue so you are not alone! A WMS request from OpenLayers to MapServer would be fine, but modifying the size of the image (WIDTH and HEIGHT parameters) would result in a blank image and no errors in the logs.I never got a chance to debug further though. An error should ideally be reported somewhere rather than a blank, seemingly valid, image. Seth -- web:http://geographika.co.uk twitter: @geographika On Wed, Jan 10, 2018, at 6:46 PM, Pablo Sanfilippo wrote: > Hi all, > > I admit this is the weirdest issue I have come across. This are the > relevant parts of my MapServer configuration:> > # A valid mapfile used for testing > MAP > NAME valid > STATUS ON > PROJECTION > "init=epsg:4326" > END > > IMAGECOLOR 0 0 0 > TRANSPARENT ON > > WEB > METADATA > "wms_srs" "EPSG:4326 EPSG:3857" > END > END > > LAYER > NAME "index" > STATUS ON > TYPE POLYGON > CONNECTIONTYPE POSTGIS > CONNECTION "host=x port=x dbname=x user=x password=x" > DATA "geometry from (select i.geometry, i.id, '/vsis3/' || > i.s3_bucket || '/' || i.s3_key as location from images_image) as > index using unique id"> CLASS > STYLE > OUTLINECOLOR 0 0 0 > WIDTH 1.0 > COLOR 200 200 200 > ANTIALIAS true > END > END > END > > LAYER > NAME "images" > STATUS ON > TILEINDEX "index" > TILEITEM "location" > TYPE RASTER > PROJECTION > AUTO > END > METADATA > "wms_title" "Images" > END > END > > > END > > The data in the PostGIS index is in EPSG:4326. The images referenced > by the index are GeoTIFFs georeferenced in EPSG:4326.> > A WMS request for the index layer shows the index polygons fine, > whatever the SRS and image size in the request.> A WMS request for the images > layer using SRS=EPSG:4326 shows the > images fine, whatever the image size.> A WMS request for the images layer > using SRS=EPSG:3857 will work fine > as long as the requested image size's x is greater than or equal to > the y. If not, it will return a blank (transparent) image. For > example, a 1300x1299 image will work fine, a 1300x1300 image won't > work and 1301x1300 won't work either.> > Any clues? > > Thanks! > _ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] MapServer returns a blank image when requesting a square image
Hi all, I admit this is the weirdest issue I have come across. This are the relevant parts of my MapServer configuration: # A valid mapfile used for testing MAP NAME valid STATUS ON PROJECTION "init=epsg:4326" END IMAGECOLOR 0 0 0 TRANSPARENT ON WEB METADATA "wms_srs" "EPSG:4326 EPSG:3857" END END LAYER NAME "index" STATUS ON TYPE POLYGON CONNECTIONTYPE POSTGIS CONNECTION "host=x port=x dbname=x user=x password=x" DATA "geometry from (select i.geometry, i.id, '/vsis3/' || i.s3_bucket || '/' || i.s3_key as location from images_image) as index using unique id" CLASS STYLE OUTLINECOLOR 0 0 0 WIDTH 1.0 COLOR 200 200 200 ANTIALIAS true END END END LAYER NAME "images" STATUS ON TILEINDEX "index" TILEITEM "location" TYPE RASTER PROJECTION AUTO END METADATA "wms_title" "Images" END END END The data in the PostGIS index is in EPSG:4326. The images referenced by the index are GeoTIFFs georeferenced in EPSG:4326. A WMS request for the index layer shows the index polygons fine, whatever the SRS and image size in the request. A WMS request for the images layer using SRS=EPSG:4326 shows the images fine, whatever the image size. A WMS request for the images layer using SRS=EPSG:3857 will work fine as long as the requested image size's x is greater than or equal to the y. If not, it will return a blank (transparent) image. For example, a 1300x1299 image will work fine, a 1300x1300 image won't work and 1301x1300 won't work either. Any clues? Thanks! ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How use ogr provider with spatialite "read only" clause
According to msOGRFileOpen(mapogr.cpp:1194): hDS = OGROpen( pszDSSelectedName, MS_FALSE, NULL ); I would say that MapServer _always_ opens an OGR datasource readonly (See http://www.gdal.org/ogr__api_8h.html#a2da3630231780d519543d1679c83e62f ). > -Original Message- > From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] > On Behalf Of Andrea Peri > Sent: Wednesday, January 10, 2018 12:29 PM > To: mapserver-users@lists.osgeo.org > Subject: [mapserver-users] How use ogr provider with spatialite "read > only" clause > > Hi, > > Usually we use the spatialite db as ordinary datasource for ours > mapserver wms. > > > Now I discovered that the last versions of spatialite always test > automatically the version of the DB sqlite and if verify that the db was > create using an older spatialite version. > > TRY TO UPDATE the spatialite system tables WHEN the connection was > closed. > > > This probably is a good strategy for an ordinary desktop application. > > But more risk pendent when used on a mpaserver that could have more than > one connection open on the same DB sqlite. > > > To avoid this the standard solution used from the spatialite driver is > to check if the DB is open in READ-ONLY mode. > > > And avoid to write and update the db when it is in read-only mode. > > > So my trouble now is how the change the usual connection string in the > mapfile to say to the OGR driver to open the sqlite/spatialite using the > "read-only" mode. > > Is this possible ? > > > Many thx > > > A. > > > -- > > - > Andrea Peri > . . . . . . . . . > qwerty àèìòù > - > > ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How use ogr provider with spatialite "read only" clause
Hello Andrea, Can't you do that by "chmod" the file? Y. 2018-01-10 12:28 GMT+01:00 Andrea Peri: > Hi, > Usually we use the spatialite db as ordinary datasource for ours mapserver > wms. > > Now I discovered that the last versions of spatialite always test > automatically the version of the DB sqlite and if verify that the db was > create using an older spatialite version. > > TRY TO UPDATE the spatialite system tables WHEN the connection was closed. > > This probably is a good strategy for an ordinary desktop application. > But more risk pendent when used on a mpaserver that could have more than > one connection open on the same DB sqlite. > > To avoid this the standard solution used from the spatialite driver is to > check if the DB is open in READ-ONLY mode. > > And avoid to write and update the db when it is in read-only mode. > > So my trouble now is how the change the usual connection string in the > mapfile to say to the OGR driver to open the sqlite/spatialite using the > "read-only" mode. > > Is this possible ? > > Many thx > > A. > > -- > - > Andrea Peri > . . . . . . . . . > qwerty àèìòù > - > > > > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Training and support manager Camptocamp France SAS Bâtiment le Dauphin - 1er étage 18 rue du Lac Saint André 73382 Le Bourget-du Lac Tel (France) : +33 4 58 48 20 43 Tel (Switzerland) : +41 21 619 10 43 Mob. : +33 6 18 75 42 21 email : yves.jaco...@camptocamp.com http://www.camptocamp.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] How use ogr provider with spatialite "read only" clause
Hi, Usually we use the spatialite db as ordinary datasource for ours mapserver wms. Now I discovered that the last versions of spatialite always test automatically the version of the DB sqlite and if verify that the db was create using an older spatialite version. TRY TO UPDATE the spatialite system tables WHEN the connection was closed. This probably is a good strategy for an ordinary desktop application. But more risk pendent when used on a mpaserver that could have more than one connection open on the same DB sqlite. To avoid this the standard solution used from the spatialite driver is to check if the DB is open in READ-ONLY mode. And avoid to write and update the db when it is in read-only mode. So my trouble now is how the change the usual connection string in the mapfile to say to the OGR driver to open the sqlite/spatialite using the "read-only" mode. Is this possible ? Many thx A. -- - Andrea Peri . . . . . . . . . qwerty àèìòù - ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users