Re: [GRASS-user] mapping interface

2014-12-02 Thread Moritz Lennert

On 02/12/14 05:25, shashank khare wrote:

Thanks Markus!

It is close to what I was trying to do but still I would love someday
GRASS to have a modular GUI especially 3D which can be embedded in any
app within few minutes.



Not sure I understand exactly what you are looking for, but have you 
looked at the toolboxes concept [1] for customizing the GRASS GUI ?


Or are you looking for a separate GUI just for the 3D viewer (wxnviz) ?

Something like a g.gui.nviz command [2] ?

Moritz

[1] http://grass.osgeo.org/grass70/manuals/wxGUI.toolboxes.html
[2] http://grass.osgeo.org/grass70/manuals/topic_gui.html
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Loading JSON data in GRASS

2014-12-02 Thread Moritz Lennert

On 30/11/14 06:10, arighna roy wrote:

Hi,

  I am trying to append points to a new map patch_map6.

v.patch -e input=patch_map1 output=patch_map6

When I run the above command I get the following error.

ERROR: Key column not found

I don't know which column it is looking for.


The key column is the column in the attribute table containing the 
category values (~ ids) of the features in your map, thus allowing to 
link the features to the attributes.


You can use 'v.db.connect -p patch_map1' to see the details of the 
connection for patch_map1.


Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Loading JSON data in GRASS

2014-12-02 Thread Arighna
Hi Moritz,

Thanks a lot for your reply. 

It is connected with the 'cat' column as I didn't provide any key column
while importing the data. Both the input and the output maps have the key
column as 'cat'. Still I am getting the error. Could this be a problem that
for both the maps the 'cat 'values are 1? 

Also I was trying to import the data with a specific key column. But there
is no provision for doing that. 
I tried these commands.

v.in.ogr input=/home/aroy/geojson_sample/patch/patch1.1.geojson
output=patch_test1 key=category
ERROR: Sorry, input is not a valid parameter
ERROR: Sorry, key is not a valid parameter
ERROR: Required parameter dsn not set:
(OGR datasource name)


v.in.ogr dsn=/home/aroy/geojson_sample/patch/patch1.1.geojson
output=patch_test1 key=category
ERROR: Sorry, key is not a valid parameter

Thanks  Regards
Roy

-Original Message-
From: Moritz Lennert [mailto:mlenn...@club.worldonline.be] 
Sent: Tuesday, December 02, 2014 2:41 AM
To: arighna roy; Vaclav Petras; grass-user@lists.osgeo.org
Subject: Re: [GRASS-user] Loading JSON data in GRASS

On 30/11/14 06:10, arighna roy wrote:
 Hi,

   I am trying to append points to a new map patch_map6.

 v.patch -e input=patch_map1 output=patch_map6

 When I run the above command I get the following error.

 ERROR: Key column not found

 I don't know which column it is looking for.

The key column is the column in the attribute table containing the
category values (~ ids) of the features in your map, thus allowing to link
the features to the attributes.

You can use 'v.db.connect -p patch_map1' to see the details of the
connection for patch_map1.

Moritz

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Error on importing ESRI grid into GRASS 7

2014-12-02 Thread RichardCooper
I upgraded GDAL to 1.10.0 (via the Ubuntu repository) and the GRASS instance,
but the error still persists.

I'll try compiling GDAL from source (1.11.1) but will need to investigate
configure options, which appear numerous, before applying to my system,
e.g.,
http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#GDAL

Richard


   



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Error-on-importing-ESRI-binary-grid-into-GRASS-7-tp5175645p5175941.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Error on importing ESRI grid into GRASS 7

2014-12-02 Thread Markus Neteler
On Tue, Dec 2, 2014 at 10:39 AM, RichardCooper richtcoo...@hotmail.com wrote:
 I upgraded GDAL to 1.10.0 (via the Ubuntu repository) and the GRASS instance,
 but the error still persists.

Could you make the file (offlist) available for testing?

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Loading JSON data in GRASS

2014-12-02 Thread Moritz Lennert

On 02/12/14 10:12, Arighna wrote:

Hi Moritz,

Thanks a lot for your reply.

It is connected with the 'cat' column as I didn't provide any key column
while importing the data. Both the input and the output maps have the key
column as 'cat'. Still I am getting the error. Could this be a problem that
for both the maps the 'cat 'values are 1?

Also I was trying to import the data with a specific key column. But there
is no provision for doing that.
I tried these commands.

v.in.ogr input=/home/aroy/geojson_sample/patch/patch1.1.geojson
output=patch_test1 key=category
ERROR: Sorry, input is not a valid parameter
ERROR: Sorry, key is not a valid parameter
ERROR: Required parameter dsn not set:
 (OGR datasource name)


v.in.ogr dsn=/home/aroy/geojson_sample/patch/patch1.1.geojson
output=patch_test1 key=category
ERROR: Sorry, key is not a valid parameter


You are using grass6.4, I suppose ? In that version v.in.ogr does not 
have a key parameter.


Could you send us the output of

v.db.connect -p patch_test1

and

v.info -c patch_test1

?

Also, I don't really understand the sens of your v.patch:

v.patch -e input=patch_map1 output=patch_map6

Why only one input map ? Doing that is somewhat like copying patch_map1 
to patch_map6...


If patch_map6 already exists and you want to append patch_map1 to it, 
then you have to use the '-a' flag.


Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] temporal mapcalc 3hour precipitation to hourly

2014-12-02 Thread maning sambale
Hi,

A have a temporal raster of 3hourly_rainrate.
 t.rast.list input=3hr_rainrate
name|mapset|start_time|end_time
3hr_rainrate_2014-11-13_0300|PERMANENT|2014-11-13 03:00:00|2014-11-13 06:00:00
3hr_rainrate_2014-11-13_0600|PERMANENT|2014-11-13 06:00:00|2014-11-13 09:00:00

The values are the average hourly rainfall at 3hr snapshot.  I want to
get the total rainfall which is (raster * 3).  Using t.rast.mapcalc, I
get this error:

 t.rast.mapcalc input=3hr_rainrate output=hourly_rainrate 
 basename=hourly_rainrate expression=(3hr_rainrate) * (3.0) nprocs=4
Start temporal sampling
Start mapcalc computation
Invalid map 3hr_rainrate_2014
Invalid map 13_0300
Parse error
ERROR: parse error
...
ERROR: parse error
Invalid map 3hr_rainrate_2014
Invalid map 13_1200
Parse error
ERROR: parse error
ERROR: Error while mapcalc computation

I'm using GRASS 7.0.0.  Thanks!



-- 
cheers,
maning
--
Freedom is still the most radical idea of all -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
--
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] temporal mapcalc 3hour precipitation to hourly

2014-12-02 Thread Moritz Lennert

On 02/12/14 13:30, maning sambale wrote:

Hi,

A have a temporal raster of 3hourly_rainrate.

t.rast.list input=3hr_rainrate

name|mapset|start_time|end_time
3hr_rainrate_2014-11-13_0300|PERMANENT|2014-11-13 03:00:00|2014-11-13 06:00:00
3hr_rainrate_2014-11-13_0600|PERMANENT|2014-11-13 06:00:00|2014-11-13 09:00:00

The values are the average hourly rainfall at 3hr snapshot.  I want to
get the total rainfall which is (raster * 3).  Using t.rast.mapcalc, I
get this error:


t.rast.mapcalc input=3hr_rainrate output=hourly_rainrate basename=hourly_rainrate 
expression=(3hr_rainrate) * (3.0) nprocs=4

Start temporal sampling
Start mapcalc computation
Invalid map 3hr_rainrate_2014
Invalid map 13_0300
Parse error
ERROR: parse error
...
ERROR: parse error
Invalid map 3hr_rainrate_2014
Invalid map 13_1200
Parse error
ERROR: parse error
ERROR: Error while mapcalc computation

I'm using GRASS 7.0.0.  Thanks!


AFAIK, r.mapcalc has difficulties dealing with map names that contain a 
dash in the name as it interprets it as a minus sign.


Try renaming your maps.

Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Error on importing ESRI grid into GRASS 7

2014-12-02 Thread Markus Neteler
On Tue, Dec 2, 2014 at 10:49 AM, Markus Neteler nete...@osgeo.org wrote:
 On Tue, Dec 2, 2014 at 10:39 AM, RichardCooper richtcoo...@hotmail.com 
 wrote:
 I upgraded GDAL to 1.10.0 (via the Ubuntu repository) and the GRASS instance,
 but the error still persists.

 Could you make the file (offlist) available for testing?

Thanks, got it.

So, it also fails with GDAL 1.10.x but works ok with GDAL 1.11.x:


[neteler@giscluster grumpv1]$ gdal-config --version
1.11.0

[neteler@giscluster grumpv1]$ gdalinfo thauds00g
Driver: AIG/Arc/Info Binary Grid
Files: thauds00g
   thauds00g.aux
   thauds00g/w001001x.adf
   thauds00g/metadata.xml
   thauds00g/prj.adf
   thauds00g/w001001.adf
   thauds00g/log
   thauds00g/dblbnd.adf
   thauds00g/hdr.adf
   thauds00g/sta.adf
Size is 1320, 1920
Coordinate System is:
GEOGCS[WGS 84,
DATUM[WGS_1984,
SPHEROID[WGS 84,6378137,298.257223563,
AUTHORITY[EPSG,7030]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY[EPSG,6326]],
PRIMEM[Greenwich,0,
AUTHORITY[EPSG,8901]],
UNIT[degree,0.0174532925199433,
AUTHORITY[EPSG,9108]],
AUTHORITY[EPSG,4326]]
Origin = (96.000,20.9936001)
Pixel Size = (0.0083300,-0.0083300)
Corner Coordinates:
Upper Left  (  96.000,  21.000) ( 96d 0' 0.00E, 21d 0' 0.00N)
Lower Left  (  96.000,   5.000) ( 96d 0' 0.00E,  5d 0' 0.00N)
Upper Right ( 107.000,  21.000) (107d 0' 0.00E, 21d 0' 0.00N)
Lower Right ( 107.000,   5.000) (107d 0' 0.00E,  5d 0' 0.00N)
Center  ( 101.500,  13.000) (101d30' 0.00E, 13d 0' 0.00N)
Band 1 Block=256x4 Type=Float32, ColorInterp=Undefined
  Description = thauds00g
  Min=0.000 Max=32565.402
  NoData Value=-3.4028234663852886e+38
  Metadata:
LAYER_TYPE=athematic

[neteler@giscluster grumpv1]$ gdalinfo thauds00ag
Driver: AIG/Arc/Info Binary Grid
Files: thauds00ag
   thauds00ag.aux
   thauds00ag/w001001x.adf
   thauds00ag/metadata.xml
   thauds00ag/prj.adf
   thauds00ag/w001001.adf
   thauds00ag/log
   thauds00ag/dblbnd.adf
   thauds00ag/hdr.adf
   thauds00ag/sta.adf
Size is 1320, 1920
Coordinate System is:
GEOGCS[WGS 84,
DATUM[WGS_1984,
SPHEROID[WGS 84,6378137,298.257223563,
AUTHORITY[EPSG,7030]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY[EPSG,6326]],
PRIMEM[Greenwich,0,
AUTHORITY[EPSG,8901]],
UNIT[degree,0.0174532925199433,
AUTHORITY[EPSG,9108]],
AUTHORITY[EPSG,4326]]
Origin = (96.000,20.9936001)
Pixel Size = (0.0083300,-0.0083300)
Corner Coordinates:
Upper Left  (  96.000,  21.000) ( 96d 0' 0.00E, 21d 0' 0.00N)
Lower Left  (  96.000,   5.000) ( 96d 0' 0.00E,  5d 0' 0.00N)
Upper Right ( 107.000,  21.000) (107d 0' 0.00E, 21d 0' 0.00N)
Lower Right ( 107.000,   5.000) (107d 0' 0.00E,  5d 0' 0.00N)
Center  ( 101.500,  13.000) (101d30' 0.00E, 13d 0' 0.00N)
Band 1 Block=256x4 Type=Float32, ColorInterp=Undefined
  Description = thauds00ag
  Min=0.000 Max=32764.812
  NoData Value=-3.4028234663852886e+38
  Metadata:
LAYER_TYPE=athematic

-- all fine.

In the Fedora/RPM world there is mock to easily recompile a newer
package for a local machine.
Something similar will exist for Mint/Ubuntu etc. in order to avoid to
mess around manually with configure options.

hope this helps,
Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] No incltree created warning importing .jp2 files

2014-12-02 Thread Markus Neteler
On Tue, Dec 2, 2014 at 4:57 AM, Jeshua Lacock jes...@3dtopo.com wrote:
 Greetings,

 I am importing thousands of .jp2 images in with r.in.gdal and creating new 
 GRASS locations (-e). Source is NAIP.

 Occasionally I am seeing this what is apparently a jpeg2 warning:

 WARNING: No incltree created.

 And I was just wondering if it was any cause for alarm. And information is 
 greatly appreciated!

Putting the error message into a search engine shows that also others
seem to get this error, eg

http://www.imagemagick.org/discourse-server/viewtopic.php?t=25556

So it will be format related (GRASS simply calls GDAL to get the job
of reading/writing done).

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] mapping interface

