Re: [GRASS-dev] Invalid timestamp file for raster

2017-10-23 Thread Nikos Alexandris

* Veronica Andreo  [2017-10-23 22:54:03 +0200]:


Hi Nikos,

Have you tried with t.register?

You would need to set the start_time="2013-04-13 10:00:09.935626" plus an
increment="10 seconds". I have not tested, but it should work.

I think it's better than r.timestamp if you want to create time series,
even though it would be great to fix the bug in r.timestamp, anyway.


I am r.timestamp-ing Landsat bands while importing them via a script and
sourcing meta from MTL files. I noticed that in some cases, the time
stamping did not work.

Cheers, Nikos


signature.asc
Description: PGP signature
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Invalid timestamp file for raster

2017-10-23 Thread Veronica Andreo
Hi Nikos,

Have you tried with t.register?

You would need to set the start_time="2013-04-13 10:00:09.935626" plus an
increment="10 seconds". I have not tested, but it should work.

I think it's better than r.timestamp if you want to create time series,
even though it would be great to fix the bug in r.timestamp, anyway.

Cheers,
Vero


El 23 oct. 2017 7:38 p.m., "Nikos Alexandris" 
escribió:


Nikos:


This
>>
>> r.timestamp B1 date='13 apr 2013 10:00:09.935626' && r.timestamp B1
>> WARNING: Invalid timestamp file for raster map 
>>
>> does not work. Why?
>>
>
Markus N:


GRASS 7.2.3svn (nc_spm_08_grass7):~ > r.mapcalc "B1 = 2"
> 100%
> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
> 2013 10:00:09.935626' && r.timestamp B1
> WARNING: Invalid timestamp file for raster map 
>
> The error message is in lib/gis/timestamp.c, line 301. With debug:
>
>
> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
> 2013 10:00:09.935626'
> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1
> WARNING: Invalid timestamp file for raster map 
> GRASS 7.2.3svn (nc_spm_08_grass7):~ > g.gisenv set=DEBUG=1
> D1/1: G_set_program_name(): g.gisenv
> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1
> D1/1: G_set_program_name(): r.timestamp
> D1/1: G_find_raster(): name=B1 mapset=
> WARNING: Invalid timestamp file for raster map 
> D1/1: G_set_program_name(): g.gisenv
>

The following do work:
>>
>> r.timestamp B1 date='13 apr 2013 10:00:19.935626' && r.timestamp B1
>> 13 Apr 2013 10:00:19.935626
>>
>
GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
> 2013 10:00:19.935626' && r.timestamp B1
> D1/1: G_set_program_name(): r.timestamp
> D1/1: G_find_raster(): name=B1 mapset=user1
> D1/1: G_set_program_name(): r.timestamp
> D1/1: G_find_raster(): name=B1 mapset=
> 13 Apr 2013 10:00:19.935626
> D1/1: G_set_program_name(): g.gisenv
>
> There is apparently a parsing bug in 10:00:0x  <<-- 0x (while 1x etc work).
> ?
>
>
Obviously.

Here a quick test for 0x:

function seconds { printf "%02d" $1; }
for SEC in `seq 0 1 59` ;do echo $(seconds $SEC) && r.timestamp B1 date="13
apr 2013 10:00:$(seconds $SEC).935626" && r.timestamp B1 ;done

00

WARNING: Invalid timestamp file for raster map 
01

WARNING: Invalid timestamp file for raster map 
02

WARNING: Invalid timestamp file for raster map 
03

WARNING: Invalid timestamp file for raster map 
04

WARNING: Invalid timestamp file for raster map 
05

WARNING: Invalid timestamp file for raster map 
06

WARNING: Invalid timestamp file for raster map 
07

WARNING: Invalid timestamp file for raster map 
08

WARNING: Invalid timestamp file for raster map 
09

WARNING: Invalid timestamp file for raster map 
10
13 Apr 2013 10:00:10.935626
11
13 Apr 2013 10:00:11.935626
12
13 Apr 2013 10:00:12.935626

[..rest is fine..]

Nikos

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by jachym):

 @neteler: you are right - we can all see my C skills be going away and
 never return back.

 Something like

 {{{
  OGRSFDriverH tempDriver;
  char *gpkgname = "GPKG";
  tempDriver = OGRGetDriverByName(gpkgname);

 }}}

 should work - but does not work for me, can you help?

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Invalid timestamp file for raster

2017-10-23 Thread Sören Gebbert
JFYI:

The temporal framework (used in t.register) ignores fractions of a
second. The smallest temporal granule is a second. Hence, it doesn't
make sense to use time-stamps for maps with fractions of a second in
the temporal framework.

Best regards
Sören

2017-10-23 22:54 GMT+02:00 Veronica Andreo :
> Hi Nikos,
>
> Have you tried with t.register?
>
> You would need to set the start_time="2013-04-13 10:00:09.935626" plus an
> increment="10 seconds". I have not tested, but it should work.
>
> I think it's better than r.timestamp if you want to create time series, even
> though it would be great to fix the bug in r.timestamp, anyway.
>
> Cheers,
> Vero
>
>
> El 23 oct. 2017 7:38 p.m., "Nikos Alexandris" 
> escribió:
>
>
> Nikos:
>
>
>>> This
>>>
>>> r.timestamp B1 date='13 apr 2013 10:00:09.935626' && r.timestamp B1
>>> WARNING: Invalid timestamp file for raster map 
>>>
>>> does not work. Why?
>
>
> Markus N:
>
>
>> GRASS 7.2.3svn (nc_spm_08_grass7):~ > r.mapcalc "B1 = 2"
>> 100%
>> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
>> 2013 10:00:09.935626' && r.timestamp B1
>> WARNING: Invalid timestamp file for raster map 
>>
>> The error message is in lib/gis/timestamp.c, line 301. With debug:
>>
>>
>> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
>> 2013 10:00:09.935626'
>> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1
>> WARNING: Invalid timestamp file for raster map 
>> GRASS 7.2.3svn (nc_spm_08_grass7):~ > g.gisenv set=DEBUG=1
>> D1/1: G_set_program_name(): g.gisenv
>> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1
>> D1/1: G_set_program_name(): r.timestamp
>> D1/1: G_find_raster(): name=B1 mapset=
>> WARNING: Invalid timestamp file for raster map 
>> D1/1: G_set_program_name(): g.gisenv
>
>
>>> The following do work:
>>>
>>> r.timestamp B1 date='13 apr 2013 10:00:19.935626' && r.timestamp B1
>>> 13 Apr 2013 10:00:19.935626
>
>
>> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
>> 2013 10:00:19.935626' && r.timestamp B1
>> D1/1: G_set_program_name(): r.timestamp
>> D1/1: G_find_raster(): name=B1 mapset=user1
>> D1/1: G_set_program_name(): r.timestamp
>> D1/1: G_find_raster(): name=B1 mapset=
>> 13 Apr 2013 10:00:19.935626
>> D1/1: G_set_program_name(): g.gisenv
>>
>> There is apparently a parsing bug in 10:00:0x  <<-- 0x (while 1x etc
>> work).
>> ?
>>
>
> Obviously.
>
> Here a quick test for 0x:
>
> function seconds { printf "%02d" $1; }
> for SEC in `seq 0 1 59` ;do echo $(seconds $SEC) && r.timestamp B1 date="13
> apr 2013 10:00:$(seconds $SEC).935626" && r.timestamp B1 ;done
>
> 00
>
> WARNING: Invalid timestamp file for raster map 
> 01
>
> WARNING: Invalid timestamp file for raster map 
> 02
>
> WARNING: Invalid timestamp file for raster map 
> 03
>
> WARNING: Invalid timestamp file for raster map 
> 04
>
> WARNING: Invalid timestamp file for raster map 
> 05
>
> WARNING: Invalid timestamp file for raster map 
> 06
>
> WARNING: Invalid timestamp file for raster map 
> 07
>
> WARNING: Invalid timestamp file for raster map 
> 08
>
> WARNING: Invalid timestamp file for raster map 
> 09
>
> WARNING: Invalid timestamp file for raster map 
> 10
> 13 Apr 2013 10:00:10.935626
> 11
> 13 Apr 2013 10:00:11.935626
> 12
> 13 Apr 2013 10:00:12.935626
>
> [..rest is fine..]
>
> Nikos
>
> ___
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
>
>
>
> ___
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by rouault):

 GDALGetDriverByName() can only be used to detect vector drivers since GDAL
 2.0. Previously you had to use OGRGetDriverByName() (OGRGetDriverByName()
 can still be used in GDAL 2.x)

 @neteler Are you using GDAL < 1.11, or perhaps a GDAL build without
 sqlite3 ?

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] [GRASS GIS] #3431: r.mapcalculator script for QGIS processing

2017-10-23 Thread GRASS GIS
#3431: r.mapcalculator script for QGIS processing
+-
 Reporter:  neteler |  Owner:  grass-dev@…
 Type:  enhancement | Status:  new
 Priority:  normal  |  Milestone:  7.2.3
Component:  Python  |Version:  7.2.2
 Keywords:  r.mapcalculator, r.mapcalc  |CPU:  Unspecified
 Platform:  Unspecified |
+-
 A wish received via personal email:

 On Mon, Oct 23, 2017 at 10:06 AM, a QGIS developer wrote:
 > it would be great to have the GRASS raster calculator back
 > in Processing. Since GRASS7 r.mapcalculator
 > been "lost" in Processing (because it also has not been ported from
 > GRASS64 to 7, correct?) and the attempt to make r.mapcalc work was not
 > completely successful (see: https://issues.qgis.org/issues/6894) If
 > you could help with that it would be *much* appreciated!

 The old parameters were:

 https://grass.osgeo.org/grass64/manuals/r.mapcalculator.html

 Apparently the interest in the QGIS community is high to get a wrapper
 back as it used to exist in G6.

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-
Changes (by jachym):

 * Attachment "shp-geopackage.4.patch" added.


--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by jachym):

 shame on me :-(

 Fixed / attached

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by neteler):

 {{{
  args.c:
   tempDriver = OGRGetDriverByName("GPKG");
 }}}

 I found a hint:

 http://www.gdal.org/ogr__api_8h.html#ae814db7e2212b9bbb0fd8c361bee11fe

 "Fetch the indicated driver.

 NOTE: Starting with GDAL 2.0, it is NOT safe to cast the returned handle
 to OGRSFDriver*. If a C++ object is needed, the handle should be cast to
 GDALDriver*.

 Deprecated: Use GDALGetDriverByName() in GDAL 2.0
 "

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by rouault):

 Oh wait, the reason might be much more mundain (deduced from code review,
 no actual testing). Apparently OGRRegisterAll() is called by
 OGR_list_write_drivers(), which is called after this new code... So no
 driver is available when it is called. Fix: call OGRRegisterAll() much
 earlier

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-
Changes (by neteler):

 * Attachment "shp-geopackage.4.patch" added.

 Patch updated with wording fixes in HTML file

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by neteler):

 Now it compiles (patch updated) for me but I have no GeoPackage on my
 current machine (so, "ESRI_Shapefile" is shown).

 TODO:
  * decide if GDALGetDriverByName() should be used (depends on GDAL
 version?)
  * test on system with GeoPackage present

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by neteler):

 I have fixed the parameter order and a missing "_" in args.c and uploaded
 under the same"shp-geopackage.4.patch​" name (please use that to
 continue).

 But it does not compile for me:
 {{{
 args.c: In function ‘parse_args’:
 args.c:36:5: error: ‘tempDriver’ undeclared (first use in this function);
 did you mean ‘dbDriver’?
  tempDriver = OGRGetDriverByName("GPKG");
  ^~
  dbDriver
 args.c:36:5: note: each undeclared identifier is reported only once for
 each function it appears in
 }}}

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-
Changes (by neteler):

 * Attachment "shp-geopackage.4.2.patch" added.

 Updated patch

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-
Changes (by neteler):

 * Attachment "shp-geopackage.4.3.patch" added.

 Updated patch

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by neteler):

 Replying to [comment:16 rouault]:
 > Oh wait, the reason might be much more mundain (deduced from code
 review, no actual testing). Apparently OGRRegisterAll() is called by
 OGR_list_write_drivers(), which is called after this new code... So no
 driver is available when it is called. Fix: call OGRRegisterAll() much
 earlier

 Bingo! I moved it up, patch updated. Now "GPKG" shows up as a default (I'm
 on Fedora with GDAL 2.x) :-)

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Invalid timestamp file for raster

2017-10-23 Thread Nikos Alexandris

Danke Soeren, Vero

Just trying to retain the original meta, in this case for Landsat8
imagery.

Nikos

* Sören Gebbert  [2017-10-23 23:08:12 +0200]:


JFYI:

The temporal framework (used in t.register) ignores fractions of a
second. The smallest temporal granule is a second. Hence, it doesn't
make sense to use time-stamps for maps with fractions of a second in
the temporal framework.

Best regards
Sören


signature.asc
Description: PGP signature
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] [GRASS GIS] #3430: v.clean threshold in lat-long: metric or not?

2017-10-23 Thread GRASS GIS
#3430: v.clean threshold in lat-long: metric or not?
-+-
 Reporter:  neteler  |  Owner:  grass-dev@…
 Type:  defect   | Status:  new
 Priority:  normal   |  Milestone:  7.2.3
Component:  Vector   |Version:  7.2.2
 Keywords:  v.clean  |CPU:  Unspecified
 Platform:  Unspecified  |
-+-
 From:
 https://gis.stackexchange.com/questions/258089/v-clean-with-rmarea-and-
 lat-long-projection

 There is some confusion concerning this message:
 main.c:
 {{{
 /* TODO: threshold might be recalculated with optional geodesic
 support to meters */
 if (G_projection() == PROJECTION_LL)
 G_important_message(_("Note: In latitude-longitude coordinate
 system specify threshold in degree unit"));
 }}}

 while the documentation reads:
 {{{
 grep meter v.clean.html
 case, also the threshold parameter requires several values to be listed
 Threshold must always be in square meters, also for latitude-longitude
 locations or locations with units other than meters.
 }}}

 Should the G_important_message() be removed from main.c?

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-
Changes (by jachym):

 * Attachment "shp-geopackage.2.patch" added.

 Documentation updated too

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by jachym):

 Thec checking is done in vector/v.out.ogr/create.c, line 18:

 {{{
 /* start driver */
 hDriver = OGRGetDriverByName(pszDriverName);
 if (hDriver == NULL) {
 G_fatal_error(_("OGR driver <%s> not available"), pszDriverName);
 }

 }}}

 And this is IMHO ok so.

 the html documentation updated too btw.

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by jachym):

 Any objections to `svn commit` ?

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by mlennert):

 Replying to [comment:4 jachym]:
 > Thec checking is done in vector/v.out.ogr/create.c, line 18:
 >
 > {{{
 > /* start driver */
 > hDriver = OGRGetDriverByName(pszDriverName);
 > if (hDriver == NULL) {
 >   G_fatal_error(_("OGR driver <%s> not available"), pszDriverName);
 > }
 >
 > }}}
 >

 This would mean that if the user does not have SQLITE support in their
 GDAL instance, they would get an error message when trying to export using
 v.out.ogr and its default settings ?

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by mmetz):

 Replying to [comment:6 mlennert]:
 > Replying to [comment:4 jachym]:
 > > Thec checking is done in vector/v.out.ogr/create.c, line 18:
 > >
 > > {{{
 > > /* start driver */
 > > hDriver = OGRGetDriverByName(pszDriverName);
 > > if (hDriver == NULL) {
 > > G_fatal_error(_("OGR driver <%s> not available"), pszDriverName);
 > > }
 > >
 > > }}}
 > >
 >
 > This would mean that if the user does not have SQLITE support in their
 GDAL instance, they would get an error message when trying to export using
 v.out.ogr and its default settings ?

 It would be safer to use GPKP as default only if it is available,
 otherwise default should fall back to ESRI Shapefile.

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by jachym):

 I'm attaching new version of the patch, which checks the availability of
 GPKG format on run time

 {{{

 tempDriver = OGRGetDriverByName("GPKG");
 if (tempDriver == NULL) {
 options->format->answer = "GPKG";
 } else {
 options->format->answer = "ESRI Shapefile";
 }
 }}}

 But I'm not quite convinced, this leads to consistent behavior. I would
 prefer clear and consistent solution - GPKG is *the* output format, make
 sure, you have support for it or use different format explicitly (using
 the `format` option).

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-
Changes (by jachym):

 * Attachment "shp-geopackage.3.patch" added.

 Make sure, GPKG is available

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS GIS] #3428: Set OGC GeoPackage as default export format

2017-10-23 Thread GRASS GIS
#3428: Set OGC GeoPackage as default export format
--+-
  Reporter:  jachym   |  Owner:  grass-dev@…
  Type:  task | Status:  new
  Priority:  normal   |  Milestone:  7.4.0
 Component:  Vector   |Version:  svn-trunk
Resolution:   |   Keywords:  v.out.ogr
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by rouault):

 @jachym Your test logic is inverted ;-)

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Invalid timestamp file for raster

2017-10-23 Thread Veronica Andreo
Hi Nikos, thanks Sören :)

You can also use t.register for only one map if you want (t.register
maps=single_map start="2003-04-13 10:00:09"). In that way you timestamp
them as you import.

Then you create the strds (t.create) and pass the list of already
timestamped maps (t.register input=your_strds maps=list_of_maps).

Cheers,
Vero

El 24 oct. 2017 12:59 a.m., "Nikos Alexandris" 
escribió:

> * Veronica Andreo  [2017-10-23 22:54:03 +0200]:
>
> Hi Nikos,
>>
>> Have you tried with t.register?
>>
>> You would need to set the start_time="2013-04-13 10:00:09.935626" plus an
>> increment="10 seconds". I have not tested, but it should work.
>>
>> I think it's better than r.timestamp if you want to create time series,
>> even though it would be great to fix the bug in r.timestamp, anyway.
>>
>
> I am r.timestamp-ing Landsat bands while importing them via a script and
> sourcing meta from MTL files. I noticed that in some cases, the time
> stamping did not work.
>
> Cheers, Nikos
>
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] List of GRASS GIS Jupyter notebooks?

2017-10-23 Thread Luca Delucchi
On 21 October 2017 at 20:13, Markus Neteler  wrote:
>
> Done:
> https://grasswiki.osgeo.org/wiki/GRASS_GIS_Jupyter_notebooks
>

Thanks,
the last two links seem the same, could we remove one?

>
> Markus
>

-- 
ciao
Luca

www.lucadelu.org
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Invalid timestamp file for raster

2017-10-23 Thread Nikos Alexandris


Nikos:


This

r.timestamp B1 date='13 apr 2013 10:00:09.935626' && r.timestamp B1
WARNING: Invalid timestamp file for raster map 

does not work. Why?


Markus N:


GRASS 7.2.3svn (nc_spm_08_grass7):~ > r.mapcalc "B1 = 2"
100%
GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
2013 10:00:09.935626' && r.timestamp B1
WARNING: Invalid timestamp file for raster map 

The error message is in lib/gis/timestamp.c, line 301. With debug:


GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
2013 10:00:09.935626'
GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1
WARNING: Invalid timestamp file for raster map 
GRASS 7.2.3svn (nc_spm_08_grass7):~ > g.gisenv set=DEBUG=1
D1/1: G_set_program_name(): g.gisenv
GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1
D1/1: G_set_program_name(): r.timestamp
D1/1: G_find_raster(): name=B1 mapset=
WARNING: Invalid timestamp file for raster map 
D1/1: G_set_program_name(): g.gisenv



The following do work:

r.timestamp B1 date='13 apr 2013 10:00:19.935626' && r.timestamp B1
13 Apr 2013 10:00:19.935626



GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
2013 10:00:19.935626' && r.timestamp B1
D1/1: G_set_program_name(): r.timestamp
D1/1: G_find_raster(): name=B1 mapset=user1
D1/1: G_set_program_name(): r.timestamp
D1/1: G_find_raster(): name=B1 mapset=
13 Apr 2013 10:00:19.935626
D1/1: G_set_program_name(): g.gisenv

There is apparently a parsing bug in 10:00:0x  <<-- 0x (while 1x etc work).
?



Obviously.

Here a quick test for 0x:

function seconds { printf "%02d" $1; }
for SEC in `seq 0 1 59` ;do echo $(seconds $SEC) && r.timestamp B1 date="13 apr 2013 
10:00:$(seconds $SEC).935626" && r.timestamp B1 ;done

00
WARNING: Invalid timestamp file for raster map 
01
WARNING: Invalid timestamp file for raster map 
02
WARNING: Invalid timestamp file for raster map 
03
WARNING: Invalid timestamp file for raster map 
04
WARNING: Invalid timestamp file for raster map 
05
WARNING: Invalid timestamp file for raster map 
06
WARNING: Invalid timestamp file for raster map 
07
WARNING: Invalid timestamp file for raster map 
08
WARNING: Invalid timestamp file for raster map 
09
WARNING: Invalid timestamp file for raster map 
10
13 Apr 2013 10:00:10.935626
11
13 Apr 2013 10:00:11.935626
12
13 Apr 2013 10:00:12.935626

[..rest is fine..]

Nikos


signature.asc
Description: PGP signature
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Invalid timestamp file for raster

2017-10-23 Thread Markus Neteler
On Mon, Oct 23, 2017 at 6:41 PM, Nikos Alexandris
 wrote:
>
> This
>
> r.timestamp B1 date='13 apr 2013 10:00:09.935626' && r.timestamp B1
> WARNING: Invalid timestamp file for raster map 
>
> does not work. Why?


GRASS 7.2.3svn (nc_spm_08_grass7):~ > r.mapcalc "B1 = 2"
 100%
GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
2013 10:00:09.935626' && r.timestamp B1
WARNING: Invalid timestamp file for raster map 

The error message is in lib/gis/timestamp.c, line 301. With debug:


GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
2013 10:00:09.935626'
GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1
WARNING: Invalid timestamp file for raster map 
GRASS 7.2.3svn (nc_spm_08_grass7):~ > g.gisenv set=DEBUG=1
D1/1: G_set_program_name(): g.gisenv
GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1
D1/1: G_set_program_name(): r.timestamp
D1/1: G_find_raster(): name=B1 mapset=
WARNING: Invalid timestamp file for raster map 
D1/1: G_set_program_name(): g.gisenv



> The following do work:
>
> r.timestamp B1 date='13 apr 2013 10:00:19.935626' && r.timestamp B1
> 13 Apr 2013 10:00:19.935626

GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
2013 10:00:19.935626' && r.timestamp B1
D1/1: G_set_program_name(): r.timestamp
D1/1: G_find_raster(): name=B1 mapset=user1
D1/1: G_set_program_name(): r.timestamp
D1/1: G_find_raster(): name=B1 mapset=
13 Apr 2013 10:00:19.935626
D1/1: G_set_program_name(): g.gisenv

There is apparently a parsing bug in 10:00:0x  <<-- 0x (while 1x etc work).
?


Markus
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] Invalid timestamp file for raster

2017-10-23 Thread Nikos Alexandris


This

r.timestamp B1 date='13 apr 2013 10:00:09.935626' && r.timestamp B1
WARNING: Invalid timestamp file for raster map 

does not work. Why?

The following do work:

r.timestamp B1 date='13 apr 2013 10:00:19.935626' && r.timestamp B1
13 Apr 2013 10:00:19.935626

r.timestamp B1 date='13 apr 2013 10:00:29.935626' && r.timestamp B1
13 Apr 2013 10:00:29.935626

r.timestamp B1 date='13 apr 2013 10:00:39.935626' && r.timestamp B1
13 Apr 2013 10:00:39.935626

r.timestamp B1 date='13 apr 2013 10:00:49.935626' && r.timestamp B1
13 Apr 2013 10:00:49.935626

r.timestamp B1 date='13 apr 2013 10:00:59.935626' && r.timestamp B1
13 Apr 2013 10:00:59.935626

Nikos


signature.asc
Description: PGP signature
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev