converting from UK ordinance survey to lat/lon

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

converting from UK ordinance survey to lat/lon

Andrea Edwards
Hi
 
I am trying to use proj4 to convert from uk ordinance survey coordinates to latitude and longitude values.
 
I found an example in the internet as so
 
C:\> proj.exe -I +init=world:bng +ellps=WGS84
353600 432900                        (input)
2d42'15.556"W   53d47'22.952"N       (output)


This does not work for me. I get this error
projection initialization failure
cause: no system list, errno: 2
program abnormally terminated
 
I think this is something to do with the world:bng file (don't know what that is though). I copied this file to the same directory as proj4 in case that helped but it didn't.
 
Thanks in advance for your help
andrea

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: converting from UK ordinance survey to lat/lon

José Alberto Gonçalves-2
Try this syntax:

   *proj.exe -I +init=./world:bng +ellps=WGS84*

It just tells that file "world" is in the current directory.



Jose' A. Gonçalves





Andrea Edwards wrote:

>Hi
>
>I am trying to use proj4 to convert from uk ordinance survey coordinates to latitude and longitude values.
>
>I found an example in the internet as so
>
>C:\> proj.exe -I +init=world:bng +ellps=WGS84
>353600 432900                        (input)
>2d42'15.556"W   53d47'22.952"N       (output)
>
>
>This does not work for me. I get this error
>projection initialization failure
>cause: no system list, errno: 2
>program abnormally terminated
>
>I think this is something to do with the world:bng file (don't know what that is though). I copied this file to the same directory as proj4 in case that helped but it didn't.
>
>Thanks in advance for your help
>andrea
>
>_______________________________________________
>Proj mailing list
>[hidden email]
>http://lists.maptools.org/mailman/listinfo/proj
>

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: converting from UK ordinance survey to lat/lon

José Alberto Gonçalves-2
Sorry for the **. It should be:

   proj.exe -I +init=./world:bng +ellps=WGS84


Jose' A. Gonçalves



José Alberto Gonçalves wrote:

> Try this syntax:
>
>   *proj.exe -I +init=./world:bng +ellps=WGS84*
>
> It just tells that file "world" is in the current directory.
>
>
>
> Jose' A. Gonçalves
>
>
>
>
>
> Andrea Edwards wrote:
>
>> Hi
>>
>> I am trying to use proj4 to convert from uk ordinance survey
>> coordinates to latitude and longitude values.
>>
>> I found an example in the internet as so
>>
>> C:\> proj.exe -I +init=world:bng +ellps=WGS84
>> 353600 432900                        (input)
>> 2d42'15.556"W   53d47'22.952"N       (output)
>>
>>
>> This does not work for me. I get this error
>> projection initialization failure
>> cause: no system list, errno: 2
>> program abnormally terminated
>>
>> I think this is something to do with the world:bng file (don't know
>> what that is though). I copied this file to the same directory as
>> proj4 in case that helped but it didn't.
>>
>> Thanks in advance for your help
>> andrea
>>
>> _______________________________________________
>> Proj mailing list
>> [hidden email]
>> http://lists.maptools.org/mailman/listinfo/proj
>>
>
> _______________________________________________
> Proj mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/proj


_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

RE: converting from UK ordinance survey to lat/lon

Hugo Tyson
In reply to this post by Andrea Edwards
Andrea Edwards [[hidden email]] wrote:

> I am trying to use proj4 to convert from uk ordinance survey
> coordinates to latitude and longitude values.
>
> I found an example in the internet as so
>
> C:\> proj.exe -I +init=world:bng +ellps=WGS84
> 353600 432900                        (input)
> 2d42'15.556"W   53d47'22.952"N       (output)
>
> This does not work for me. I get this error
> projection initialization failure
> cause: no system list, errno: 2
> program abnormally terminated

Hi Andrea, 'fraid I don't know about that specific
initialisation issue.  I only ever spelled out the
args in full.

But a couple of comments/questions...

Are you converting to WGS84 Lat/Long or sticking to
Lat/Long relative to the Ordnance Survey datum (OSGB36)?
OSGB36 Lat/Long is the blue + marks on OS maps; they're
not WGS84.  If OSGB36 you'll be OK with proj.  If WGS84
you'll need to use cs2cs (which is part of the proj suite
of tools) instead, because it does datum changes as well
as projections.

I was doing this the other way - WGS84LatLong to OSGB36
British National Grid.  I found that I needed to add a datum
to proj, so that cs2cs can do the datum change.  Details are
in the archive of this list.

If you make that change and rebuild proj et al, you should
be able to do your conversion (to WGS84 datum) with

cs2cs +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601
      +x_0=400000 +y_0=-100000 +units=m
      +ellps=airy +datum=OSGB36
      +to
      +proj=latlong +ellps=WGS84 +datum=WGS84

(which doesn't give the same answers as your web example)
Hope this helps,

        - Huge

--
Hugo Tyson, Cambridge Positioning Systems Ltd
=************************************************************
This email and any attachments are confidential. They have been checked for viruses but it is your
responsibility to conduct your own virus checks.

Cambridge Positioning Systems Limited, 62-64 Hills Road, Cambridge, CB2 1LA, is registered in England
under company number 2808344.


_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

RE: converting from UK ordinance survey to lat/lon

Andrea Edwards
In reply to this post by José Alberto Gonçalves-2
Hi
 
Thanks for your reply.
 
It turns out i had not set the lib_path properly (set PROJ_LIB=C:\Software\PROJ\NAD)
 
It works now.
 
Thank you!

________________________________

From: [hidden email] on behalf of José Alberto Gonçalves
Sent: Tue 15/11/2005 11:32
To: PROJ.4 and general Projections Discussions
Subject: Re: [Proj] converting from UK ordinance survey to lat/lon



Sorry for the **. It should be:

   proj.exe -I +init=./world:bng +ellps=WGS84


Jose' A. Gonçalves



José Alberto Gonçalves wrote:

> Try this syntax:
>
>   *proj.exe -I +init=./world:bng +ellps=WGS84*
>
> It just tells that file "world" is in the current directory.
>
>
>
> Jose' A. Gonçalves
>
>
>
>
>
> Andrea Edwards wrote:
>
>> Hi
>>
>> I am trying to use proj4 to convert from uk ordinance survey
>> coordinates to latitude and longitude values.
>>
>> I found an example in the internet as so
>>
>> C:\> proj.exe -I +init=world:bng +ellps=WGS84
>> 353600 432900                        (input)
>> 2d42'15.556"W   53d47'22.952"N       (output)
>>
>>
>> This does not work for me. I get this error
>> projection initialization failure
>> cause: no system list, errno: 2
>> program abnormally terminated
>>
>> I think this is something to do with the world:bng file (don't know
>> what that is though). I copied this file to the same directory as
>> proj4 in case that helped but it didn't.
>>
>> Thanks in advance for your help
>> andrea
>>
>> _______________________________________________
>> Proj mailing list
>> [hidden email]
>> http://lists.maptools.org/mailman/listinfo/proj
>>
>
> _______________________________________________
> Proj mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/proj

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj



_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj

winmail.dat (8K) Download Attachment