Modify

Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#16129 closed defect (fixed)

Unsupported ESRI projections

Reported by: StefanB Owned by: team
Priority: normal Milestone: 18.04
Component: Core imagery Version: latest
Keywords: template_report wmts slovenia esri projection Cc: bastiK, stoecker

Description

What steps will reproduce the problem?

  1. In Imagery preferences add WMTS by URL: http://gis.arso.gov.si/arcgis/rest/services/Lidar_hillshade/MapServer/WMTS/1.0.0/WMTSCapabilities.xml
  2. add the just added imagery to the map, selecting the first, the only layer

What is the expected result?

Imagery layer is added and shown properly

What happens instead?

An error occurs: java.lang.IllegalArgumentException: [TileMatrixSet [crs=EPSG:102060, identifier=default028mm]]

Full log with stacktrace:

Mar 26, 2018 7:16:16 AM org.openstreetmap.josm.data.imagery.WMTSTileSource <init>
WARNING: No default layer selected, choosing first layer.
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.generic.default_autozoom differ: true != 
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.generic.default_autozoom differ:  != true
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.wmts.default_autozoom differ: true != 
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.wmts.default_autozoom differ:  != true
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.generic.default_autoload differ: true != 
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.generic.default_autoload differ:  != true
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.wmts.default_autoload differ: true != 
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.wmts.default_autoload differ:  != true
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.generic.default_showerrors differ: true != 
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.generic.default_showerrors differ:  != true
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.wmts.default_showerrors differ: true != 
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.data.Preferences getSetting
INFO: Defaults for imagery.wmts.default_showerrors differ:  != true
Mar 26, 2018 7:16:20 AM org.openstreetmap.josm.tools.Logging error
SEVERE: org.openstreetmap.josm.tools.bugreport.ReportedException: java.lang.IllegalArgumentException: [TileMatrixSet [crs=EPSG:102060, identifier=default028mm]]. Cause: java.lang.IllegalArgumentException: [TileMatrixSet [crs=EPSG:102060, identifier=default028mm]]
ReportedException [thread=Thread[AWT-EventQueue-2,6,javawsApplicationThreadGroup], exception=java.lang.IllegalArgumentException: [TileMatrixSet [crs=EPSG:102060, identifier=default028mm]], methodWarningFrom=null]
	at org.openstreetmap.josm.tools.bugreport.BugReport.intercept(BugReport.java:173)
	at org.openstreetmap.josm.gui.MapView.layerAdded(MapView.java:369)
	at org.openstreetmap.josm.gui.layer.LayerManager.fireLayerAdded(LayerManager.java:458)
	at org.openstreetmap.josm.gui.layer.LayerManager.realAddLayer(LayerManager.java:233)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realAddLayer(MainLayerManager.java:291)
	at org.openstreetmap.josm.gui.layer.LayerManager.lambda$addLayer$0(LayerManager.java:217)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:234)
	at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(LayerManager.java:217)
	at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(LayerManager.java:206)
	at org.openstreetmap.josm.actions.AddImageryLayerAction.actionPerformed(AddImageryLayerAction.java:144)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
	at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
	at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
	at java.awt.MenuItem.processEvent(MenuItem.java:628)
	at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357)
	at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:761)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.IllegalArgumentException: [TileMatrixSet [crs=EPSG:102060, identifier=default028mm]]
	at org.openstreetmap.josm.data.imagery.WMTSTileSource.initProjection(WMTSTileSource.java:698)
	at org.openstreetmap.josm.gui.layer.WMTSLayer.projectionChanged(WMTSLayer.java:102)
	at org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.initializeIfRequired(AbstractTileSourceLayer.java:591)
	at org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.attachToMapView(AbstractTileSourceLayer.java:568)
	at org.openstreetmap.josm.gui.MapView.layerAdded(MapView.java:347)
	... 36 more

Please provide any additional information below. Attach a screenshot if possible.

Same happenst with tested version 13500 and latest dev version 13573.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-03-04 16:20:37 +0100 (Sun, 04 Mar 2018)
Build-Date:2018-03-04 15:24:13
Revision:13500
Redirecting:to URL 'https://josm.openstreetmap.de/svn/trunk':
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13500 en) Mac OS X 10.13.3
OS Build number: Mac OS X 10.13.3 (17D102)
Memory Usage: 996 MB / 3641 MB (548 MB allocated, but free)
Java version: 1.8.0_161-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 69733378 1680x1050
Maximum Screen Size: 1680x1050
VM arguments: [-Djava.security.policy=file:<java.home>/lib/security/javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>/bin, -Djava.security.manager, -Djnlpx.origFilenameArg=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/56/1ee8cfb8-70305c5c, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Dmacosx.jnlpx.dock.name=JOSM, -Dmacosx.jnlpx.dock.icon=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/16/47ee53d0-5531b76d.icns, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp , -Djnlpx.jvm="<java.home>/bin/java"]
Dataset consistency test: No problems found

Plugins:
+ apache-commons (33668)
+ ejml (32680)
+ geotools (33958)
+ jts (32699)
+ opendata (34089)
+ utilsplugin2 (33991)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: No default layer selected, choosing first layer.
- W: No default layer selected, choosing first layer.
- E: org.openstreetmap.josm.tools.bugreport.ReportedException: java.lang.IllegalArgumentException: [TileMatrixSet [crs=EPSG:102060, identifier=default028mm]]. Cause: java.lang.IllegalArgumentException: [TileMatrixSet [crs=EPSG:102060, identifier=default028mm]]
- W: No default layer selected, choosing first layer.
- E: org.openstreetmap.josm.tools.bugreport.ReportedException: java.lang.IllegalArgumentException: [TileMatrixSet [crs=EPSG:102060, identifier=default028mm]]. Cause: java.lang.IllegalArgumentException: [TileMatrixSet [crs=EPSG:102060, identifier=default028mm]]

Attachments (2)

16129_wip_v1.patch (1.0 MB ) - added by Don-vip 7 years ago.
itworks.png (807.1 KB ) - added by Don-vip 7 years ago.

Download all attachments as: .zip

Change History (85)

comment:1 by Don-vip, 7 years ago

Keywords: esri added

comment:2 by Don-vip, 7 years ago

102060 is not defined in our esri file. The nearest projections are:

# S-JTSK Krovak
<102065> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
# S-JTSK Ferro Krovak East North
<102066> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=-17.66666666666667 +units=m +no_defs <>
# S-JTSK Krovak East North
<102067> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>

comment:3 by Don-vip, 7 years ago

Our ESRI file comes from proj.4. Issue https://github.com/OSGeo/proj.4/issues/904 created

comment:4 by Don-vip, 7 years ago

Keywords: projection added
Milestone: 18.04

comment:5 by Don-vip, 7 years ago

Cc: bastiK added
Summary: WMTS throws IllegalArgumentExceptionUnsupported ESRI projections

I started to play with the new ESRI file:

loaded 210 entries from josm-epsg
loaded 5754 entries from epsg
loaded 1573 entries from esri

some entries from proj.4 have not been included:
 * already in the maintained JOSM list: 210 entries
 * ESRI already in the standard EPSG list: 1 entries
 * deprecated: 583 entries
 * using +proj=geocent, which is 3D (X,Y,Z) and not useful in JOSM: 181 entries
 * unsupported ellipsoids: 45 entries
   in particular: {evrst30=4, evrst48=1, evrst56=1, evrst69=2, fschr68=1, hough=1, sphere=34, walbeck=1}
 * unsupported base projection: 126 entries
   in particular: {aeqd=10, aitoff=2, bonne=3, cea=4, comill=2, crast=2, eck1=2, eck2=2, eck3=2, eck4=2, eck5=2, eck6=2, eqc=20, eqdc=9, gall=2, gnom=2, igh=2, krovak=4, labrd=1, loxim=2, mbtfpq=2, mill=2, moll=2, natearth=2, natearth2=2, nsper=2, nzmg=1, ortho=3, patterson=2, poly=8, qsc=1, qua_aut=2, robin=2, times=2, tpeqd=2, vandg=2, wag4=2, wag5=2, wag7=2, wink1=2, wink2=2, wintri=2}
 * requires data file for vertical datum conversion: 230 entries
   in particular: {egm08_25.gtx=2, g2012a_conus.gtx,g2012a_alaska.gtx,g2012a_guam.gtx,g2012a_hawaii.gtx,g2012a_puertorico.gtx,g2012a_samoa.gtx=4}
 * requires data file for datum conversion: 127 entries
   in particular: {A66_National_13_09_01.gsb=9, D73_ETRS89_geo.gsb=2, DLX_ETRS89_geo.gsb=3, OSTN02_NTv2.gsb=102, conus=9, hawaii=2}
 * projection is Oblique Mercator (requires bounds), but no bounds specified: 8 entries

written 210 entries from josm-epsg
written 4813 entries from epsg
written 1062 entries from esri

@bastiK: do you know what the "sphere" ellipsoid is?

comment:6 by Don-vip, 7 years ago

In 13582/josm:

