Re: [gdal-dev] Spatial references and geometry operations

2023-09-29 Thread adamgutonski via gdal-dev
Thank you for the response Paul, it sounds like I'll be safe as long as I 
include the SRS :)

Cheers,
Adam

Sent with [Proton Mail](https://proton.me/) secure email.

--- Original Message ---
On Friday, September 29th, 2023 at 4:20 AM, Paul Harwood  
wrote:

> As a very general response, you probably need to differentiate between two 
> possible questions that you are asking, either:
>
> 1 Does the operation fail with an error, or
> 2 Is the result correct or meaningful?
>
> I don't know about 1). My guess and experience is that, in most cases, it 
> won't fail.
>
> However, I would make the case that most operations are undefined if the 
> system is making (possibly) unknown assumptions about the CRS. If you are 
> asking for the point at a distance along a line or a buffer then you are 
> implicitly or explicitly giving the system an input distance, so you are 
> making assumptions about the CRS of your input. If your assumptions do not 
> match the system's assumptions for the CRS, then the result will be wrong. I 
> would say that it is always better to make the definition of the CRS explicit 
> and then the result is defined.
>
> On Fri, 29 Sept 2023 at 03:32, adamgutonski via gdal-dev 
>  wrote:
>
>> Hello,
>>
>> I am using geometry object functions like Buffer and Value. I am wondering 
>> if and when it is necessary to assign a spatial reference to an ogr.Geometry 
>> before calling these functions? For example if I want to get a point along 
>> the line using Value is the output affected by whether or not the ogr line 
>> geometry has an assigned spatial reference? Is there a way to tell what 
>> geometry functions are affected by this or not?
>>
>> Thanks,
>> Adam Gutonski
>>
>> Sent with [Proton Mail](https://proton.me/) secure email.
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Spatial references and geometry operations

2023-09-28 Thread adamgutonski via gdal-dev
Hello,

I am using geometry object functions like Buffer and Value. I am wondering if 
and when it is necessary to assign a spatial reference to an ogr.Geometry 
before calling these functions? For example if I want to get a point along the 
line using Value is the output affected by whether or not the ogr line geometry 
has an assigned spatial reference? Is there a way to tell what geometry 
functions are affected by this or not?

Thanks,
Adam Gutonski

Sent with [Proton Mail](https://proton.me/) secure email.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Java Binding Versions in GDAL Docker Ubuntu Full

2023-05-01 Thread adamgutonski via gdal-dev
Amazing Even, thank you!

Sent with [Proton Mail](https://proton.me/) secure email.

--- Original Message ---
On Monday, May 1st, 2023 at 4:08 PM, Even Rouault  
wrote:

> Fixed per https://github.com/OSGeo/gdal/pull/7669
>
> Le 01/05/2023 à 19:20, adamgutonski via gdal-dev a écrit :
>
>> Hello,
>>
>> I am setting up a Docker container which copies from the GDAL ubuntu-full 
>> image, and I noticed that the Java bindings with ubuntu-full are for Java 
>> Version 11 only. I am using Java Version 17. Are there any deprecated 
>> features or potential caveats to be aware of when using Java 17 and the GDAL 
>> bindings that have been compiled for 11? I can't find any information online 
>> about this and I do not know how one would rebuild the container bindings. 
>> Perhaps the bindings be updated in ubuntu-full in the future?
>>
>> Thank you for any information you can provide.
>>
>> Kind regards,
>> Adam Gutonski
>>
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>>
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Java Binding Versions in GDAL Docker Ubuntu Full

2023-05-01 Thread adamgutonski via gdal-dev
Hello,

I am setting up a Docker container which copies from the GDAL ubuntu-full 
image, and I noticed that the Java bindings with ubuntu-full are for Java 
Version 11 only. I am using Java Version 17. Are there any deprecated features 
or potential caveats to be aware of when using Java 17 and the GDAL bindings 
that have been compiled for 11? I can't find any information online about this 
and I do not know how one would rebuild the container bindings. Perhaps the 
bindings be updated in ubuntu-full in the future?

Thank you for any information you can provide.

Kind regards,
Adam Gutonski___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Building distributable files and bindings with CMake

2023-02-26 Thread adamgutonski via gdal-dev
Hello,

I am having trouble with CMake and creating the GDAL configuration that I 
desire. My goal is to be able to distribute GDAL to a few colleagues so they 
can immediately use the GDAL bindings in Java code without them having to build 
and install GDAL directly. The GDAL build should be minimal and only include 
the OpenFileGDB driver.

I run the following CMake configuration and build:

cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_JAVA_BINDINGS=ON 
-DGDAL_BUILD_OPTIONAL_DRIVERS:BOOL=OFF -DOGR_BUILD_OPTIONAL_DRIVERS:BOOL=OFF 
-DOGR_ENABLE_DRIVER_OPENFILEGDB:BOOL=ON -DBUILD_PYTHON_BINDINGS=OFF 
-DBUILD_APPS=NO -DGDAL_USE_EXTERNAL_LIBS=OFF

cmake --build .

After this, I am able to add the Java bindings (.jar) to my Java project on my 
machine without installing GDAL. After setting java.library.path to the 
gdalalljni directory (gdal-version/build/swig/java) the bindings work. I want 
my colleagues to be able to do the same by simply sending them a folder of the 
build I create. Currently when I send my build to a colleague and they set up 
their Java project to include the bindings, they get this error:

java.lang.UnsatisfiedLinkError: no gdalalljni in java.library.path

Is it even possible to distribute GDAL this way on MacOS/Ubuntu? Especially 
given PROJ as a runtime dependency? I would be grateful for any advice about 
how I can get close to be able to distributing GDAL in this manner. Perhaps 
using a docker container is the way to go? However I have been unable to find 
any documentation about how to use the Java bindings with docker since it does 
not look like they are included in the latest alpine release.

Kind regards,
Adam Gutonski___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] GDAL bindings support for Java 17

2023-01-03 Thread adamgutonski via gdal-dev
Hello,

My question is, is it possible to build the GDAL bindings for Java 17? I am 
trying to build GDAL with Java bindings for Java temurin-17.jdk when prior I 
have been able to build and use the bindings successfully for Java 
adoptopenjdk-8.jdk, using the exact same build process. However when I run the 
equivalent build steps with Java 17 I continue to receive this link error when 
implementing the bindings:

Native library load failed.
java.lang.UnsatisfiedLinkError: no gdalalljni in java.library.path: ...
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void 
org.gdal.gdal.gdalJNI.AllRegister()'
at org.gdal.gdal.gdalJNI.AllRegister(Native Method)
at org.gdal.gdal.gdal.AllRegister(gdal.java:664) at Main.main(Main.java:14)

My system specs:

System Version: macOS 12.6.1 (21G217)

Kernel Version: Darwin 21.6.0

Boot Volume: Macintosh HD

Boot Mode: Normal

Secure Virtual Memory: Enabled

System Integrity Protection: Enabled

Time since boot: 15 days 20:17

Model Name: MacBook Pro

Model Identifier: MacBookPro18,3

Chip: Apple M1 Pro

When I run the build I see that the Java bindings are generated, the .jar and 
libgdalalljni.dylib are created in /build/swig/java. Here are the build 
commands used:

sudo arch -x86_64 /usr/local/homebrew/bin/cmake .. -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_INSTALL_PREFIX=/usr/local/bin -DBUILD_JAVA_BINDINGS=ON 
-DBUILD_PYTHON_BINDINGS=OFF -DCMAKE_OSX_ARCHITECTURES=x86_64 -DGDAL_USE_ZSTD=OFF

sudo arch -x86_64 /usr/local/homebrew/bin/cmake --build .

sudo arch -x86_64 /usr/local/homebrew/bin/cmake --build . --target install

Again, all of the above steps work when I am using JDK 8. So does GDAL support 
Java bindings for JDK 17? Is there a way to resolve the error no gdalalljni in 
java.library.path? Here are the path settings in IntelliJ IDE:

VM options: 
-Djava.library.path=/Users//code/gdal-/build/swig/java:$PATH$
 Environment Vars: 
PATH=/Users//code/gdal-:/Users//code/gdal-/build/swig/java:$PATH$___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Creating Feature Classes/Tables with XML_DEFINITION option via FileGDB and OpenFileGDB drivers

2022-08-26 Thread adamgutonski via gdal-dev
Hello,

I am having trouble when creating a feature class with subtypes and/or coded 
domains with the FileGDB or OpenFileGDB drivers, specifically when using the 
"XML_DEFINITION" or "DOCUMENTATION" layer creation option. I am simply creating 
a dataset and calling on CreateLayer:

lyr = ds.CreateLayer("TESTPOINT_2", geom_type=ogr.wkbPoint, 
options=["XML_DEFINITION/DOCUMENTATION=%s" % xmlstr])
ERROR 1: Failed at creating table for \TESTPOINT_2 (General function failure.)

xmlstr is read from a file containing the XML. The XML is based on 
FC_PCS_Point.xml found in the ESRI FileGDB API resources (in the XMLsamples 
folder) with added domain information.

My question is where and how to to structure the domain and subtype XML 
tag/information when using an XML string as part of the XML_DEFINITION or 
DOCUMENTATION layer creation options? The GDAL documentation specifically 
mentions that for the xml string that the " root node of such a XML definition 
must be a ". Where are the  and  elements to 
be placed? Is the subtype and domain information only referenced in the Field 
elements? I can not seem to get any type of XML string to work beyond a simple 
feature class or table and have not been able to add subtypes or domains. I 
have attached the XML document that I am using to this email. Please see the 
 element under the root  as well as the  
under the ELEVATION Field element. Any help or guidance would be greatly 
appreciated.

Kind regards,
Adam Gutonski

Sent with [Proton Mail](https://proton.me/) secure email.
http://www.w3.org/2001/XMLSchema-instance; xmlns:xs="http://www.w3.org/2001/XMLSchema;
  xmlns:esri="http://www.esri.com/schemas/ArcGIS/10.1; xsi:type="esri:DEFeatureClass">
\TESTPOINT_2
TESTPOINT_2
false
esriDTFeatureClass
false
false

true
OBJECTID


Galvanic
3


SOURCEACCURACY
Source Accuracy


CONSTRUCTIONSTATUS
Construction Status


SUBTYPECD

3


MATERIAL
Anode Material Type


SINGLEANODEWEIGHT
Anode Weight
UNK


INSTALLATIONTYPE
CP Anode Installation Type
DW


BACKFILLTYPE
CP BackFill Type
UNK


LOCATIONACCURACY
Location Accuracy


MABCONSTRUCTIONSTATUS
MAB Construction Status




Grounding Cell
2


SOURCEACCURACY
Source Accuracy


CONSTRUCTIONSTATUS
Construction Status


SUBTYPECD

2


MATERIAL
Anode Material Type


SINGLEANODEWEIGHT
Anode Weight
UNK


INSTALLATIONTYPE
CP Anode Installation Type
DW


BACKFILLTYPE
CP BackFill Type
UNK


LOCATIONACCURACY
Location Accuracy


MABCONSTRUCTIONSTATUS
MAB Construction Status




Impressed Current Ground Bed
1


SOURCEACCURACY
Source Accuracy


CONSTRUCTIONSTATUS
Construction Status


SUBTYPECD

1


MATERIAL
Anode Material Type


SINGLEANODEWEIGHT
Anode Weight
UNK


INSTALLATIONTYPE
CP Anode Installation Type
DW


BACKFILLTYPE
CP BackFill Type
   

[gdal-dev] Add FileGDB Driver to GDAL Version 3.5.0

2022-06-29 Thread adamgutonski via gdal-dev
Hello,

I am wondering how to add the ESRI File GDB API .dll to an established conda 
environment with GDAL 3.5.0. Previous versions of GDAL allowed me to:

- place FileGDBAPI.dll in C:\Anaconda3\envs\\Library\bin

- place gdalplugins folder containing ogr_FileGDB.dll here 
C:\Anaconda3\envs\

After this simple set up, I am able to use the driver. However, this set up 
does not work for GDAL 3.5.0. It seems that the gdalplugins folder is already 
created here: C:\anaconda3\envs\\Library\bin\gdalplugins. When I 
create a system environment variable GDAL_DRIVER_PATH and point it to this 
directory, the File GDB API still does not load.

How does one add the FileGDB API to an already installed version of GDAL 3.5.0?

Thank you,
Adam

Sent with [Proton Mail](https://proton.me/) secure email.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Anticipated GDAL 3.5.1 Release Date

2022-06-28 Thread adamgutonski via gdal-dev
Hello,

When is the anticipated release date for GDAL release 3.5.1?

Thank you,
Adam

Sent with [Proton Mail](https://proton.me/) secure email.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Installing drivers on macOS Monterey v12.4

2022-05-22 Thread adamgutonski via gdal-dev
Hello,

I am having trouble installing gdal with the FileGDB driver in a conda 
environment. I believe the issue is the version of macOS.

System specs:

- macOS Monterey v12.4
- Apple M1 Pro chip
- 16gb RAM

Attempts so far:

- Tried using osgeo4mac, the formulae appear to be broken on M1 Mac, not sure 
if there’s a macport for this specific repo.
- Tried using Kyngchaos complete GDAL build, does not cooperate with conda 
environments
- Tried manually, Conda install -c condo-forge gdal, then copy over the lib 
files into /anaconda/envs/testing/lib, and copied the include files into 
/anaconda/envs/testing/include
- Additionally, tried copying the files into the gdalplugins folder located in 
the lib folder
- Tried installing lib/include files to /usr/local/lib and /usr/local/include

Are there any tips for creating a successful conda build in this mac 
environment?

Kind regards,
Adam Gutonski

Sent with [ProtonMail](https://protonmail.com/) secure email.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Normalized/laundered field names

2022-05-13 Thread adamgutonski via gdal-dev
Hello,

I am attempting to create an ogr.OFTDateTime field named "date", within a file 
geodatabase table. However anytime a field definition is created with the name 
"date", once the layer tries to create the field, I get receive a warning:

Warning 6: Normalized/laundered field name: 'date' to 'date_'

Why does this field need to be normalized? Is there anyway to suppress this 
warning and retain the "date" string that is expected as the field name? Are 
there other field names besides date that will always be normalized?

Below is my code snippet:

field_defn = ogr.FieldDefn("date", ogr.OFTDateTime)
layer.CreateField(field_defn)

Thank you for your time as always!

Sincerely,
Adam Gutonski___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Add coded field domains to file geodatabase

2022-04-11 Thread adamgutonski via gdal-dev
I am wondering how can one add a coded field domain to a file geodatabase using 
the FileGDB driver and File GDB API? Anytime I call AddFieldDomain it returns 
false:

>>> coded_domain = ogr.CreateCodedFieldDomain("name", "desc", ogr.OFTString, 
>>> ogr.OFSTNone, {1:'LOW'})
>>> driver = gdal.GetDriverByName("FileGDB")
>>> datasource = driver.Create(r'C:\output\test_domains.gdb', 0, 0, 0)
>>> datasource.AddFieldDomain(coded_domain)
False
>>> datasource.TestCapability(ogr.ODsCAddFieldDomain)
False

The documentation suggests that the FileGDB driver is capable of supporting 
domains as of 3.3: 
https://gdal.org/drivers/vector/filegdb.html?highlight=domains#field-domains

I am using gdal version 3.4.2.

Am I adding the domain incorrectly, or does this mean that domains are not 
supported with the FileGDB driver?

Thank you,
Adam Gutonski___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Followup to Matching ESRI projection/transformations using GDAL/OSR

2022-02-18 Thread adamgutonski via gdal-dev
Hello,

I recently messaged about matching projection/transformations between GDAL/OSR 
and ESRI (gdal-dev Digest, Vol 213, Issue 35).

I had two follow-up questions regarding transforming from a geographic CRS to a 
projected CRS. When transforming from EPSG:6318 to a projected CRS EPSG:32015, 
the point values I receive are different than in ESRI. My first question is, 
when I am setting the 
osr.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) parameter for 
EPSG:6318, why would the transformation points be different?

My second question is regarding the compound transformation that ESRI applies. 
In this example ArcPy uses the "WGS_1984_(ITRF00)_To_NAD_1983_2011 + 
NAD_1927_To_WGS_1984_3" transformation to project between EPSG:6318 and 
EPSG:32015. Is there a way to replicate such a transformation using the python 
GDAL/OSR libraries?

ESRI code:

arc_fromsr = arcpy.

SpatialReference

(6318)

arc_tosr = arcpy.

SpatialReference

(32015)

arcpoint = arcpy.

PointGeometry

(

arcpy.

Point

(

*

test_coords)

, arc_fromsr

)

transformers = arcpy.

ListTransformations

(

arc_fromsr, arc_tosr

)
# transformers[0] is WGS_1984_(ITRF00)_To_NAD_1983_2011 + NAD_1927_To_WGS_1984_3

new_arcpoint = arcpoint.

projectAs

(

arc_tosr, transformers

[0])

GDAL\OSR code:

to_nad = osr.

SpatialReference

()

to_nad.

ImportFromEPSG

(6318)

to_nad.

SetAxisMappingStrategy

(

osr.OAMS_TRADITIONAL_GIS_ORDER

)

final = osr.

SpatialReference

()

final.

ImportFromEPSG

(32015)

outpoint = ogr.

Geometry

(

ogr.wkbPoint

)

outpoint.

AddPoint_2D

(

*

test_coords)

outpoint.

AssignSpatialReference

(

to_nad

)

outpoint.

TransformTo

(

final

)

Input test coordinate: -73.964183, 40.785075

GDAL\OSR transformation output: 602119.3891505665, 286201.7616068426

ESRI\ArcPy transformation output: 602115.6116177095, 286190.512887311

Any help is again, greatly appreciated.

Sincerely,
Adam Gutonski

Sent with [ProtonMail](https://protonmail.com/) Secure Email.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Matching ESRI projection/transformations using GDAL/OSR

2022-02-17 Thread adamgutonski via gdal-dev
Thank you so much! This appears to have resolved the issue.

Sent with [ProtonMail](https://protonmail.com/) Secure Email.

--- Original Message ---
On Thursday, February 17th, 2022 at 10:36 AM, Even Rouault 
 wrote:

> Hi,
>
>> I am attempting to project and transform geometry using OSR. The 
>> projection/transformation is from ITRF2014 via Proj4 string to NAD83(CSRS)v7 
>> (EPSG:8255). My problem is that I need the transformation output to match 
>> the output I receive when transforming the geometry in ESRI using the 
>> geometry.projectAs function. It seems that the OSR transformation creates a 
>> point that is always shifted from the ESRI geometry. Any advice on how to 
>> match projections and transformations between open source and ESRI would be 
>> extremely helpful.
>>
>> Original coordinate: -74.44279945, 41.406811727778
>>
>> ESRI point after transform: -74.4427951819612, 41.4068026527349
>>
>> OGR point after transform: -74.44281012167299, 41.40671904426617
>>
>> Code used to generate the OGR point:
>
> You've likely used the coordinate order wrong. GDAL 3 honours by default 
> authority (EPSG) axis order, so for EPSG this means lat/lon for geographic 
> CRS.
>
> So either switch your coordinate, or call 
> itrf.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) and 
> to_nad.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)
>
> With that, you'll get the same results as Esri software
>
 print(outpoint)
> POINT (-74.442810121673 41.4067190442662 0)
>
> Even
>
>> itrf = osr.SpatialReference()
>> itrf.ImportFromProj4(
>>
>> 'GEOGCS["ITRF2014",DATUM["International_Terrestrial_Reference_Frame_2014",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433],AUTHORITY["EPSG",9000]]'
>>
>> )
>>
>> to_nad = osr.SpatialReference()
>> to_nad.ImportFromEPSG(
>>
>> 8255
>>
>> )
>>
>> opts = osr.CoordinateTransformationOptions()
>> opts.SetOperation(
>>
>> "ITRF2014_To_NAD_1983_CSRS_v7_7par"
>>
>> )
>> transformer = osr.CreateCoordinateTransformation(itrf, to_nad, opts)
>>
>> outpoint = ogr.Geometry(ogr.wkbPoint)
>> outpoint.AddPoint(*test_coords)
>> outpoint.AssignSpatialReference(itrf)
>> outpoint.Transform(transformer)
>>
>> With ESRI I am using the ArcPy geometry function, projectAs when taking in 
>> the name of a transformation. When ArcGIS reprojects from ITRF2014 to 
>> NAD83(CSRS)v7 (EPSG:8255) with the transformation 
>> "ITRF2014_To_NAD_1983_CSRS_v7_7par", a point is generated ~30 ft away from 
>> the point generated by GDAL/OSR
>>
>> Code used to generate the Esri point:
>>
>> ITRF_SPATIAL_REF = arcpy.SpatialReference(
>>
>> 'ITRF2014.prj'
>>
>> )
>> NAD_SPATIAL_REF= arcpy.SpatialReference(
>>
>> 8255
>>
>> )
>>
>> longitude = test_coords[
>>
>> 0
>>
>> ]
>> latitude = test_coords[
>>
>> 1
>>
>> ]
>> point = arcpy.Point(
>> longitude,
>> latitude
>> )
>> return_point = arcpy.PointGeometry(point, 
>> ITRF_SPATIAL_REF).projectAs(NAD_SPATIAL_REF,
>>
>> "ITRF2014_To_NAD_1983_CSRS_v7_7par"
>>
>> )
>>
>> Thank you for your time,
>> adamg
>>
>> Sent with [ProtonMail](https://protonmail.com/) Secure Email.
>>
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>>
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Matching ESRI projection/transformations using GDAL/OSR

2022-02-17 Thread adamgutonski via gdal-dev
Hello,

I am attempting to project and transform geometry using OSR. The 
projection/transformation is from ITRF2014 via Proj4 string to NAD83(CSRS)v7 
(EPSG:8255). My problem is that I need the transformation output to match the 
output I receive when transforming the geometry in ESRI using the 
geometry.projectAs function. It seems that the OSR transformation creates a 
point that is always shifted from the ESRI geometry. Any advice on how to match 
projections and transformations between open source and ESRI would be extremely 
helpful.

Original coordinate: -74.44279945, 41.406811727778

ESRI point after transform: -74.4427951819612, 41.4068026527349

OGR point after transform: -74.44281012167299, 41.40671904426617

Code used to generate the OGR point:

itrf = osr.SpatialReference()
itrf.ImportFromProj4(

'GEOGCS["ITRF2014",DATUM["International_Terrestrial_Reference_Frame_2014",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433],AUTHORITY["EPSG",9000]]'

)

to_nad = osr.SpatialReference()
to_nad.ImportFromEPSG(

8255

)

opts = osr.CoordinateTransformationOptions()
opts.SetOperation(

"ITRF2014_To_NAD_1983_CSRS_v7_7par"

)
transformer = osr.CreateCoordinateTransformation(itrf, to_nad, opts)

outpoint = ogr.Geometry(ogr.wkbPoint)
outpoint.AddPoint(*test_coords)
outpoint.AssignSpatialReference(itrf)
outpoint.Transform(transformer)

With ESRI I am using the ArcPy geometry function, projectAs when taking in the 
name of a transformation. When ArcGIS reprojects from ITRF2014 to NAD83(CSRS)v7 
(EPSG:8255) with the transformation "ITRF2014_To_NAD_1983_CSRS_v7_7par", a 
point is generated ~30 ft away from the point generated by GDAL/OSR

Code used to generate the Esri point:

ITRF_SPATIAL_REF = arcpy.SpatialReference(

'ITRF2014.prj'

)
NAD_SPATIAL_REF= arcpy.SpatialReference(

8255

)

longitude = test_coords[

0

]
latitude = test_coords[

1

]
point = arcpy.Point(
longitude,
latitude
)
return_point = arcpy.PointGeometry(point, 
ITRF_SPATIAL_REF).projectAs(NAD_SPATIAL_REF,

"ITRF2014_To_NAD_1983_CSRS_v7_7par"

)

Thank you for your time,
adamg

Sent with [ProtonMail](https://protonmail.com/) Secure Email.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev