Tag Info

Hot answers tagged import

36

In the newer versions of QGIS (2.18+) there was a feature implemented to import .dwg-files into geopackages (.gpkg). This feature can be found under: Project >> DWG/DXF-import In order to make it work, you can follow those steps: Create a new/load an existing Geopackage with a fitting CRS Import DWG-file Check 'Expand block references' and 'Use curves' ...

29

You can convert the DWG files to DXF (which QGIS does support) using the Teigha® File Converter. It's a free (not open source unfortunately) cross-platform application provided by the ODA to end users only for the conversion of .dwg and .dxf files to/from different versions. The following platforms are supported: Linux (OpenSUSE 11.2/Ubuntu 10.10 x86) Mac ...

20

You can use PostGIS's ST_GeomFromGeoJSON to bring in just the geometry part of the GeoJSON. Better yet, you can use ogr2ogr to import the entire JSON document: ogr2ogr -f "PostgreSQL" PG:"dbname=my_database user=postgres" "source_data.json" -nln destination_table -append (I haven't tested this with your data, add a comment if you have issues.)

18

My quick fix is to create the first row all with dummy values, and then delete this row/record after bringing into in ArcGIS. This first row contains representative values or often wildly different values (e.g. alphabetic characters even if the column contains numbers that I want to be text data type) and with the largest number of characters needed for ...

16

Use the -nlt option. In this case you want: -nlt MULTILINESTRING There is also PROMOTE_TO_MULTI (GDAL 1.10 and later), which chooses either MULTILINESTRING or MULTIPOLYGON depending on the input layer. The use case for this is "doing a mass conversion of shapefiles that [mix] different types of geometries".

15

The ExtendedData does not have correct "name" values. For example <Data><displayName>System</displayName><value>Riverine</value></Data> is not imported by GDAL and Qgis Master, while <Data name="System"><displayName>System</displayName><value>Riverine</value></Data> gets imported. ...

15

To expand on David Bitner's answer, here's an example ogr2ogr instruction demonstrating an optional OGR SQL clause to rename fields from a source dataset (shapefile in this case) before they are brought into a target dataset (a PostGREsql table): ogr2ogr -f "PostGreSQL" PG:"host=127.0.0.1 user=YourUser dbname=YourDB password=YourPass" "E:\path\to\...

15

tl;dr import qgis import PyQt4 etc is the correct way Long version Yes the import order can matter and in the case of QGIS 2.0 and above it does matter. You should always import qgis.core or qgis.gui, even just import qgis is enough, before you import any PyQt stuff. That seems silly. Why? In QGIS 2.0 we switched to using version 2 bindings of SIP ...

13

ERROR: **function addGeometrycolumn**(unknown, unknown, unknown, unknown,unknown, integer) does not exist It seems that PostGIS is not yet installed. PostGIS is an extension of Postgres which allows the use of geographic files. Install it and your import will work fine.

13

You can often make a WKT (Well Known Text) column in Excel without too much fiddling, which effectively creates a spatial definition for points, lines or polygons within a single field. What you want to do is create a WKT string, in the format: POLYGON((X1 Y1, X2 Y2, X3 Y3, X4 Y4, X1 Y1)) You can create new columns in Excel with the below formulas. The ...

12

The reason that you are not able to save Time related information in a shapefile is that the Shapefile format, does not support Time as an attribute. They only support Date fields. This is due to the fact that the shapefile uses an older specification of the dBase file (.dbf) to store the attribute table. If you need to store time data, you are going to ...

12

I've been working with MS Sql Server Spatial since the '07 Katmai betas and I know of no Microsoft tool to do this. I had discussions with MS staff in '07 or '08 and at that point both reprojection and shapefile support were features they had chosen to leave up to third parties to implement.

12

You are putting the x and y coordinates in wrong order. -8.183973 is latitude (Y) and 111.845623 is longitude (X). You need to adjust the column of X and Y to be Y and X, respectively. The coordinates are in geographic, which means using WGS84 is suitable for the given coordinates. Here is an image showing the correct location in Google Earth:

11

