Re: [mapserver-users] INSIDE Idaho
Small progress this morning; The extent numbers on my vector data seemed way off, so I switched to IDTM27, which uses easting=50 and northing=10, and the results were much closer. There is a visible difference on the mapserver output... all the vector data is rendered "just a bit" west of the matching DRG data. Close enough for now. Contents of my modified idtm83.wtk: PROJCS["NAD_1983_Transverse_Mercator", GEOGCS["GCS_North_American_1983", DATUM["D_North_American_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["False_Easting",50.0], PARAMETER["False_Northing",10.0], PARAMETER["Central_Meridian",-114.0], PARAMETER["Scale_Factor",0.9996], PARAMETER["Latitude_Of_Origin",42.0], UNIT["Meter",1.0]] ----- Original Message From: Jon Miner To: mapserver-users@lists.osgeo.org Sent: Tue, February 9, 2010 6:47:51 AM Subject: Re: [mapserver-users] INSIDE Idaho Bringing this back onto the mailing list Re: [mapserver-users] INSIDE Idaho... From: "greg.lu...@scu.edu.au" ...Add to Contacts To: Jon Miner __ Hi Jon, I'm very much NOT a mapserver expert (a beginner in fact), but one thing I noticed (it might mean nothing) is: UNIT["Degree",0.0174532925199433]] I realise that ogr is saying this, but I thought UTM projection unit is metre not degree, and I'm guessing that number (0.0174532925199433) is how many degrees in a metre at that latitude. Also the gdalinfo is listing the origin and pixel size in metres. One thing you could do is just put one layer in a mapfile and set the mapfile projection to NAD83 (or whatever the epsg code is for that) to see if you can actually see the data at all, and then project it into what you need, using "metres" (or maybe "meters") as the unit, somehow. Sorry I can't help more, but maybe this might point you in a useful direction. Thanks, Greg. - Forwarded Message From: Jon Miner To: glu...@scu.edu.au Sent: Mon, February 8, 2010 8:16:22 PM Subject: Re: [mapserver-users] INSIDE Idaho Hi Greg - I've looked at the parameters... Here is the DRG file: http://data.insideidaho.org/data2/24k/usgs/drg/idtm/quad/nocollar/archive/43112/cirbu3se_24k_usgs_drg.tgz So I extract that file and then run gdalinfo on the tif file: gdalinfo cirbu3se_24k_usgs_drg.tif Driver: GTiff/GeoTIFF Files: cirbu3se_24k_usgs_drg.tif Size is 4221, 5752 Coordinate System is `' Origin = (590767.311137848766521,281203.236009103886317) Pixel Size = (2.4384000,-2.4384000) Metadata: TIFFTAG_SOFTWARE=Arc/Info TIFFTAG_XRESOLUTION=0.41 TIFFTAG_YRESOLUTION=0.41 TIFFTAG_RESOLUTIONUNIT=1 (unitless) Image Structure Metadata: COMPRESSION=PACKBITS INTERLEAVE=BAND Corner Coordinates: Upper Left ( 590767.311, 281203.236) Lower Left ( 590767.311, 267177.559) Upper Right ( 601059.798, 281203.236) Lower Right ( 601059.798, 267177.559) Center ( 595913.554, 274190.398) ...etc... Note the blank "coordinate system" entry... Using values from http://spatialreference.org, I came up with the PROJECTION values in my map file, which seems to work, since mapserver renders the DRG. So far so good... Next I download some vector data: http://data.insideidaho.org/data/USCB/TIGER2000/archive/butte/roadsl_butte_uscb.tgz and extract it, then check it with ogrinfo: $ ogrinfo roadsl_butte_uscb.shp roadsl_butte_uscb -so INFO: Open of `roadsl_butte_uscb.shp' using driver `ESRI Shapefile' successful. Layer name: roadsl_butte_uscb Geometry: Line String Feature Count: 2596 Extent: (-113.641719, 43.284631) - (-112.694959, 44.233133) Layer SRS WKT: GEOGCS["GCS_North_American_1983", DATUM["North_American_Datum_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]] ..etc.. If I'm not mistaken, I need to translate this to match the projection of the DRG file... I've been doing this with ogr2ogr: ogr2ogr -t_srs idtm83.wkt -f "ESRI Shapefile" temp roadsl_butte_uscb.shp where the idtm83.wkt contains: PROJCS["NAD_1983_Transverse_Mercator", GEOGCS["GCS_North_American_1983", DATUM["D_North_American_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["False_Easting",250.0], PARAMETER["False_Northing",120.0], PAR
Re: [mapserver-users] INSIDE Idaho
Bringing this back onto the mailing list Re: [mapserver-users] INSIDE Idaho... From: "greg.lu...@scu.edu.au" ...Add to Contacts To: Jon Miner __ Hi Jon, I'm very much NOT a mapserver expert (a beginner in fact), but one thing I noticed (it might mean nothing) is: UNIT["Degree",0.0174532925199433]] I realise that ogr is saying this, but I thought UTM projection unit is metre not degree, and I'm guessing that number (0.0174532925199433) is how many degrees in a metre at that latitude. Also the gdalinfo is listing the origin and pixel size in metres. One thing you could do is just put one layer in a mapfile and set the mapfile projection to NAD83 (or whatever the epsg code is for that) to see if you can actually see the data at all, and then project it into what you need, using "metres" (or maybe "meters") as the unit, somehow. Sorry I can't help more, but maybe this might point you in a useful direction. Thanks, Greg. - Forwarded Message From: Jon Miner To: glu...@scu.edu.au Sent: Mon, February 8, 2010 8:16:22 PM Subject: Re: [mapserver-users] INSIDE Idaho Hi Greg - I've looked at the parameters... Here is the DRG file: http://data.insideidaho.org/data2/24k/usgs/drg/idtm/quad/nocollar/archive/43112/cirbu3se_24k_usgs_drg.tgz So I extract that file and then run gdalinfo on the tif file: gdalinfo cirbu3se_24k_usgs_drg.tif Driver: GTiff/GeoTIFF Files: cirbu3se_24k_usgs_drg.tif Size is 4221, 5752 Coordinate System is `' Origin = (590767.311137848766521,281203.236009103886317) Pixel Size = (2.4384000,-2.4384000) Metadata: TIFFTAG_SOFTWARE=Arc/Info TIFFTAG_XRESOLUTION=0.41 TIFFTAG_YRESOLUTION=0.41 TIFFTAG_RESOLUTIONUNIT=1 (unitless) Image Structure Metadata: COMPRESSION=PACKBITS INTERLEAVE=BAND Corner Coordinates: Upper Left ( 590767.311, 281203.236) Lower Left ( 590767.311, 267177.559) Upper Right ( 601059.798, 281203.236) Lower Right ( 601059.798, 267177.559) Center ( 595913.554, 274190.398) ...etc... Note the blank "coordinate system" entry... Using values from http://spatialreference.org, I came up with the PROJECTION values in my map file, which seems to work, since mapserver renders the DRG. So far so good... Next I download some vector data: http://data.insideidaho.org/data/USCB/TIGER2000/archive/butte/roadsl_butte_uscb.tgz and extract it, then check it with ogrinfo: $ ogrinfo roadsl_butte_uscb.shp roadsl_butte_uscb -so INFO: Open of `roadsl_butte_uscb.shp' using driver `ESRI Shapefile' successful. Layer name: roadsl_butte_uscb Geometry: Line String Feature Count: 2596 Extent: (-113.641719, 43.284631) - (-112.694959, 44.233133) Layer SRS WKT: GEOGCS["GCS_North_American_1983", DATUM["North_American_Datum_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]] ..etc.. If I'm not mistaken, I need to translate this to match the projection of the DRG file... I've been doing this with ogr2ogr: ogr2ogr -t_srs idtm83.wkt -f "ESRI Shapefile" temp roadsl_butte_uscb.shp where the idtm83.wkt contains: PROJCS["NAD_1983_Transverse_Mercator", GEOGCS["GCS_North_American_1983", DATUM["D_North_American_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["False_Easting",250.0], PARAMETER["False_Northing",120.0], PARAMETER["Central_Meridian",-114.0], PARAMETER["Scale_Factor",0.9996], PARAMETER["Latitude_Of_Origin",42.0], UNIT["Meter",1.0]] ogrinfo on the new file reports: Layer name: roadsl_butte_uscb Geometry: Line String Feature Count: 2596 Extent: (2528908.642544, 1342938.885743) - (2605077.684651, 1448186.034775) Layer SRS WKT: PROJCS["NAD_1983_Transverse_Mercator", GEOGCS["GCS_North_American_1983", DATUM["North_American_Datum_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.017453292519943295]], PROJECTION["Transverse_Mercator"], PARAMETER["False_Easting",250.0], PARAMETER["False_Northing",120.0], PARAMETER["Central_Meridian",-114.0], PARAMETER["Scale_Factor",0.9996], PARAMETER["Latitude_Of_Origin",42.0], UNIT["Meter",1.0]] To me (as a programmer, not a map guru) everything seems to match up... Can you spot something that is not right? Thanks - Jon From: "greg
[mapserver-users] INSIDE Idaho
Anybody familiar with the projections used by INSIDE Idaho? http://inside.uidaho.edu/default.htm I can get the GeoTIFF rendered using this PROJECTION: EXTENT 590767.311 267177.559 601059.798 281203.236 PROJECTION "proj=tmerc" "lat_0=42" "lon_0=-114" "k=0.9996" "x_0=250" "y_0=120" "ellps=GRS80" "units=m" "no_defs" END but no luck getting the vector stuff to render. - Jon ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users