[Qgis-user] How to create a clipped grayscale raster with pixel values of 0 only on the unclipped areas
Hi everyone, I was hoping to get some help with the following problem. I'm working with a grayscale georeferenced and clipped raster (.tif). The raster has been clipped with the 'clipper' tool using a shapefile as a mask. The resulting raster has black bands of color along the four edges which can be turned off by assigning 0 pixel values to NO DATA values in the transparency tab of the raster properties. The problem I have is that many other pixels within the clipped area have 0 value which are also turned off. How can I obtain a final raster that has 0 values only outside the clipped area? I'm using: QGIS standalone installer version 2.4 (64bit) Windows 7 Professional Service Pack 1 Intel Core Duo CPU E6850 @3.00GHz 2.99GHz 8 GB RAM 64-bit OS Many Thanks Andrea ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Unable to open OGR .vrt file
Hi Even/Andre, After going through the OGR Virtual Format documentation again I realized that the GeometryField sub-element has an optional attribute called reportSrcColum. When set to FALSE (by default is set to TRUE) the source geometry fields (longitude and latitude columns in .csv file) will only be used to build the geometry of the features of the VRT layer but they will not be copied over to the attribute table in QGIS. In contrast if I use the default value the source geometry fields will only be copied over without building the geometry. Have I understood correctly? Modifying the following line it worked: GeometryField encoding=PointFromColumns reportSrcColumn=false x=longitude y=latitude/ Thanks again for your help Andrea ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Unable to open OGR .vrt file
Andre/Even, Maybe I didn't explained it properly but by adding the reportSrcColumn=false attribute in GeometryField all points are displayed correctly all over the world in QGIS. GeometryField encoding=PointFromColumns reportSrcColumn=false x=longitude y=latitude/ Just wondering if what I described in the previous post is the expected behaviour. What do you think? Thanks a million Andrea ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Unable to open OGR .vrt file
Hi, Thanks Andre. Your help is very much appreciated. Your last comment: Maybe there is another typo in your dataset. Alternatively, you can try ogr2ogr Global_24h.shp Global_24h.vrt and see if that shows the points correctly. I tried the ogr2ogr utility that came with PostGIS by Postgresql.app and the resulting shapefile loads correctly in QGIS. The .vrt file I converted is the unedited one (see below) without the relativeToVRT=1 and reportSrcColumn=false attributes: OGRVRTDataSource OGRVRTLayer name=Global_24h SrcDataSourceGlobal_24h.csv/SrcDataSource GeometryTypewkbPoint/GeometryType LayerSRSEPSG:4326/LayerSRS GeometryField encoding=PointFromColumns x=longitude y=latitude/ /OGRVRTLayer /OGRVRTDataSource The virtual file above seems to load correctly on windows as in your case. Can I ask other mac users to test the above .vrt file, the .csv can be downloaded from http://firms.modaps.eosdis.nasa.gov/active_fire/text/Global_24h.csv and see if they need to insert the additional attributes display the points? Thanks Andrea NOTE: This is my first support request and I noticed that I didn't reply properly. Almost all my mails represent a new thread. How do I replay so that my replays appear indented from the previous post etc..___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Unable to open OGR .vrt file
Hi Andre, Thanks for spotting that. After correcting the quotation the virtual layer loaded but without showing any features on the canvas or the attribute table. After, as Even suggested, I modified the .vrt file including the relativeToVRT=1 attribute in SrcDataSource and layer gets loaded with all the features but all the points gets rendered on top of each at lat=0, long=0. However in the attribute table each point has the correct lat/long values. Do you know what's going on now? Many thanks for your help. Andrea ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Unable to open OGR .vrt file
Operating System: OS X 10.9.3 QGIS 2.2.0-9 distributed by KyngChaos Postgres 9.3.4 PostGIS 2.1.2 distributed by Postgres.app Hi, When trying to open a .vrt file referencing a .csv with 'lat' and ‘ ong’ in two separate columns I get the following error message: ‘Invalid Data Source: /Users/Andrea/postgis_cookbook/Chapter 1/global_24h.vrt is not a valid or recognized data source’. Virtual file and .csv file are in the same directory. I did my homework and tried to search for answers to similar questions in this mailing list, the QGIS User List and GIS StackExchange but could not find any. The following is the content of the .vrt file: OGRVRTDataSource OGRVRTLayer name=Global_24h SrcDataSourceGlobal_24h.csv/SrcDataSource GeometryTypewkbPoint/GeometryType LayerSRSEPSG:4326/LayerSRS GeometryField encoding=PointFromColumns x=longitude y=latitude”/ /OGRVRTLayer /OGRVRTDataSource NOTE: I’m able to read the file with the GDAL utility ogrinfo installed with PostGIS: $ ogrinfo global_24h.vrt Global_24h -fid 1 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Unable to open OGR .vrt file
Hi, Thanks for your help. Unfortunately it didn't work. Is the relativeToVRT=1 attribute the same as specifying the full path in SrcDataSource? (It did't work anyway). It's a fresh installation. Thanks Andrea ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user