2014-12-02 Thread Markus Neteler
On Tue, Dec 2, 2014 at 5:25 AM, shashank khare skh...@hotmail.com wrote:
 Thanks Markus!

 It is close to what I was trying to do but still I would love someday GRASS
 to have a modular GUI especially 3D which can be embedded in any app within
 few minutes.

I see, so I misunderstood your initial request. If wxPython is in
general ok for you, check also

http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython
- newgui
- wx.metadata
- wx.rdigit
- wx.stream
- wx.wms

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Pygrass vector package: write geometric feature in a specific layer

2014-12-02 Thread Laurent C.
Hello all,

I'm writing a GRASS module with pygrass to import data from a text file
into a new vector map.
Those data have topological relationships: they are nodes and links of a
sewer network. But those objects may have different types of attributes.
For example a link could be a pipe or a pump.
Therefore I think that the use of vector layers is the right way to store
those data.

With pygrass I managed to set DB links and import the attributes in
different tables.
But the only way I've found to change the layer of geometric features is
with .open(mode='w', layer=X). This works well for one layer, but I've to
write different objects in different layers.
I tried to close the map and re-open it with another layer, but if I pass
mode='rw', the map refuse to open because the layer not yet exist, and with
mode='w', it overwrite the existing map.

I know there is a way to create a new map for each layer and then use
existing GRASS modules to merge them into a single map, but I feel that
this is overly complex.

So my question is: Is there a way to decide which layer to write new
objects, and change this layer during the import process?

I'm using grass70-svn with the following version of libgis:
libgis Revision: 62395
libgis Date: 2014-10-26 18:17:27

Thanks for you help.

Regards,
Laurent
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Loading JSON data in GRASS

2014-12-02 Thread Arighna


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. 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? 

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

-Original Message-
From: Moritz Lennert [mailto:mlenn...@club.worldonline.be] 
Sent: Tuesday, December 02, 2014 3:54 AM
To: Arighna; 'Vaclav Petras'; grass-user@lists.osgeo.org
Subject: Re: [GRASS-user] Loading JSON data in GRASS

On 02/12/14 10:12, Arighna wrote:
 Hi Moritz,

 Thanks a lot for your reply.

 It is connected with the 'cat' column as I didn't provide any key 
 column while importing the data. Both the input and the output maps 
 have the key column as 'cat'. Still I am getting the error. Could this 
 be a problem that for both the maps the 'cat 'values are 1?

 Also I was trying to import the data with a specific key column. But 
 there is no provision for doing that.
 I tried these commands.

 v.in.ogr input=/home/aroy/geojson_sample/patch/patch1.1.geojson
 output=patch_test1 key=category
 ERROR: Sorry, input is not a valid parameter
 ERROR: Sorry, key is not a valid parameter
 ERROR: Required parameter dsn not set:
  (OGR datasource name)


 v.in.ogr dsn=/home/aroy/geojson_sample/patch/patch1.1.geojson
 output=patch_test1 key=category
 ERROR: Sorry, key is not a valid parameter

You are using grass6.4, I suppose ? In that version v.in.ogr does not have a
key parameter.

Could you send us the output of

v.db.connect -p patch_test1

and

v.info -c patch_test1

?

Also, I don't really understand the sens of your v.patch:

v.patch -e input=patch_map1 output=patch_map6

Why only one input map ? Doing that is somewhat like copying patch_map1 to
patch_map6...

If patch_map6 already exists and you want to append patch_map1 to it, then
you have to use the '-a' flag.

Moritz

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] No incltree created warning importing .jp2 files

2014-12-02 Thread Jeshua Lacock

 On Dec 2, 2014, at 8:05 AM, Markus Neteler nete...@osgeo.org wrote:
 
 On Tue, Dec 2, 2014 at 4:57 AM, Jeshua Lacock jes...@3dtopo.com wrote:
 Greetings,
 
 I am importing thousands of .jp2 images in with r.in.gdal and creating new 
 GRASS locations (-e). Source is NAIP.
 
 Occasionally I am seeing this what is apparently a jpeg2 warning:
 
 WARNING: No incltree created.
 
 And I was just wondering if it was any cause for alarm. And information is 
 greatly appreciated!
 
 Putting the error message into a search engine shows that also others
 seem to get this error, eg
 
 http://www.imagemagick.org/discourse-server/viewtopic.php?t=25556
 
 So it will be format related (GRASS simply calls GDAL to get the job
 of reading/writing done).

Hi Markus!

Thank you for the link, I had read that others before posting but I was not 
able to find what it might mean for r.in.gdal.

I guess I will have to examine some of the imagery that generated the warnings, 
but obviously it would be better if I knew I could safely ignore them versus 
looking through hundreds of billions of pixels for a handful of pixels that 
could be bad or something. And even if some pixels are bad - I am not sure I 
would even be able to tell.

Anyways, that is why I posted my question here and not on a JPEG forum or 
something.


Best,

Jeshua Lacock
Founder/Engineer
3DTOPO Incorporated
http://3DTOPO.com
Phone: 208.462.4171

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] No incltree created warning importing .jp2 files

2014-12-02 Thread Markus Neteler
Hi Jeshua,

On Tue, Dec 2, 2014 at 9:25 PM, Jeshua Lacock jes...@3dtopo.com wrote:
...
 Thank you for the link, I had read that others before posting but I was not 
 able to find what it might mean for r.in.gdal.

I also have no idea...

 I guess I will have to examine some of the imagery that generated the 
 warnings, but obviously it would be better if I knew I could safely ignore 
 them versus looking through hundreds of billions of pixels for a handful of 
 pixels that could be bad or something. And even if some pixels are bad - I am 
 not sure I would even be able to tell.

Please consider to check with the GDAL community, perhaps someone came
across it in the past.

Best
Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user