[GRASS-user] Loading JSON data in GRASS

Arighna roy.arighna at gmail.com
Mon Oct 20 19:38:21 PDT 2014


Hi Vaclav,

 

I have loaded the point in GRASS. But the attributes are not loaded successfully. I am posting one sample data. Could you please help me finding what is wrong with the data. Or maybe I am going wrong with the loading process. 

 

 

{

    "type": "Point",

    "coordinates": [50.922759,-90.089954],

                "current_conditions":

                {

                                "air_temp":{"unit":"F","value":32.0},

                                "cloud_cover":{"unit":"%","value":92.8},

                                "descriptors":

                                {

                                                "cloud_cover_descriptor":{"code":20500,"icon":"http://icons.clearpathapis.com/en-us/style1/v1/128/cover_cloudy.png","text":"Cloudy"},

                                                "precipitation_descriptor":{"code":61100,"icon":"http://icons.clearpathapis.com/en-us/style1/v1/128/precip_flurries.png","text":"Flurries"},

                                                "visibility_obstruction_descriptor":{"code":10500,"icon":"http://icons.clearpathapis.com/en-us/style1/v1/128/error_none.png","text":"None"},

                                                "weather_descriptor":{"code":61100,"icon":"http://icons.clearpathapis.com/en-us/style1/v1/128/precip_flurries.png","text":"Flurries"},

                                                "wind_direction_descriptor":{"code":51800,"icon":"http://icons.clearpathapis.com/en-us/style1/v1/128/direction_w.png","text":"West"}

                                },

                                "dew_point":{"unit":"F","value":32.0},

                                "ice_acc_last_hour":{"unit":"in","value":0.0},

                                "liquid_acc_last_hour":{"unit":"in","value":0.0},

                                "msl_pressure":{"unit":"mb","value":994.0},

                                "precip_acc_last_hour":{"unit":"in","value":0.002},

                                "relative_humidity":{"unit":"%","value":91.0},

                                "snow_acc_last_hour":{"unit":"in","value":0.01},

                                "station_pressure":{"unit":"mb","value":946.0},

                                "u_wind_speed":{"unit":"mph","value":4.8},

                                "v_wind_speed":{"unit":"mph","value":0.9},

                                "valid_time_end":1412667600.0,

                                "valid_time_start":1412664000.0,

                                "visibility":{"unit":"mi","value":10.0},

                                "wind_direction":{"unit":"degrees","value":260.0},

                                "wind_speed":{"unit":"mph","value":7.0}

                }

}

 

 

Thanks in advance

Arighna

 

From: Arighna [mailto:roy.arighna at gmail.com] 
Sent: Monday, October 06, 2014 10:28 AM
To: 'Vaclav Petras'
Subject: RE: [GRASS-user] Loading JSON data in GRASS

 

Hi Vaclav,

 

I have found the module and found GeoJSON in there. I will try to load the data and will definitely post you once get success. 

 

Arighna

 

From: Vaclav Petras [ <mailto:wenzeslaus at gmail.com> mailto:wenzeslaus at gmail.com] 
Sent: Sunday, October 05, 2014 10:56 PM
To: Arighna
Cc: GRASS user list; Moritz Lennert
Subject: Re: [GRASS-user] Loading JSON data in GRASS

 

Hi,

here is a basic answer to start with.

 

On Sun, Oct 5, 2014 at 8:44 PM, Arighna <roy.arighna at gmail.com <mailto:roy.arighna at gmail.com> > wrote:

Hi everybody,

 

I want to load GeoJSON data in GRASS. I am totally unware of the process. Could anybody please help me to do that?

 

I never tried GeoJSON but with recent enough GRASS GIS and GDAL/OGR, you can use v.in.ogr module (module for import of vector data using OGR).

You can use

v.in.ogr -f

 

to list all available formats. For me it gives "GeoJSON (rw): GeoJSON".

Something like:


v.in.ogr dsn=/path/to/data/file.json output=grass_vector_map

 

should work. I don't know how it is with layers and features but you will see I guess.

Let us know if it work and if you have any problems.

Vaclav
 

Thanks & Regards

Arighna Roy


_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org <mailto:grass-user at lists.osgeo.org> 
http://lists.osgeo.org/mailman/listinfo/grass-user

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20141020/2560809b/attachment.html>


More information about the grass-user mailing list