Hot answers tagged

17

I'm a little bit late to the party, but this can now be read by sf, with vessel <- sf::st_read(dsn = "Zone9_2014_01.gdb", layer = "Zone9_2014_01_Vessel") It returns a warning (no feature geometries present) but also a data.frame with the table. See the thread that started here: https://stat.ethz.ch/pipermail/r-sig-geo/2018-February/026344.html


16

Maybe I'm not understanding, but you seem to be entering Longitude Latitude coordinates (-97, 21) in degrees,into a CRS that is UTM based, and uses meters. If you're declaring this as SRID 26918, then the long/lat values must be in that CRS. If the Long/Lat values are in degrees then you will need to create the geometry as ST_SetSRID(MakePoint(...),4326) ...


13

First make sure that processing plugin is activated. Go to plugins/install and manage plugins and look for processing. Make sure it is activated. It should look like this: You must have a Processing menu. Choose toolbox. In the toolbox, go to the bottom and choose advanced interface. I think you are trying to use SAGA reclassifying tool. I personally prefer ...


12

If you use the ArcToolbox Tool "Table to Table" you can add, rename, or delete output fields using the Field Map Parameter. With arcpy you can use the tool and build your own field map. That field map can use the aliasName property of the field object (have a look at the FieldMappings example 2. With ArcGIS 10.1 you are able to rename the field name in ...


11

Save your excel file as CSV file go to Add Vector Layer in QGIS and navigate to your CSV file and load it In the print composer, go to Add attribute table, as you can see below: Select the Source from Layer Feature from the window in the right,as shown below: You can change the font and formats based on your needs, and here is final output: UPDATE In ...


10

It is not possible to create a new Layout Element from scratch using ArcPy but since ArcGIS 10.1 you have been able to clone graphic and text elements. In the GraphicElement (arcpy.mapping) help there is code that shows you how to use cloning to: construct a graphic table based on data values from a table in the map document. If you are not keen on ...


10

This is a very simple implementation using Table to Table (Conversion). import arcpy ws = r'C:\temp' file = r'C:\temp\poly.shp' arcpy.TableToTable_conversion(file, ws, "outTable.dbf") For an even more efficient pure python approach, you can copy the shapefile's .dbf file using shutil: import shutil file = r'C:\temp\poly.dbf' outFile = r'C:\temp\...


10

You could use the Group Stats plugin from Plugins > Manage and Install Plugins. This calculates various data statistics for your attributes such as finding the minimum value in a group. I made an example of attributes from the data you gave: Then from the Group Stats interface, select and drag the toid field from the list into the Rows window; and repeat ...


10

It can be done with an expression. Bear in mind this only works if the original table is already ordered with N descending as feature IDs increase. Since the result field is empty, we need to get past NULL values ruining the calculation. We'll use a conditional statement to fill the first line with a different value than the rest, so subsequent calculations ...


9

This uses the Summary Statistics tool rather than Summarize from the Attribute Table window but I think achieves the correct values - you may just need to re-order and delete some fields once you are satisfied the correct values are coming through.


9

Here's code for the solution based on the accepted answer: #define the input table name tblIN = "LFA_WYKAZ" #define new feature class name fcOUT = "LFA" #define projection projection = "c:\Program Files\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems\National Grids\Europe\ETRS 1989 Poland CS92.prj" #create empty polygon ...


9

I use GDAL 2.0.2 that is "shipped" with FDGB support and without a third party a FGDB driver to investigate that stuff. The test environment is Debian Jessie 64-bit. In short, it seems, that the "layer" Zone9_2014_01_Vessel contains pure attribute data and the layer Zone9_2014_01_Broadcast contains position data. You can use a workaround within R via a ...


9

In QGIS 2.8, you can find it either in the Vector menu, or in the left panel:


9

Simply use Field Calculator and create new field with min(A,B,C) where A, B, C, are field names If you need to keep the field (min_ABC) updated, set the expression to default value of the field. It can be done in Attributes Form setting in Layer Properties. Scroll down in the right part of window fill the default value and check Apply default value on ...


8

Try creating a new IStandaloneTable, assign your table to IStandaloneTable.Table, cast the focus map to IStandaloneTableCollection, and add the standalonetable to it. Might need to call IMxDocument.UpdateContents too.


8

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 ...


8

You can use the Sort and Number plugin. It allows you to sort an attribute table by up to 3 fields, then it creates an additional field that contains the order of the sorted features. Disclaimer: I'm the author of the plugin.


8

It's sometimes confusing, but it's really a matter of perspective. See this diagram (from this topic) for a reference: This is an example of five relationships (and three different cardinalities). One-to-many: Parcels are related to the ParcelToOwner table in a one-to-many relationship; one parcel may have many owners (partial ownership). Many-to-one: The ...


8

You can add your .dbf table into ArcMap and then create an XY event layer which you will be able to export to a shapefile. Read more details here: Adding x,y coordinate data as a layer


8

Command-line dump straight into psql is the best bet pg_dump -h host1 -t yourtable database1 | psql -d database2 -h host2 The line in the middle is a pipe, it takes the output from the first command and provides it as input to the second.


7

If is OK to save the result permanently you can sort the shapefile with GDAL ogr2ogr -f "ESRI Shapefile" -dialect sqlite -sql "SELECT * FROM my_shapefile ORDER BY attr_1, attr_2, attr_3" sorted.shp my_shapefile.shp Took less that 3 minutes with a shapefile having one million polygons.


7

For data load purposes, reading a huge CSV file into memory is rather silly. It only really ever needs to read 1 line at time. I would suggest writing a Python script and use the csv module to read it line by line and insert rows into the table using an InsertCursor (or preferably an arcpy.da.InsertCursor as it is faster, but only available at 10.1). Edit: ...


7

Combining the script mentioned above by AkselO with model builder, I would go with the model below. Create a new field, use the field calculator to create a unique identifier (by combining fields 1, 2 and 3) then use the script to split that shapefile by the unique field value.


7

In geodatabases, tables cannot be stored in a feature dataset. They can only be stored at the geodatabase level. Feature datasets are limited to feature classes and other advanced dataset types like topology, etc. Check out the ArcGIS help regarding Feature Datasets: http://resources.arcgis.com/en/help/main/10.1/index.html#//002300000001000000


7

Try the delete field tool and make sure that table is not in use elsewhere. For example, if the table is in use by an ArcGIS for Server service, stopping the service, it may became possible to delete the field.


7

PostgresSQL/PostGIS is a relational database management system ( RDBMS) and the original order of the columns have no significance. If you want to change the order in which they appear, use SQL: select Field2, Field3, Field1 from table; select Field1, Field3, Field2 from table; And if you want to keep this ordered result as a table in the database, use SQL ...


7

No, you cannot keep the original names. The problem is that DBF files and therefore Shapefile attribute tables have a limit of 10 characters for the column names. When you join two layers, QGIS constructs new attribute names by combining layer and attribute names of the joined layer. To ensure unique column names, QGIS further adds a running number to the ...


7

There is another approach I found by chance. You can transform the cells of your attribute table into Multi-Line Text Edit widgets, that is, switch from a single line editor to a multi-line one. This is how you do it: Open QGIS and load a layer. Right click on the layer and open the Properties dialog. Go to Properties->Fields and in the row ...


7

The correct name for this function is TableToNumPyArray (arcpy.da) i.e. there should be a capital "T" on "to". Correct capitalization is very important to the Python programming language.


7

The reason for your issue is in how GDAL Shapefile driver http://www.gdal.org/drv_shapefile.html deletes features from shapefile The OGR shapefile driver supports rewriting existing shapes in a shapefile as well as deleting shapes. Deleted shapes are marked for deletion in the .dbf file, and then ignored by OGR. To actually remove them permanently (...


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