see #16129 - add new Ellipsoids taken from PROJ.4

comment:7 by Don-vip, 7 years ago

OK now we have:

 * unsupported base projection: 126 entries
   in particular: {aeqd=10, aitoff=2, bonne=3, cea=4, comill=2, crast=2, eck1=2, eck2=2, eck3=2, eck4=2, eck5=2, eck6=2, eqc=20, eqdc=9, gall=2, gnom=2, igh=2, krovak=4, labrd=1, loxim=2, mbtfpq=2, mill=2, moll=2, natearth=2, natearth2=2, nsper=2, nzmg=1, ortho=3, patterson=2, poly=8, qsc=1, qua_aut=2, robin=2, times=2, tpeqd=2, vandg=2, wag4=2, wag5=2, wag7=2, wink1=2, wink2=2, wintri=2}
 * requires data file for vertical datum conversion: 230 entries
   in particular: {egm08_25.gtx=2, g2012a_conus.gtx,g2012a_alaska.gtx,g2012a_guam.gtx,g2012a_hawaii.gtx,g2012a_puertorico.gtx,g2012a_samoa.gtx=4}
 * requires data file for datum conversion: 127 entries
   in particular: {A66_National_13_09_01.gsb=9, D73_ETRS89_geo.gsb=2, DLX_ETRS89_geo.gsb=3, OSTN02_NTv2.gsb=102, conus=9, hawaii=2}

written 1075 entries from esri

comment:8 by stoecker, 7 years ago

A sphere with 6370997 meter radius.

{"sphere","a=6370997.0","b=6370997.0","Normal Sphere (r=6370997)"}

https://github.com/OSGeo/proj.4/blob/master/src/pj_ellps.c

comment:9 by stoecker, 7 years ago

😐 Too late.

comment:10 by StefanB, 7 years ago

While checking the JOSM code i noticed a related recent change r13395 for #15880.
You are likely already familiar with that, but am mentioning it just in case... :)

comment:11 by Don-vip, 7 years ago

Thanks :) I found it strange to have geographic projections assuming the Earth is a perfect sphere. I wonder if these projections are used in the real world.

comment:12 by bastiK, 7 years ago

As someone who is active in OSM, you better not ask that question. The Google projection that we use, doesn't even bother to make a datum transformation, it just takes the WGS84 coordinates and pretends they come from a sphere. :)

comment:13 by stoecker, 7 years ago

As someone who actually learned all that stuff I still hear my lecturer when he talked about non-projection types of "map projection". Especially the disgust in the words. And now everybody is using such stuff because of Google and properly looking maps loose. OTOH availability of raw data allows everybody to make proper maps when wanted.

comment:14 by Don-vip, 7 years ago

Thanks! :)
@bastiK I'm trying to implement new projections. I began with EquidistantCylindrical (eqc, concerns 20 projections). It seems simple enough to begin with, I have two questions though:

  • how do you determine the getAlgorithmBounds() implementation?
  • how do you test a projection is correctly implemented?

comment:15 by bastiK, 7 years ago

Great!

In case you are not aware, I used the geotools implementation as base for most of the projections (stripped down to the essential part). It worked quite well. The geotools code seems to be quite close to the proj.4 library c-implementation anyway.

For the getAlgorithmBounds() method, I tried to determine an area where the algorithm is numerically stable, i.e. has a reasonable round trip error (see ProjectionTest). For this purpose I had a tool to draw the world map with each pixel colored according to the error. It looked quite pretty, but the tool is probably gone now. As for the dependency on the projection parameters, you need to experiment or understand it on a theoretical level.

To verify that it is correctly implemented, you can simply compare a few coordinates to the output of proj.4 (ProjectionRefTest).

comment:16 by Don-vip, 7 years ago

In 13588/josm:

see #16129 - add NTv2 grids referenced in ESRI file

in reply to:  15 comment:17 by Don-vip, 7 years ago

Replying to bastiK:

It looked quite pretty, but the tool is probably gone now.

Sounds nice. No chance to get it back? :)

comment:18 by bastiK, 7 years ago

Sorry, couldn't find anything. Maybe on a floppy disk in a dusty cupboard. :)

comment:19 by Don-vip, 7 years ago

Still on it. What is the JOSM equivalent to these two methods?

public GeodesicData Direct(double lat1,
                           double lon1,
                           double azi1,
                           double s12)
Solve the direct geodesic problem where the length of the geodesic is specified in terms of distance.

Parameters:
    lat1 - latitude of point 1 (degrees).
    lon1 - longitude of point 1 (degrees).
    azi1 - azimuth at point 1 (degrees).
    s12 - distance between point 1 and point 2 (meters); it can be negative.
Returns:
    a GeodesicData object with the following fields: lat1, lon1, azi1, lat2, lon2, azi2, s12, a12.

    lat1 should be in the range [−90°, 90°]. The values of lon2 and azi2 returned are in the range [−180°, 180°].

    If either point is at a pole, the azimuth is defined by keeping the longitude fixed, writing lat = ±(90° − ε), and taking the limit ε → 0+. An arc length greater that 180° signifies a geodesic which is not a shortest path. (For a prolate ellipsoid, an additional condition is necessary for a shortest path: the longitudinal extent must not exceed of 180°.)

https://geographiclib.sourceforge.io/html/java/net/sf/geographiclib/Geodesic.html#Direct-double-double-double-double-

public GeodesicData Inverse(double lat1,
                            double lon1,
                            double lat2,
                            double lon2)
Solve the inverse geodesic problem.

Parameters:
    lat1 - latitude of point 1 (degrees).
    lon1 - longitude of point 1 (degrees).
    lat2 - latitude of point 2 (degrees).
    lon2 - longitude of point 2 (degrees).
Returns:
    a GeodesicData object with the following fields: lat1, lon1, azi1, lat2, lon2, azi2, s12, a12.

    lat1 and lat2 should be in the range [−90°, 90°]. The values of azi1 and azi2 returned are in the range [−180°, 180°].

    If either point is at a pole, the azimuth is defined by keeping the longitude fixed, writing lat = ±(90° − ε), taking the limit ε → 0+.

    The solution to the inverse problem is found using Newton's method. If this fails to converge (this is very unlikely in geodetic applications but does occur for very eccentric ellipsoids), then the bisection method is used to refine the solution.

https://geographiclib.sourceforge.io/html/java/net/sf/geographiclib/Geodesic.html#Inverse-double-double-double-double-

by Don-vip, 7 years ago

Attachment: 16129_wip_v1.patch added

comment:20 by Don-vip, 7 years ago

See attached patch. I don't know what to do with Equatorial/Oblique modes of AzimuthalEquidistant which rely on those Geodesic methods.

Last edited 7 years ago by Don-vip (previous) (diff)

comment:21 by bastiK, 7 years ago

I'm not aware that those functions are already present in JOSM. I put all helper functions in AbstractProj. Using geographiclib also came up in #12427. If we ship the library, I would suggest to keep the original package name. The jar is 37 kB, so no problem space-wise.

comment:22 by Don-vip, 7 years ago

Alright! I will disable these cases for now, we'll see later if this feature is really needed.

by Don-vip, 7 years ago

Attachment: itworks.png added

comment:23 by Don-vip, 7 years ago

It (almost) works!

The artifacts are the same than #16082. Could you please take a look or guide me to fix them? I tried to look myself with your advices but I still don't know how to fix them.

I'd like to see the United Nations in JOSM. We're almost there now:
https://upload.wikimedia.org/wikipedia/commons/2/2f/Flag_of_the_United_Nations.svg

comment:24 by Don-vip, 7 years ago

In 13598/josm:

see #16129 - add new projections and support for new format of ESRI file

comment:25 by Don-vip, 7 years ago

In 13599/josm:

see #16129 - fix build error

comment:26 by Don-vip, 7 years ago

In 13600/josm:

see #16129 - fix error_prone warnings

comment:27 by Don-vip, 7 years ago

In 13601/josm:

see #16129 - spotbugs

comment:28 by Don-vip, 7 years ago

In 13602/josm:

see #16129 - projections rework for new ESRI file

comment:30 by Don-vip, 7 years ago

Paul, can you please update test data? The script or cs2cs doesn't seem to work well on Windows, I always get all these zeros...

comment:31 by Don-vip, 7 years ago

In 13609/josm:

see #16129 - SonarQube/Surefire can't parse XML attributes longer than 524288 characters

comment:32 by Don-vip, 7 years ago

In 13610/josm:

see #16129 - update regression test data

comment:33 by Don-vip, 7 years ago

In 13618/josm:

see #16129 - fix generation of projection reference data with French locale

comment:34 by Don-vip, 7 years ago

In 13622/josm:

see #16129 - fix Equidistant Cylindrical projection

comment:35 by Don-vip, 7 years ago

In 13624/josm:

see #16129 - update regression test data

comment:36 by Don-vip, 7 years ago

In 13626/josm:

see #16129 - fix Sphere ellipsoid radius (values of proj.4 and Proj4J are different!)

