[Mapserver-users] CGI extent defined in lat/lon

Thomas Chesky thomaschesky at yahoo.com
Tue Jul 20 16:28:21 EDT 2004


--0-346505720-1090355301=:92203
Content-Type: text/plain; charset=us-ascii

Matthew,

Thanks. It workes when proper projection is added to the layer . The layer is actually in CA State Plane NAD83 but I could find the corresponding epsg in PROJ 4.
 
I have another layer with the following .proj info.
 
PROJCS["NAD_1983_HARN_StatePlane_Washington_North_FIPS_4601_Feet",GEOGCS["GCS_North_American_1983_HARN",DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1640416.666666667],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-120.8333333333333],PARAMETER["Standard_Parallel_1",47.5],PARAMETER["Standard_Parallel_2",48.73333333333333],PARAMETER["Latitude_Of_Origin",47.0],UNIT["Foot_US",0.3048006096012192]]
 
How do I define this in the map file? I could not find the related epsg code?
 
Thanks again.
 
Thomas

Matthew Perry <mtperry78 at sbcglobal.net> wrote:
Thomas,
In order to reproject your vector data, you need to
add a projection object to your layer. So assuming
your data is in UTM, Zone 10 that would be:

"init=epsg:26710" for NAD27 datum OR
"init=epsg:26910" for NAD83 datum

You can check the metadata for the streets data to see
which datum is used. Or just try both and see which
one lines up. 

Matthew Perry
Humboldt State University
Natural Resources Planning


--- Thomas Chesky wrote:
> Hello,
> I have a USGS DOQ showing a section of San
> Francisco. I know the lat/lon boudaries
> and would like to request an image from mapserver to
> return sf street lines for the same extent and in
> the same projection.
> 
> The USGS image is coming from a different legacy
> app, so I am not planning to integrate that layer
> into mapserver, but I'd like to produce a matching
> vector layer.
> 
> The problem I have is the following:
> 
> I can reproject (via the map file) the vector layer
> to the desired projection, epsg:4326
> but I have hard time defining the same extent via
> the CGI interface.
> shpinfo gives me an extent of the street lines, I
> believe in UTM
> 
> I can use that metrics to pass in MAPEXT CGI param
> and get the proper image, but if I use lat/lon
> extent (left bottom pair followed by right top pair)
> I get blank image.
> 
> I tried it by removing the extent from the map file,
> settings UNITS DD etc.
> nothing worked but I am pretty sure, that I have the
> right lat/lon extent (should overlap the extent of
> the shape file) 
> 
> To generalize it further, I'd like to know if one
> can pass in lat/lon extent as cgi param even though
> the original shp extent is in UTM. Also, when I
> converted the lat/lons to UTM I got an extent with
> northing 4179967.999999912 to 4183167.9999999166 ,
> while the same extent revealed by shpinfo is in the
> range of 2110000 to 2114000, which looks like some
> other metrics.
> 
> I am not GIS educated so I might badly misuse some
> terms :-)
> 
> My goal seems to be pretty simple so I probably miss
> some obvious here.
> 
> Please advise if you may..
> 
> Thanks -- Tom
> 
> 
> Here is my map file:
> MAP
> IMAGETYPE PNG24
> EXTENT 5975000 2110000 6000000 2114000
> #EXTENT -123.113714 37.691039 -122.355778
> 37.930881
> 
> SIZE 600 400
> SHAPEPATH "data"
> IMAGECOLOR 255 255 255
> FONTSET "fonts/fonts.list"
> PROJECTION
> "init=epsg:4326"
> END
> # Start of LAYER DEFINITIONS
> ---------------------------------------------
> LAYER 
> NAME street_lines
> DATA stclines
> STATUS DEFAULT
> TYPE LINE
> CLASS
> COLOR 212 212 212
> OUTLINECOLOR 212 212 212 
> END
> END 
> LAYER 
> NAME street_label
> DATA stclines
> STATUS DEFAULT
> TYPE ANNOTATION
> 
> LABELITEM "STREET"
> CLASS
> COLOR 255 255 255
> LABEL
> COLOR 1 1 1
> TYPE TRUETYPE
> FONT arial
> SIZE 6
> ANTIALIAS TRUE
> POSITION AUTO
> ANGLE AUTO
> PARTIALS FALSE
> MINDISTANCE 300
> BUFFER 4
> END # end of label
> END 
> END
> 
> # End of LAYER DEFINITIONS
> -------------------------------
> END # end of map file/object
> 
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Vote for the stars of Yahoo!'s next ad campaign!


		
---------------------------------
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
--0-346505720-1090355301=:92203
Content-Type: text/html; charset=us-ascii

