[Mapserver-users] CGI extent defined in lat/lon
Thomas Chesky
thomaschesky at yahoo.com
Wed Jul 21 21:14:52 PDT 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 for 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> </DIV>
<DIV>Thanks<BR><BR><BR><B><I>Gerry Creager N5JXS <gerry.creager at tamu.edu></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>> Matthew,<BR>> <BR>> Thanks. It workes when proper projection is added to the layer . The <BR>> layer is actually in CA State Plane NAD83 but I could find the <BR>> corresponding epsg in PROJ 4.<BR>> <BR>> I have another layer with the following .proj info.<BR>> <BR>>
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>> <BR>> How do I define this in the map file? I could not find the related epsg <BR>> code?<BR>> <BR>> Thanks again.<BR>> <BR>> Thomas<BR>> <BR>> */Matthew Perry <MTPERRY78 at SBCGLOBAL.NET>/* wrote:<BR>> <BR>> 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 wrote:<BR>> > Hello,<BR>> > I have a USGS DOQ showing a section of San<BR>> > Francisco. I know the lat/lon boudaries<BR>> > and would like to request an image from mapserver to<BR>> > return sf street lines for the same extent and in<BR>> > the same projection.<BR>> ><BR>> > The USGS image is coming from a different legacy<BR>> > app, so I am not planning to int! egrate that layer<BR>> > into mapserver, but I'd like to produce a matching<BR>> > vector layer.<BR>> ><BR>> > The problem I have is the
following:<BR>> ><BR>> > I can reproject (via the map file) the vector layer<BR>> > to the desired projection, epsg:4326<BR>> > but I have hard time defining the same extent via<BR>> > the CGI interface.<BR>> > shpinfo gives me an extent of the street lines, I<BR>> > believe in UTM<BR>> ><BR>> > I can use that metrics to pass in MAPEXT CGI param<BR>> > and get the proper image, but if I use lat/lon<BR>> > extent (left bottom pair followed by right top pair)<BR>> > I get blank image.<BR>> ><BR>> > I tried it by removing the extent from the map file,<BR>> > settings UNITS DD etc.<BR>> > nothing worked but I am pretty sure, that I have the<BR>> > right lat/lon extent (should overlap the extent of<BR>> > the shape file)<BR>> ><BR>> > To generalize it further, I'd like to know if one<BR>> > can pass in lat/lon extent as ! cgi param even though<BR>> > the
original shp extent is in UTM. Also, when I<BR>> > converted the lat/lons to UTM I got an extent with<BR>> > northing 4179967.999999912 to 4183167.9999999166 ,<BR>> > while the same extent revealed by shpinfo is in the<BR>> > range of 2110000 to 2114000, which looks like some<BR>> > other metrics.<BR>> ><BR>> > I am not GIS educated so I might badly misuse some<BR>> > terms :-)<BR>> ><BR>> > My goal seems to be pretty simple so I probably miss<BR>> > some obvious here.<BR>> ><BR>> > Please advise if you may..<BR>> ><BR>> > Thanks -- Tom<BR>> ><BR>> ><BR>> > Here is my map file:<BR>> > MAP<BR>> > IMAGETYPE PNG24<BR>> > EXTENT 5975000 2110000 6000000 2114000<BR>> > #EXTENT -123.113714 37.691039 -122.355778<BR>> > 37.930881<BR>> ><BR>> > SIZE 600 400<BR>> > SHAPEPATH "data"<BR>> > IMAGECOLOR 255 255 255<BR>> > FONTSET
"fonts/fonts.list"<BR>> > PROJECTION<BR>> > "init=epsg:4326"<BR>> > END<BR>> > # Start of LAYER DEFINITIONS<BR>> > ---------------------------------------------<BR>> > LAYER<BR>> > NAME street_lines<BR>> > DATA stclines<BR>> > STATUS DEFAULT<BR>> > TYPE LINE<BR>> > CLASS<BR>> > COLOR 212 212 212<BR>> > OUTLINECOLOR 212 212 212<BR>> > END<BR>> > END<BR>> > LAYER<BR>> > NAME street_label<BR>> > DATA stclines<BR>> > STATUS DEFAULT<BR>> > TYPE ANNOTATION<BR>> ><BR>> > LABELITEM "STREET"<BR>> > CLASS<BR>> > COLOR 255 255 255<BR>> > LABEL<BR>> > COLOR 1 1 1<BR>> > TYPE TRUETYPE<BR>> > FONT arial<BR>> > SIZE 6<BR>> > ANTIALIAS TRUE<BR>> > POSITION AUTO<BR>> > ANGLE AUTO<BR>> > PARTIALS FALSE<BR>> > MINDISTANCE 300<BR>> > BUFFER 4<BR>> > END # end of label<BR>> >
END<BR>> > END<BR>> ><BR>> > # End of LAYER DEFINITIONS<BR>> > -------------------------------<BR>> > END # end of map file/object<BR>> ><BR>> ><BR>> ><BR>> ><BR>> > ---------------------------------<BR>> > Do you Yahoo!?<BR>> > Vote for the stars of Yahoo!'s ne! xt ad campaign!<BR>> <BR>> ------------------------------------------------------------------------<BR>> Do you Yahoo!?<BR>> Vote for the stars of Yahoo!'s next ad campaign! <BR>> <HTTP: votelifeengine yahoo advision.webevents.yahoo.com /><BR><BR>-- <BR>Gerry Creager -- gerry.creager at tamu.edu<BR>Network Engineering -- AATLT, Texas A&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