[Qgis-us-user] Qgis-us-user Digest, Vol 17, Issue 1

stu at truenorthgis.net stu at truenorthgis.net
Mon Jul 23 16:57:58 PDT 2018


Hi John,
 
I'll attempt to help, but your email is a little confusing.  Here's my interpretation:
 
You have a QGIS project file that contains a source shapefile.  You've successfully added a new attribute field (I'll call it newfield) to that shapefile.  Newfield contains a set of values.
 
You want to create a subset of records within newfield, determined by value(s) within newfield.  That subset will be output to a new shapefile (which I'll call newshapefile).  Newshapefile will be stored in the QGIS project file.
 
If my read is correct, try this:
 
1.  Create the subset of newfield records:
 
a) From the Layers Panel, right-click your source shapefile and click Open Attribute Table
b) In the resulting attribute table toolbar, click on the yellow button titled Select Features Using an Expression
c) In the ensuing Select by Expression window, enter your selection expression in the left-hand pane
  - Depending on your desired selection, the expression will look something like "newfield" > 0
d) click the Select button on the lower right of the Select by Expression window
e) Voila, you now have a subset!
 
2. Create newshapefile:
 
a) >From the Layers Panel, right-click your subsetted shapefile and click Save As
b) The Save Vector Layer As window appears.
     - From the Format dropdown, select ESRI Shapefile
     - Browse to the output folder and supply the name for newshapefile
     - Check the Add Saved File to Map checkbox
     - Click ok
c) Newshapefile is created and added to the QGIS project, displayed in the Layers Panel
d) Save the QGIS project with ctrl-s
 
 
Enjoy!
 
Stu Smith
 
 
-----Original Message-----
From: qgis-us-user-request at lists.osgeo.org
Sent: Monday, July 23, 2018 3:00pm
To: qgis-us-user at lists.osgeo.org
Subject: Qgis-us-user Digest, Vol 17, Issue 1



Send Qgis-us-user mailing list submissions to
 qgis-us-user at lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
 https://lists.osgeo.org/mailman/listinfo/qgis-us-user
or, via email, send a message with subject or body 'help' to
 qgis-us-user-request at lists.osgeo.org

You can reach the person managing the list at
 qgis-us-user-owner at lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Qgis-us-user digest..."


Today's Topics:

 1. Problems creating layers (John Antkowiak)


----------------------------------------------------------------------

Message: 1
Date: Mon, 23 Jul 2018 05:14:35 +0000 (UTC)
From: John Antkowiak <john_antkowiak at yahoo.com>
To: qgis-us-user at lists.osgeo.org
Subject: [Qgis-us-user] Problems creating layers
Message-ID: <923434916.755164.1532322875719 at mail.yahoo.com>
Content-Type: text/plain; charset="utf-8"

Hi. I've been trying unsuccessfully to create my own layers in QGIS. I'm a new user and I just can't figure it out. (I know how it's SUPPOSED to work...) I don't know if this is a question of user permissions where whatever database it's trying to open lives (even though it's all on my hard drive). Ten years ago I could do this in my sleep with ArcMap... I must be forgetting something very basic here...
(And this begs the question, "What database is it trying to open? Can't I even create a new database and write to that one?")
All I've done is open a project that I created by loading a shapefile, and add a field to one of the shapefile tables. I need to be ale to filter the layer in order to show only certain values in that field. I need to be able to save that information in the project file. I can't "Create a Layer." I can't "Export to a layer." I can't "Clip a layer." The error messages all say something like this one:
"Export to vector file failed.Error: Creation of data source failed (OGR error: sqlite3_open(NC GeoRegions.gpkg) failed: unable to open database file)"
No one has responded to my pleas for help, although every other request generates responses.
Could someone please weigh in? You were all newbies once too...
Thanks so much. Have a great day  : )
John A,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-us-user/attachments/20180723/f04f43dc/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Qgis-us-user mailing list
Qgis-us-user at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-us-user


------------------------------

End of Qgis-us-user Digest, Vol 17, Issue 1
*******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-us-user/attachments/20180723/ddcb8536/attachment.html>


More information about the Qgis-us-user mailing list