to your working folder, double-click the .zip file to extract the contents. The complete set of placename features is in the file From the CALC application (not from WRITER or the default LibreOffice Suite!) click on the menu item File >, Open and browse to your UNZIPPED and RENAMED file Currently QGIS imports CSV as UTF-8 Encoding. If you are using ANY OTHER encoding, create TWO tables: one for the LAT LONG import, and one to join the other character set attributes to the resulting points layer (see JOINS for details on how to accomplish the second JOIN process). In the example shown below, the placenames are in UTF-8 encoding, so it is not necessary to create a second table. If the names were in Arabic (CP1256 encoding) for example, you should split the placename column into a second table (which MUST also have a column of unique Identifiers, which will serve as the JOIN ID) In the jm.csv example, and for all GNS Country files, the UNIQUE ID field is 'UFI' or Unique Feature ID. Make sure you know which field contains your JOIN ID, and keep in mind that it must be a unique value for each row. Make sure to Format the Cells for your Lat Long values with enough decimal places, so that saving to CSV does not trim off your most accurate values. The dialog will allow you to EXPLICITLY set the Encoding (change it to Unicode UTF8) and the Delimiter (change it to $). By using a $ delimiter, you can avoid errors caused by stray commas that might be in the cells. Because the x, y values you want to import must be in Decimal Degrees, be sure to RESET the CRS to plain WGS 84 (EPSG: 4326) In QGIS 2, the ability to import delimited text as Vector Layers is built in to the Manage Layers tools. Just click on the large COMMA icon to launch the ADD DELIMITED TEXT LAYER dialog. Unset Comma delimiter, and choose CUSTOM DELIMITERS, (for the example type our $ delimiter into the OTHER DELIMITERS box) X is generally used for the 'horizontal' or degrees East and West of Longitude, while Y is use for the 'vertical' degrees North and South of Latitude. In the case of plain decimal degrees, click on the option WGS84, also called EPSG:4326. If you don't see this available under 'Recently Used' options, then put your cursor into the FILTER form and type 'WGS' into the form. Select EPSG:4326 from the results. Note: WGS 84 Pseudo Mercator is a specialized projection which is equivalent to the so-called Google Spherical Mercator. You don't want to use this EPSG:3857 for loading decimal degree points from .csv. EPSG:3857 is really only appropriate for adding Google and other basemaps with the OpenLayers Plugin With the correct CRS selected, hit Okay, and the points should appear as a new data layer in the QGIS Layer List and the Map View. Check the Number of Features on the top bar of the attribute to make sure all were mapped (2,774 features in our example for Jamaica) Note: you may encounter problems if the field delimiters (such as COMMAS) have been used within the fields and wrappers such as Double-quotes were not used int the raw data file. Sometimes it may be necessary to massage the .csv file in order to eliminate uses of the cell delimiters within FIELDS. Usually this can be accomplished by adjusting the EXPORT to CSV settings in Libre Office and saving out to a new version of the .csv file with specific field delimiters (SEPARATED BY) and text wrapper (TEXT DELIMITER) settings. In other words, if commas in your text are a problem, use a custom pipe delimiter as Note that QGIS is holding the points layer created in memory. You may want to right click on the layer and SAVE AS a SHAPEFILE (or your preferred format) for later use. After exporting to SHP, right click to remove the DELIMITED TEXT LAYER (jm_import.csv) and use the ADD VECTOR layer tool to add your new Shapefile (jm_places.shp). Now you should be able to run spatial analysis tools and other operations on the Shapefile, which would not have been possible using the .csv file held in the memory buffer. Source.

Яндекс.Метрика Рейтинг Free Web Counter
page counter
Last Modified: April 18, 2016 @ 12:06 pm