Re: [GRASS-user] Any Gentoo/Funtoo grass-gis users?
On Sunday 07 of July 2013 12:08:43 Sylvain Maillard wrote: .. I join a small script I wrote to get an automated update. You just need to install all dependencies, uncomment the first line for the first launch + to make a new '/opt/grass7' directory ... it's basically just a collection of commands for the standard compilation procedure and is not system dependant ... Hi Sylvain! Returning on this: if you install grass after compilation (as it is instructed in the script you attached), how do you remove later grass? Is it safe to do so? In Ubuntu it always took to search manually and remove all the relevant bits. I am hesitant to install and have a future plan to study ebuilds to do it the right way. In case you have a nice working solution, would you mind sharing it as well? Thanks a lot, Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Query: number of 'areas' reported in v.build output does not necessarily represent different geographical areas
Nikos Alexandris wrote: I tried to import USGS' (2011) Global Mangroves map: .. Markus Metz wrote: I assume the global mangroves map should not have overlapping polygons, therefore as long as there are overlapping areas and/or the number of centroids is not equal to the number of input polygons, more cleaning is needed. Nikos A: Unfortunately it seems there are overlapping polygons. .. I will search the respective documentation tonight to find stuff related to minimum area extent -- maybe this can help (?). I can't find more than a short description of the production process and basic geo-referencing information (http://data.unep-wcmc.org/datasets/21#fn2). I will try to search more and perhaps gain contact with the responsible organisations UNEP-WCMC and USGS. For the records, I had an e-mail exchange with Chandra Giri (last month actually), the man behind the wonderful work of the Global Mangroves map. I informed that the Shapefiles contain many duplicate entries, as indicated by GRASS' import process. Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] NDVI analyses with Landsat 8
Huub Munstege wrote: [...] But as you already noticed the bands and ranges have changed under Landsat 8. Various combinations of bands (4,5 and 8) give a result that is at best not so clear cut as the analysis done with L-7. The bluntly subtraction with 0.12 is based on on a quick scan of the obtained result. Areas without vegetation in our project area should give values in the range between -0.05 - 0. The result of the combination of the 5 and 4 bands in the above formula gives values that are aprroximately 0.12 higher. Therefore the blunt and in-elegant subtraction which is definitely wrong. But it gives us for the time being a better deistinction between cultivated irrigation schemes and their surroundings. Maybe I am simply too impatient and too eager to work with the new fresh data from L-8. Undoubtedly soon, Grass and the other software will incorporate specific modules that will be tailored to the L-8 sensors. Dear Huub, did you eventually progress regarding the VI from L8 images? Any findings you could share? Thanks, Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Get output from r.stats in Python script
Dear all I'm doing some Python scripts and I want to retrieve r.stats output information in a variable. How can I do this? variable= grass.run_command(r.series, .. ) Thanks Antonio ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] GRASS64 - r.mapcalc - replacement of specifics value by a mean of nearest neigbour
BLANDENIER Lucien wrote: Dear Grass users, I'm working with rasters maps of large area and I want to calculate surface related to specific colours. Before this, I have to replace the surfaces of the rivers by the surrounding value (or the mean of the surrounding value). I looked at the manual of r.mapcalc but I didn't found how to do this... For instance, I want to replace all value between 4 and 7 by the mean of the value of the 4 nearest pixels. Is there any way of doing this? Which command shall I use then for calculating the surface for each color? r.stats? or is there a command that directly computes the surface? Dear Lucien, did you get past this problem? I think a combination of r.neighbours (to get the average values from surrounding cells) and r.recode (for re-categorising values in your input raster maps so as to get the desired output) + r.stats could do it. Didn't try anything, of course -- not time. Thanks, Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] unexpected i.pansharpen results
Nikos Alexandris wrote: So, does i.pansharpen expect only 8-bit images? Can someone confirm or reject? Moritz: Looking at the i.pansharpen source code, I see that in all algorithms a function for histogram matching is called and IIUC, in that function, values seem to be limited to [0,255]. Maybe you should open a ticket on that. Done, Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Get output from r.stats in Python script
On 29/07/13 15:03, António Rocha wrote: Dear all I'm doing some Python scripts and I want to retrieve r.stats output information in a variable. How can I do this? variable= grass.run_command(r.series, .. ) Try grass.pipe_command as suggested here: http://grasswiki.osgeo.org/wiki/GRASS_Python_Scripting_Library#Example_for_parsing_category_numbers or possibly grass.read_command. Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.external pg alternative geometry column
On 29/07/13 16:34, António M. Rodrigues wrote: Hi, I'm using v.external to get postgres geometries into grass7. I have a table with two geometries, each for a different crs. Is there a way to specify the name of the geometry column? http://www.gdal.org/ogr/drv_pg_advanced.html Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.external pg alternative geometry column
Hi Moritz, Thanks for your reply. In http://www.gdal.org/ogr/drv_pg_advanced.html, it says: Starting with GDAL 1.6.0, the PostgreSQL driver supports accessing tables with multiple PostGIS geometry columns. For such a table, there will be as many layers reported as the number of geometry columns listed for that table in the geometry_columns table. Now, I have one postgis table with two geometry fields, the_geom and the_geo3763. I opened both in qgis to make sure the geometries were correctly transformed and everything was in place. I set a connection with pg from grass7 using db.connect, db.login, db.connect -p, db.tables -p (details below). db.tables returns only one base.geoi1 table (should be 2, since it has 2 geometry columns, no?). Then I imported both geometries with v.external. For the second geometry I specified the field the_geometry3763. Both tables are imported into grass, showing the same geometry (the orginal, with crs=20790). Is this a bug or I'm doing something wrong? Thanks, António g.region -p projection: 99 (Transverse Mercator) zone: 0 datum: etrs89 ellipsoid: grs80 north: 1 south: 0 west: 0 east: 1 nsres: 1 ewres: 1 rows: 1 cols: 1 cells: 1 (Mon Jul 29 16:39:23 2013) Command finished (0 sec) (Mon Jul 29 16:40:06 2013) db.connect driver=pg database=host=localhost,dbname=geocontacto,port=5432 (Mon Jul 29 16:40:06 2013) Command finished (0 sec) (Mon Jul 29 16:41:02 2013) db.login user=marxco password= The password was stored in file (.grass7/dblogin) (Mon Jul 29 16:41:02 2013) Command finished (0 sec) db.connect -p driver: pg database: host=localhost,dbname=geocontacto,port=5432 schema: group: (Mon Jul 29 16:41:48 2013) Command finished (0 sec) --- db.tables -p base.geoi1 information_schema.sql_features information_schema.sql_implementation_info information_schema.sql_languages information_schema.sql_packages information_schema.sql_parts information_schema.sql_sizing information_schema.sql_sizing_profiles public.geography_columns public.geometry_columns public.raster_columns public.raster_overviews public.spatial_ref_sys public.spatial_ref_sys_old topology.layer topology.topology (Mon Jul 29 16:42:25 2013) Command finished (0 sec) - (from postgis) select st_srid(the_geom3763) from base.geoi; Returns 3763 - v.external dsn=PG:host=localhost user=marxco password= dbname=geocontacto layer=base.geoindex_jan13_v3 output=geoindex1 Building topology for vector map geoi1@geoindex... Using external data format 'PostgreSQL' (feature type '(null)') Building pseudo-topology over simple features... Registering primitives... 8177 primitives registered 8177 vertices registered Number of nodes: 0 Number of primitives: 8177 Number of points: 8177 Number of lines: 0 Number of boundaries: 0 Number of centroids: 0 Number of areas: 0 Number of isles: 0 v.external complete. Link to vector map geoi1 created. (Mon Jul 29 16:49:03 2013) Command finished (0 sec) - v.external dsn=PG:host=localhost user=marxco password= dbname=geocontacto layer=base.geoindex_jan13_v3.the_geom3763 output=geoindex2 Building topology for vector map geoindex2@geoindex... Using external data format 'PostgreSQL' (feature type '(null)') Building pseudo-topology over simple features... Registering primitives... 8177 primitives registered 8177 vertices registered Number of nodes: 0 Number of primitives: 8177 Number of points: 8177 Number of lines: 0 Number of boundaries: 0 Number of centroids: 0 Number of areas: 0 Number of isles: 0 v.external complete. Link to vector map geoi2 created. (Mon Jul 29 16:50:22 2013) Command finished (0 sec) 2013/7/29 Moritz Lennert mlenn...@club.worldonline.be On 29/07/13 16:34, António M. Rodrigues wrote: Hi, I'm using v.external to get postgres geometries into grass7. I have a table with two geometries, each for a different crs. Is there a way to specify the name of the geometry column? http://www.gdal.org/ogr/drv_**pg_advanced.htmlhttp://www.gdal.org/ogr/drv_pg_advanced.html Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] [gdal-dev] Working with NTF files
Should I file for this a ticket in GRASS' trac first? Nikos --%--- 1) Markus Metz wrote: What says g.proj georef=your_geofile -p? Nikos Alexandris: g.proj -p georef=15JUN11IK0101000po_697515_pan_000.ntf Trying to open with OGR... ...succeeded. WARNING: Read of file 15JUN11IK0101000po_697515_pan_000.ntf was successful, but it did not contain projection information. 'XY (unprojected)' will be used XY location (unprojected) This is however 1) strange -- it misses a message like Trying to open with GDAL... and 2) (successively) not true because gdalinfo reports: Markus M: g.proj first tries to open the geofile with OGR, if that fails, it tries to open it with GDAL. Apparently OGR found a driver with which it could successfully open the geofile. This might be a bug in OGR (Frank?). Nikos A: Using this file in grass7 -c 15JUN11IK0101000po_697515_pan_000.tif /grassdb/test_Location creates the following Location: g.proj -p -PROJ_INFO- name : Lat/Lon proj : ll datum : wgs84 ellps : wgs84 no_defs : defined -PROJ_UNITS unit : degree units : degrees meters : 1.0 Markus M: grass7 -c uses g.proj to create a location, thus the resulting projection info of grass7 -c and g.proj georef= should be identical. 2) Markus M: What reports r.in.gdal when trying to import in a location that definitively does not match the SRS? Nikos A: Now, r.in.gdal seems to correctly recognise the SRS! Markus M: Good. So it is either a bug in g.proj (even though the call to OGROpen() succeeds) or in OGR. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Filtering high outliers in Landsat reflectance imagery?
Nikos A wrote: Advanced users, may I seek for some recommendation on filtering Landsat reflectance outliers? Nikos A (replying to self): (Thanks Yann) Reflectance is a unit-less ratio, ranging from 0 to 1.0. So I can flatten everything 1.0 to 1.0. Markus N: I would run r.neighbors with a 3x3 or 5x5 moving window and averaging or likewise. The question is always: are they outliers or data? Wild guessing: too high to be data!? Nikos Coming back to this! I think that Markus' suggestion was/is correct. However, at the time of having to decide what to do, I simply flattened them. They were only a few though, not a real issue. Anyhow, just for completeness an official definition of reflectance, here is one copy-pasted from http://landsat.gsfc.nasa.gov/references/glossary.html: --%--- reflectance - A measure of the ratio of outgoing to incoming radiation calculated by converting a radiometrically calibrated image to an innate characteristic of the target being observed. Calibrated at-satellite spectral radiance is converted to unitless reflectance by separating out the atmospheric component of the reflective band radiance and assuming that the target is a Lambertian reflector, re-radiating incident solar radiation equally in all directions. In general, reflectance is a function of incident angle of the energy, viewing angle of the sensor, spectral wavelength, and bandwidth, and the nature of the object. Also see planetary albedo, bidirectional reflectance and atmospheric correction. (Source: Dr. John Barker) ---%-- Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user