Re: [Qgis-user] Field calculator - converting string to int with possible NULL values

2021-05-14 Thread David Strip

  
  
To answer my own question - 
My problem occurred in a layer that was joined to a csv file. I had
"NULL" values where there was no matching join field, as one might
expect.
But it turns out that the csv file had the string "null" in an
otherwise integer column for missing entries. Thus, when I thought
the field calculator was rejecting NULL values, it was actually
rejecting the "null" string.

Sorry for the distraction.

On 5/14/2021 4:21 PM, David Strip wrote:

  
  I have a string field I wish to convert to int. A small subset of
  the records contain NULL.
  I tried the following in the field calculator:
  
  case
when ("bb_usage" IS NULL) then 0
else to_int("bb_usage"")
end
  
  When I look at the preview, the result is correct whether or not
  the field contains int or NULL. But when I try to run it, I get an
  error:
   
          
  
  I also tried
  
  case
when ("bb_usage" IS NULL) then 0
when  ("bb_usage" IS NULL) then to_int("bb_usage")
end
  
  and get the same error.
  
  I tried
  if ("bb_usage" IS NULL, 0, to_int("bb_usage"))
  
  same error.
  
  I know there are workarounds, but why don't any of these work? Why
  does to_int get evaluated on the NULLs?
  
  
  ___
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] Field calculator - converting string to int with possible NULL values

2021-05-14 Thread David Strip

  
  
I have a string field I wish to convert to int. A small subset of
the records contain NULL.
I tried the following in the field calculator:

case
  when ("bb_usage" IS NULL) then 0
  else to_int("bb_usage"")
  end

When I look at the preview, the result is correct whether or not the
field contains int or NULL. But when I try to run it, I get an
error:
 
        

I also tried

case
  when ("bb_usage" IS NULL) then 0
  when  ("bb_usage" IS NULL) then to_int("bb_usage")
  end

and get the same error.

I tried
if ("bb_usage" IS NULL, 0, to_int("bb_usage"))

same error.

I know there are workarounds, but why don't any of these work? Why
does to_int get evaluated on the NULLs?
  

___
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] Fw: How to change Map resolution in QGIS Print Layout

2021-05-14 Thread John Antkowiak
 Hi. I cannot find an answer to this in the QGIS User Guide or online tutorial 
videos, and I'm a very inexperienced user.

My datasets are linked below. They're from the State of North Carolina and 
consist of 1) all the streets in the State, and 2) all the county boundaries. I 
clipped each layer so that I'm working with the streets in Alamance County 
only. I use the "StreetName" attribute to label the layer.
I need to create a paper wall map to help a charity plan its delivery routes. I 
have no innate sense exactly how big the map has to be; I'm starting with an 
assumption of a 60" roll of paper. (I've already had to rule out a commercial 
or purchase of a predesigned product. Doing it myself will cost me probably ten 
hours, which I can spare, but save nearly a thousand dollars that I can't.) 
In my Print Layout, I set the paper size to 60" wide by 115" high. (It would be 
nice if I could change the interface ruler units from mm to inches, but I don't 
see how. This would help me ensure the desired margin.)
I add the map and adjust its scale to fit the entire county as large as 
possible on the layout page. I hope I'm expressing the scale correctly, but I 
believe the smaller the scale number, the closer-in the map appears. The closer 
I zoom in, the more street names should appear. I would prefer that all street 
names are visible.
But here's the first challenge.
The Print Layout window acts as a preview of the final printed product, and 
what it shows me when viewed at 1:1 scale is not what I want to see. All the 
vector lines and all the labels are so pixelated that they're almost illegible. 
It makes no difference what the map scale is, because the size of the labels 
and their resolution doesn't change with the map scale. 
I tried going back to the source map and adjusting the label font size from the 
default (10) to 12, but it didn't change the outcome. It only yielded bigger 
pixelated illegible labels. (I exaggerate; they're not illegible they're just 
very difficult to read, almost to the point of rendering the whole exercise 
moot.) I tried adjusting the output dpi in the Print Layout to 500 dpi, but I 
think all that does is make the pixelated labels more sharply pixelated. The 
preview didn't change at all.
A screen capture is attached.
Once I solve that problem, I suspect I'm going to find that a scale of 18,000 - 
which allows the entire county to be shown on one page without losing any 
vector data - isn't close enough to display enough of the street names. I'm 
going to have to create map panels, which adds a level of complexity to my 
learning curve. 
Any insights on this situation would be most appreciated. Have a good day -
John A.


The two datasets are found 
here:https://connect.ncdot.gov/resources/gis/Pages/GIS-Data-Layers.aspx

Download the layers titled "Road Characteristics Arcs Shapefile Format" and 
"County Boundary Shoreline" to reproduce exactly what I see. Clip them as 
described above.

  ___
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] QGIS file version control

2021-05-14 Thread Alexandre Neto
Hi Hugh,

Check this plugin to make you qgs files more trackable:

https://plugins.qgis.org/plugins/trackable_project_files/

Best regards,

Alexandre Neto
User support
www.qcooperative.net


A sexta, 14/05/2021, 18:03, Hugh Kelley  escreveu:

> Hi,
>
> Is anyone aware of any thought or work put into version control for a qgis
> file?
>
> I had a look through the open issues on github and didn't turn anything
> up. I found some conversation about data versioning on stack overflow but
> nothing specific to the qgis file itself.
>
> Unzipping the qgz file and tracking the qgs file with git worked fairly
> smoothly for the few basic tests i just tried. it would become much more
> complicated as some other files get created for more complicated maps are
> built. For instance the .qgd files are binaries which aren't handled very
> well in git.
>
> If anyone is currently using git to version control their qgis projects i
> would be interested in hearing how they manage it and any best practices
> they could share.
>
> Thanks
>
> Hugh
>
> ___
> 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] QGIS file version control

2021-05-14 Thread Hugh Kelley
Hi,

Is anyone aware of any thought or work put into version control for a qgis
file?

I had a look through the open issues on github and didn't turn anything up.
I found some conversation about data versioning on stack overflow but
nothing specific to the qgis file itself.

Unzipping the qgz file and tracking the qgs file with git worked fairly
smoothly for the few basic tests i just tried. it would become much more
complicated as some other files get created for more complicated maps are
built. For instance the .qgd files are binaries which aren't handled very
well in git.

If anyone is currently using git to version control their qgis projects i
would be interested in hearing how they manage it and any best practices
they could share.

Thanks

Hugh
___
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] Shapefile and GeoPackage

2021-05-14 Thread Andrea Giudiceandrea
Riccardo D'Alvito wrote
> In the creation of a Shapefile, in the choice of the type of geometry you
> have point, multipoint, line and polygon. 

The shapefile format (as you can read in the ESRI technical description
already linked by Nicolas Cadieux) supports only the following base "shape
types" (excluding Null Shape, Multipatch and Z and M variants) called:

- Point
- MultiPoint
- PolyLine
- Polygon

The "Point" type only stores single-part geometries, while MultiPoint,
PolyLine and Polygon types can store multi-part geometries.

Best regards.

Andrea



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
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] From Clarke 1880 and 1866 to WGS1984

2021-05-14 Thread Nicolas Cadieux
Hi,

If this is vector data, open the file and make sure it’s in Clarke 1880 or 
1866.  Make sure the data is in the proper place (georeferenced) by opening 
another data source like a Google layer from quickmap services.  Then, simply 
select the layer in the layer panel, right click it and use save as or export.  
You will have the possibility to change the projection.  You then will be 
possibly face with the choice of various transformations.  Select the best one.

For raster data, you can try Gdal warp under the raster menu or found in 
“processing”, a plugin that you must activate under the plugin menu.

Nicolas Cadieux


> Le 14 mai 2021 à 07:32, jean Lukusa  a écrit :
> 
> 
> Hi all .
> I have some data recorded in clarke1880 and 1866 .
> So I want to convert them into WGS1984.
> Would you tell me the procedure
> 
> Jean Lukusa
> B.Sc. Geology
> Trained on Jorc  Code
> GIS  Operator 
> +243812156128
> ___
> 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] From Clarke 1880 and 1866 to WGS1984

