[GRASS-user] Loading JSON data in GRASS

Moritz Lennert mlennert at club.worldonline.be
Thu Dec 4 06:06:27 PST 2014


On 04/12/14 03:02, Arighna wrote:
> Hi Moritz,
>
> This command has worked. Thanks a lot Moritz. This is the command('in' instead of 'input') I was looking for.
> Is there any documentation where I could find these commands in detail? I did not find this in http://grass.osgeo.org/documentation/manuals/.

'in' is just short for 'input' and it is a parameter of the command 
v.patch, not a command in itself. In GRASS you can abbreviate all 
parameter names as long as your abbreviation is unambiguous.

v.patch -e input=patch_map1,patch_map2,patch_map3[,...] output=patched_map

should work just as well.

Moritz

>
> Thanks again
> Roy
>
> -----Original Message-----
> From: Moritz Lennert [mailto:mlennert at club.worldonline.be]
> Sent: Wednesday, December 03, 2014 3:59 AM
> To: Arighna; 'Vaclav Petras'; grass-user at lists.osgeo.org
> Subject: Re: [GRASS-user] Loading JSON data in GRASS
>
> On 02/12/14 17:51, Arighna wrote:
>>
>>
>> I am using -e flag to copy the attribute table as well. I have data in
>> json format. I am importing json data in separate maps and then
>> patching them into one map to have all the points in one place.
>
>
> So, if you have several patch_map*, then you could just do:
>
> v.patch -e in=patch_map1,patch_map2,patch_map3[,...] output=patched_map
>
> What I don't understand is why you do
>
> v.patch -e in=patch_map1 out=patch_map6
>
> which doesn't patch any maps together, but just copies patch_map1 to patch_map6...
>
>
>> I did not find any smarter
>> way to import them. Is there any way that I can directly insert the records
>> in the db instead of saving them in json file first and then importing it?
>
> In what format are they before you save them into json format ?
>
> If you stick with json, couldn't you just glue your json files together
> before importing ?
>
>>
>> I am using GRASS 7.0.
>>
>> v.db.connect -p patch_map1
>> layer <1/patch_map1> table <patch_map1> in database
>> </home/shared/research/GRASSDATA/RedRiverValley/aroy/sqlite/sqlite.db>
>> through driver <sqlite> with key <cat>
>>
>> v.info -c patch_map1
>>
>> INTEGER|cat
>> CHARACTER|air_temp
>> CHARACTER|cloud_cover
>> CHARACTER|descriptors
>> CHARACTER|dew_point
>> CHARACTER|ice_acc_last_hour
>> CHARACTER|liquid_acc_last_hour
>> CHARACTER|msl_pressure
>> CHARACTER|precip_acc_last_hour
>> CHARACTER|relative_humidity
>> CHARACTER|snow_acc_last_hour
>> CHARACTER|station_pressure
>> CHARACTER|u_wind_speed
>> CHARACTER|v_wind_speed
>> DOUBLE PRECISION|valid_time_end
>> DOUBLE PRECISION|valid_time_start
>> CHARACTER|visibility
>> CHARACTER|wind_direction
>> CHARACTER|wind_speed
>> Displaying column types/names for database connection of layer <1>:
>> (Tue Dec  2 10:47:58 2014) Command finished (0 sec)
>>
>>
>> Thanks
>> Roy
>
> Everything looks fine here...
>
> Moritz
>
>




More information about the grass-user mailing list