43

You can use rgdal to access feature classes in Esri file geodatabases. require(rgdal) # The input file geodatabase fgdb <- "C:/path/to/your/filegeodatabase.gdb" # List all feature classes in a file geodatabase subset(ogrDrivers(), grepl("GDB", name)) fc_list <- ogrListLayers(fgdb) print(fc_list) # Read the feature class fc <- readOGR(dsn=fgdb,...


32

You just gotta use the LIKE operator. For example, "TITLE" LIKE '%MINERAL CLAIM%' The % symbol acts like a wildcard. LIKE is case-sensitive, whereas ILIKE is not.


30

This works without needing to remove the layer and recreate a new one as described above: geojson_layer.eachLayer(function (layer) { if(layer.feature.properties.NAME == 'feature 1') { layer.setStyle({fillColor :'blue'}) } }); It seems to be quite a bit more efficient than removing and recreating the geoJson layer. From the docs, a GeoJSON ...


20

I have written down a small code to style specific geojson feature using leaflet. you can try it on JSFiddle (Original, non-functional), Functional JSFiddle 2018-02-17, or use the following code test locally. For this example i am using us-states.json files but it can be used for any geojson file. I hope it will help. Here is the code: <!DOCTYPE html&...


19

The line where you create and bind your popup should have been included in the onEachFeature option of your L.geoJSON factory. var layerGroup = L.geoJSON(data, { onEachFeature: function (feature, layer) { layer.bindPopup('<h1>'+feature.properties.f1+'</h1><p>name: '+feature.properties.f2+'</p>'); } }).addTo(map); Demo: http:/...


18

I know this is old but I was looking for the same as I don't have ArcInfo for the FeatureVerticesToPoints tools. After using Search cursor solution above I went forward to simplify the code and found that using NumPy Arrays in the Data Access Module a simple and very quick script could be produced. I'm using this as a script tool. Note: The key is the ...


18

Answering your two questions: You can change your feature values from the layer object, no need to access the dataProvider(). Yes, you can use the iterator in a for loop. Check the code below: layers = QgsMapLayerRegistry.instance().mapLayersByName('my_line') layer = layers[0] it = layer.getFeatures() layer.startEditing() for feat in it: layer....


16

The Feature Class to Feature Class tool is a Conversion tool. The idea is to convert a feature class in one format (e.g. shapefile) to another (e.g. geodatabase). It also allows the user to control the Field Map - i.e. which fields will be copied over. The Copy Features tool simply creates an exact copy of the input features. Note - this tool can also be ...


16

Here you find the map including the legend. The legend is in German, but I am German, so I tried to translate it as precise as possible. I think (and please @Giancarlo correct me, if you disagree): 1 is "Reichsstra├če, ausgebaut". That means a well-developed street. 2 is propably a sort of drainage system or stream (thank you @AndreJ). It is not named in ...


15

Use the select tool (either select by rectangle or select by polygon) to select the features you want to delete. Then you can delete all of them by hitting the delete button on the tool bar.


14

