[Geomoose-users] Projection Issues, Extent Issues, Limit Buffer Size, Security

Jim Klassen Jim.Klassen at ci.stpaul.mn.us
Thu May 8 14:57:19 EDT 2008


Mark,

# The Mapfile for reprojecting the WMS would look something like:

===

MAP
        NAME LMIC_FSA
        STATUS ON
        SIZE 800 800
        EXTENT 540000 135000 600000 175000
        UNITS FEET

        IMAGETYPE JPEG

        TRANSPARENT ON

        PROJECTION
                "init=epsg:200068"
        END

        LAYER
                NAME LMIC_FSA
                STATUS DEFAULT
                TYPE RASTER
                CONNECTIONTYPE WMS
                CONNECTION "http://geoint.lmic.state.mn.us/cgi-bin/wms?STYLES=&"

                METADATA
                        "ows_title" "layer_0"
                        "gml_include_items" "all"
                        "wms_srs" "EPSG:26915"
                        "wms_name" "fsa"
                        "wms_server_version" "1.1.1"
                        "wms_format" "jpeg"
                END

                PROJECTION
                      "init=epsg:26915"
                END
        END
END

===

The key points here are your projection is specified outside of the LAYER. In our case I made a shortcut so that EPSG:20068 maps to Ramsey county coordinates. You can use the normal PROJ.4 format strings here for your county instead. (See: http://mapserver.gis.umn.edu/docs/reference/mapfile/projection for more info.)

The other two key points are inside the layer definition.
 The projection inside the layer definition tells Mapserver the projection that layer will be returned from the WMS in. In your case will be epsg:26915 for UTM15N. Similarly, The "wms_srs" inside the METADATA tells the WMS server what projection you want it to return the request in (if it supports it). This should be EPSG:26915 for UTM15N. 



# As for per layer security... I have a setup we've been using here that is based on using Apache <Location> directives and rewrite rules that I would be willing to share if you are interested.

The basic premise is the rewrite rule changes makes it look to the clients (web browser/geomoose) that the .map file is the "cgi" and then behind the scenes translates that into a call to mapserver. Now, since the clients are making a request for the .map file that can be filtered by username using <Location> directives. You do have to be sure that the clients cannot access the .map files or mapserver cgi directly though.

So the client calls: https://myserver/datasets/my_layer.map?mode=map&mapext=1+2+3+4&...

Apache checks using the typical HTTP(s) authentication methods that the user has access to /datasets/my_layer.map using the configuration in the <Location> directives. If the user does, access is granted, if not Apache returns an error telling the client that it needs to ask for a user/password and try again.

Assuming access is granted, the rewrite rule in Apache re-writes the request and re-submits it to the server as
/hidden/cgi-bin/mapserv?map=/something/datasets/my_layer.map&mode=map&mapext=1+2+3+4&....

Where mapserver handles the request as normal and sends the result back to the client.




>>> "Mark Volz" <MarkVolz at co.lyon.mn.us> 05/07/08 7:44 PM >>>
This message covers a couple questions I have within Geomoose including

#Projection Issues

#Extent Issues

#Limit Buffer Size

#Security

 

#Projection Issues:

 

What I would like to do is:

 

a) Include data in either UTM or Lyon County Coordinates - including the
ability to utilize the LMIC WMS Server which is in UTM. 

b) Have the XY location on the bottom of the map to display Lyon County
Coordinates, the latitude and longitude must be accurate for the pictometry
tool. 

 

Currently my data is in UTM so that it matches the LMIC imagery.  The XY
location of also is in UTM.  The highway department expressed interest in
having the XY location display in County Coordinates.  To fix this, I changed
the Coordinate system in the .js file from UTM to MN-COUNTY LYON.  The XY
location did display our county coordinates and the measurements were
correct; however, the latitude and longitude are no longer valid.

 

I would like to keep using the LMIC UTM image server, however, we do need the
XY location in county coordinates and the latitude and longitude to be
correct.  The GIS data could be in county coordinates or UTM.  For my own
curiosity I would like to know how to get the county coordinates to work, I
also think it might save time dealing with updates - and yes I understand
that there will be a performance hit if mapserver reprojects on the fly,
however I can always switch back if I think its too slow.  Perhaps someone
could send me a .map file using county coordinates as an example.

 

#Extent Issue

 

Next, I am having some issues with the extent.  What I would like to do is
display only a portion of the data by using a top bottom left right box area
instead of a query.  However when I assign to small of an area the entire
layer does not draw.  Can I use the extent to limit the displayed area, or is
this not possible?

 

#Select by Buffer

On the select by buffer tool I noticed that If I typed in a ridicules number
such as "buffer parcels within 900 miles" The server obviously could not
handle the request and crashed.  Is there a way to limit the buffer size?

 

#Security question

Last,  

We need the ability for some users to log in to get access to more secure
data.  For example a we need a public and internal site or perhaps one where
users log in i.e. The Sheriff might want a "crime map" whereas only the
sheriff and deputies have access to that information.  Does anyone have any
ideas on how this could be done though geomoose?

 

 

Mark Volz

GIS Specialist

Lyon County, MN

(507) 532-8218

 






More information about the Geomoose-users mailing list