Re: [OSGeo-Discuss] parsing coordinates

2009-06-26 Thread Pere Roca Ristol


  hi Agustin,
  thanks for the info, but what I was looking for is an on-line tool or
script to run on server-side.
  A project's colleague (Dominik Mikiewicz) has developed a tool; it runs on
ASPX but the source code is in C# and soon will be migrated to JAVA. 

  if someone is interested can check
http://forest.miiz.waw.pl/gis/coordinateconverter/default.aspx
  Any feedback and/or suggestions are wellcome.

  Below are some comments from the author (about 29 april, maybe now
outdated)

   "At the moment it converts only 4 coordinate notation patterns (currently
English only, sorry) but I tried to enable it to convert most of the
flavours of given notation. If you find anything that is supposed to be
converted but either yields an error in an application (serious problem as
the parser recognizes pattern but can't parse it) or gives a 'Unrecognized
pattern' message, please note the coordinate string you were trying to parse
and kindly send it to me.

   Ideally, if I have enough spare time, I will add a custom pattern builder
and a batch converter for the csv / txt files. This may take some time
though. Anyway, just to get to the point:
 
Recognized coordinate notations are:
1. Variations of DD(.|,)DDD (useful if hemisphere indicator is to be
removed)
2. Variations of DD(°|d)MM.MMM('|m)
3. Variation of DD(°|d)MM(ʹ|m)SS.SSS(ʺ|s)
4. Variation of DD:MM:SS.SSS
 
   Some other comments that may be useful:
1. Characters in brackets mean that the converter recognizes all of the
listed characters. Furthermore they can be mixed, ie: 12°25m, 12d25',
12D25m, or omitted when at the end, ie:  12°12, 12°, 12, etc.

2. Converter recognizes patterns even if they are not written in the full so
quite flexible notations are allowed, ie: DD, DD:, DD:MM, DD:MM:, DD:MM:SS,
DD:MM:SS., DD:MM:SS.SSS, etc

3. In adition to the coordinate pattern each coordinate may have either
(+|-|N|n|S|s|W|w|E|e) in the front or (N|n|S|s|W|w|E|e) at the end; in a
case there is no chemisphere indicator the parser assumes the coordinate is
positive; in a specific case of the DD(°|d)MM(ʹ|m)SS.SSS(ʺ|s) notation, when
there is "s" used to mark seconds the coverter will assume the coordinate is
negative if the hemisphere indicator is not given explicitly - by using
(+|-|N|n|S|s|W|w|E|e) in front or (N|n|S|s|W|w|E|e) at the end

4. Any amouont of the white space characters may be used between each part
of the coordinate except between a number and it's decimal part. So <> or <<   -  123  °  30   '   50  ''  >> is allowed but <<12  , 
30>> will yield an "unrecognized pattern' message; as demonstrated in this
example any amount of whitespace characters may also be at the beginning or
at the end of the string.

   Pere  

adiez wrote:
> 
> There is a new extension [1] for gvSIG able to do that [2].
> [1] http://www.gvsig.gva.es/index.php?id=2187&L=0
> [2] http://mmedia.uv.es/display?c=adiez&name=normalizar.mov
> 
> 
> On Apr 20, 2009, at 12:04 PM, pere roca ristol wrote:
> 
>>
>> hi all,
>>
>> I'm developing a webapplication that let's user upload their point  
>> data and play with it.
>> It currently works with lat/long in a CSV with this format (eg:  
>> 0.44, -79.9) but we find users with some of these also valid and  
>> acceptable ways to write geographic coordinates:
>> 40:26:46N,79:56:55W
>> 40:26:46.302N 79:56:55.903W
>> 40°26'21"N 79°58'36"W
>> 40d 26' 21" N 79d 58' 36" W
>> 40.446195N 79.948862W
>> 40.446195, -79.948862
>> 40° 26.7717, -79° 56.93172
>>
>> I'm aware that parsing and interpreting free-text coordinate  
>> descriptions is quite complex, maybe someone knows a script (or a  
>> remote service) that does a similar job?
>>
>> It would be very helpful.
>> Thanks!
>>
>> Pere
>> ___
>> Discuss mailing list
>> Discuss@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/discuss
> 
> 
> ___
> Discuss mailing list
> Discuss@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/discuss
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/parsing-coordinates-tp2662782p3160702.html
Sent from the OSGeo Discuss mailing list archive at Nabble.com.

___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


Re: [OSGeo-Discuss] parsing coordinates

2009-06-19 Thread Agustin Diez Castillo

There is a new extension [1] for gvSIG able to do that [2].
[1] http://www.gvsig.gva.es/index.php?id=2187&L=0
[2] http://mmedia.uv.es/display?c=adiez&name=normalizar.mov


On Apr 20, 2009, at 12:04 PM, pere roca ristol wrote:



hi all,

I'm developing a webapplication that let's user upload their point  
data and play with it.
It currently works with lat/long in a CSV with this format (eg:  
0.44, -79.9) but we find users with some of these also valid and  
acceptable ways to write geographic coordinates:

40:26:46N,79:56:55W
40:26:46.302N 79:56:55.903W
40°26'21"N 79°58'36"W
40d 26' 21" N 79d 58' 36" W
40.446195N 79.948862W
40.446195, -79.948862
40° 26.7717, -79° 56.93172

I'm aware that parsing and interpreting free-text coordinate  
descriptions is quite complex, maybe someone knows a script (or a  
remote service) that does a similar job?


It would be very helpful.
Thanks!

Pere
___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


Re: [OSGeo-Discuss] parsing coordinates

2009-04-24 Thread Judit Mays
hello,

this is not specifically on the matter of parsing different kinds of
notations for geographic coordinates.

But as you were also looking for a remote service doing a similar job, I
would like to point out that deegree offers an application which is
capable to either transform single coordinate pairs to a different
coordinate systems, or to transform all coordinate pairs within a file
(csv, txt) to a chosen coordinate system. The output file may be either
txt, csv, or kml (output as WGS84 only).

You can find the running demo [1] or the sources in svn [2].
A little more detailed description is given at [3].
Feedback is welcome to the developers list of deegree [4].

Kind regards,
Judit Mays

[1] http://testing.deegree.org/coordcalc/
[2]
http://wald.intevation.org/plugins/scmsvn/viewcvs.php/apps/coordinate-calculator/trunk/?root=deegree
[3] https://wiki.deegree.org/deegreeWiki/WebClients
[4] https://lists.sourceforge.net/lists/listinfo/deegree-devel


pere roca ristol schrieb:
> 
> hi all,
> 
> 
> I'm developing a webapplication that let's user upload their point data
> and play with it.
> 
> It currently works with lat/long in a CSV with this format (eg: /0.44,
> -79.9/) but we find users with some of these also valid and acceptable
> ways to write geographic coordinates:
> 
> * 40:26:46N,79:56:55W
> * 40:26:46.302N 79:56:55.903W
> * 40°26'21"N 79°58'36"W
> * 40d 26' 21" N 79d 58' 36" W
> * 40.446195N 79.948862W
> * 40.446195, -79.948862
> * 40° 26.7717, -79° 56.93172
> 
> 
> I'm aware that parsing and interpreting free-text coordinate
> descriptions is quite complex, maybe someone knows a script (or a remote
> service) that does a similar job?
> 
> 
> It would be very helpful.
> 
> Thanks!
> 
> 
> Pere 
> 
> 
> 
> 
> ___
> Discuss mailing list
> Discuss@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/discuss



signature.asc
Description: OpenPGP digital signature
___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


Re: [OSGeo-Discuss] parsing coordinates

2009-04-21 Thread Arnulf Christl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

pere roca ristol schrieb:
> hi all,
> 
> 
> I'm developing a webapplication that let's user upload their point data and
> play with it.
> 
> It currently works with lat/long in a CSV with this format (eg: *0.44, -79.9
> *) but we find users with some of these also valid and acceptable ways to
> write geographic coordinates:
> 
>- 40:26:46N,79:56:55W
>- 40:26:46.302N 79:56:55.903W
>- 40°26'21"N 79°58'36"W
>- 40d 26' 21" N 79d 58' 36" W
>- 40.446195N 79.948862W
>- 40.446195, -79.948862
>- 40° 26.7717, -79° 56.93172
> 
> 
> I'm aware that parsing and interpreting free-text coordinate descriptions is
> quite complex, maybe someone knows a script (or a remote service) that does
> a similar job?
> 
> 
> It would be very helpful.
> 
> Thanks!
> 
> 
> Pere

Potentially adding to your woes you should take into account that people
mix up axis order. It is a well established traditional fight between
developers, geodesists and the rest of the world. This page [1] sums up
the main issue. If you find a script that dares to deal with this, feel
free to add it as a link to that page.

Best regards,
Arnulf.

[1] http://wiki.osgeo.org/wiki/Axis_Order_Confusion
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknt2q8ACgkQhcSN09gHfZwNzwCgk1S2Cg/iHJIAljjqgnSHhDpB
QD4AniAQ9tvYuJ/KH4uoy/vRhzyTS3pM
=tK5z
-END PGP SIGNATURE-
___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss