Re: [Qgis-user] Importing spreadsheet: Strange behaviour
*Bernd Vogelgesang* /Sat Mar 12 14:13:04 PST 2022/ So: All-string tables will not be imported correctly. Always e.g. add an id-field with number Hi Bernd, this is by design: https://github.com/OSGeo/gdal/blob/1c5bc766513c4407f702bd8cd8bfa958ed61cfea/ogr/ogrsf_frmts/xlsx/ogrxlsxdatasource.cpp#L597-L598 Am 12.03.22 um 23:04 schrieb Jonas Küpper:// >/what should have fixed it as well would be to pass OGR_XLSX_HEADERS = />/FORCE to the provider while loading xlsx-files but a i couldn't find a />/way how to do that. (see https://gdal.org/drivers/vector/xlsx.html) / Hi Jonas, you can set a GDAL/OGR configuration option, like OGR_XLSX_HEADERS, via the "Settings" -> "Options" -> "System" -> "Environment" setting panel in QGIS. Regards. Andrea Giudiceandrea___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Importing spreadsheet: Strange behaviour
Caramba! That did the trick indeed! Added a field "dummy" and some numbers in the next rows and gave it a try: Tada! All headers there. So: All-string tables will not be imported correctly. Always e.g. add an id-field with number Thanx a ton! Bernd Am 12.03.22 um 23:04 schrieb Jonas Küpper: Hi Bernd, for what its worth: I experienced these Field1, Field2 troubles recently as well. The problem is that gdal apparently does not assume headers in a table, if all columns are string data. What usually fixes that for me is to add a dummy column where the first row (the header) is a string eg. "dummy" but all the subsequent rows are numbers. i stumbled over this behavior in the sources https://github.com/OSGeo/gdal/blob/1a30b3fab043a918e78cac7cc035ddc2670a9ba9/ogr/ogrsf_frmts/xlsx/ogrxlsxdatasource.cpp#L575 . what should have fixed it as well would be to pass OGR_XLSX_HEADERS = FORCE to the provider while loading xlsx-files but a i couldn't find a way how to do that. (see https://gdal.org/drivers/vector/xlsx.html) Cheers Jonas On 11.03.2022 21:52, Bernd Vogelgesang wrote: Hi Chris, mhm. There are only two columns with ordinary names. The data holds some special characters, and first I thought this might influence the process as well. But the version where I deleted those entries does not behave differently. Very strange. Meanwhile, I exported the file to a csv, imported this one successfully and then saved as gpkg. So at least, the data is in and working. Thanks, Bernd Am 11.03.22 um 21:38 schrieb chris hermansen: Bernd and list, On Fri, Mar 11, 2022, 12:08 Bernd Vogelgesang via Qgis-user wrote: Hi folks, for quite some time, I hold frequently changing data in a xlsx-file. Working in a spreadsheet application is so much more efficient sometimes. This spreadsheet easily imports by drag and drop, the import dialog pops up where to choose which tab to import, and finally the table is there with the first row as column heads. Now, I'm getting just nuts. I'm trying to do the same with other data, and whatever I try, it imports the table ignoring the header row, so its Field1, Field2... Findings so far: I had a long file name. With this, there was no import dialog, but the first tab was imported immediately, but without the header row. I saved the file with a short file name, and now the import dialog asks which tab to import. But still, the first data-row is ignored. Dragging my other already existing file into that project works just perfectly. What could be the reason for this behaviour? Clutching at straws here... Sometimes when making a pivot table in LibreOffice calc I notice that column headings (first row) aren't interpreted as such. This seems to occur on the following scenarios: 1) a column has an en empty cell in row 1 (or missing title) 2) a column exists outside the area of interest with no header (this probably would not apply in your case, but maybe you have some calculations to the right of your data which don't have a column header) 3) there are some "strange" characters in one or more header fields (I can't recall precisely what constitutes "strange") What you might want to do is save a copy of your spreadsheet, then delete anything to the left or right of your columns, and check that your column names are all "legal variable" names ie begin with a letter, only letters and numbers I hope this helps; good luck! Chris ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] OTB Plugin Activation
Hi, I am currently with QGIS 3.22.2. my version of the OrfeoToolbox provider is 2.12.99. Under Processing Toolbox/options/providers/OTB, I see OTB application folder. It is set to C:/OTB-7.4.0-Win64/lib/otb/applications. OTB folder is set to C:/OTB-7.4.0-Win64. If you don't have the right folders, it will not work. I see no "activate box". Set the folder then click ok. Close the Option panel and reopen it to make sure the setting have been accepted. If the first folder was the most complicated to set correctly. Nicolas On 2022-03-12 8:12 a.m., martin.bitt...@gmx.de wrote: The OTB settings are not accessable. I can see the fields but when I clicked on it nothing happened. Regards Martin Am 12.03.2022 1:20 AM schrieb Nicolas Cadieux : Hi, Y did you indicate the directory paths for the binaries in the processing options? Nicolas Cadieux https://gitlab.com/njacadieux Le 11 mars 2022 à 09:52, Martin Bittens via Qgis-user a écrit : Hello QGIS Users, I am running QGIS 3.22.4 and 3.24.0 and I tried to activate the OTB plugin processing the following steps: 1. Downloading the Orfeo Toolbox (version 7.4.0) as zip file; 2. Unpacking the zip file; 3. Opening QGIS; 4. Checking in the plug in manager if the Orfeo Toolbox Provider is enabled (it was); 5. Opening the Options --> Processing --> Providers --> OTB But there the "Activate' checkbox did not appear. Does anybody know is going wrong? Many thanks for your help. Regards Martin -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user -- Nicolas Cadieux https://gitlab.com/njacadieux ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Automating creation of county distribution maps
Great, thanks for sharing ! Le sam. 12 mars 2022 à 10:43, Bernd Vogelgesang a écrit : > Hi Mike and list, > > I took the challenge and so far succeeded at the very moment. Mike sent me > a (not so clean list) of species and counties. > > My idea was to produce an atlas. (Actually, it should be made by a report, > but since those are a bit quirky still, I went the pure atlas way) > > It's a bit hacky, a more straightforward way would be nice. > > - cleaning the data and importing them (table species/county, county > polygons) > > - create table of individual species (toolbox "Delete duplicates by > attribute") -> 101 unique species > > - Setting up a relation between county layer and species/county-table on > the county name > > - new text field in county layer "species" : > > relation_aggregate('name_of_relation', 'concatenate', "species_names", > ',') > > this creates a comma-separated list of species for each county polygon > > Prepare Atlas > > Coverage layer: (fake coverage, as it does not move) > > - create bounding box of the county-layer (Extract layer extent) > > - take list of individual species and add the geometry: retrieved the wkt > of the extent in the field calculator -> "Geometry by expression": > geom_from_wkt('Polygon ((355937 4117435, 782844 4117435, 782844 4498773, > 355937 4498773, 355937 4117435)') > > -> 101 extents with species name as atlas coverage > > - create new map layout > > - Activating atlas, setting species name-field as page name > > - duplication of the county-layer and setting up a rule based style: > > visible: array_contains( string_to_array( "species_names",','), > @atlas_pagename) > > invisible: else > > this query will look for the pagename (= species name) in the array of > species names in the county polygons, and if the name is in, then the > polygon is shown in grey, alse transparent. > > add text field @atlas_pagename > > set atlas output filename to @atlas_pagename > > Export atlas as images > > DONE > > Question: is there a way to aggregate the species per county without > setting up that relation beforehand? This is an extra step which would be > nice if it could be circumvented by some cool function. > > Any ideas or comments? > > Am 12.03.22 um 10:04 schrieb Jésahel Benoist via Qgis-user: > > Hello Mike, > > I tried to follow your question and the most I read the less I understand ! > Could you simply explain what you want to see, what action the user have > to do and what he gets? > For this, try to give input data and what will link them : plants (table > with plant name and states distribution?), states (geometric data with > states names?), columns to link... > The good point is that I'm sure QGIS can do this. But nobody will engage > work if objective isn't precise enough. > > Regards, > > J. B. > > > Le ven. 11 mars 2022 à 21:50, Mike Breiding - Morgantown WV via Qgis-user < > qgis-user@lists.osgeo.org> a écrit : > >> I had the range USA range map in the screen shot and have since updated >> it. https://photos.app.goo.gl/ktn5quT6s6SRwrzBA >> WV-Mike >> >> On 3/10/2022 11:04 AM, chris hermansen wrote: >> > Perhaps others are better understanding how you want to visualize the >> > distributions, but what I get from your description is that if you have >> > 100 (or 2500) species then you will have 100 (or 2500) maps, which >> > sounds unwieldy to me. >> >> I neglected to mention the use for the distribution maps. >> They will be used in a print brochure. >> A page mock up can be seen here: >> https://photos.app.goo.gl/ktn5quT6s6SRwrzBA >> >> The USA distribution map in the mock up was made in Qgis using the >> information from: >> https://plants.usda.gov/home/plantProfile?symbol=BODI2 >> >> This is interactive and will display down to the state and county level. >> However, they are not up to date at the state/county level. If they were >> I would simply make a screen shot and that would be the end of it. >> >> The state distribution map used in the mock up was made using Qgis based >> on data from the West Virginia University Herbarium which has the most >> up to date information on distribution. >> >> WV-Mike >> >> >> >> ___ >> Qgis-user mailing list >> Qgis-user@lists.osgeo.org >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user >> > > ___ > Qgis-user mailing listqgis-u...@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user > > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Automating creation of county distribution maps
Hi Mike and list, I took the challenge and so far succeeded at the very moment. Mike sent me a (not so clean list) of species and counties. My idea was to produce an atlas. (Actually, it should be made by a report, but since those are a bit quirky still, I went the pure atlas way) It's a bit hacky, a more straightforward way would be nice. - cleaning the data and importing them (table species/county, county polygons) - create table of individual species (toolbox "Delete duplicates by attribute") -> 101 unique species - Setting up a relation between county layer and species/county-table on the county name - new text field in county layer "species" : relation_aggregate('name_of_relation', 'concatenate', "species_names", ',') this creates a comma-separated list of species for each county polygon Prepare Atlas Coverage layer: (fake coverage, as it does not move) - create bounding box of the county-layer (Extract layer extent) - take list of individual species and add the geometry: retrieved the wkt of the extent in the field calculator -> "Geometry by expression": geom_from_wkt('Polygon ((355937 4117435, 782844 4117435, 782844 4498773, 355937 4498773, 355937 4117435)') -> 101 extents with species name as atlas coverage - create new map layout - Activating atlas, setting species name-field as page name - duplication of the county-layer and setting up a rule based style: visible: array_contains( string_to_array( "species_names",','), @atlas_pagename) invisible: else this query will look for the pagename (= species name) in the array of species names in the county polygons, and if the name is in, then the polygon is shown in grey, alse transparent. add text field @atlas_pagename set atlas output filename to @atlas_pagename Export atlas as images DONE Question: is there a way to aggregate the species per county without setting up that relation beforehand? This is an extra step which would be nice if it could be circumvented by some cool function. Any ideas or comments? Am 12.03.22 um 10:04 schrieb Jésahel Benoist via Qgis-user: Hello Mike, I tried to follow your question and the most I read the less I understand ! Could you simply explain what you want to see, what action the user have to do and what he gets? For this, try to give input data and what will link them : plants (table with plant name and states distribution?), states (geometric data with states names?), columns to link... The good point is that I'm sure QGIS can do this. But nobody will engage work if objective isn't precise enough. Regards, J. B. Le ven. 11 mars 2022 à 21:50, Mike Breiding - Morgantown WV via Qgis-user a écrit : I had the range USA range map in the screen shot and have since updated it. https://photos.app.goo.gl/ktn5quT6s6SRwrzBA WV-Mike On 3/10/2022 11:04 AM, chris hermansen wrote: > Perhaps others are better understanding how you want to visualize the > distributions, but what I get from your description is that if you have > 100 (or 2500) species then you will have 100 (or 2500) maps, which > sounds unwieldy to me. I neglected to mention the use for the distribution maps. They will be used in a print brochure. A page mock up can be seen here: https://photos.app.goo.gl/ktn5quT6s6SRwrzBA The USA distribution map in the mock up was made in Qgis using the information from: https://plants.usda.gov/home/plantProfile?symbol=BODI2 This is interactive and will display down to the state and county level. However, they are not up to date at the state/county level. If they were I would simply make a screen shot and that would be the end of it. The state distribution map used in the mock up was made using Qgis based on data from the West Virginia University Herbarium which has the most up to date information on distribution. WV-Mike ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info:https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Automating creation of county distribution maps
Hello Mike, I tried to follow your question and the most I read the less I understand ! Could you simply explain what you want to see, what action the user have to do and what he gets? For this, try to give input data and what will link them : plants (table with plant name and states distribution?), states (geometric data with states names?), columns to link... The good point is that I'm sure QGIS can do this. But nobody will engage work if objective isn't precise enough. Regards, J. B. Le ven. 11 mars 2022 à 21:50, Mike Breiding - Morgantown WV via Qgis-user < qgis-user@lists.osgeo.org> a écrit : > I had the range USA range map in the screen shot and have since updated > it. https://photos.app.goo.gl/ktn5quT6s6SRwrzBA > WV-Mike > > On 3/10/2022 11:04 AM, chris hermansen wrote: > > Perhaps others are better understanding how you want to visualize the > > distributions, but what I get from your description is that if you have > > 100 (or 2500) species then you will have 100 (or 2500) maps, which > > sounds unwieldy to me. > > I neglected to mention the use for the distribution maps. > They will be used in a print brochure. > A page mock up can be seen here: > https://photos.app.goo.gl/ktn5quT6s6SRwrzBA > > The USA distribution map in the mock up was made in Qgis using the > information from: > https://plants.usda.gov/home/plantProfile?symbol=BODI2 > > This is interactive and will display down to the state and county level. > However, they are not up to date at the state/county level. If they were > I would simply make a screen shot and that would be the end of it. > > The state distribution map used in the mock up was made using Qgis based > on data from the West Virginia University Herbarium which has the most > up to date information on distribution. > > WV-Mike > > > > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user