It depends on what you mean by import. Do you want to import data to actually do something with it, or just to have a background layer for viewing? Also consider this: In GIS, basic building blocks are points, lines and polygons (sometimes called basic topological types), and in CAD, you are working with drawings which can be made of anything, including ...

10

To follow theJones and user5584, PyCharm 4 now stores the setting under "Project Interpreter" rather than "Python Interpreters." With all projects closed, and PyCharm still open, go to "Configure" and then "Settings". "Project Interpreter" is under the "Default Project" menu on the left. Click the settings gear in the upper-right, and then "Add Local." ...

10

I love open-source but FME easily wins out against the opensource ETL's as best I can tell. It's actually quite cheap for maintenance and support too (at least compared to most other corporate solutions we have for things). If you're looking for translations between formats then OGR may do it (with some piping into GDAL for transformations). Of course, that'...

9

It is possible that there is something wrong with resolution and tolerance in PGDB. Take a look at sections X,y resolution and X,y tolerance in this topic. Try increasing these values. What coordinate system are you using? What values are set for resolution and tolerance?

9

I often recieve cad files but I don't have AutoCAD, so I break them down with DoubleCAD XT which is a free download. I export each layer or set of data by selecting it then SAVE AS (toggle the selected option) type = DXF-2004-2006. These seem to import fine into QGIS, when you open it up as a vector layer. FME server might be worth a try as well, http://...

9

I did call ESRI support about this and their answer wasn't encouraging, but it did explain the problem. Paraphrasing ESRI: The problem is that ArcGIS Desktop, being 32-bit software, is limited to using 4GB of RAM at the most. The text file has to be processed in RAM before being stored as a table, so at some poing during processing ArcGIS was hitting the RAM ...

9

If you go to the menu "Layer" and then "Add delimited text Layer", choose the correct delimiter (tabs, commas, semicolons, ...) and then choose the correct X and Y fields below it should show a preview at the bottom of the window - with all columns from the original file (see below). If you press "ok" a temporary point layer will be created. Each column ...

9

I had the same problem (Arcmap would not import my csv file with headers, instead it would show Field1, Field2, Field3 etc). When I examined the file headers in Excel, I found...decimals numbers, spaces, percent signs etc. After replacing all of that with underscores or text, I had no problems. I dragged the .csv file into arcmap, opened the attribute ...

9

I had the same problem of QGIS reading a CSV file (saved from MS Excel 2011 on my Mac) as a single row. So, I re-saved the Excel worksheet as "Windows Comma Separated (.csv)" and QGIS was able to read it just fine.

9

No idea what happened with the first three lines but the other lines are coordinates in UTM zone 28N. data_lat is X, data_lon is Y. I noticed that simply plotting each pair as X and Y points looked very similar, so I gave it a try on http://projfinder.com with success.

9

From Settings >> Data Sources >> Data source handling, you may try to uncheck the Ignore shapefile encoding declaration option. If you move the mouse cursor over the above option, this message appears: Disable OGR on-the-fly conversion from declared encoding to UTF-8

9

Your data is obviously in decimal degree, hence WGS 84 - EPSG 4326 is the correct CRS. In the import window change from 25832 to 4326 and you're fine.

9

You can convert your .img files to .tif using gdal_translate. Here is a shell script to convert all .img in actual folder to .tif #! /bin/bash for i in *.img; do gdal_translate $i${i%.*}.tif done After this you can build .vrt gdalbuildvrt all.vrt *.tif Depending on the size of your rasters, you had better to build pyramids for faster rendering: for ...

8

You can use Layer > Add delimited text layer For more about this, you can read: Visualising WKT geometry string in QGIS

8

I converted one of the wetlandfiles with globalmapper to shape: enclosed two screenshots from converted dbf-files (areas and lines): hopefully this is what you want ..

8

A slight departure from the traditional CSV->ArcGIS layer could be to use ogr2ogr to create your shapefile from CSV BEFORE loading it into ArcMap. When using OGR, you can manually create a CSVT file that describes your column types, similar to what ArcGIS attempts to do with the schema.ini file. This post by @underdark on How to Specify Data Types of CSV ...

Only top voted, non community-wiki answers of a minimum length are eligible