comment:37 by Don-vip, 7 years ago

Paul we have a lot of issues with this kind of projections:

# USA_Contiguous_Albers_Equal_Area_Conic [NAD 1983 Albers contiguous USA]
# area: (lat: 24.41, 49.38) - (lon: -124.79, -66.91) [USA - CONUS - onshore]
<102003> +proj=aea +datum=NAD83 +x_0=0.0 +y_0=0.0 +lon_0=96dW +lat_0=37d30'N +lat_1=29d30'N +lat_2=45d30'N +towgs84=-0.9956000824677655,1.901299877314078,0.5215002840524426,0.02591500053005733,5345.352563225674,5345.352563225674,-0.00062000005129903 +no_defs <>

We have both +datum and +towgs84. The projections aea/NAD83 without +towgs84 parameter are OK.

When I read CustomProjection.parseDatum it seems to me we're ignoring +towgs84 parameter if we have a +datum. Am I right? Should we inverse the priority? Ignore +datum if we have +towgs84?

comment:38 by Don-vip, 7 years ago

In 13627/josm:

see #16129 - datum javadoc

comment:39 by Don-vip, 7 years ago

In 13628/josm:

see #16129 - handle projection definitions with both +datum and +towgs84

comment:40 by Don-vip, 7 years ago

In 13629/josm:

see #16129 - increase timeout

comment:41 by Don-vip, 7 years ago

In 13631/josm:

see #16129 - better catch of WMS ServiceExceptions

comment:42 by Don-vip, 7 years ago

In 13632/josm:

see #16129 - add spherical versions of Cassini and Albers projections

comment:43 by Don-vip, 7 years ago

In 13634/josm:

see #16129 - Transverse Mercator: Minor coefficient error in tmerc inverse transform (see https://github.com/OSGeo/proj.4/issues/174)

comment:44 by Don-vip, 7 years ago

In 13639/josm:

see #16129 - align Lambert Conformal Conic projection implementation with proj.4/GeoTools

comment:45 by Don-vip, 7 years ago

Still failing:

634 definitions: {
aea=[
EPSG:102003, EPSG:102039, EPSG:102042, EPSG:102399, EPSG:102600],

lcc=[
EPSG:102041, EPSG:102191, EPSG:102192, EPSG:102193, EPSG:102221, EPSG:102222, EPSG:102375, EPSG:102398, EPSG:102492, EPSG:102581, EPSG:102582, EPSG:102583, EPSG:102584, EPSG:102585, EPSG:102586, EPSG:102587, EPSG:102588, EPSG:102592, EPSG:102604, EPSG:102640, EPSG:102688, EPSG:102689, EPSG:102690, EPSG:102700, EPSG:102720, EPSG:102721, EPSG:102726, EPSG:102727, EPSG:102733, EPSG:102761, EPSG:103166, EPSG:103167, EPSG:103168, EPSG:103228, EPSG:103229, EPSG:103230, EPSG:103231, EPSG:103233, EPSG:103234, EPSG:103236, EPSG:103237, EPSG:103239, EPSG:103240, EPSG:103242, EPSG:103243, EPSG:103244, EPSG:103245, EPSG:103246, EPSG:103247, EPSG:103248, EPSG:103249, EPSG:103250, EPSG:103251, EPSG:103256, EPSG:103259, EPSG:103278, EPSG:103279, EPSG:103280, EPSG:103281, EPSG:103282, EPSG:103283, EPSG:103284, EPSG:103285, EPSG:103286, EPSG:103287, EPSG:103288, EPSG:103289, EPSG:103290, EPSG:103291, EPSG:103292, EPSG:103293, EPSG:103294, EPSG:103295, EPSG:103303, EPSG:103306, EPSG:103308, EPSG:103310, EPSG:103311, EPSG:103312, EPSG:103317, EPSG:103322, EPSG:103323, EPSG:103332, EPSG:103333, EPSG:103336, EPSG:103338, EPSG:103341, EPSG:103343, EPSG:103346, EPSG:103347, EPSG:103349, EPSG:103352, EPSG:103356, EPSG:103360, EPSG:103362, EPSG:103363, EPSG:103364, EPSG:103365, EPSG:103369, EPSG:103375, EPSG:103376, EPSG:103377, EPSG:103378, EPSG:103379, EPSG:103380, EPSG:103381, EPSG:103382, EPSG:103383, EPSG:103384, EPSG:103385, EPSG:103386, EPSG:103387, EPSG:103388, EPSG:103389, EPSG:103390, EPSG:103391, EPSG:103392, EPSG:103403, EPSG:103406, EPSG:103408, EPSG:103410, EPSG:103411, EPSG:103412, EPSG:103417, EPSG:103422, EPSG:103423, EPSG:103432, EPSG:103433, EPSG:103436, EPSG:103438, EPSG:103441, EPSG:103443, EPSG:103446, EPSG:103447, EPSG:103449, EPSG:103452, EPSG:103456, EPSG:103460, EPSG:103462, EPSG:103463, EPSG:103464, EPSG:103465, EPSG:103469, EPSG:103472, EPSG:103473, EPSG:103495, EPSG:103499, EPSG:103500, EPSG:103501, EPSG:103502, EPSG:103503, EPSG:103504, EPSG:103505, EPSG:103506, EPSG:103507, EPSG:103508, EPSG:103509, EPSG:103510, EPSG:103511, EPSG:103512, EPSG:103513, EPSG:103514, EPSG:103515, EPSG:103516, EPSG:103517, EPSG:103520, EPSG:103521, EPSG:103522, EPSG:103523, EPSG:103524, EPSG:103525, EPSG:103526, EPSG:103527, EPSG:103539, EPSG:103540, EPSG:103541, EPSG:103542, EPSG:103543, EPSG:103544, EPSG:103545, EPSG:103546, EPSG:103547, EPSG:103548, EPSG:103549, EPSG:103550, EPSG:103551, EPSG:103552, EPSG:103553, EPSG:103554, EPSG:103555, EPSG:103556, EPSG:103557, EPSG:103559, EPSG:103560, EPSG:103561, EPSG:103562, EPSG:103563, EPSG:103564, EPSG:103565, EPSG:103566, EPSG:103567, EPSG:103568, EPSG:103569, EPSG:103570, EPSG:103571, EPSG:103572, EPSG:103573, EPSG:103574, EPSG:103575, EPSG:103576, EPSG:103608, EPSG:103609, EPSG:103610, EPSG:103611, EPSG:103612, EPSG:103613, EPSG:103614, EPSG:103615, EPSG:103616, EPSG:103617, EPSG:103618, EPSG:103619, EPSG:103620, EPSG:103621, EPSG:103622, EPSG:103623, EPSG:103624, EPSG:103625, EPSG:103626, EPSG:103627, EPSG:103628, EPSG:103629, EPSG:103630, EPSG:103631, EPSG:103632, EPSG:103633, EPSG:103634, EPSG:103635, EPSG:103636, EPSG:103637, EPSG:103638, EPSG:103639, EPSG:103640, EPSG:103641, EPSG:103642, EPSG:103643, EPSG:103644, EPSG:103645, EPSG:103646, EPSG:103647, EPSG:103648, EPSG:103649, EPSG:103650, EPSG:103651, EPSG:103652, EPSG:103653, EPSG:103654, EPSG:103655, EPSG:103656, EPSG:103657, EPSG:103658, EPSG:103659, EPSG:103660, EPSG:103661, EPSG:103662, EPSG:103663, EPSG:103664, EPSG:103665, EPSG:103666, EPSG:103667, EPSG:103668, EPSG:103669, EPSG:103670, EPSG:103671, EPSG:103672, EPSG:103673, EPSG:103674, EPSG:103675, EPSG:103676, EPSG:103677, EPSG:103678, EPSG:103679, EPSG:103680, EPSG:103681, EPSG:103682, EPSG:103683, EPSG:103684, EPSG:103685, EPSG:103686, EPSG:103687, EPSG:103688, EPSG:103689, EPSG:103690, EPSG:103691, EPSG:103692, EPSG:103693, EPSG:103708, EPSG:103709, EPSG:103710, EPSG:103711, EPSG:103712, EPSG:103713, EPSG:103714, EPSG:103715, EPSG:103716, EPSG:103717, EPSG:103718, EPSG:103719, EPSG:103720, EPSG:103721, EPSG:103722, EPSG:103723, EPSG:103724, EPSG:103725, EPSG:103726, EPSG:103727, EPSG:103728, EPSG:103729, EPSG:103730, EPSG:103731, EPSG:103732, EPSG:103733, EPSG:103734, EPSG:103735, EPSG:103736, EPSG:103737, EPSG:103738, EPSG:103739, EPSG:103740, EPSG:103741, EPSG:103742, EPSG:103743, EPSG:103744, EPSG:103745, EPSG:103746, EPSG:103747, EPSG:103748, EPSG:103749, EPSG:103750, EPSG:103751, EPSG:103752, EPSG:103753, EPSG:103754, EPSG:103755, EPSG:103756, EPSG:103757, EPSG:103758, EPSG:103759, EPSG:103760, EPSG:103761, EPSG:103762, EPSG:103763, EPSG:103764, EPSG:103765, EPSG:103766, EPSG:103767, EPSG:103768, EPSG:103769, EPSG:103770, EPSG:103771, EPSG:103772, EPSG:103773, EPSG:103774, EPSG:103775, EPSG:103776, EPSG:103777, EPSG:103778, EPSG:103779, EPSG:103780, EPSG:103781, EPSG:103782, EPSG:103783, EPSG:103784, EPSG:103785, EPSG:103786, EPSG:103787, EPSG:103788, EPSG:103789, EPSG:103790, EPSG:103791, EPSG:103792, EPSG:103793, EPSG:103846, EPSG:103946],

omerc=[
EPSG:102389, EPSG:102390, EPSG:102391], 

tmerc=[
EPSG:102063, EPSG:102064, EPSG:102070, EPSG:102071, EPSG:102101, EPSG:102102, EPSG:102103, EPSG:102104, EPSG:102105, EPSG:102106, EPSG:102107, EPSG:102108, EPSG:102136, EPSG:102137, EPSG:102138, EPSG:102159, EPSG:102160, EPSG:102161, EPSG:102164, EPSG:102165, EPSG:102216, EPSG:102224, EPSG:102225, EPSG:102226, EPSG:102227, EPSG:102228, EPSG:102231, EPSG:102232, EPSG:102233, EPSG:102240, EPSG:102400, EPSG:102448, EPSG:102449, EPSG:102451, EPSG:102459, EPSG:102461, EPSG:102462, EPSG:102464, EPSG:102465, EPSG:102525, EPSG:102526, EPSG:102528, EPSG:102529, EPSG:102629, EPSG:102630, EPSG:102648, EPSG:102649, EPSG:102650, EPSG:102661, EPSG:102662, EPSG:102664, EPSG:102665, EPSG:102696, EPSG:102697, EPSG:102698, EPSG:102705, EPSG:102844, EPSG:103220, EPSG:103221, EPSG:103222, EPSG:103223, EPSG:103224, EPSG:103225, EPSG:103226, EPSG:103227, EPSG:103252, EPSG:103253, EPSG:103254, EPSG:103255, EPSG:103257, EPSG:103258, EPSG:103260, EPSG:103261, EPSG:103262, EPSG:103263, EPSG:103264, EPSG:103265, EPSG:103266, EPSG:103267, EPSG:103268, EPSG:103269, EPSG:103270, EPSG:103271, EPSG:103272, EPSG:103273, EPSG:103274, EPSG:103275, EPSG:103276, EPSG:103277, EPSG:103296, EPSG:103297, EPSG:103298, EPSG:103299, EPSG:103300, EPSG:103301, EPSG:103302, EPSG:103305, EPSG:103307, EPSG:103309, EPSG:103313, EPSG:103314, EPSG:103315, EPSG:103316, EPSG:103318, EPSG:103319, EPSG:103320, EPSG:103321, EPSG:103324, EPSG:103325, EPSG:103326, EPSG:103327, EPSG:103328, EPSG:103329, EPSG:103330, EPSG:103331, EPSG:103334, EPSG:103335, EPSG:103337, EPSG:103339, EPSG:103340, EPSG:103342, EPSG:103344, EPSG:103345, EPSG:103348, EPSG:103350, EPSG:103351, EPSG:103353, EPSG:103354, EPSG:103355, EPSG:103357, EPSG:103358, EPSG:103359, EPSG:103361, EPSG:103366, EPSG:103367, EPSG:103368, EPSG:103370, EPSG:103372, EPSG:103373, EPSG:103374, EPSG:103393, EPSG:103394, EPSG:103395, EPSG:103396, EPSG:103397, EPSG:103398, EPSG:103399, EPSG:103400, EPSG:103401, EPSG:103402, EPSG:103405, EPSG:103407, EPSG:103409, EPSG:103413, EPSG:103414, EPSG:103415, EPSG:103416, EPSG:103418, EPSG:103419, EPSG:103420, EPSG:103421, EPSG:103424, EPSG:103425, EPSG:103426, EPSG:103427, EPSG:103428, EPSG:103429, EPSG:103430, EPSG:103431, EPSG:103434, EPSG:103435, EPSG:103437, EPSG:103439, EPSG:103440, EPSG:103442, EPSG:103444, EPSG:103445, EPSG:103448, EPSG:103450, EPSG:103451, EPSG:103453, EPSG:103454, EPSG:103455, EPSG:103457, EPSG:103458, EPSG:103459, EPSG:103461, EPSG:103466, EPSG:103467, EPSG:103468, EPSG:103470, EPSG:103476, EPSG:103477, EPSG:103478, EPSG:103479, EPSG:103480, EPSG:103481, EPSG:103482, EPSG:103483, EPSG:103484, EPSG:103485, EPSG:103486, EPSG:103487, EPSG:103488, EPSG:103489, EPSG:103490, EPSG:103491, EPSG:103492, EPSG:103493, EPSG:103494, EPSG:103496, EPSG:103497, EPSG:103498, EPSG:103518, EPSG:103519, EPSG:103558, EPSG:103577, EPSG:103578, EPSG:103579, EPSG:103580, EPSG:103581, EPSG:103582, EPSG:103583, EPSG:103585, EPSG:103600, EPSG:103601, EPSG:103602, EPSG:103603, EPSG:103604, EPSG:103605, EPSG:103606, EPSG:103607, EPSG:103694, EPSG:103695, EPSG:103700, EPSG:103701, EPSG:103702, EPSG:103703, EPSG:103704, EPSG:103705, EPSG:103706, EPSG:103707]}

