Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have written an ArcMap v10 AddIn that reads a folder of geotagged JPEG's and creates a new feature class where each point is the geotag information from on of the JPEG's. The issue is:

The GPS information from the exif information in each JPEG is in Latitude/Longitude with Degrees, Minutes, Seconds and I have successfully converted to decimal degrees. The Altitude information in the exif properties is in feet.

I recently discovered that ArcMap is apparently interpreting the Z value I provide when setting point.Z = zAltitude as being in the decimal degree unit instead of feet. This happens despite the fact that I have set the spatial reference information of the feature class and the IPoint to a geographic coordinate system of WGS84 and a Vertical Coordinate System of NAVD88 and a ZCoordinateUnit of feet.

Below is the code that creates the spatial reference and the code that creates the points:

Private _spatialRef As ISpatialReference3 = CreateSpatialRef()

Private Function CreateSpatialRef() As ISpatialReference3

    Dim COORDSYS As ESRI.ArcGIS.Geometry.esriSRGeoCSType = ESRI.ArcGIS.Geometry.esriSRGeoCSType.esriSRGeoCS_WGS1984
    Dim VERTCOORDSYS As ESRI.ArcGIS.Geometry.esriSRVerticalCSType = ESRI.ArcGIS.Geometry.esriSRVerticalCSType.esriSRVertCS_NAVD1988

    Dim spatialRefFact As ISpatialReferenceFactory3 = New SpatialReferenceEnvironment
    Dim geogCS As IGeographicCoordinateSystem2 = spatialRefFact.CreateGeographicCoordinateSystem(CInt(COORDSYS))
    Dim vertCS As IVerticalCoordinateSystem = spatialRefFact.CreateVerticalCoordinateSystem(CInt(VERTCOORDSYS))

    Dim spatialRef As ISpatialReference3 = CType(geogCS, ISpatialReference3)
    spatialRef.VerticalCoordinateSystem = vertCS

    Dim spatialRefResolution As ISpatialReferenceResolution = CType(geogCS, ISpatialReferenceResolution)

    spatialRef.ZCoordinateUnit = CType(spatialRefFact.CreateUnit(CInt(esriSRUnitType.esriSRUnit_Foot)), LinearUnit)

    Return spatialRef

End Function

Private Function CreatePoint(ByVal xLong As Double, ByVal yLat As Double, ByVal zAlt As Double) As IPoint

    Dim pnt As IPoint = New ESRI.ArcGIS.Geometry.Point
    pnt.SpatialReference = _spatialRef
    pnt.PutCoords(xLong, yLat)

    Dim zAwre As IZAware = CType(pnt, IZAware)
    zAwre.ZAware = True

    pnt.Z = zAlt

    xLong = Nothing
    yLat = Nothing
    zAlt = Nothing
    zAwre = Nothing

    Return pnt

End Function

Any ideas how to do this without converting my Altitude from feet to decimal degrees?

Thanks in advance for your help.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.