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

Thomas Chesky thomaschesky at yahoo.com
Mon Jul 19 17:08:33 EDT 2004


--0-2008529837-1090271313=:23256
Content-Type: text/plain; charset=us-ascii

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!
--0-2008529837-1090271313=:23256
Content-Type: text/html; charset=us-ascii

<DIV>Hello,</DIV>
<DIV>I have a USGS DOQ showing a section of San Francisco. I know the lat/lon boudaries<BR>and would like to request an image from mapserver to return sf street lines for the same extent and in the same projection.</DIV>
<DIV>&nbsp;</DIV>
<DIV>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.</DIV>
<DIV>&nbsp;</DIV>
<DIV>The problem I have is the following:</DIV>
<DIV><BR>I can reproject (via the map file) the vector layer to the desired projection, epsg:4326<BR>but I have hard time defining the same extent via the CGI interface.</DIV>
<DIV>shpinfo gives me an extent&nbsp; of the street lines, I believe in UTM</DIV>
<DIV>&nbsp;</DIV>
<DIV>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.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I tried it by removing the extent from the map file, settings UNITS DD etc.<BR>nothing worked but I am pretty sure, that I have the right lat/lon extent (should overlap the extent of the shape file) </DIV>
<DIV>&nbsp;</DIV>
<DIV>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&nbsp; 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.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am not GIS educated so I might badly misuse some terms :-)<BR></DIV>
<DIV>My goal seems to be pretty simple so I probably miss some obvious here.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Please advise if you may..</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks -- Tom</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here is my map file:</DIV>
<DIV>MAP<BR>&nbsp; IMAGETYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PNG24</DIV>
<DIV>&nbsp; EXTENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5975000 2110000 6000000 2114000<BR>&nbsp; #EXTENT&nbsp;-123.113714 37.691039 -122.355778 37.930881<BR>&nbsp; <BR>&nbsp; SIZE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 600 400<BR>&nbsp; SHAPEPATH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "data"</DIV>
<DIV>&nbsp; IMAGECOLOR&nbsp;&nbsp;&nbsp;&nbsp; 255 255 255</DIV>
<DIV>&nbsp; FONTSET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "fonts/fonts.list"</DIV>
<DIV>&nbsp; PROJECTION<BR>&nbsp;&nbsp; "init=epsg:4326"<BR>&nbsp; END</DIV>
<DIV>&nbsp; # Start of LAYER DEFINITIONS ---------------------------------------------</DIV>
<DIV>&nbsp; LAYER <BR>&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; street_lines<BR>&nbsp;&nbsp;&nbsp; DATA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stclines<BR>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEFAULT<BR>&nbsp;&nbsp;&nbsp; TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LINE<BR>&nbsp;&nbsp;&nbsp; CLASS<BR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nbsp; ANTIALIAS&nbsp;&nbsp;&nbsp; TRUE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION&nbsp;&nbsp;&nbsp;&nbsp; AUTO<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANGLE AUTO<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PARTIALS&nbsp;&nbsp;&nbsp;&nbsp; FALSE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINDISTANCE&nbsp; 300<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BUFFER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 4<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END # end of label</DIV>
<DIV>&nbsp;&nbsp;&nbsp; END <BR>&nbsp; END</DIV>
<DIV>&nbsp; </DIV>
<DIV>&nbsp; # End of LAYER DEFINITIONS -------------------------------</DIV>
<DIV>END # end of map file/object</DIV>
<DIV><BR>&nbsp;</DIV><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-2008529837-1090271313=:23256--



More information about the mapserver-users mailing list