comment:46 by Don-vip, 7 years ago

Paul, can you please help me? I don't see what's wrong with these projections, I compared proj.4 source code with ours and I have no clue.

If we can't find how to fix them I'd like at least find a general rule to exclude them without having to hardcode 634 projection codes...

comment:47 by stoecker, 7 years ago

I checked aea and it has a bunch of differences with https://github.com/OSGeo/proj.4/blob/master/src/PJ_aea.c
E.g. n = (m1 * m1 - m2 * m2) / (ml2 - ml1) not n = (m1 * m1 - m2 * m2) / (q2 - q1)

Where did you get the code and the references data?

comment:48 by Don-vip, 7 years ago

Most of our projection code comes from geotools which itself comes from proj.4.

For the line you highlight the code is the same, only the variable ml2 as been renamed to q2.

These issues I don't understand because the projections seem to be correct. We have:

  • aea: 40 working, 5 failing
  • omerc: 26 working, 3 failing
  • tmerc: 2422 working, 242 failing
  • lcc: 1078 working, 384 failing

comment:49 by stoecker, 7 years ago

How did you get the reference values to decide if it fails?

comment:50 by Don-vip, 7 years ago

We call proj.4 cs2cs tool by running ProjectionRefTest.main(). It updates the data_nodist/projection/projection-reference-data file which is later used by ProjectionRefTest.testProjections().

comment:51 by bastiK, 7 years ago

Hi,

sorry for not responding so quickly, but I'm still around... :)

Looks to me like the reference data is incorrect:

ESRI: USA_Contiguous_Albers_Equal_Area_Conic [NAD 1983 Albers contiguous USA] (EPSG:102003): Projecting latlon(31.10696098118092,-87.49717771752603):
        expected: eastnorth(752791.366674947,-736835.00270881),
        but got:  eastnorth(582052.640080823,-690849.8349793773)!
$ echo "-87.49717771752603 31.10696098118092" | cs2cs -f %.9f +proj=longlat +datum=WGS84 +to +proj=aea +datum=NAD83 +x_0=0.0 +y_0=0.0 +lon_0=96dW +lat_0=37d30"'"N +lat_1=29d30"'"N +lat_2=45d30"'"N +towgs84=-0.9956000824677655,1.901299877314078,0.5215002840524426,0.02591500053005733,5345.352563225674,5345.352563225674,-0.00062000005129903 +no_defs
582052.640080816	-690849.834979281 4042.525268644

I can run the ProjectionRefTest.main on my machine, but would prefer to update only the wrong entries, not the entire file. Not sure how to do this conveniently at the moment.

in reply to:  37 ; comment:52 by bastiK, 7 years ago

Replying to Don-vip:

Paul we have a lot of issues with this kind of projections:

# USA_Contiguous_Albers_Equal_Area_Conic [NAD 1983 Albers contiguous USA]
# area: (lat: 24.41, 49.38) - (lon: -124.79, -66.91) [USA - CONUS - onshore]
<102003> +proj=aea +datum=NAD83 +x_0=0.0 +y_0=0.0 +lon_0=96dW +lat_0=37d30'N +lat_1=29d30'N +lat_2=45d30'N +towgs84=-0.9956000824677655,1.901299877314078,0.5215002840524426,0.02591500053005733,5345.352563225674,5345.352563225674,-0.00062000005129903 +no_defs <>

We have both +datum and +towgs84. The projections aea/NAD83 without +towgs84 parameter are OK.

When I read CustomProjection.parseDatum it seems to me we're ignoring +towgs84 parameter if we have a +datum. Am I right? Should we inverse the priority? Ignore +datum if we have +towgs84?

It would make sense to take the ellipsoid from the datum, but otherwise use +towgs84 parameters. If I read your changeset correctly, this is what you did?

in reply to:  51 comment:53 by Don-vip, 7 years ago

Replying to bastiK:

sorry for not responding so quickly, but I'm still around... :)

Yay thanks! :)

I can run the ProjectionRefTest.main on my machine, but would prefer to update only the wrong entries, not the entire file. Not sure how to do this conveniently at the moment.

We could update the script to accept projection codes as parameter. The list of codes to update is EPSG:102003,EPSG:102039,EPSG:102042,EPSG:102399,EPSG:102600,EPSG:102041,EPSG:102191,EPSG:102192,EPSG:102193,EPSG:102221,EPSG:102222,EPSG:102375,EPSG:102398,EPSG:102492,EPSG:102581,EPSG:102582,EPSG:102583,EPSG:102584,EPSG:102585,EPSG:102586,EPSG:102587,EPSG:102588,EPSG:102592,EPSG:102604,EPSG:102640,EPSG:102688,EPSG:102689,EPSG:102690,EPSG:102700,EPSG:102720,EPSG:102721,EPSG:102726,EPSG:102727,EPSG:102733,EPSG:102761,EPSG:103166,EPSG:103167,EPSG:103168,EPSG:103228,EPSG:103229,EPSG:103230,EPSG:103231,EPSG:103233,EPSG:103234,EPSG:103236,EPSG:103237,EPSG:103239,EPSG:103240,EPSG:103242,EPSG:103243,EPSG:103244,EPSG:103245,EPSG:103246,EPSG:103247,EPSG:103248,EPSG:103249,EPSG:103250,EPSG:103251,EPSG:103256,EPSG:103259,EPSG:103278,EPSG:103279,EPSG:103280,EPSG:103281,EPSG:103282,EPSG:103283,EPSG:103284,EPSG:103285,EPSG:103286,EPSG:103287,EPSG:103288,EPSG:103289,EPSG:103290,EPSG:103291,EPSG:103292,EPSG:103293,EPSG:103294,EPSG:103295,EPSG:103303,EPSG:103306,EPSG:103308,EPSG:103310,EPSG:103311,EPSG:103312,EPSG:103317,EPSG:103322,EPSG:103323,EPSG:103332,EPSG:103333,EPSG:103336,EPSG:103338,EPSG:103341,EPSG:103343,EPSG:103346,EPSG:103347,EPSG:103349,EPSG:103352,EPSG:103356,EPSG:103360,EPSG:103362,EPSG:103363,EPSG:103364,EPSG:103365,EPSG:103369,EPSG:103375,EPSG:103376,EPSG:103377,EPSG:103378,EPSG:103379,EPSG:103380,EPSG:103381,EPSG:103382,EPSG:103383,EPSG:103384,EPSG:103385,EPSG:103386,EPSG:103387,EPSG:103388,EPSG:103389,EPSG:103390,EPSG:103391,EPSG:103392,EPSG:103403,EPSG:103406,EPSG:103408,EPSG:103410,EPSG:103411,EPSG:103412,EPSG:103417,EPSG:103422,EPSG:103423,EPSG:103432,EPSG:103433,EPSG:103436,EPSG:103438,EPSG:103441,EPSG:103443,EPSG:103446,EPSG:103447,EPSG:103449,EPSG:103452,EPSG:103456,EPSG:103460,EPSG:103462,EPSG:103463,EPSG:103464,EPSG:103465,EPSG:103469,EPSG:103472,EPSG:103473,EPSG:103495,EPSG:103499,EPSG:103500,EPSG:103501,EPSG:103502,EPSG:103503,EPSG:103504,EPSG:103505,EPSG:103506,EPSG:103507,EPSG:103508,EPSG:103509,EPSG:103510,EPSG:103511,EPSG:103512,EPSG:103513,EPSG:103514,EPSG:103515,EPSG:103516,EPSG:103517,EPSG:103520,EPSG:103521,EPSG:103522,EPSG:103523,EPSG:103524,EPSG:103525,EPSG:103526,EPSG:103527,EPSG:103539,EPSG:103540,EPSG:103541,EPSG:103542,EPSG:103543,EPSG:103544,EPSG:103545,EPSG:103546,EPSG:103547,EPSG:103548,EPSG:103549,EPSG:103550,EPSG:103551,EPSG:103552,EPSG:103553,EPSG:103554,EPSG:103555,EPSG:103556,EPSG:103557,EPSG:103559,EPSG:103560,EPSG:103561,EPSG:103562,EPSG:103563,EPSG:103564,EPSG:103565,EPSG:103566,EPSG:103567,EPSG:103568,EPSG:103569,EPSG:103570,EPSG:103571,EPSG:103572,EPSG:103573,EPSG:103574,EPSG:103575,EPSG:103576,EPSG:103608,EPSG:103609,EPSG:103610,EPSG:103611,EPSG:103612,EPSG:103613,EPSG:103614,EPSG:103615,EPSG:103616,EPSG:103617,EPSG:103618,EPSG:103619,EPSG:103620,EPSG:103621,EPSG:103622,EPSG:103623,EPSG:103624,EPSG:103625,EPSG:103626,EPSG:103627,EPSG:103628,EPSG:103629,EPSG:103630,EPSG:103631,EPSG:103632,EPSG:103633,EPSG:103634,EPSG:103635,EPSG:103636,EPSG:103637,EPSG:103638,EPSG:103639,EPSG:103640,EPSG:103641,EPSG:103642,EPSG:103643,EPSG:103644,EPSG:103645,EPSG:103646,EPSG:103647,EPSG:103648,EPSG:103649,EPSG:103650,EPSG:103651,EPSG:103652,EPSG:103653,EPSG:103654,EPSG:103655,EPSG:103656,EPSG:103657,EPSG:103658,EPSG:103659,EPSG:103660,EPSG:103661,EPSG:103662,EPSG:103663,EPSG:103664,EPSG:103665,EPSG:103666,EPSG:103667,EPSG:103668,EPSG:103669,EPSG:103670,EPSG:103671,EPSG:103672,EPSG:103673,EPSG:103674,EPSG:103675,EPSG:103676,EPSG:103677,EPSG:103678,EPSG:103679,EPSG:103680,EPSG:103681,EPSG:103682,EPSG:103683,EPSG:103684,EPSG:103685,EPSG:103686,EPSG:103687,EPSG:103688,EPSG:103689,EPSG:103690,EPSG:103691,EPSG:103692,EPSG:103693,EPSG:103708,EPSG:103709,EPSG:103710,EPSG:103711,EPSG:103712,EPSG:103713,EPSG:103714,EPSG:103715,EPSG:103716,EPSG:103717,EPSG:103718,EPSG:103719,EPSG:103720,EPSG:103721,EPSG:103722,EPSG:103723,EPSG:103724,EPSG:103725,EPSG:103726,EPSG:103727,EPSG:103728,EPSG:103729,EPSG:103730,EPSG:103731,EPSG:103732,EPSG:103733,EPSG:103734,EPSG:103735,EPSG:103736,EPSG:103737,EPSG:103738,EPSG:103739,EPSG:103740,EPSG:103741,EPSG:103742,EPSG:103743,EPSG:103744,EPSG:103745,EPSG:103746,EPSG:103747,EPSG:103748,EPSG:103749,EPSG:103750,EPSG:103751,EPSG:103752,EPSG:103753,EPSG:103754,EPSG:103755,EPSG:103756,EPSG:103757,EPSG:103758,EPSG:103759,EPSG:103760,EPSG:103761,EPSG:103762,EPSG:103763,EPSG:103764,EPSG:103765,EPSG:103766,EPSG:103767,EPSG:103768,EPSG:103769,EPSG:103770,EPSG:103771,EPSG:103772,EPSG:103773,EPSG:103774,EPSG:103775,EPSG:103776,EPSG:103777,EPSG:103778,EPSG:103779,EPSG:103780,EPSG:103781,EPSG:103782,EPSG:103783,EPSG:103784,EPSG:103785,EPSG:103786,EPSG:103787,EPSG:103788,EPSG:103789,EPSG:103790,EPSG:103791,EPSG:103792,EPSG:103793,EPSG:103846,EPSG:103946,EPSG:102389,EPSG:102390,EPSG:102391,EPSG:102063,EPSG:102064,EPSG:102070,EPSG:102071,EPSG:102101,EPSG:102102,EPSG:102103,EPSG:102104,EPSG:102105,EPSG:102106,EPSG:102107,EPSG:102108,EPSG:102136,EPSG:102137,EPSG:102138,EPSG:102159,EPSG:102160,EPSG:102161,EPSG:102164,EPSG:102165,EPSG:102216,EPSG:102224,EPSG:102225,EPSG:102226,EPSG:102227,EPSG:102228,EPSG:102231,EPSG:102232,EPSG:102233,EPSG:102240,EPSG:102400,EPSG:102448,EPSG:102449,EPSG:102451,EPSG:102459,EPSG:102461,EPSG:102462,EPSG:102464,EPSG:102465,EPSG:102525,EPSG:102526,EPSG:102528,EPSG:102529,EPSG:102629,EPSG:102630,EPSG:102648,EPSG:102649,EPSG:102650,EPSG:102661,EPSG:102662,EPSG:102664,EPSG:102665,EPSG:102696,EPSG:102697,EPSG:102698,EPSG:102705,EPSG:102844,EPSG:103220,EPSG:103221,EPSG:103222,EPSG:103223,EPSG:103224,EPSG:103225,EPSG:103226,EPSG:103227,EPSG:103252,EPSG:103253,EPSG:103254,EPSG:103255,EPSG:103257,EPSG:103258,EPSG:103260,EPSG:103261,EPSG:103262,EPSG:103263,EPSG:103264,EPSG:103265,EPSG:103266,EPSG:103267,EPSG:103268,EPSG:103269,EPSG:103270,EPSG:103271,EPSG:103272,EPSG:103273,EPSG:103274,EPSG:103275,EPSG:103276,EPSG:103277,EPSG:103296,EPSG:103297,EPSG:103298,EPSG:103299,EPSG:103300,EPSG:103301,EPSG:103302,EPSG:103305,EPSG:103307,EPSG:103309,EPSG:103313,EPSG:103314,EPSG:103315,EPSG:103316,EPSG:103318,EPSG:103319,EPSG:103320,EPSG:103321,EPSG:103324,EPSG:103325,EPSG:103326,EPSG:103327,EPSG:103328,EPSG:103329,EPSG:103330,EPSG:103331,EPSG:103334,EPSG:103335,EPSG:103337,EPSG:103339,EPSG:103340,EPSG:103342,EPSG:103344,EPSG:103345,EPSG:103348,EPSG:103350,EPSG:103351,EPSG:103353,EPSG:103354,EPSG:103355,EPSG:103357,EPSG:103358,EPSG:103359,EPSG:103361,EPSG:103366,EPSG:103367,EPSG:103368,EPSG:103370,EPSG:103372,EPSG:103373,EPSG:103374,EPSG:103393,EPSG:103394,EPSG:103395,EPSG:103396,EPSG:103397,EPSG:103398,EPSG:103399,EPSG:103400,EPSG:103401,EPSG:103402,EPSG:103405,EPSG:103407,EPSG:103409,EPSG:103413,EPSG:103414,EPSG:103415,EPSG:103416,EPSG:103418,EPSG:103419,EPSG:103420,EPSG:103421,EPSG:103424,EPSG:103425,EPSG:103426,EPSG:103427,EPSG:103428,EPSG:103429,EPSG:103430,EPSG:103431,EPSG:103434,EPSG:103435,EPSG:103437,EPSG:103439,EPSG:103440,EPSG:103442,EPSG:103444,EPSG:103445,EPSG:103448,EPSG:103450,EPSG:103451,EPSG:103453,EPSG:103454,EPSG:103455,EPSG:103457,EPSG:103458,EPSG:103459,EPSG:103461,EPSG:103466,EPSG:103467,EPSG:103468,EPSG:103470,EPSG:103476,EPSG:103477,EPSG:103478,EPSG:103479,EPSG:103480,EPSG:103481,EPSG:103482,EPSG:103483,EPSG:103484,EPSG:103485,EPSG:103486,EPSG:103487,EPSG:103488,EPSG:103489,EPSG:103490,EPSG:103491,EPSG:103492,EPSG:103493,EPSG:103494,EPSG:103496,EPSG:103497,EPSG:103498,EPSG:103518,EPSG:103519,EPSG:103558,EPSG:103577,EPSG:103578,EPSG:103579,EPSG:103580,EPSG:103581,EPSG:103582,EPSG:103583,EPSG:103585,EPSG:103600,EPSG:103601,EPSG:103602,EPSG:103603,EPSG:103604,EPSG:103605,EPSG:103606,EPSG:103607,EPSG:103694,EPSG:103695,EPSG:103700,EPSG:103701,EPSG:103702,EPSG:103703,EPSG:103704,EPSG:103705,EPSG:103706,EPSG:103707.

