locked
Error populating GEO field : Latitude values must be between -90 and 90 degrees. RRS feed

  • Question

  • ERROR : System.FormatException: 24201: Latitude values must be between -90 and 90 degrees.
    System.FormatException:

     

    i created the field GEO as Geography

    my query

    UPDATE [dbo].[xvenues]
    SET [Geo] = geography::Point(latitude, Longitude, 4326)

    my lat long fields are defined as

        [Latitude] nvarchar(50),
        [Longitude] nvarchar(50),

    The odd thing is I struggled through this before with this same data (slightly different source format but...)

    now I am getting this error on my web server and my local server as well

    I have queried the data for lat > 90 and I don't find any.,..


    - 10spotdomain for all your domain and domain related needs
    Tuesday, August 30, 2011 3:21 PM

Answers

  •  

    OK here is a query that will locate the bad latitude data in my file....

    select * from places  where convert(float, Latitude) > 90


    - 10spotdomain for all your domain and domain related needs
    • Marked as answer by Mothermugger' Tuesday, August 30, 2011 3:58 PM
    Tuesday, August 30, 2011 3:57 PM

All replies

  • OK OK

     

    I do find one record that has a latitude that is in error it's got the lognitude number

     

    So I need to do some error trapping on my importing of the data

    so I will check for greater than 90 on Lat

    but now how do I find these records?

    I found this one with a select query ... order by latitude
    and there it was first record

    here is the data

    Sacramento    CA    121.49963    -121.49963
    Kailua-Kona    HI    18.91316    -155.68070
    Hilo    HI    19.40000    -155.30000
    Honaunau    HI    19.41838    -155.90700

    first record -

    select .... where latitude > '90'
    returns nothing

    but select .... where lsatitude > '40' for example seems to work...

     


    - 10spotdomain for all your domain and domain related needs
    Tuesday, August 30, 2011 3:48 PM
  •  

    OK here is a query that will locate the bad latitude data in my file....

    select * from places  where convert(float, Latitude) > 90


    - 10spotdomain for all your domain and domain related needs
    • Marked as answer by Mothermugger' Tuesday, August 30, 2011 3:58 PM
    Tuesday, August 30, 2011 3:57 PM