Create shapefile using textfile in QGIS - gis

I have a shapefile in QGIS which has polygons in it . There are several other attributes for each feature .
I want to add another attribute to each feature . The value for this attribute is available to me in a text file . How do i add this column programatically to the existing shapefile's attribute table .
It is not feasible to do it manually as i will have to change the value of that attribute quite often and the number of features are in thousands.
I am open to suggestions to use other GIS software if that fits my requirements.

Related

Drop down menu fields in ArcMap shapefile

I need to create shape file in ArcMap that have drop down field with predefined variables (some of them had 3 variables, some have more than five).
Is it posible to create that type of shapefile?
This need's to me to prevent different user to input different type of information about ownership of companies, type, structure, material. So if I don't have predefined variables in the fields they will put different text. ex. material=wood, some will put "WOOD", "Wood", "Wod" and etc.
What you're referring to is a coded domain, where you store 1 in the attribute and there's a domain table that informs the application that 1 = wood.
A shapefile doesn't have the ability to handle coded domains.
However, a geodatabase does. Try that instead of a shapefile!
As stated in another answer to this question, your best bet is to create a file geodatabase (.gdb) with the data you're working with using Export from the ArcMap menu and on doing so, right-click and select Properties to add new values that you want to be the only available options for users of your map or application.
See the link below in the ArcGIS resources for more information about domains and how to code the values you want.
http://desktop.arcgis.com/en/arcmap/10.3/manage-data/geodatabases/creating-new-attribute-domains-creating-a-new-code.htm

Convert shape file type from Multipatch to Polygon

I have a shape file of multipatch type and this shape file have a attribute table. I want convert this shp file type to polygon and be retained attribute table. How can i do this task?
Thanks a lot for help.
Use the 3D Analyst Tools --> Conversions --> "Multipatch Footprint" in ArcGIS.
You'll obtain a polygon shapefile with the original multipatch's attribute table.
Tasks for format conversion are covered in the appropriate documentation and the method chosen will determine the requirements and outputs available.

Is it possible to export geometry data from a shapefile to CSV from QGIS?

I'm trying to get geometry data from a large quantity of shapefiles into a database (Google Datastore). The thing is, I don't need to work with maps, I just need the coordinates, so I would like just the numerical coordinates. Ideally I'd like to use CSV, but any plain text would be workable. I have a Mac and have been able to get QGIS installed (I also tried udig but the interface was baffling). While it is easy to load a shp file into QGIS as a vector layer, I'm lost as to how to export the geometry, or even if it is possible.
Does anyone know how to extract plain text geometry from a shp file? Ideally with QGIS, but any method would be appreciated.
The "You can simply right-click the layer entry in QGIS and select "Save as"" approach was right
But the "GEOMETRY=AS_WKT" in the OGR layer option was missing.
I may also be a good idea to convert the coordinate system to WGS 84, as CSV are usually expected not to be projected (and shapefile sometimes are)
You can simply right-click the layer entry in QGIS and select "Save as".
In the dialog, there's an option to save as "CSV".
There are plenty of options to refine the format of the generated CSV file, as well as there are many other file formats to choose from.
Update:
See here for a solution: https://gis.stackexchange.com/a/8846
Outdated Response:
It is possible, in a sort of roundabout way...
Open the attribute table for the layer you want to save.
Select all rows.
Copy the rows
Paste into a spreadsheet
Save the spreadsheet as a csv.
Unfortunately there is no way to do this directly in QGIS.
See here for more details:
https://gis.stackexchange.com/questions/8844/get-list-of-coordinates-for-points-in-a-layer/8911#8911

I notice world file is missing the zone paramter

I'm just trying to figure out how to create world file. I saw some explanation but I notice world file having the easting and northing values but not the zone value. So how the location of the map will be identified, or I'm missing something.
Thanking you.
The world file does specify numerical geographical location for an image, but it unfortunately does not contain any information about what coordinate systems is used.
Such information typically comes in a separate file with extension .prj and is defined usually with the WKT standard and via a unique EPSG code of the coordinate system.
To simplify the search for coordinate system definitions we created an online tool:
http://epsg.io/
There you can use simple search phrases and preview position of any coordinates on a map - and also download the .prj file mentioned above.
Because you have tagged your question with "maptiler" I expect you want to cut the map tiles from your geodata and world file with the MapTiler software.
The coordinate systems can be specified directly in MapTiler easily. See http://www.maptiler.com/how-to/coordinate-systems/

Combining additional data with Shapefile using GeoJSON and Gdal

I used Mike Bostock's great tutorial to make a simple map using downloaded shapefiles and processing them with GDAL into GeoJSON files.
http://bost.ocks.org/mike/map/
I'm trying to build on this learning by taking a county-level shapefile map and marrying it with additional demographic data (CSV) so that I can load a single GeoJSON file and not have to use Javascript to merge the data at runtime. The goal is to have a county-level heatmap.
The CSV file has an ID column that looks like this: 01348. While the Shapefile has two ID columns that are 01 and 348.
Is it possible to use GeoJSON to store this kind of data? If so, what kind of terminal commands must I use to combine the two?
Little trick:
When converting from Shape file to GeoJSON, keep "id-a":"01";"id-b":"348" as neighbors in this order.
use a simple regex to delete all ";"id-b":" and thus obtain "id-a":"01348".
go ahead to inject your CSV property given the common ID, see: How to add properties to topojson file?
That's should work.