in reply to:  52 ; comment:54 by Don-vip, 7 years ago

Replying to bastiK:

It would make sense to take the ellipsoid from the datum, but otherwise use +towgs84 parameters. If I read your changeset correctly, this is what you did?

Yes that's what I did (at least that's I wanted to do). I noticed however the test now takes twice the time (30s) it took before this change (15s). Maybe the code can be optimized.

comment:55 by Don-vip, 7 years ago

Ah also make sure you're using proj 5.0 or later, otherwise you could have minor changes for transverse mercator (see r13634).

in reply to:  54 ; comment:56 by bastiK, 7 years ago

Replying to Don-vip:

Replying to bastiK:

It would make sense to take the ellipsoid from the datum, but otherwise use +towgs84 parameters. If I read your changeset correctly, this is what you did?

Yes that's what I did (at least that's I wanted to do). I noticed however the test now takes twice the time (30s) it took before this change (15s). Maybe the code can be optimized.

Maybe the correct algorithm simply takes longer: When it was just +datum=NAD83, it would skip datum transformation (NullDatum) now it has to do relatively expensive calculations with +towgs84 (SevenParameterDatum).

in reply to:  56 comment:57 by Don-vip, 7 years ago

Replying to bastiK:

Maybe the correct algorithm simply takes longer: When it was just +datum=NAD83, it would skip datum transformation (NullDatum) now it has to do relatively expensive calculations with +towgs84 (SevenParameterDatum).

OK, makes sense.

comment:58 by Don-vip, 7 years ago

ping? :)

comment:59 by Don-vip, 7 years ago

In 13659/josm:

see #16129 - increase error threshold with java 9/10/11

comment:60 by Don-vip, 7 years ago

Paul, can you please complete the update this week? We're closing in for the release.

comment:61 by Don-vip, 7 years ago

Milestone 18.04 is feature complete for me. I won't be able to do the release this week-end. I'd appreciate someone else updates the regression data to fix this ticket and does the actual release. Thanks.

comment:62 by Don-vip, 7 years ago

Up? If nobody's willing to work on this please tell me so that I don't wait for nothing.

comment:63 by stoecker, 7 years ago

I'm a bit lazy ATM regarding computers (which includes JOSM :-). So don't expect too much from my side.

comment:64 by Don-vip, 7 years ago

In 13702/josm:

see #16129 - fix Java warnings

comment:65 by Don-vip, 7 years ago

In 13703/josm:

see #16129 - escape quotes on Windows

comment:66 by Don-vip, 7 years ago

r13703 fixed a lot of errors but there are still 188 generation errors:

the following 188 entries had errors: [EPSG:102231, EPSG:102232, EPSG:102233, EPSG:102459, EPSG:102629, EPSG:102630, EPSG:102648, EPSG:102649, EPSG:102650, EPSG:102696, EPSG:102697, EPSG:102698, EPSG:102705, EPSG:103220, EPSG:103221, EPSG:103222, EPSG:103223, EPSG:103224, EPSG:103225, EPSG:103226, EPSG:103227, EPSG:103252, EPSG:103253, EPSG:103260, EPSG:103261, EPSG:103262, EPSG:103263, EPSG:103264, EPSG:103266, EPSG:103267, EPSG:103269, EPSG:103270, EPSG:103271, EPSG:103272, EPSG:103273, EPSG:103274, EPSG:103275, EPSG:103276, EPSG:103277, EPSG:103296, EPSG:103297, EPSG:103298, EPSG:103299, EPSG:103301, EPSG:103302, EPSG:103305, EPSG:103307, EPSG:103309, EPSG:103313, EPSG:103314, EPSG:103315, EPSG:103316, EPSG:103318, EPSG:103319, EPSG:103320, EPSG:103321, EPSG:103324, EPSG:103325, EPSG:103326, EPSG:103327, EPSG:103329, EPSG:103330, EPSG:103331, EPSG:103334, EPSG:103335, EPSG:103337, EPSG:103339, EPSG:103340, EPSG:103342, EPSG:103344, EPSG:103345, EPSG:103348, EPSG:103350, EPSG:103351, EPSG:103353, EPSG:103354, EPSG:103355, EPSG:103357, EPSG:103358, EPSG:103359, EPSG:103361, EPSG:103366, EPSG:103367, EPSG:103368, EPSG:103370, EPSG:103372, EPSG:103373, EPSG:103374, EPSG:103393, EPSG:103394, EPSG:103395, EPSG:103396, EPSG:103397, EPSG:103398, EPSG:103399, EPSG:103401, EPSG:103402, EPSG:103405, EPSG:103407, EPSG:103409, EPSG:103413, EPSG:103414, EPSG:103415, EPSG:103416, EPSG:103418, EPSG:103419, EPSG:103420, EPSG:103421, EPSG:103424, EPSG:103425, EPSG:103426, EPSG:103427, EPSG:103429, EPSG:103430, EPSG:103431, EPSG:103434, EPSG:103435, EPSG:103437, EPSG:103439, EPSG:103440, EPSG:103442, EPSG:103444, EPSG:103445, EPSG:103448, EPSG:103450, EPSG:103451, EPSG:103453, EPSG:103454, EPSG:103455, EPSG:103457, EPSG:103458, EPSG:103459, EPSG:103461, EPSG:103466, EPSG:103467, EPSG:103468, EPSG:103470, EPSG:103476, EPSG:103477, EPSG:103478, EPSG:103479, EPSG:103480, EPSG:103481, EPSG:103482, EPSG:103483, EPSG:103484, EPSG:103485, EPSG:103486, EPSG:103487, EPSG:103488, EPSG:103489, EPSG:103490, EPSG:103491, EPSG:103492, EPSG:103493, EPSG:103494, EPSG:103496, EPSG:103497, EPSG:103498, EPSG:103518, EPSG:103519, EPSG:103558, EPSG:103577, EPSG:103578, EPSG:103579, EPSG:103580, EPSG:103581, EPSG:103582, EPSG:103583, EPSG:103585, EPSG:103600, EPSG:103601, EPSG:103602, EPSG:103603, EPSG:103604, EPSG:103605, EPSG:103606, EPSG:103607, EPSG:103694, EPSG:103695, EPSG:103700, EPSG:103701, EPSG:103702, EPSG:103703, EPSG:103704, EPSG:103705, EPSG:103706, EPSG:103707]
Last edited 7 years ago by Don-vip (previous) (diff)

