You are viewing limited content. For full access, please sign in.

Question

Question

SDK - Geographical Location

SDK
asked on October 13, 2020

How to get via SDK the Geographical Information when using eris ArcGis? 

0 0

Answer

SELECTED ANSWER
replied on October 13, 2020

With the Laserfiche.RepositoryAccess assembly, use Entry.GetGeographyData to retrieve and Entry.SetGeographyData to set it. Entry.GetGeographyData returns an EntryGeography object and you can use the Laserfiche.RepositoryAccess.Spatial.GeoConverter class to decode the coordinates:

EntryGeography geoData = Entry.GetGeographyData(entryId, session);
if (geoData != null && geoData.GeoObject != null && geoData.GeoObject.Length > 0)
{
    // EntryGeography.GeoObject uses the WKB format (https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry)
    var index = 4; // Skip WKB header and start on the geometry type byte
    var decoded = GeoConverter.DecodeWkb(geoData.GeoObject, ref index);
    if (decoded is Point2D)
    {
        Point2D point = (Point2D)decoded;
        double latitude = point.P.Y;
        double longitude = point.P.X;
    }
}

 

2 0

Replies

replied on September 26, 2023

I found this amazing database from the Department of Transportation that lets you get geocodes by address. The schema looks very well designed, and it's downloadable.  Add it to workflow and you'll expand the range of documents you can tag.

 

NAD SCHEMA APRIL 2023 (transportation.gov)

 

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.