2021-05-14 Thread jean Lukusa
Hi all .
I have some data recorded in clarke1880 and 1866 .
So I want to convert them into WGS1984.
Would you tell me the procedure

Jean Lukusa
B.Sc. Geology
Trained on Jorc  Code
GIS  Operator
+243812156128
___
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] tfw Parameters

2021-05-14 Thread Alexandre Neto
Hi,

This has to do with projections. Putting it as simple as possible, because
the earth is "round" any try to flatten it (a projection) implies some form
of distortion. Using different projections means different distortions.

When we reproject a raster, that distortion difference is applied to each
pixel, which leads to different pixel sizes and shape.

Best regards,

Alexandre Neto
Users Support
www.qcooperative.net


A terça, 11/05/2021, 07:55, ludwig  escreveu:

> Perhaps because pixels must not necessarily be quadratic? A grafic in Din
> A1 has to sides with a relation of sqrt(2), 594x841mm, I think qgis tries
> to fill the area without rest, which is not possible with quadratic pixels.
> Just a thought...
>
>
>
> Von meinem/meiner Galaxy gesendet
>
>
>  Ursprüngliche Nachricht 
> Von: "Preuß, Sylvia" 
> Datum: 11.05.21 07:55 (GMT+01:00)
> An: 'Marco Lechner' , "Quantum Gis mailinglist (
> qgis-user@lists.osgeo.org)" 
> Betreff: Re: [Qgis-user] tfw Parameters
>
> Hi Marco,
>
>
>
> thank you, the original data is from a SpatiaLite database with EPSG:25832
>
>
>
>
>
> Sylvia
>
>
>
> *Von:* Marco Lechner 
> *Gesendet:* Montag, 10. Mai 2021 16:33
> *An:* Preuß, Sylvia ; Quantum Gis mailinglist (
> qgis-user@lists.osgeo.org) 
> *Betreff:* AW: tfw Parameters
>
>
>
> I’d guess the original TIFF is not EPSG:25832 and is based on a different
> elipsoid?
>
>
>
> best regards
>
> Marco
>
>
>
> *Von:* Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] *Im Auftrag
> von *Preuß, Sylvia
> *Gesendet:* Montag, 10. Mai 2021 15:51
> *An:* Quantum Gis mailinglist (qgis-user@lists.osgeo.org) <
> qgis-user@lists.osgeo.org>
> *Betreff:* [Qgis-user] tfw Parameters
>
>
>
>
>
> Hi all,
>
>
>
> I exported vectordata DIN A1 TIFF in EPSG 25832, scale 1:25000 and got
> different Pixelsizes in the worldfile.
>
> 2.116892375645
>
> 0.
>
> 0.
>
> -2.116681770004
>
> 391333.92426485
>
> 5663925.500010723248
>
>
>
> Does anybody know how come?
>
>
>
> Thank you
>
>
>
> Sylvia
>
>
> --
>
>
>
> * Der E-Mail-Dienst des Oberbergischen Kreises dient ausschließlich der
> dienstlichen Kommunikation. Senden Sie deshalb keine E-Mails privaten
> Inhalts an E-Mail-Adressen des Oberbergischen Kreises.*
> Es wird darauf hingewiesen, dass neben der Person, an die Ihre E-Mail
> gerichtet ist, auch deren Vertretung im Amt einen unmittelbaren Zugriff auf
> Ihre Nachricht hat. Für Berufsgeheimnisträger und besondere Funktionsträger
> gelten abweichende Regelungen.
> Es wird außerdem darauf hingewiesen, dass die Kommunikation per E-Mail
> ohne Authentifizierung und Verschlüsselung unsicher ist, da für
> unberechtigte Dritte grundsätzlich die Möglichkeit der Kenntnisnahme und
> Manipulation besteht.
> Es wird deshalb keine Verantwortung für den Inhalt dieser Nachricht
> übernommen, da eine Manipulation nicht ausgeschlossen werden kann.
> Obwohl alle angemessenen Vorkehrungen getroffen wurden, um
> sicherzustellen, dass Anlagen dieser E-Mail virusgeprüft sind, wird
> empfohlen, anhängende Dateien vor dem Öffnen durch Ihr eigenes
> Virus-Programm zu prüfen, da keinerlei Haftung für Schäden übernommen wird,
> die infolge etwaiger Software-Viren entstehen könnten.
> Der Inhalt dieser E-Mail ist ausschließlich für die bezeichnete Person
> bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen
> Vertretung sein sollten, beachten Sie bitte, dass jede Form der
> Kenntnisnahme, Veröffentlichung, Vervielfältigung oder Weitergabe des
> Inhalts dieser E-Mail unzulässig ist. In diesem Fall wird darum gebeten,
> sich mit der absendenden Person der E-Mail in Verbindung zu setzen.
> --
> --
>
>
> * Der E-Mail-Dienst des Oberbergischen Kreises dient ausschließlich der
> dienstlichen Kommunikation. Senden Sie deshalb keine E-Mails privaten
> Inhalts an E-Mail-Adressen des Oberbergischen Kreises.*
> Es wird darauf hingewiesen, dass neben der Person, an die Ihre E-Mail
> gerichtet ist, auch deren Vertretung im Amt einen unmittelbaren Zugriff auf
> Ihre Nachricht hat. Für Berufsgeheimnisträger und besondere Funktionsträger
> gelten abweichende Regelungen.
> Es wird außerdem darauf hingewiesen, dass die Kommunikation per E-Mail
> ohne Authentifizierung und Verschlüsselung unsicher ist, da für
> unberechtigte Dritte grundsätzlich die Möglichkeit der Kenntnisnahme und
> Manipulation besteht.
> Es wird deshalb keine Verantwortung für den Inhalt dieser Nachricht
> übernommen, da eine Manipulation nicht ausgeschlossen werden kann.
> Obwohl alle angemessenen Vorkehrungen getroffen wurden, um
> sicherzustellen, dass Anlagen dieser E-Mail virusgeprüft sind, wird
> empfohlen, anhängende Dateien vor dem Öffnen durch Ihr eigenes
> Virus-Programm zu prüfen, da keinerlei Haftung für Schäden übernommen wird,
> die infolge etwaiger Software-Viren entstehen könnten.
> Der Inhalt dieser E-Mail ist ausschließlich für die bezeichnete Person
> be