comment:67 by Don-vip, 7 years ago

In 13704/josm:

see #16129 - update remaining codes on Linux, does not work on Windows

comment:68 by Don-vip, 7 years ago

In 13705/josm:

see #16129 - call PROJ by JNI if available. Faster and removes the problem of escaping quote characters via command line

comment:69 by Don-vip, 7 years ago

Errors down from 614 to 383:

383 definitions: {
aea=[
EPSG:102042], 

lcc=[
EPSG:102041, EPSG:102191, EPSG:102192, EPSG:102193, EPSG:102221, EPSG:102222, EPSG:102581, EPSG:102582, EPSG:102583, EPSG:102584, EPSG:102585, EPSG:102586, EPSG:102587, EPSG:102588, EPSG:102604, EPSG:102689, EPSG:102690, EPSG:102700, EPSG:102720, EPSG:102721, EPSG:102726, EPSG:102727, EPSG:102761, EPSG:103166, EPSG:103167, EPSG:103168, EPSG:103234, EPSG:103237, EPSG:103240, EPSG:103243, EPSG:103244, EPSG:103245, EPSG:103246, EPSG:103247, EPSG:103248, EPSG:103249, EPSG:103250, EPSG:103251, EPSG:103256, EPSG:103259, EPSG:103278, EPSG:103279, EPSG:103280, EPSG:103281, EPSG:103283, EPSG:103285, EPSG:103286, EPSG:103287, EPSG:103288, EPSG:103289, EPSG:103290, EPSG:103291, EPSG:103292, EPSG:103293, EPSG:103294, EPSG:103295, EPSG:103303, EPSG:103306, EPSG:103308, EPSG:103310, EPSG:103311, EPSG:103312, EPSG:103317, EPSG:103322, EPSG:103323, EPSG:103332, EPSG:103333, EPSG:103336, EPSG:103338, EPSG:103341, EPSG:103343, EPSG:103346, EPSG:103347, EPSG:103349, EPSG:103352, EPSG:103356, EPSG:103360, EPSG:103362, EPSG:103363, EPSG:103364, EPSG:103365, EPSG:103369, EPSG:103377, EPSG:103378, EPSG:103379, EPSG:103380, EPSG:103382, EPSG:103383, EPSG:103385, EPSG:103386, EPSG:103387, EPSG:103388, EPSG:103390, EPSG:103391, EPSG:103403, EPSG:103406, EPSG:103408, EPSG:103410, EPSG:103411, EPSG:103412, EPSG:103417, EPSG:103422, EPSG:103423, EPSG:103432, EPSG:103433, EPSG:103436, EPSG:103438, EPSG:103441, EPSG:103443, EPSG:103446, EPSG:103447, EPSG:103449, EPSG:103452, EPSG:103456, EPSG:103460, EPSG:103462, EPSG:103463, EPSG:103464, EPSG:103465, EPSG:103469, EPSG:103472, EPSG:103473, EPSG:103502, EPSG:103503, EPSG:103504, EPSG:103505, EPSG:103506, EPSG:103507, EPSG:103508, EPSG:103509, EPSG:103514, EPSG:103515, EPSG:103516, EPSG:103517, EPSG:103523, EPSG:103525, EPSG:103539, EPSG:103540, EPSG:103541, EPSG:103543, EPSG:103544, EPSG:103545, EPSG:103546, EPSG:103548, EPSG:103549, EPSG:103550, EPSG:103551, EPSG:103552, EPSG:103553, EPSG:103554, EPSG:103555, EPSG:103556, EPSG:103557, EPSG:103559, EPSG:103560, EPSG:103561, EPSG:103562, EPSG:103563, EPSG:103564, EPSG:103565, EPSG:103566, EPSG:103567, EPSG:103569, EPSG:103608, EPSG:103609, EPSG:103610, EPSG:103611, EPSG:103612, EPSG:103613, EPSG:103614, EPSG:103615, EPSG:103616, EPSG:103617, EPSG:103618, EPSG:103619, EPSG:103620, EPSG:103621, EPSG:103622, EPSG:103623, EPSG:103624, EPSG:103625, EPSG:103626, EPSG:103627, EPSG:103628, EPSG:103629, EPSG:103630, EPSG:103631, EPSG:103632, EPSG:103633, EPSG:103634, EPSG:103635, EPSG:103636, EPSG:103637, EPSG:103638, EPSG:103639, EPSG:103640, EPSG:103641, EPSG:103642, EPSG:103643, EPSG:103644, EPSG:103645, EPSG:103646, EPSG:103647, EPSG:103648, EPSG:103649, EPSG:103650, EPSG:103651, EPSG:103652, EPSG:103653, EPSG:103654, EPSG:103655, EPSG:103656, EPSG:103657, EPSG:103658, EPSG:103659, EPSG:103660, EPSG:103661, EPSG:103662, EPSG:103663, EPSG:103664, EPSG:103665, EPSG:103666, EPSG:103667, EPSG:103668, EPSG:103669, EPSG:103670, EPSG:103671, EPSG:103672, EPSG:103673, EPSG:103674, EPSG:103675, EPSG:103676, EPSG:103677, EPSG:103678, EPSG:103679, EPSG:103680, EPSG:103681, EPSG:103682, EPSG:103683, EPSG:103684, EPSG:103685, EPSG:103686, EPSG:103687, EPSG:103688, EPSG:103689, EPSG:103690, EPSG:103691, EPSG:103692, EPSG:103693, EPSG:103708, EPSG:103709, EPSG:103710, EPSG:103711, EPSG:103712, EPSG:103713, EPSG:103714, EPSG:103715, EPSG:103716, EPSG:103717, EPSG:103718, EPSG:103719, EPSG:103720, EPSG:103721, EPSG:103722, EPSG:103723, EPSG:103724, EPSG:103725, EPSG:103726, EPSG:103727, EPSG:103728, EPSG:103729, EPSG:103730, EPSG:103731, EPSG:103732, EPSG:103733, EPSG:103734, EPSG:103735, EPSG:103736, EPSG:103737, EPSG:103738, EPSG:103739, EPSG:103740, EPSG:103741, EPSG:103742, EPSG:103743, EPSG:103744, EPSG:103745, EPSG:103746, EPSG:103747, EPSG:103748, EPSG:103749, EPSG:103750, EPSG:103751, EPSG:103752, EPSG:103753, EPSG:103754, EPSG:103755, EPSG:103756, EPSG:103757, EPSG:103758, EPSG:103759, EPSG:103760, EPSG:103761, EPSG:103762, EPSG:103763, EPSG:103764, EPSG:103765, EPSG:103766, EPSG:103767, EPSG:103768, EPSG:103769, EPSG:103770, EPSG:103771, EPSG:103772, EPSG:103773, EPSG:103774, EPSG:103775, EPSG:103776, EPSG:103777, EPSG:103778, EPSG:103779, EPSG:103780, EPSG:103781, EPSG:103782, EPSG:103783, EPSG:103784, EPSG:103785, EPSG:103786, EPSG:103787, EPSG:103788, EPSG:103789, EPSG:103790, EPSG:103791, EPSG:103792, EPSG:103793, EPSG:103846, EPSG:103946],

omerc=[
EPSG:102389, EPSG:102390, EPSG:102391], 

tmerc=[
EPSG:102063, EPSG:102064, EPSG:102070, EPSG:102071, EPSG:102101, EPSG:102102, EPSG:102103, EPSG:102104, EPSG:102105, EPSG:102106, EPSG:102107, EPSG:102108, EPSG:102136, EPSG:102137, EPSG:102138, EPSG:102159, EPSG:102160, EPSG:102161, EPSG:102164, EPSG:102165, EPSG:102224, EPSG:102225, EPSG:102226, EPSG:102227, EPSG:102228, EPSG:102400, EPSG:102448, EPSG:102449, EPSG:102451, EPSG:102461, EPSG:102462, EPSG:102464, EPSG:102465, EPSG:102525, EPSG:102526, EPSG:102528, EPSG:102529, EPSG:102661, EPSG:102662, EPSG:102664, EPSG:102665, EPSG:102844]}

