Opened 16 years ago
Closed 16 years ago
#2559 closed defect (fixed)
Krovak EPSG translation wrong?
Reported by: | warmerdam | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.0 |
Component: | OGR_SRS | Version: | svn-trunk |
Severity: | normal | Keywords: | krovak |
Cc: | Markus Neteler, martinl |
Description
Frank,
not sure where this belongs to (mailing list):
epsg_tr.py -proj4 2065 # S-JTSK (Ferro) / Krovak <2065> +proj=krovak +lat_0=49.5 +lon_0=0 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs <>
-> lon_0=0 looks wrong to me
grep '<2065' /usr/local/share/proj/epsg <2065> +proj=krovak +lat_0=49.5 +lon_0=42.5 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs <>
Is this a bug somewhere?
thanks Markus
Change History (6)
follow-up: 2 comment:1 by , 16 years ago
comment:2 by , 16 years ago
Cc: | added |
---|
Replying to warmerdam:
I have confirmed that EPSG:2065 is being expanded by OGR with a lon_0=0 value (including in the WKT) currently. I'm getting the same results as far back as GDAL 1.4 though I'm not positive I was really using different csv files. I'm not absolutely sure whether the lon_0=42.5 Markus found in an old epsg init file is correct or not, but the matter certainly bears additional investigation.
The reference meridian used in Krovak projections is 42d30m (prime meridian is Ferro), so
lon_0=42.5 +pm=ferro
is right.
comment:3 by , 16 years ago
I can reproduce the problem when running GDAL svn trunk against $(GDAL_ROOT)/data directory from svn trunk. But when running against /data directory from GDAL 1.5 or 1.4, I get the expected value of lon_0=42.5.
Extract of pcs.csv from gdal svn trunk:
PARAMETER_CODE_7 PARAMETER_VALUE_7 PARAMETER_UOM_7 8833 42.3 9110
Extract of pcs.csv from gdal 1.5 branch:
PARAMETER_CODE_2 PARAMETER_VALUE_2 PARAMETER_UOM_2 8812 42.3 9110
8812 == ProjCenterLong 8833 == PolarLongOrigin --> that looks wrong.
Last upgrade to EPSG 6.17 in r14987 seems to be the root of the problem
comment:5 by , 16 years ago
Milestone: | → 1.6.0 |
---|---|
Status: | new → assigned |
I'm guessing that EPSG has changed how the central meridian is communicated for the krovak projection, and ogr_fromepsg.cpp will need to be updated to handle both approaches. I'll dig into this.
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I have corrected ogr_fromepsg.cpp (ImportFromEPSG()) logic in trunk (r15479) to accept either the ProjCenterLong or PolarLongOrigin parameters. This appears to have corrected the problem.
Thanks for the digging Even.
I have confirmed that EPSG:2065 is being expanded by OGR with a lon_0=0 value (including in the WKT) currently. I'm getting the same results as far back as GDAL 1.4 though I'm not positive I was really using different csv files. I'm not absolutely sure whether the lon_0=42.5 Markus found in an old epsg init file is correct or not, but the matter certainly bears additional investigation.