[mapserver-users] AGG Rendering
Hi! I can't seem to get AGG to work. Currently my output is not antialiased. Can anyone give me some hints? Thanks! Note that I have built AGG 2.5 with freetype support. Also note that I needed two ./configure --with-postgis=/usr/bin/pg_config --with-wfs --with-proj --with-geos=/usr/bin/geos-config --with-gd=/usr/local/ --with-jpeg --with-ogr=/usr/bin/gdal-config --with-gdal=/usr/bin/gdal-config --with-agg=/usr/local/src/agg-2.5 --with-freetype MapServer is now configured for -- Compiler Info - C compiler:gcc -O2 -fPIC -Wall C++ compiler: g++ -O2 -fPIC -Wall Debug: Generic NINT: -- Renderer Settings - zlib support: -DUSE_ZLIB png support: palette rgba png support: jpeg support: iconv support: -DUSE_ICONV AGG support: -DUSE_AGG AGG Freetype support: agg_font_freetype.o Ming(flash) support: PDFLib support: -- Support Libraries - Proj.4 support:-DUSE_PROJ Libxml2 support: FriBidi support: Curl support: FastCGI support: Threading support: GEOS support: -DUSE_GEOS -- Data Format Drivers --- native tiff support: PostGIS support: -DUSE_POSTGIS EPPL7 support: -DUSE_EPPL ArcSDE support: OGR support: -DUSE_OGR GDAL support: -DUSE_GDAL Oracle Spatial support: -- OGC Services -- WMS Server:-DUSE_WMS_SVR WMS Client: WFS Server:-DUSE_WFS_SVR WFS Client: WCS Server: SOS Server: -- MapScript - PHP MapScript: no ./mapserv.cgi -v MapServer version 5.2.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE OUTPUTFORMAT NAME 'AGG_Q' DRIVER AGG/PNG IMAGEMODE RGB FORMATOPTION QUANTIZE_FORCE=ON FORMATOPTION QUANTIZE_DITHER=OFF FORMATOPTION QUANTIZE_COLORS=256 END This is the error message I get: loadOutputFormat(): General error message. OUTPUTFORMAT clause references driver AGG/PNG, but this driver isn#39;t configured. Andy -- Andy PGP Key ID: 0xDC1B5864 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] AGG Rendering
Andrew Ayre wrote: Hi! I can't seem to get AGG to work. Currently my output is not antialiased. Can anyone give me some hints? Thanks! loadOutputFormat(): General error message. OUTPUTFORMAT clause references driver AGG/PNG, but this driver isn#39;t configured. That says it all: Your mapserv binary doesn't support PNG. Says so in your mapserv -v line too: note the lack of SUPPORTS=AGG I'd suggest re-running your ./configure and check for the lines where it mentions that it's checking for AGG, cuz something's not right there. -- HostGIS, Open Source solutions for the global GIS community Greg Allensworth - SysAdmin, Programmer, GIS Person, Security Network+ Server+ A+ Security+ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Using the SQL Server 2008 Plugin with a Geography column
Hi, The MSSQL 2008 driver only compatible with the Geometry data type at the moment. In case if the Geography data type is used the spatial filter should also be specifyed as Geography which is not the case in the current implementation. You might want to submit a ticket describing the issue and we could probably get it implemented in a future release. Best regards, Tamas 2009/4/2 joncoign jnco...@knology.net To clarify I have a column in SQL 2008 of type geography that I would like to use in map server. I have been able to do this using the OGR ODBC driver. However, when trying to use the Native SQL 2008 driver that has been added to MS4W 2.3.1 I get the error message sys.geometry is incompatible with sys.geography when executing the query captured by profiling the database request. It appears as though the SQL 2008 driver either assumes that it will always (and only) be used against geometry columns or there is a configuration setting I that I can use to tell it that the internal datatype is geography and as such builds the WHERE clause using the geomertry type for the bounding box filter. SQL Excerpt: the_geom.STIntersects(Geometry::STGeomFromText('POLYGON(...)') = 1 where in this case the_geom is a Geography column that cannot be used in an STIntersects call with a Geometry object. I am hoping someone can tell me about the configuration option to change this behavior or confirm that it does not exist so we can discuss the possibility of adding such an option. Let me know if you need additional details. There are two ways to define an object spatially in 2008 one as type geometry and one as geography. -- View this message in context: http://n2.nabble.com/Using-the-SQL-Server-2008-Plugin-with-a-Geography-column-tp2565867p2575468.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ 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] Re: [mapserver-dev] MapServer 5.4 Beta 4 is now available...
Steve Lime wrote: Greetings all: MapServer 5.4 Beta 4 is now available for download at http://mapserver.org/download.html. This beta includes all the security fixes/improvements made available last week in 5.2.2 and fixes a few bugs found since beta 3. Sorry for the delay in getting this release out the door. The next release should be a release candidate and will be available mid-next week. As always any help in testing the software is greatly appreciated. Findings should be sent to the mapserver-dev (or even just mapserver-users) mailing list. The FGS modules for the beta 4 are available here: http://dl.maptools.org/dl/fgs/releases/1.0/1.0.0/modules/ and the self-installer: http://dl.maptools.org/dl/fgs/releases/1.0/1.0.0/self-installers/ Norm ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Dynamic 'OnMouseOver' Info generation vomPostGIS/Postgres
To do this you need some sort of an observer for the map and an image map is one way to do that. Here's an example: http://www.dnr.state.mn.us/ice_out/index.html In this case the data to be displayed are encoded in the image map produced by MapServer (I used the template mechanism). So, onMouseOver, a function is called to display the data object. You could just as easily wrap an ajax call in that function. You'd need to store a unique ID as part of your image map sufficient so that you can query postgres. Then the function is called you pass the ID and then use that to retrieve the additional data. The image map will work when you have a relatively small number of reasonably spaced features AND you're interface is not particularly interactive. I don't think it's possible to combine an image map with your typical pan/zoom operation. Another solution is create a polling capability in your application and tie it to some sort of an event, such has pausing the mouse for a few seconds. If that event happens you do a spatial query to see if the user is hovering over anything and if so you do something. Here's an example site: http://www.dnr.state.mn.us/waters/csg/index.html If you hold your mouse over one of the points on the map you'll get details about that feature. At each pause a query is done behind the scenes and if something is found a popup is populated. It's kinda chatty but works. Watch the above page in FireBug so see the network communication. OpenLayers has a great hover control to do this sort of thing. You can also use click events, like so: http://www.dnr.state.mn.us/waters/csg/index_copy.html Creating the content to send back will depend on the data. In the above cases I use MapServer templates to build it. You could use your favorite scripting language to do so as well. Hope this helps! Steve Heiko Schröter schro...@iup.physik.uni-bremen.de 04/02/09 7:44 AM Hello all, we are displaying satellite measurement geolocations with Mapserver and PostGIS/Postgres underneath. I would like to add a feature (similar to the MapServer:ImagMap stuff) that displays some more info about the point on which the mouse is over inside the map. i.e. geolocation, name of datafile, value or so. These infos can be sourced from the Postgres db. It is ok to just show these infos on the bottom window frame (like the MapServer:ImageMap example). How do i create the html code (javascript or php or whatever needed) with the dynamic content piped back from the Postgres db ? Sorry if this is an obvious question. I did read the ImageMap and Template stuff, but i cannot get grip to the logic when the data are coming from a db. Any pointer to more info or background knowledge deeply apreciated. Thanks. Heiko ___ 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] How to access Templating: Map Geometry Variables(or Equivalent) from OGR Connection
This would be a feature request. The runtime subs are done well ahead of the computation of things like map extent. This would be a relatively simple hack and I can show you where in the CGI code to try it out if you'd like. Steve joncoign jnco...@knology.net 04/02/09 10:47 AM I didn't get a response to my previous post so I wanted to rewrite it and attempt to make it more general. We make OGR ODBC requests to SQL Server 2005 with MSSQLSpatial extensions. To get good performance out of this system and to further secure the paramters we have been using stored procedures so we can optimize the queries inside of the database. This results in a connection object that similar to the following: CONNECTIONTYPE OGR CONNECTION OGRVRTDataSource OGRVRTLayer name='GDT' SrcDataSourceODBC:MSSQLSPATIALDSN,states/SrcDataSource SrcSQL EXEC dbo.MappingGetStates %BBOX% /SrcSQL GeometryField encoding='WKB' field='the_geom' / /OGRVRTLayer /OGRVRTDataSource DATA GDT We have had good luck using Variable Subsitution from the querystring however, sometimes it would be useful to be able to access additional varaibles from within mapserver such as those defined in the Templating section of the documentation (an alternative method to access equivalent data would be full acceptable). Specifically, it would be nice to have access to [mapext], [minx], [miny], [maxx], [maxy], [rawext], [mapext_latlon], [minlon], [minlat], [maxlon] [maxlat]. To be explicit I am asking is there a way to use these inside of the SrcSQL section of the CONNECTION. Is this functionality currently available and something I have overlooked in the manual or would this fall under the category of a feature request? Looking forward to SQL Server 2008 I think this approach will still have merit as it offers quite a bit of additional flexibility in writing and optimizing the query over what I have been able to achieve thus far with the Native SQL Server 2008 driver. I should stipulate I have only been using the new driver for a couple of weeks so I may not find it as limiting after additional testing. I have a WFS Server layer defined and have recently needed to provide this service in an alternate projection. The Data is in EPSG:4326 and I need the WFS Service to provide it in Spherical Mercator (SM / EPSG:900913). I have this working properly with the layers projection definition and wfs_srs. The problem I have is that previously I was passing the %BBOX% parameter to the database stored procedure using an OGRVRTDataSource referencing an ODBC connection. When reprojecting the WFS layer the %BBOX% does not get reprojected so it gets sent to the database in meters as defined in SM. I could reproject this in the Stored Procedure, but my client would prefer I treat their DB as a black box and not make changes. Am I correct in assuming that %BBOX% comes unaltered from the querystring? Is there another variable I can use with Variable substitution to get the BBOX in the data's projection? Or is there a way to reproject %BBOX% variable? It is critical that I can filter the data coming out of the spatial DB before it gets to MapServer for performance reasons. Any help is greatly appreciated. Jon -- View this message in context: http://n2.nabble.com/WFS-Server-Request-w-Reprojection-to-Database-tp2545150p2575962.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ 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] AGG Rendering
Gregor at HostGIS wrote: Andrew Ayre wrote: Hi! I can't seem to get AGG to work. Currently my output is not antialiased. Can anyone give me some hints? Thanks! loadOutputFormat(): General error message. OUTPUTFORMAT clause references driver AGG/PNG, but this driver isn#39;t configured. That says it all: Your mapserv binary doesn't support PNG. Says so in your mapserv -v line too: note the lack of SUPPORTS=AGG I'd suggest re-running your ./configure and check for the lines where it mentions that it's checking for AGG, cuz something's not right there. Thanks for the reply Gregor. It seems I had to change the configure file to get it to add AGG support. This is on Debian Etch. Andy -- Andy PGP Key ID: 0xDC1B5864 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] AGG Rendering
Thanks to Håvard I now have AGG compiled in. I needed to modify the configure file: AGG_LIB=-L$AGG_LIBDIR -lagg_pic -laggfontfreetype_pic Now I have SUPPORTS=AGG. Also the error has gone. But the output isn't anti-aliased. Is there something else that I need to add to the map file besides the outputformat section to get it to work? MapServer version 5.2.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE I'm using WMS and OpenLayers. thanks, Andy Andrew Ayre wrote: Hi! I can't seem to get AGG to work. Currently my output is not antialiased. Can anyone give me some hints? Thanks! OUTPUTFORMAT NAME 'AGG_Q' DRIVER AGG/PNG IMAGEMODE RGB FORMATOPTION QUANTIZE_FORCE=ON FORMATOPTION QUANTIZE_DITHER=OFF FORMATOPTION QUANTIZE_COLORS=256 END -- Andy PGP Key ID: 0xDC1B5864 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapscript shapeObj-toWKt() orms_shapeObjfromWkt problem.
Just an update, this will be fixed in the upcoming 5.4 release. Steve Moen, Paul T. pm...@nd.gov 04/01/09 3:55 PM I changed my Geos to version 3.0.3 and the error changed from Segmentation fault to Bus error. I also looked at the ticket Assefa indicated below and am wondering if that was related to the buffer or to the same problem I am having? The script I am having problems does nothing more than create a new shape object from a wkt and then re-output the wkt from the shape object. The object seems to be created fine, because I can get the number of lines with $drawnShp-numlines. I can also create a new shape object with the other shape object constructer as follows and the output works. Xphp dl('php_mapscript.so'); $drawnShp = ms_newShapeObj(MS_SHAPE_POLYGON); $line = ms_newLineObj(); $line-addXY(1207657,478875); $line-addXY(1208230,478275); $line-addXY(1207452,477811); $line-addXY(1207043,478520); $line-addXY(1207657,478875); $drawnShp-add($line); error_log($drawnShp-numlines); error_log($drawnShp-towkt()); ? Is this specifically a problem with Geos 3.1 and the function ms_shapeObjFromWkt()? Which version of Mapserver will have the patch in ticket 2929? Thanks, Paul On 4/1/09 12:33 PM, Yewondwossen Assefa yass...@dmsolutions.ca wrote: Not helping here but I have tested your script on windows with Mapserver 5.2.2 and 5.4 and the script runs ok. The geos version used in this case is geos 2.2.3. Do you know what version of geos you are using? There was a recent fix done toward geos support in MapServer and the problem from what I remember was occurring with geos 3.1 (Is that correct Tom ?) (http://trac.osgeo.org/mapserver/ticket/2929 Best Regards Moen, Paul T. wrote: I get a segmentation fault when I run the following simple script with PHP MapScript on Mac OSX 10.5.6 running the latest versions from www.kyngchaos.com #!/usr/local/php5cgi/bin/php -q Xphp dl('php_mapscript.so'); $newwkt = 'MULTIPOLYGON(((1207657 478875,1208230 478275,1207452 477811,1207043 478520,1207657 478875)))'; $drawnShp = ms_shapeObjFromWkt($newwkt); echo $drawnShp-toWKT(); ? /Library/WebServer/CGI-Executables/mapserv -v MapServer version 5.2.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE The only output is; Segmentation fault The php version is 5.2.9 and the same thing happens with php versions 5.2.8, 5.2.5. *MapServer Version*MapServer version 5.2.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE *PHP MapScript Version*($Revision: 7937 $ $Date: 2008-09-30 07:37:46 -0700 (Tue, 30 Sep 2008) $) Anybody else run into this this error? How do I get more debug information? Thanks, Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Assefa Yewondwossen Software Analyst Email: ass...@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] setFilter problem (c#)
Hello guys... I got a problem... My code : var _filter = ('[gid]'='10'); var _layer = _map.MapObj.getLayerByName(X); var _lC = _layer.clone(); _lC.setFilter(_filter); _lC.name = Dummy; _lC.status = 1; _lC.getClass(0).getStyle(0).color.setRGB(0, 250, 250); _lC.getClass(0).getStyle(0).outlinecolor.setRGB(0, 250, 0); _map.MapObj.insertLayer(_lC, _map.MapObj.numlayers-1); - No error, but the filter layer doest appear... If I took of the filter line, the layer shows up ok... Any idea? []´s ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How to access Templating: Map Geometry Variables(or Equivalent) from OGR Connection
I haven't built MapServer before I have been using MS4W builds. However, if you can show me where to make this change I will be happy to get up to speed and work on the change. Jon This would be a feature request. The runtime subs are done well ahead of the computation of things like map extent. This would be a relatively simple hack and I can show you where in the CGI code to try it out if you'd like. Steve -- View this message in context: http://n2.nabble.com/Re%3A-How-to-access-Templating%3A-Map-Geometry-Variables%28or-Equivalent%29-from-OGR-Connection-tp2581092p2582268.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: setFilter problem (c#)
I forgot, my mapserver version 5.2.0 Thanks On Fri, Apr 3, 2009 at 3:21 PM, Paul james paulj...@gmail.com wrote: Hello guys... I got a problem... My code : var _filter = ('[gid]'='10'); var _layer = _map.MapObj.getLayerByName(X); var _lC = _layer.clone(); _lC.setFilter(_filter); _lC.name = Dummy; _lC.status = 1; _lC.getClass(0).getStyle(0).color.setRGB(0, 250, 250); _lC.getClass(0).getStyle(0).outlinecolor.setRGB(0, 250, 0); _map.MapObj.insertLayer(_lC, _map.MapObj.numlayers-1); - No error, but the filter layer doest appear... If I took of the filter line, the layer shows up ok... Any idea? []´s ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] PIXMAP Positioning
Are PIXMAP symbols for points always centered on the point? I want to add thumb tack style markers, like Google Maps, where the entire image should be located above the point. Is this possible? thanks, Andy -- Andy PGP Key ID: 0xDC1B5864 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] PIXMAP Positioning
Andrew Ayre wrote: Are PIXMAP symbols for points always centered on the point? I want to add thumb tack style markers, like Google Maps, where the entire image should be located above the point. Is this possible? thanks, Andy Type OFFSET x y where x and y are in pixels. -Steve W ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] AGG Rendering
Andrew Ayre wrote: Now I have SUPPORTS=AGG. Also the error has gone. But the output isn't anti-aliased. Is there something else that I need to add OUTPUTFORMAT NAME 'AGG_Q' DRIVER AGG/PNG IMAGEMODE RGB FORMATOPTION QUANTIZE_FORCE=ON FORMATOPTION QUANTIZE_DITHER=OFF FORMATOPTION QUANTIZE_COLORS=256 END Have you tried removing those formatoption lines? Seems to me that forcing it to a 256-color palette will mess with AGG's very careful subpixel shading alpha-channel stuff. The paragraph I use is this. OUTPUTFORMAT NAME png MIMETYPE image/png DRIVER AGG/PNG EXTENSION png IMAGEMODE RGBA TRANSPARENT OFF END -- HostGIS, Open Source solutions for the global GIS community Greg Allensworth - SysAdmin, Programmer, GIS Person, Security Network+ Server+ A+ Security+ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] PIXMAP Positioning
Stephen Woodbridge wrote: Andrew Ayre wrote: Are PIXMAP symbols for points always centered on the point? I want to add thumb tack style markers, like Google Maps, where the entire image should be located above the point. Is this possible? thanks, Andy Type OFFSET x y where x and y are in pixels. Thanks Steve! Andy -- Andy PGP Key ID: 0xDC1B5864 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] WFS Layers not visualized and big size?
Hi ! I got a WFS server with two layers inside -nothing special. But now something weird happens: When I try to build them in in a wms/wfs client together they are not shown. If there is only one layer embed in the client it works without any problems. Anybody knows why ? And another strange thing is the size of files (xyz.tmp.gml and xyz.tmp.gfs) which are created in the tmp-folder. The size of them is about 4 - 11MB, and that's why every request lasts a few second (too long I think.. because the data isn't that large). Or is this case normal? (Mapserver: 4.10) thank you kind regards m.sirin -- View this message in context: http://n2.nabble.com/WFS-Layers-not-visualized-and-big-size--tp2583277p2583277.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users