comment:70 by Don-vip, 7 years ago

To build JNI wrappers from 5.0.1 tarball:

cd proj-5.0.1
CFLAGS=-I/usr/lib/jvm/java-8-openjdk-amd64/include/linux/ ./configure --with-jni=/usr/lib/jvm/java-8-openjdk-amd64/include
make
cd jniwrap
ant

To build JNI wrappers from git repository:

sudo apt install automake libtool
git clone https://github.com/OSGeo/proj.4.git proj-master
cd proj-master
./autogen.sh
CFLAGS=-I/opt/jdk-9/include/linux/ ./configure --with-jni=/opt/jdk-9/include
make
cd jniwrap
JAVA_HOME=/opt/jdk-9 /var/lib/jenkins/tools/hudson.tasks.Ant_AntInstallation/Ant_Latest/bin/ant
Last edited 7 years ago by Don-vip (previous) (diff)

comment:71 by Don-vip, 7 years ago

In 13706/josm:

see #16129 - new update (forgot many projection codes and nadgrid configuration)

comment:72 by Don-vip, 7 years ago

Much better!

7 definitions: {tmerc=[EPSG:102224, EPSG:102225, EPSG:102226, EPSG:102227, EPSG:102228, EPSG:102449, EPSG:102844]}

comment:73 by Don-vip, 7 years ago

In 13707/josm:

see #16129 - fix areas of Mongolia UTM zones

see https://github.com/Esri/projection-engine-db-doc/pull/4

comment:74 by Don-vip, 7 years ago

In 13708/josm:

see #16129 - hopefully the last update

comment:75 by Don-vip, 7 years ago

Resolution: fixed
Status: newclosed

comment:76 by Don-vip, 7 years ago

JOSM r13576: 5411 projections
JOSM r13710: 6135 projections

+724 projections with this ticket :)

comment:77 by anonymous, 7 years ago

Hey, I must say you impressed me again - the original test layer works flawlessly!
That LIDAR shaded relief will help us map the paths in the woods more accurately.

in reply to:  76 comment:78 by Klumbumbus, 7 years ago

Replying to Don-vip:

JOSM r13576: 5411 projections
JOSM r13710: 6135 projections

+724 projections with this ticket :)

That's impressive! (I just added it the the stable release news on the startuppage.)

comment:79 by Don-vip, 6 years ago

To build JNI wrappers from 5.2.0 tarball:

cd proj-5.2.0
CFLAGS=-I/opt/jdk-11/include/linux/ ./configure --with-jni=/opt/jdk-11/include
make
cd jniwrap
JAVA_HOME=/opt/jdk-11 /var/lib/jenkins/tools/hudson.tasks.Ant_AntInstallation/Ant_Latest/bin/ant

To build JNI wrappers from git repository:

sudo apt install automake libtool
git clone https://github.com/OSGeo/proj.4.git proj-master
cd proj-master
./autogen.sh
CFLAGS=-I/opt/jdk-11/include/linux/ ./configure --with-jni=/opt/jdk-11/include
make
cd jniwrap
JAVA_HOME=/opt/jdk-11 /var/lib/jenkins/tools/hudson.tasks.Ant_AntInstallation/Ant_Latest/bin/ant

comment:80 by Don-vip, 6 years ago

In 14568/josm:

see #16129 - update to latest ESRI definitions (ArcMap 10.6.1 / ArcGISPro 2.2)

see https://github.com/Esri/projection-engine-db-doc/pull/5

comment:81 by Don-vip, 4 years ago

Cc: stoecker added

I try to update to latest ESRI projections.

JNI wrappers have been removed from PROJ. There is a replacement, which needs cmake to build. Right now I don't find how to build it with a locally built version of PROJ.

@Dirk can you please help me? Right now I did the following:

apt install cmake pkg-config sqlite3 libsqlite3-dev libtiff-dev

wget -qO- https://download.osgeo.org/proj/proj-7.2.1.tar.gz | tar --transform 's/^dbt2-0.37.50.3/dbt2/' -xvz
cd proj-7.2.1 && ./configure --without-curl --prefix=/home/josm/proj && make && make install && cd ..

git clone https://github.com/Kortforsyningen/PROJ-JNI.git && cd PROJ-JNI

Applied patch to workaround first error:

  • src/main/cpp/CMakeLists.txt

    index 8325e21..6dcac78 100644
    a b include_directories(${JNI_INCLUDE_DIRS})  
    7272# We want the "local/lib/" directory to be checked first in order to link against the PROJ version compiled
    7373# locally. Otherwise the PROJ version installed by the package manager may have precedence on Linux systems.
    7474# CMake searches the path in the desired order when using this directive.
    75 find_library(PROJLIB proj)
     75find_library(PROJLIB
     76       proj
     77       HINTS /home/josm/proj/lib
     78)
    7679
    7780# GCC options reminder:
    7881#    -fPIC             Generate position-independent code suitable for use in a shared library.

Then in /home/josm/PROJ-JNI:

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
mvn clean package

fails as follows:

[INFO] --- maven-antrun-plugin:1.8:run (build-native) @ proj ---
[INFO] Executing tasks

main:

init:

configure:
    [mkdir] Created dir: /home/josm/PROJ-JNI/target/cmake
     [exec] -- The CXX compiler identification is GNU 7.5.0
     [exec] -- Check for working CXX compiler: /usr/bin/c++
     [exec] -- Check for working CXX compiler: /usr/bin/c++ -- works
     [exec] -- Detecting CXX compiler ABI info
     [exec] -- Detecting CXX compiler ABI info - done
     [exec] -- Detecting CXX compile features
     [exec] -- Detecting CXX compile features - done
     [exec] -- Found JNI: /usr/lib/jvm/java-11-openjdk-amd64/lib/libjawt.so
     [exec] -- Configuring done
     [exec] -- Generating done
     [exec] -- Build files have been written to: /home/josm/PROJ-JNI/target/cmake

build:
     [exec] Scanning dependencies of target proj-binding
     [exec] [ 33%] Building CXX object CMakeFiles/proj-binding.dir/assertions.cpp.o
     [exec] CMakeFiles/proj-binding.dir/build.make:62: recipe for target 'CMakeFiles/proj-binding.dir/assertions.cpp.o' failed
     [exec] CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/proj-binding.dir/all' failed
     [exec] Makefile:83: recipe for target 'all' failed
     [exec] /home/josm/PROJ-JNI/src/main/cpp/assertions.cpp:4:10: fatal error: proj/coordinateoperation.hpp: No such file or directory
     [exec]  #include "proj/coordinateoperation.hpp"
     [exec]           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     [exec] compilation terminated.
     [exec] make[2]: *** [CMakeFiles/proj-binding.dir/assertions.cpp.o] Error 1
     [exec] make[1]: *** [CMakeFiles/proj-binding.dir/all] Error 2
     [exec] make: *** [all] Error 2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.125 s
[INFO] Finished at: 2021-01-22T21:44:29+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (build-native) on project proj: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /home/josm/PROJ-JNI/src/main/cpp/build.xml:42: exec returned: 2
[ERROR] around Ant part ...<ant antfile="/home/josm/PROJ-JNI/src/main/cpp/build.xml" inheritAll="true" dir="${target.directory}"/>... @ 7:106 in /home/josm/PROJ-JNI/target/antrun/build-main.xml

I don't know how to tell cmake to use proj C++ header files located in /home/josm/proj/include.

comment:82 by Don-vip, 4 years ago

Ah I didn't see the documentation, maybe no need to patch after all:

# If above command fails (for example on Windows), then it may be useful to invoke `cmake` manually.
# It can be done with the following commands (the `-DPROJINC` and `-DPROJLIB` arguments can be omitted
# on POSIX systems):
#
#     cd target/cmake
#     cmake ../../src/main/cpp -DPROJINC=Proj6/Path/include -DPROJLIB=Proj6/Path
#     cd ../..
#
# Then the following command can be run from the project root directory (actually it
# can be run from any directory if `target/cmake` argument is adjusted accordingly):
#
#     cmake --build target/cmake

comment:83 by Don-vip, 4 years ago

I managed to build the bindings, but can't make the new cs2cs work with ESRI updates, created https://github.com/OSGeo/PROJ/issues/2508

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.