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

Thomas Chesky thomaschesky at yahoo.com
Thu Jul 22 00:14:52 EDT 2004


--0-1272398236-1090469692=:23514
Content-Type: text/plain; charset=us-ascii

Thanks.
Somehow I still got a blank image on this layer.
It is setup exactly as the SF layer, the only difference is 
the NAME, DATA and projection of the layer.
Is it possible that reprojecting from epsg:2855 to epsg:26910 (the one I have for MAP tag)
might have some problem? I was testing that I do not have any typo with the extent, but can't seem to find any.
What are the typical (obvious for a practiced eye) causes of getting blank image in such case?
 
Thanks


Gerry Creager N5JXS <gerry.creager at tamu.edu> wrote:
epsg=2855

Thomas Chesky wrote:
> 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 /* 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 int! egrate 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 ne! xt ad campaign!
> 
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Vote for the stars of Yahoo!'s next ad campaign! 
> 

-- 
Gerry Creager -- gerry.creager at tamu.edu
Network Engineering -- AATLT, Texas A&M University 
Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.847.8578
Page: 979.228.0173
Office: 903A Eller Bldg, TAMU, College Station, TX 77843


		
---------------------------------
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
--0-1272398236-1090469692=:23514
Content-Type: text/html; charset=us-ascii

<DIV>Thanks.</DIV>
<DIV>Somehow I still got a blank image on this layer.<BR>It is setup exactly as the SF layer, the only difference is <BR>the NAME, DATA and projection of the layer.</DIV>
<DIV>Is it possible that reprojecting from epsg:2855 to epsg:26910 (the one I have&nbsp;for&nbsp;MAP tag)<BR>might have some problem? I was testing that I do not have any typo with the extent, but can't seem to find any.</DIV>
<DIV>What are the typical (obvious for a practiced eye) causes of getting blank image in such case?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks<BR><BR><BR><B><I>Gerry Creager N5JXS &lt;gerry.creager at tamu.edu&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">epsg=2855<BR><BR>Thomas Chesky wrote:<BR>&gt; Matthew,<BR>&gt; <BR>&gt; Thanks. It workes when proper projection is added to the layer . The <BR>&gt; layer is actually in CA State Plane NAD83 but I could find the <BR>&gt; corresponding epsg in PROJ 4.<BR>&gt; <BR>&gt; I have another layer with the following .proj info.<BR>&gt; <BR>&gt;
 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]]<BR>&gt; <BR>&gt; How do I define this in the map file? I could not find the related epsg <BR>&gt; code?<BR>&gt; <BR>&gt; Thanks again.<BR>&gt; <BR>&gt; Thomas<BR>&gt; <BR>&gt; */Matthew Perry <MTPERRY78 at SBCGLOBAL.NET>/* wrote:<BR>&gt; <BR>&gt; Thomas,<BR>&gt; In order to reproject your vector data, you need to<BR>&gt; add a projection object to your layer. So assuming<BR>&gt; your data is in UTM, Zone 10 that would
 be:<BR>&gt; <BR>&gt; "init=epsg:26710" for NAD27 datum OR<BR>&gt; "init=epsg:26910" for NAD83 datum<BR>&gt; <BR>&gt; You can check the metadata for the streets data to see<BR>&gt; which datum is used. Or just try both and see which<BR>&gt; one lines up.<BR>&gt; <BR>&gt; Matthew Perry<BR>&gt; Humboldt State University<BR>&gt; Natural Resources Planning<BR>&gt; <BR>&gt; <BR>&gt; --- Thomas Chesky wrote:<BR>&gt; &gt; Hello,<BR>&gt; &gt; I have a USGS DOQ showing a section of San<BR>&gt; &gt; Francisco. I know the lat/lon boudaries<BR>&gt; &gt; and would like to request an image from mapserver to<BR>&gt; &gt; return sf street lines for the same extent and in<BR>&gt; &gt; the same projection.<BR>&gt; &gt;<BR>&gt; &gt; The USGS image is coming from a different legacy<BR>&gt; &gt; app, so I am not planning to int! egrate that layer<BR>&gt; &gt; into mapserver, but I'd like to produce a matching<BR>&gt; &gt; vector layer.<BR>&gt; &gt;<BR>&gt; &gt; The problem I have is the
 following:<BR>&gt; &gt;<BR>&gt; &gt; I can reproject (via the map file) the vector layer<BR>&gt; &gt; to the desired projection, epsg:4326<BR>&gt; &gt; but I have hard time defining the same extent via<BR>&gt; &gt; the CGI interface.<BR>&gt; &gt; shpinfo gives me an extent of the street lines, I<BR>&gt; &gt; believe in UTM<BR>&gt; &gt;<BR>&gt; &gt; I can use that metrics to pass in MAPEXT CGI param<BR>&gt; &gt; and get the proper image, but if I use lat/lon<BR>&gt; &gt; extent (left bottom pair followed by right top pair)<BR>&gt; &gt; I get blank image.<BR>&gt; &gt;<BR>&gt; &gt; I tried it by removing the extent from the map file,<BR>&gt; &gt; settings UNITS DD etc.<BR>&gt; &gt; nothing worked but I am pretty sure, that I have the<BR>&gt; &gt; right lat/lon extent (should overlap the extent of<BR>&gt; &gt; the shape file)<BR>&gt; &gt;<BR>&gt; &gt; To generalize it further, I'd like to know if one<BR>&gt; &gt; can pass in lat/lon extent as ! cgi param even though<BR>&gt; &gt; the
 original shp extent is in UTM. Also, when I<BR>&gt; &gt; converted the lat/lons to UTM I got an extent with<BR>&gt; &gt; northing 4179967.999999912 to 4183167.9999999166 ,<BR>&gt; &gt; while the same extent revealed by shpinfo is in the<BR>&gt; &gt; range of 2110000 to 2114000, which looks like some<BR>&gt; &gt; other metrics.<BR>&gt; &gt;<BR>&gt; &gt; I am not GIS educated so I might badly misuse some<BR>&gt; &gt; terms :-)<BR>&gt; &gt;<BR>&gt; &gt; My goal seems to be pretty simple so I probably miss<BR>&gt; &gt; some obvious here.<BR>&gt; &gt;<BR>&gt; &gt; Please advise if you may..<BR>&gt; &gt;<BR>&gt; &gt; Thanks -- Tom<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; Here is my map file:<BR>&gt; &gt; MAP<BR>&gt; &gt; IMAGETYPE PNG24<BR>&gt; &gt; EXTENT 5975000 2110000 6000000 2114000<BR>&gt; &gt; #EXTENT -123.113714 37.691039 -122.355778<BR>&gt; &gt; 37.930881<BR>&gt; &gt;<BR>&gt; &gt; SIZE 600 400<BR>&gt; &gt; SHAPEPATH "data"<BR>&gt; &gt; IMAGECOLOR 255 255 255<BR>&gt; &gt; FONTSET
 "fonts/fonts.list"<BR>&gt; &gt; PROJECTION<BR>&gt; &gt; "init=epsg:4326"<BR>&gt; &gt; END<BR>&gt; &gt; # Start of LAYER DEFINITIONS<BR>&gt; &gt; ---------------------------------------------<BR>&gt; &gt; LAYER<BR>&gt; &gt; NAME street_lines<BR>&gt; &gt; DATA stclines<BR>&gt; &gt; STATUS DEFAULT<BR>&gt; &gt; TYPE LINE<BR>&gt; &gt; CLASS<BR>&gt; &gt; COLOR 212 212 212<BR>&gt; &gt; OUTLINECOLOR 212 212 212<BR>&gt; &gt; END<BR>&gt; &gt; END<BR>&gt; &gt; LAYER<BR>&gt; &gt; NAME street_label<BR>&gt; &gt; DATA stclines<BR>&gt; &gt; STATUS DEFAULT<BR>&gt; &gt; TYPE ANNOTATION<BR>&gt; &gt;<BR>&gt; &gt; LABELITEM "STREET"<BR>&gt; &gt; CLASS<BR>&gt; &gt; COLOR 255 255 255<BR>&gt; &gt; LABEL<BR>&gt; &gt; COLOR 1 1 1<BR>&gt; &gt; TYPE TRUETYPE<BR>&gt; &gt; FONT arial<BR>&gt; &gt; SIZE 6<BR>&gt; &gt; ANTIALIAS TRUE<BR>&gt; &gt; POSITION AUTO<BR>&gt; &gt; ANGLE AUTO<BR>&gt; &gt; PARTIALS FALSE<BR>&gt; &gt; MINDISTANCE 300<BR>&gt; &gt; BUFFER 4<BR>&gt; &gt; END # end of label<BR>&gt; &gt;
 END<BR>&gt; &gt; END<BR>&gt; &gt;<BR>&gt; &gt; # End of LAYER DEFINITIONS<BR>&gt; &gt; -------------------------------<BR>&gt; &gt; END # end of map file/object<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; ---------------------------------<BR>&gt; &gt; Do you Yahoo!?<BR>&gt; &gt; Vote for the stars of Yahoo!'s ne! xt ad campaign!<BR>&gt; <BR>&gt; ------------------------------------------------------------------------<BR>&gt; Do you Yahoo!?<BR>&gt; Vote for the stars of Yahoo!'s next ad campaign! <BR>&gt; <HTTP: votelifeengine yahoo advision.webevents.yahoo.com /><BR><BR>-- <BR>Gerry Creager -- gerry.creager at tamu.edu<BR>Network Engineering -- AATLT, Texas A&amp;M University <BR>Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.847.8578<BR>Page: 979.228.0173<BR>Office: 903A Eller Bldg, TAMU, College Station, TX 77843<BR><BR></BLOCKQUOTE><p>
		<hr size=1>Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/mail_us/taglines/50x/*http://promotions.yahoo.com/new_mail/static/efficiency.html">Yahoo! Mail</a> - 50x more storage than other providers!
--0-1272398236-1090469692=:23514--



More information about the mapserver-users mailing list