[UMN_MAPSERVER-USERS] Mapscript Question
I am doing a layer search using the method queryByAttributes and want to know if I can get the map coordinates from the result. So far, I haven't seen anything in the API documentation that supports this. Is this possible? Greg
[UMN_MAPSERVER-USERS] MapScript Spatial Query Help
I'm stuck and I don't know where to go from here. I need to search a layer by latitude/longitude, but I don't see this available in the API. How is this done? What I want to do is take an address, geocode it to produce the lat/long coordinate, and use it to query my shape file. I feel I may be missing a step. Greg
Re: [UMN_MAPSERVER-USERS] MapScript Spatial Query Help
David, I am using that object and method and it works fine if I supply coordinates provided by MapServer based on a click point. To test, I setup a demo with my map. When I click on the image, the query results are produced and I am given the image and map coordinates. When I plug the map coordinates into another test application - built with MapScript using the layerObj - I get the same results. But when I supply geocoded lat/long values (from geocoder.us) for a feature I know exists in my map, I don't get any results. That tells me there is a difference between the coordinate systems. Or, there is something that I haven't considered. From: UMN MapServer Users List [mailto:[EMAIL PROTECTED] On Behalf Of Fawcett, David Sent: Friday, February 22, 2008 2:16 PM To: MAPSERVER-USERS@LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] MapScript Spatial Query Help I assume that you are looking for the layerObj method queryByPoint(). I don't have an example for you though. David. queryByPoint( mapObj http://mapserver.gis.umn.edu/docs/reference/mapscript/index_html#mapobj map, pointObj http://mapserver.gis.umn.edu/docs/reference/mapscript/index_html#pointo bj point, int mode, float buffer ) : int Query layer at point location specified in georeferenced map coordinates (i.e. not pixels). The query is performed on all the shapes that are part of a CLASS that contains a TEMPLATE value or that match any class in a layer that contains a LAYER TEMPLATE value. Mode is MS_SINGLE or MS_MULTIPLE depending on number of results you want. Passing buffer =0 defaults to tolerances set in the map file (in pixels) but you can use a constant buffer (specified in ground units) instead. Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing was found or if some other error happened. -Original Message- From: UMN MapServer Users List [mailto:[EMAIL PROTECTED] On Behalf Of Pearson, Gregory Sent: Friday, February 22, 2008 1:07 PM To: MAPSERVER-USERS@LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] MapScript Spatial Query Help I'm stuck and I don't know where to go from here. I need to search a layer by latitude/longitude, but I don't see this available in the API. How is this done? What I want to do is take an address, geocode it to produce the lat/long coordinate, and use it to query my shape file. I feel I may be missing a step. Greg
[UMN_MAPSERVER-USERS] MS4W GDAL/OGR
Has anyone had issues with using ogrinfo.exe? I get the following error message: I found the file in the cgi-bin folder and copied it to the local gdal-ogr folder, but then received another error on a different *dll. So, I copied all the dlls to the local directory and then it worked. What's the right way to have it reference the files in the cgi-bin directory? Greg image002.jpg
Re: [UMN_MAPSERVER-USERS] MS4W GDAL/OGR
Ok, I must have missed that in the documentation. I just extracted the files to the root directory and almost everything worked out the box in Apache. And since IIS has port 80, I use port 81. That's all it takes to run under IIS? Have you had any problems? Thanks, Greg From: Milo van der Linden [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 20, 2008 10:00 AM To: Pearson, Gregory Cc: MAPSERVER-USERS@LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-USERS] MS4W GDAL/OGR Hello Greg, I am running Mapserver as a IIS cgi-bin component. Installed it in C:\Mapserver and then set the environment variables as follows. Path %PATH%; C:\MapServer\cgi-bin; C:\MapServer\tools\gdal-ogr; C:\MapServer\tools\mapserv; C:\MapServer\tools\shapelib; C:\MapServer\proj\bin; C:\MapServer\tools\shp2tile; C:\MapServer\tools\shpdiff; C:\MapServer\tools\avce00; GDAL_DATAC:\Mapserver\gdaldata GDAL_DRIVER_PATHC:\Mapserver\gdalplugins PROJ_LIBC:\MapServer\proj\nad Also make sure that the user under whom you use the tools has read access rights on ALL the directories required by the different mapserver dll's Pearson, Gregory schreef: Has anyone had issues with using ogrinfo.exe? I get the following error message: I found the file in the cgi-bin folder and copied it to the local gdal-ogr folder, but then received another error on a different *dll. So, I copied all the dlls to the local directory and then it worked. What's the right way to have it reference the files in the cgi-bin directory? Greg image001.jpg
[UMN_MAPSERVER-USERS] Itemquery Error
I'm having a hard time finding information on this error: mapserv(): Web application error. Metadata qstring_validation_pattern is not set. It is raised when I run an itemquery with the parameters: qlayer=cad, qitem=GISID, and qstring=1. The last parameter - qstring - should actually be a numeric. Here is the querystring: http://dmz-web-srv:81/cgi-bin/mapserv.exe?zoomdir=0zoomsize=2layer=cit ylayer=cityborderlayer=parklayer=cadlayer=cadborderlayer=watermode =itemqueryqlayer=cadimgbox=qitem=GISIDimgshape=qstring=%221%22maps hape=map_CAD_tolerance=2imgxy=200+150imgext=1377116.003087+557733.625 000+1462348.472157+621604.573000map=d%3A%5Cms4w%5Capache%5Chtdocs%5Cmap data%5Ccad.mapprogram=mapserv.exeslayer=cadpreviousmode=%5Bpreviousmo de%5Dsavequery=true Greg
[UMN_MAPSERVER-USERS] FW: Itemquery Error
I have the answer. I needed this in my query layer: METADATA qstring_validation_pattern '.' END Thanks, Lawrence. From: Pearson, Gregory Sent: Wednesday, February 20, 2008 3:38 PM To: 'MAPSERVER-USERS@LISTS.UMN.EDU' Subject: Itemquery Error I'm having a hard time finding information on this error: mapserv(): Web application error. Metadata qstring_validation_pattern is not set. It is raised when I run an itemquery with the parameters: qlayer=cad, qitem=GISID, and qstring=1. The last parameter - qstring - should actually be a numeric. Here is the querystring: http://dmz-web-srv:81/cgi-bin/mapserv.exe?zoomdir=0zoomsize=2layer=cit ylayer=cityborderlayer=parklayer=cadlayer=cadborderlayer=watermode =itemqueryqlayer=cadimgbox=qitem=GISIDimgshape=qstring=%221%22maps hape=map_CAD_tolerance=2imgxy=200+150imgext=1377116.003087+557733.625 000+1462348.472157+621604.573000map=d%3A%5Cms4w%5Capache%5Chtdocs%5Cmap data%5Ccad.mapprogram=mapserv.exeslayer=cadpreviousmode=%5Bpreviousmo de%5Dsavequery=true Greg
[UMN_MAPSERVER-USERS] Query Shapefile
Is there a way to perform something like a spatial query on a shapefile? I need to take an address and determine if my widgets are near it. I know this is typically done with geocoding and polygon analysis tools, which MapServer does not supply. The geocoder.us service provides latitude and longitude based on the address, but I don't have a way to relate this to my shapefile. I'm told that ArmIMS does this without a spatial database. Greg
[UMN_MAPSERVER-USERS] Polygon Fill Transparency
Is there a way to specify polygon fill transparency in a map file? Greg
Re: [UMN_MAPSERVER-USERS] ArcIMS migration
Thanks, Michael. The plan is to install MapServer on a new box and port an existing application. I have installed MS on a server and want to translate the existing AXL file to *.map and reuse the shape files. If this worked well, I might be able to convince the GIS group to switch over. Are there good open source tools that are comparable to IMS? For example, what would you use to create shape files? It looks like displaying maps on the web is rather complicated and will be a steep learning curve for me. And I only have a couple of months to put something together. To get started, I may get the book Web Mapping Illustrated. Am I in over my head? Greg From: UMN MapServer Users List [mailto:[EMAIL PROTECTED] On Behalf Of Smith, Michael Sent: Monday, February 11, 2008 3:50 PM To: MAPSERVER-USERS@LISTS.UMN.EDU Subject: [UMN_MAPSERVER-USERS] ArcIMS migration I recently had to install ArcIMS alongside MapServer (well the other way around actually), using MS4W. The trick was really to get ArcIMS running on the Apache 2.2.4 and Tomcat 5.5.25. My notes are included below. Please note that if you do this ESRI will NOT support your ArcIMS. The supported environment for ArcIMS 9.2 is Apache 2.0.58 and Tomcat 5.5.17. Another avenue to try (I did this but did not implement) is installing MS4W, but don't run Apache. Instead configure IIS to look for MapServer. In this situation you could co-host ArcIMS on IIS and Tomcat 5.5.17 with MS4W. As for migrating applications you will likely have to rewrite them for MS. ** Michael Smith Maine Office of GIS Procedure for installing MS4W MapServer alongside IMS 9.2 Background: MS4W runs on a bundled Apache distribution (2.2.4), while IMS can run on either IIS or Apache (2.0.58 is the supported version). Tomcat also requires Tomcat servlet engine (5.5.17 is the supported version). The trick here is that the newest version of Tomcat (5.5.25) should be used with Apache 2.2.4, thus they (and IMS) must be configured to use the newest versions of both. 1) Unzip the MS4W 2.2.6 distribution to c:\ms4w. Run the install script. Verify the install by opening the default MapServer web page with http://hostname http://%3chostname 2) Download and install Java 2 SDK 1.5.6 to c:\j2sdk156. Install the J2RE to c:\jre156. 3) Install Tomcat 5.5.25 to c:\tomcat5525, do a 'full' install, set the password, path to JRE should be c:\j2sdk156. IMPORTANT - at this point you will need to update the tcnative-1.dll that is bundled. It has a bug and needs to be replaced with a newer version. Download version 1.1.19 from http://tomcat.heanet.ie/native/ and copy it into c:\tomcat5525\bin, overwriting the existing one. Tomcat service will need to be stopped while you copy the file. 4) Create system environment variables (or replace existing ones): JAVA_HOME = c:\j2sdk156 CATALINA_HOME = c:\tomcat5525 PATH = (append this to the PATH) ;%JAVA_HOME%\bin 5) Download the JK 1.2.26 connector file for Tomcat 5.5.25 and Apache 2.2.4 (should be mod_jk-1.2.26-httpd-2.2.4.so) and save it as c:\ms4w\apache\modules\mod_jk.so). 6) Create this file c:\tomcat5525\conf\mod_jk.conf: JkWorkersFile C:\ms4w\Apache\conf\workers.properties JkLogFile C:\Tomcat5525\logs\mod_jk.log JkLogLevel all VirtualHost * ServerName your hostname JkMount /servlet ajp13 JkMount /servlet/* ajp13 JkMount /esriadmin ajp13 JkMount /esriadmin/* ajp13 JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /webdav ajp13 JkMount /webdav/* ajp13 JkMount /tomcat-docs ajp13 JkMount /tomcat-docs/* ajp13 JkMount /manager ajp13 JkMount /manager/* ajp13 JkMount /servlets-examples ajp13 JkMount /servlets-examples/* ajp13 /VirtualHost 7) Create this file c:\ms4w\apache\conf\workers.properties: #---LOAD BALANCER worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=ajp13 #You should configure your environment slash...ps=\on NT and / on UNIX #and may be different elsewhere. # ps=\ #---DEFAULT worker list-- #The worker that your plugins should create and work with # worker.list=ajp13 #DEFAULT ajp13 WORKER DEFINITION- # #Defining a worker named ajp13 and of type ajp13 #Note that the name and the type do not have to match. # worker.ajp13.port=8009 worker.ajp13.host=dep-eia1pcgis1 worker.ajp13.connection_pool_size=10 worker.ajp13.connection_pool_timeout=600 worker.ajp13.socket_keepalive=False # #*End worker.properties* 8) Modify the c:\ms4w\apache\conf\httpd.conf file, find the line: #LoadModule ssl_module modules/mod_ssl.so and add this module after it: LoadModule jk_module modules/mod_jk.so then add this line at the end of the file: include c:/tomcat5525/conf/mod_jk.conf 9) Verify the Apache/Tomcat install with this: Restart Apache and Tomcat http://hostname/servlets-examples/servlet/HelloWorldExample http://%3chostname%3e/servlets-examples/servlet/HelloWorldExample (should return a Hello
[UMN_MAPSERVER-USERS] New Member
I'm completely new to maps and have a question. I am thinking about helping another group move from ArcIMS to MapServer. Has anyone here done this? Greg