Hello,

I apologize please ignore my mention of EPSG 4326.  My end result is a WMS map 
in Web Mercator 3857.  My underlying data is stored in a shapefile that is in 
WKID 103749 which is a projection has already been included in proj.db  as ESRI 
as the authority .  The underlying map application is using javascript.  I know 
that my map is finding proj.db because it MapServer does not complain when I 
convert UTM 14 to Web Mercator...  but that does not help because the 
underlying data is not in UTM 14.

Here is how I have the projections of my map is set up:
MAP
  PROJECTION
    "init=epsg:3857"
  END  #end map projection
  LAYER
    DATA 'ParcelsLyon.shp'
    PROJECTION
      "init=epsg:103749" #Error: proj_create: cannot expand init=espg:103749 
type=crs
      "init=crs:103749"  # Error: proj_create: cannot expand init=crs:103749 
type=crs
      "init=ESRI:103749" #Error: proj_create: cannot expand init=esri:103749 
type=crs
      "init=epsg:26914"  #MapServer does not warn about any errors, but of 
course nothing draws because my data is in a different projection
    END #layer projection
  END #end layer
END #end map

Example request
http://localhost/cgi-bin/mapserv.exe?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=parcels%2CCityLimits%2CTownships&MAP=%2Fms4w%2Fapps%2Flyondata%2F.%2Fmaps%2Falllayers%2FAllLayers.map&SRS=EPSG%3A3857&STYLES=&WIDTH=1569&HEIGHT=912&BBOX=-10678090.52943604%2C5544408.3738651555%2C-10668156.653791208%2C5550182.55779638


@Bob
I could project my shapefile into any projection.  However, I will hit a wall 
with my raster layers which I prefer not to project at this time.

Thanks!


From: [email protected] <[email protected]>
Sent: Thursday, January 6, 2022 7:19 PM
To: Mark Volz <[email protected]>
Subject: RE: [mapserver-users] working with ESRI coordinate systems in proj.db

It's a little unclear to me what you are attempting.
A mapfile can be defined where the map's projection is EPSG:3857 (web mercator) 
set in a projection block at the map level, and your layer definition can have 
a projection block set to whatever projection you are using. That tells the map 
to render in web Mercator but says what projection your layer is stored in so 
that map server knows when to reproject stuff. I think you know that, but I'm 
just covering the "is it plugged in" issues and to suggest making sure the 
right projections are in the right projection blocks.

Although not quite the problem you are having yet, epsg:4326 is wgs84 lat/lon. 
Web Mercator is: EPSG:3857.

If I remember correctly the projection can be defined for a mapfile projection 
block using the proj code definition if not the ESPG/numeric code. If that 
works, it might mean that MapServer isn't using the proj.db file like you 
expect. Or if it is using a proj.db file it may be located elsewhere. Whether 
putting the whole proj definition is viable for your ultimate use it would at 
least identify the problem.

Then there's a question of access. How are you "accessing" things? Are you 
using WFS? Or are you using a python/php/other script? Are things stored in a 
shp file or postgis or other database?

If you are using wfs are you passing the desired projection on the request? 
Also, are you defining the allowed wms/wfs projections?

I'm not sure how much I personally can be of help, but any further context on 
your setup and what you are attempting that you are free and willing to provide 
will help folks here narrow down the possibilities.




From: MapServer-users 
<[email protected]<mailto:[email protected]>>
 On Behalf Of Mark Volz
Sent: Thursday, January 6, 2022 9:19 AM
To: [email protected]<mailto:[email protected]>
Subject: [mapserver-users] working with ESRI coordinate systems in proj.db

Hello,

Could someone help me with setting up MapServer to use a non ESRI projection 
that is already stored in proj.db?  The coordinate system is for Lyon County, 
MN #103749 and is stored with ESRI as the authority.  I know that we can set up 
MapServer to use Web Mercator by setting the adding "init=epsg:4326" to a 
projection block.  Unfortunately I cannot access my counties coordinate system 
by setting the projection with "init=esri:103749".

Thank you for any help!

Sincerely,
Mark Volz, GISP

_______________________________________________
MapServer-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to