[GRASS-user] v.out.ogr to KML ERROR 1: Latitude is invalide

Moritz Lennert mlennert at club.worldonline.be
Fri Jun 19 03:39:06 EDT 2009


On 19/06/09 09:27, Moritz Lennert wrote:
> On 19/06/09 04:40, maven apache wrote:
>> This is a vector layer transfered from a raster and its general info 
>> can be seen as follows:
>> +----------------------------------------------------------------------------+ 
>>
>>  | Layer:           
>> swi_0 at PERMANENT                                            | 
>> Mapset:          PERMANENT                                           
>>        | Location:        
>> newlocation                                               | 
>> Database:        D:/GrassDataBase                                     
>>       | 
>> Title:                                                               
>>        | Map scale:       
>> 1:1                                                        | Map 
>> format:      native                                                    
>>  | Name of creator: 
>> Administrator                                              | 
>> Organization:                                                         
>>       | Source date:     Thu Jun 18 20:51:48 
>> 2009                                  
>>  |---------------------------------------------------------------------------- 
>>
>>  |   Type of Map:  vector (level: 
>> 2)                                          
>>  |                                                                       
>>       |   Number of points:       0               Number of 
>> areas:      88          |   Number of lines:        0               
>> Number of islands:    79          |   Number of boundaries:   
>> 229             Number of faces:      0           |   Number of 
>> centroids:    84              Number of kernels:    0          
>>  |                                                                       
>>       |   Map is 3D:              
>> 0                                                 |   Number of 
>> dblinks:      1                                                
>>  |                                                                       
>>       |         Projection: Universe Transverse Mercator (zone 
>> 0)                   |               N:  2762370.84493965    S:  
>> 2668889.78644383                  |               E:   
>> 636604.74247833    W:   592287.35339113                 
>>  |                                                                       
>>       |   Digitization threshold: 
>> 0                                                 |   
>> Comments:                                                           
>>      
>>  |                                                                       
>>      
>>  +----------------------------------------------------------------------------+ 
>>
>> then I want to export it to kml and add it to the google earth, I use 
>> the commond:
>> g.region vect=swi_blue at PERMANENT v.out.ogr input=swi_blue at PERMANENT 
>> type=area dsn=d:/blueNew.kml layer=1 format=KML
>> and I got the errors:
>> ---------------------------------------------------------------
>> arning 1: Layer name 'swi_blue at PERMANENT' adjusted to 
>> 'swi_blue_PERMANENT' for XML validity.
>>
>> Exporting 4893 areas (may take some time) ...
>> ERROR 1: Latitude 2764980.037140 is invalid. Valid range is [-90,90]. 
>> This warning will not be issued any more
>> Warning 1: Longitude 638073.992861 has been modified to fit into range 
>> [-180,180]. This warning will not be issued any more
>>
>>
>>
>> 9259 features written
>>
>> 4476 features without category written
>> ----------------------------------------------------------------
>> it seems that there is something wrong with the Coordinate,but  
>> Latitude 2764980.037140 is the same with the general info from the 
>> command v.info <http://v.info> map=''''''.
>> I wonder it is my problem or the grass?
> 
> On the KML page of OGR it says: "Note that KML by specification uses 
> only a single projection, EPSG:4326" [1]
> 
> It also says "As such OGR will create layers in the correct coordinate 
> system and transform any geometries."
> 
> Not sure how to interpret this, but from your error message, I would 
> guess that you have to reproject your vector to a epsg:4326 location 
> first, before exporting with v.out.ogr.
> 
> Moritz
> 
> [1]http://www.gdal.org/ogr/drv_kml.html
> 

Sorry, just reread your message, and my answer is probably not really 
helpful. In fact v.out.ogr does transform your data to EPSG 4326, as the 
following message shows:

 >> Warning 1: Longitude 638073.992861 has been modified to fit into range
 >> [-180,180]. This warning will not be issued any more


No, idea what the ERROR means. What does the resulting KML file look like ?

You still might want to try to reproject (v.proj) to EPSG 4326, just to 
see what happens.

Moritz


More information about the grass-user mailing list