[gdal-dev] How do I get lat long extents from this Ogrinfo output on a .shp?

Stephen Woodbridge stephenwoodbridge37 at gmail.com
Thu Jun 20 13:33:21 PDT 2019


Hi Paul,

Its not just the extents but all the data in the file is in a UTM 
projection. You can reproject the file to WGS84 and then ogrinfo will 
report in long-lat.

ogr2ogr -t_srs EPSG:4326 OldStreamsPolyline-wgs84.shp OldStreamsPolyline.shp
ogrinfo -so OldStreamsPolyline-wgs84.shp OldStreamsPolyline-wgs84

-Steve W

On 6/20/2019 4:26 PM, Dante, Paul wrote:
>
> I ran ogrinfo on a shape file and got output. How do I convert the 
> extent listed below into lat long coordinates? It looks like the units 
> are meters, but I’m not sure how that will translate to lat long for 
> creating a bounding box:
>
> INFO: Open of `OldStreamsPolyline.shp'
>
>       using driver `ESRI Shapefile' successful.
>
> Layer name: OldStreamsPolyline
>
> Metadata:
>
> DBF_DATE_LAST_UPDATE=2011-02-17
>
> Geometry: Line String
>
> Feature Count: 179
>
> Extent: (482246.857278, 5449862.717375) - (498293.801839, 5462019.990072)
>
> Layer SRS WKT:
>
> PROJCS["NAD83 / UTM zone 10N",
>
> GEOGCS["NAD83",
>
> DATUM["North_American_Datum_1983",
>
> SPHEROID["GRS 1980",6378137,298.257222101,
>
> AUTHORITY["EPSG","7019"]],
>
> TOWGS84[0,0,0,0,0,0,0],
>
> AUTHORITY["EPSG","6269"]],
>
> PRIMEM["Greenwich",0,
>
>   AUTHORITY["EPSG","8901"]],
>
> UNIT["degree",0.0174532925199433,
>
> AUTHORITY["EPSG","9122"]],
>
> AUTHORITY["EPSG","4269"]],
>
> PROJECTION["Transverse_Mercator"],
>
> PARAMETER["latitude_of_origin",0],
>
> PARAMETER["central_meridian",-123],
>
> PARAMETER["scale_factor",0.9996],
>
> PARAMETER["false_easting",500000],
>
> PARAMETER["false_northing",0],
>
> UNIT["metre",1,
>
> AUTHORITY["EPSG","9001"]],
>
> AXIS["Easting",EAST],
>
> AXIS["Northing",NORTH],
>
> AUTHORITY["EPSG","26910"]]
>
> Id: Integer (6.0)
>
> Name: String (50.0)
>
> Region: String (2.0)
>
> Type: String (50.0)
>
> Paul Dante
>
> Software Developer - Geodisy
>
> Walter C. Koerner Library | UBC Library
>
> The University of British Columbia | Vancouver Campus
> 219-1958 Main Mall | Vancouver BC | V6T 1Z2 Canada
>
> Phone 604 827 5129
>
> paul.dante at ubc.ca <mailto:paul.dante at ubc.ca>__
>
> UBC Vancouver is located on the traditional, ancestral, unceded 
> territory of the xʷməθkʷəy̓əm (Musqueam) people
>
> cid:image001.png at 01D42428.A8255E20
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the gdal-dev mailing list