<DIV>Matthew,</DIV>
<DIV><BR>Thanks. It workes when proper projection is added to the layer&nbsp;. The layer is actually in CA State Plane NAD83 but I could find the corresponding epsg in PROJ 4.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have another layer with the following .proj info.</DIV>
<DIV>&nbsp;</DIV>
<DIV>PROJCS["NAD_1983_HARN_StatePlane_Washington_North_FIPS_4601_Feet",GEOGCS["GCS_North_American_1983_HARN",DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1640416.666666667],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-120.8333333333333],PARAMETER["Standard_Parallel_1",47.5],PARAMETER["Standard_Parallel_2",48.73333333333333],PARAMETER["Latitude_Of_Origin",47.0],UNIT["Foot_US",0.3048006096012192]]</DIV>
<DIV>&nbsp;</DIV>
<DIV>How do I define this in the map file? I could not find the related epsg code?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks again.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thomas<BR><BR><B><I>Matthew Perry &lt;mtperry78 at sbcglobal.net&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Thomas,<BR>In order to reproject your vector data, you need to<BR>add a projection object to your layer. So assuming<BR>your data is in UTM, Zone 10 that would be:<BR><BR>"init=epsg:26710" for NAD27 datum OR<BR>"init=epsg:26910" for NAD83 datum<BR><BR>You can check the metadata for the streets data to see<BR>which datum is used. Or just try both and see which<BR>one lines up. <BR><BR>Matthew Perry<BR>Humboldt State University<BR>Natural Resources Planning<BR><BR><BR>--- Thomas Chesky <THOMASCHESKY at YAHOO.COM>wrote:<BR>&gt; Hello,<BR>&gt; I have a USGS DOQ showing a section of San<BR>&gt; Francisco. I know the lat/lon boudaries<BR>&gt; and would like to request an image from mapserver to<BR>&gt; return sf street lines for the same extent and in<BR>&gt; the same projection.<BR>&gt; <BR>&gt; The USGS image is coming from a different legacy<BR>&gt; app, so I am not planning to integrate
 that layer<BR>&gt; into mapserver, but I'd like to produce a matching<BR>&gt; vector layer.<BR>&gt; <BR>&gt; The problem I have is the following:<BR>&gt; <BR>&gt; I can reproject (via the map file) the vector layer<BR>&gt; to the desired projection, epsg:4326<BR>&gt; but I have hard time defining the same extent via<BR>&gt; the CGI interface.<BR>&gt; shpinfo gives me an extent of the street lines, I<BR>&gt; believe in UTM<BR>&gt; <BR>&gt; I can use that metrics to pass in MAPEXT CGI param<BR>&gt; and get the proper image, but if I use lat/lon<BR>&gt; extent (left bottom pair followed by right top pair)<BR>&gt; I get blank image.<BR>&gt; <BR>&gt; I tried it by removing the extent from the map file,<BR>&gt; settings UNITS DD etc.<BR>&gt; nothing worked but I am pretty sure, that I have the<BR>&gt; right lat/lon extent (should overlap the extent of<BR>&gt; the shape file) <BR>&gt; <BR>&gt; To generalize it further, I'd like to know if one<BR>&gt; can pass in lat/lon extent as cgi param
 even though<BR>&gt; the original shp extent is in UTM. Also, when I<BR>&gt; converted the lat/lons to UTM I got an extent with<BR>&gt; northing 4179967.999999912 to 4183167.9999999166 ,<BR>&gt; while the same extent revealed by shpinfo is in the<BR>&gt; range of 2110000 to 2114000, which looks like some<BR>&gt; other metrics.<BR>&gt; <BR>&gt; I am not GIS educated so I might badly misuse some<BR>&gt; terms :-)<BR>&gt; <BR>&gt; My goal seems to be pretty simple so I probably miss<BR>&gt; some obvious here.<BR>&gt; <BR>&gt; Please advise if you may..<BR>&gt; <BR>&gt; Thanks -- Tom<BR>&gt; <BR>&gt; <BR>&gt; Here is my map file:<BR>&gt; MAP<BR>&gt; IMAGETYPE PNG24<BR>&gt; EXTENT 5975000 2110000 6000000 2114000<BR>&gt; #EXTENT -123.113714 37.691039 -122.355778<BR>&gt; 37.930881<BR>&gt; <BR>&gt; SIZE 600 400<BR>&gt; SHAPEPATH "data"<BR>&gt; IMAGECOLOR 255 255 255<BR>&gt; FONTSET "fonts/fonts.list"<BR>&gt; PROJECTION<BR>&gt; "init=epsg:4326"<BR>&gt; END<BR>&gt; # Start of LAYER
 DEFINITIONS<BR>&gt; ---------------------------------------------<BR>&gt; LAYER <BR>&gt; NAME street_lines<BR>&gt; DATA stclines<BR>&gt; STATUS DEFAULT<BR>&gt; TYPE LINE<BR>&gt; CLASS<BR>&gt; COLOR 212 212 212<BR>&gt; OUTLINECOLOR 212 212 212 <BR>&gt; END<BR>&gt; END <BR>&gt; LAYER <BR>&gt; NAME street_label<BR>&gt; DATA stclines<BR>&gt; STATUS DEFAULT<BR>&gt; TYPE ANNOTATION<BR>&gt; <BR>&gt; LABELITEM "STREET"<BR>&gt; CLASS<BR>&gt; COLOR 255 255 255<BR>&gt; LABEL<BR>&gt; COLOR 1 1 1<BR>&gt; TYPE TRUETYPE<BR>&gt; FONT arial<BR>&gt; SIZE 6<BR>&gt; ANTIALIAS TRUE<BR>&gt; POSITION AUTO<BR>&gt; ANGLE AUTO<BR>&gt; PARTIALS FALSE<BR>&gt; MINDISTANCE 300<BR>&gt; BUFFER 4<BR>&gt; END # end of label<BR>&gt; END <BR>&gt; END<BR>&gt; <BR>&gt; # End of LAYER DEFINITIONS<BR>&gt; -------------------------------<BR>&gt; END # end of map file/object<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; ---------------------------------<BR>&gt; Do you Yahoo!?<BR>&gt; Vote for the stars of Yahoo!'s next ad
 campaign!<BR><BR></BLOCKQUOTE><p>
		<hr size=1>Do you Yahoo!?<br>
<a href="http://advision.webevents.yahoo.com/yahoo/votelifeengine/">Vote for the stars of Yahoo!'s next ad campaign!</a>
--0-346505720-1090355301=:92203--



More information about the mapserver-users mailing list