Sure it is. Depending on what you need: zoom to whole layer right click on layer in Layers list and first item is "Zoom to layer" zoom to selected feature(s) select feature in map and click on icon "Zoom to selection" in the main toolbar or right click on layer in layers list and choose "Open Attribute Table" (there is also icon in the main toolbar/...


14

The drawn feature are added to the layer named vector. See draw interactions constructors. // Get the array of features var features = vector.getSource().getFeatures(); // Go through this array and get coordinates of their geometry. features.forEach(function(feature) { console.log(feature.getGeometry().getCoordinates()); });


13

OpenLayers 2: You can unselect features with unselect and unselectAll methods of SelectFeature control: selectControl = new OpenLayers.Control.SelectFeature(vectorLayer); ... map.addControls([selectControl]); selectControl.activate(); // unselect any specific feature... selectControl.unselect(vectorLayer.features[0]); // ...or all features selectControl....


12

Use Edit > Select > Select Features by Polygon. Draw a polygon to surround the features you want deleted. (Left click for each point then right click to close your polygon.) Click Layer > Toggle Editing. Click Delete Selected from the Editing toolbar. . Note: This process deletes all the selected features. I'm not sure how to select and ...


12

Notwithstanding whether there are non-geographical features, I think of a feature as being something with geometry (x,y etc) and attributes i.e. a feature is more than geometry. Then when a feature (as part of a feature class) is displayed on a map it also has symbology (points drawn in red dots of 10pts, etc) and can be referred to as part of a layer. In ...


12

Officially, .shp and .dbf files are limited to 2GB. Using GDAL Shapefile driver this can be exceeded, but as stated on this site, this is not recommended due to compatibility issues (See point #Size Issues). As @Gabriel C. already mentioned, geopackage is a good alternative. You could also use a SpatialLite or SQLite database.


10

I recommend using the Select_analysis tool which will accept a where clause. arcpy.Select_analysis("C:/CGDP.shp", "C:/New.shp", ' "GDP_TOP10" = 1 ')


10

As already posted in this answer, this now also works very nicely with sf: require(sf) fc <- sf::st_read("C:/path/to/your/filegeodatabase.gdb", layer = "some_featureclass") But writing into a fgdb ist not implemented (yet?), you'd have to have a ArcGIS / ArcMap License as well as the R library arcgisbinding (see https://github.com/R-ArcGIS/r-bridge) ...


10

QGIS 3.2 Thanks to new Union tool in QGIS 3.2, this has become quite easy!!! What we do, is just use Union and Aggregate tools. (1) Union (Processing Toolbox | Vetor Overlay | Union) (2) We obtain Union layer (now broken into 12 parts...sorry mostly hidden...) (3) Aggregate (Processing Toolbox | Vector geometry | Aggregate) Note: Group by expression ...


9

The most basic difference is the level at which each of the functions are working. The Feature Class to Feature Class tool is working at the Layer level, meaning that regardless of the features selected, it treats them as a whole. A new feature class is going to be created. This means that you have control over the structure of the new featureclass, ...


9

Features in the most general sense are analagous to records in computer science: In computer science, records (also called tuples, structs, or compound data) are among the simplest data structures. A record is a value that contains other values, typically in fixed number and sequence and typically indexed by names. The elements of records are ...


9

You want to use the Append_Management tool. If you know the attribute tables will match up (including data type), use schema_type NO_TEST anyway (even though the documentation would suggest TEST). If the attribute tables do not match up you will have to deal with field mappings, which can be a huge pain in arcpy. (If you are using NO_TEST and a subtype, ...


9

To draw a layer with a categorized renderer you first should create appropriate categories. A category needs value, symbol, and label. If you know the values at design time you may define these 3 parameters for each category. For an example see QGIS Python Programming Cookbook. After defining categories you create a QgsCategorizedSymbolRendererV2() with ...


9

You can add a geometry to an existing feature which has no geometry: Put the layer in edit mode Select the feature from the attribute table Use that "add part" tool from the "Advanced Digitizing Toolbar": Draw the geometry you want to attach to the feature


9

You may try a right click on your layer and then chose to Show Feature Count (green on figure):


9

One approach is to change the features' style. In order to hide a feature, you can set its style to an empty style object: myFeatureIWantToHide.setStyle(new ol.style.Style({})); To show this feature again, simply set the feature's style to null: myFeatureIWantToHide.setStyle(null);


8

Yes, there is. Go to Options in the Settings menu and open the tab Map tools. Then you can set the Identify Mode. You probably want the Top down, stop at first.


8

Magnus, What are you intending to do with the OSM data once in a postgis table ? Depending on what you intend on doing with the data (Are you looking to do spatial analysis of highways ? Make a map of a complete city including restaurants and other POIs (points of interests) ? ), your osm2pgsql style files will be a little different. First, osm2pgsql's ...


8

You kind of have catch-22 or at minimum not detailed enough requirements. Specifically - do you want to remove the 1st feature as SOON as the user starts drawing a new feature? Or when they're done? Because you could end up blowing out your 1st feature and user cancels out of drawing 2nd feature and then you have nothing. You have 2 additional things ...


8

The select features of visible layer has been integrated into QGIS and its toolbar. Just select a layer in the table of contents and click on this little icon: If this isn't the function you wanted than you might have to wait(or pay him) for the original plugins author to adapt the plugin for QGIS 2.0.


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