[Qgis-user] How to select a polygon feature underneath another in the same ArcGIS REST feature layer.

2021-05-14 Thread Michael Dufty
Does anyone know the best way to select a feature entirely underneath another 
in an ArcGIS REST feature layer.
The standard select tool seems to only select one feature, is there a setting 
to let is select all?
Freehand select actually seemed to work well to get both features, which was 
enough for my purpose.
Radius select initiated an indexing of the whole layer which freezes QGIS for 
about 15 minutes (huge layer).

Related question is there any way to cancel these indexing operations?  Turning 
on snap with such a layer active causes the same issue.

Michael Dufty
Senior Environmental Engineer

[cid:image001.png@01D748D0.F3F535D0]
MBS ENVIRONMENTAL
4 Cook Street, West Perth  WA 6005

t:+61 8 9226-3166

e:   mdu...@mbsenvironmental.com.au
w:   www.mbsenvironmental.com.auhttp://www.mbsenvironmental.com.au/>
Disclaimer:
The information contained in this message is intended for those to whom it is 
addressed. It may contain confidential or privileged information and if you are 
not the intended recipient, you must not copy, distribute or take any action in 
reliance on it. If you received this message in error please destroy it and 
reply to the sender immediately or contact Martinick Bosch Sell Pty Ltd. on +61 
8 9226 3166 immediately. All care has been taken to ensure that this message 
and any attachments are virus free; we do not accept responsibility for any 
virus infections caused by receipt of this message

___
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