Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add us survey foot #3276

Closed
bartvde opened this issue Feb 25, 2015 · 9 comments · Fixed by #3303 or #3307
Closed

add us survey foot #3276

bartvde opened this issue Feb 25, 2015 · 9 comments · Fixed by #3303 or #3307

Comments

@bartvde
Copy link
Member

bartvde commented Feb 25, 2015

Coordinate systems based on the US Survey Foot are failing in OL 3.2.1. epsg.io uses the abbreviation 'us-ft'. The US Survey Foot is defined as 1200/3937 meters. It is widely used in US State Plane Coordinate Systems. I believe two additions are required in prij/proj.js:
ol.proj.Units.USFEET: 'us-ft',
and
ol.proj.METERS_PER_UNIT[ol.proj.Units.USFEET] = 1200/3937;
but I'm not user if "USFEET" follows your naming convention.

@bartvde bartvde changed the title add us survey geet add us survey foot Feb 25, 2015
@ahocevar
Copy link
Member

@rgreenwood
Copy link

I have investigated a little further and there is still a problem. The METERS_PER_UNIT seems to be ignored (both the definition that I added for US Survey Feet and the existing definition for the International Foot) The result of a transformation using either "ft" or "us-ft" is returned in meters.
ol.proj.transform([-110.8, 43.5], "EPSG:4326", "EPSG:3739")
[742041.9212159723, 433448.6294142811]
which is incorrect. The correct result in US Survey Feet is:
2434515.870, 1422072.711

@ahocevar
Copy link
Member

Careful. This might be a proj4js issue. But I'll take a closer look.

@ahocevar
Copy link
Member

Can you share your complete projection definition? Both the proj4js and the ol part.

@rgreenwood
Copy link

It SHOULD be a proj4js issue, but I didn't find any unit definitions in the
proj4js-master. The only unit definitions that I could find grep'ing
proj4js and ol3 were in ol3, which does not seem right to me.

Rich

On Wed, Feb 25, 2015 at 5:28 PM, Andreas Hocevar notifications@github.com
wrote:

Careful. This might be a proj4js issue. But I'll take a closer look.


Reply to this email directly or view it on GitHub
#3276 (comment).

Richard W. Greenwood, PLS
www.greenwoodmap.com

@rgreenwood
Copy link

I started with this:
http://epsg.io/3739.js and ol3.2.1 but no map displayed. After I add:
ol.proj.Units -> USFEET: 'us-ft'
ol.proj.METERS_PER_UNIT[ol.proj.Units.USFEET] = 1200/3937;
my map displayed and I thought that I had the solution.

But regardless of what I do I am getting meters back when I do
ol.proj.transform()
So maybe there are two problems:

  1. missing us-ft definition in ol3
  2. proj4js not using units

I'm still working on it.

Thanks,
Rich

On Wed, Feb 25, 2015 at 5:31 PM, Andreas Hocevar notifications@github.com
wrote:

Can you share your complete projection definition? Both the proj4js and
the ol part.


Reply to this email directly or view it on GitHub
#3276 (comment).

Richard W. Greenwood, PLS
www.greenwoodmap.com

@rgreenwood
Copy link

ol3 fails silently (does not request a map) if "projection" does not include a know "units" definition.
epsg.io returns definitions with e.g. "+units=us-ft", however proj4js ver 2.2.1 does not appear to recognize "+units=us-ft" or "+units=ft" and silently defaults to meters.
By adding "+to_meter=0.3048006096012192" to the coord system definition proj4js returns the correct values.

So when using proj4js and epsg.io, any projection that is not in meters transformations will not be correct. This is more of a proj4js issue than an ol3 issue. Adding the us-ft definition that I initially suggested will not solve the problem, but might still be useful in some cases.

@bill-chadwick
Copy link
Contributor

The scale line control needs updating to check for USFEET

@bill-chadwick
Copy link
Contributor

Around line 230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants