pesekon2 / GRASS-GIS-SOS-tools

My Google Summer of Code 2017 project. This is just development part. Intended GRASS GIS modules and final code will be at https://svn.osgeo.org/grass/grass-addons/
GNU General Public License v2.0
3 stars 1 forks source link

Two or more observed proprierties errors #11

Closed lucadelu closed 7 years ago

lucadelu commented 7 years ago

Running this

v.in.sos.py url=http://istsos.geodati.fmach.it/istsos/edenext? offering=GRIDA observed_properties='urn:ogc:def:parameter:x-istsos:1.0:meteo:air:humidity:relative,urn:ogc:def:parameter:x-istsos:1.0:meteo:air:temperature' response_format='text/xml;subtype="om/1.0.0"' output=gridaoneday_2props event_time="2012-03-14T18:28:01+01:00/2012-03-15T18:28:01+01:00"

I got

name=
mapset=
fullname=
file=
DBMI-SQLite driver error:
Error in sqlite3_prepare():
no such table: gridaoneday_2props

DBMI-SQLite driver error:
Error in sqlite3_prepare():
no such table: gridaoneday_2props

WARNING: Width for column x012_03_14T18_35_01_01_00 set to 255 (was not
         specified by OGR), some strings may be truncated!
......
WARNING: Width for column x012_03_15T17_31_01_01_00 set to 255 (was not
         specified by OGR), some strings may be truncated!
Traceback (most recent call last):
  File "/home/lucadelu/compilati/grass72/dist.x86_64-pc-linux-gnu/scripts/db.in.ogr", line 150, in <module>
    main()
  File "/home/lucadelu/compilati/grass72/dist.x86_64-pc-linux-gnu/scripts/db.in.ogr", line 142, in main
    column='cat', stdout=nuldev, stderr=nuldev)
  File "/home/lucadelu/compilati/grass72/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 410, in run_command
    return handle_errors(returncode, returncode, args, kwargs)
  File "/home/lucadelu/compilati/grass72/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 329, in handle_errors
    returncode=returncode)
grass.exceptions.CalledModuleError: Module run None ['db.dropcolumn', '--q', '-f', 'column=cat', 'table=urn_ogc_def_parameter_x_istsos_1_0_meteo_air_temperature'] ended with error
Process ended with non-zero return code 1. See errors in the (error) output.
ERROR: Vector map <gridaoneday_2props> already exists
Traceback (most recent call last):
  File "v.in.sos.py", line 266, in <module>
    main()
  File "v.in.sos.py", line 161, in main
    create_maps(parsed_obs)
  File "v.in.sos.py", line 248, in create_maps
    quiet=True)
  File "/home/lucadelu/compilati/grass72/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 410, in run_command
    return handle_errors(returncode, returncode, args, kwargs)
  File "/home/lucadelu/compilati/grass72/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 329, in handle_errors
    returncode=returncode)
grass.exceptions.CalledModuleError: Module run None ['v.in.ogr', '--q', '-o', 'input=/grassdata/latlong/sos/.tmp/geowork/14223.1', 'output=gridaoneday_2props'] ended with error
Process ended with non-zero return code 1. See errors in the (error) output.
pesekon2 commented 7 years ago

It isn't a problem with more observed properties. It's the same problem as in #7. (it works with smaller time span)

There is an error message saying that *** buffer overflow detected ***. It's problem raising in GRASS for many years as you can see for example at [1] and it doesn't seem fixed to me. It raises during v.in.ogr and it seems that the problem raises during db.dropcolumn somewhere in v.in.ogr, but I can't find it in source code [2]. But I believe it's because of the size, I hope I can solve it somehow with SQLite columns problem (any help appreciated).

[1] https://trac.osgeo.org/grass/ticket/800 [2] https://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_0/vector/v.in.ogr/main.c

lucadelu commented 7 years ago

This is fixed, you need to fix the problem of records reported in issue #9