Tag Info

Hot answers tagged

23

Vector data can have properties stored at two levels. File level or Layer level. For feature class (a type of vector data), file level information is stored in a geodatabase. This consists of properties like feature class geometry, attribute table, assigned subtypes and domains, a coordinate system, etc:. All these file level properties make up the actual ...


18

My thoughts are: Export your shapefile to a file geodatabase feature class - I think its drawing performance will be better but am not sure by how much If you are using ArcGIS Desktop 10.0 or later move it into a Basemap Layer - this will improve drawing performance dramatically If you like the sound of pyramids for vector data, be sure to vote for this ...


13

The MultiQML plugin lets you apply one QGIS layer style to multiple layers at once. I think that's as close to what you are looking for as currently possible.


11

If I got you right, the answer is yes, QGIS supports dynamic layer names. You would need to write a Python macro to be ran every time the project is opened. This would be the workflow: Go to on QGIS->Project->Project Properties and replace openProject() with the following Python code: def openProject(): import re, qgis iface = ...


10

Direct tile access is not allowed by Google (and this is what ArcBruTile is doing). Usually this will get your IP address banned for awhile but they could also come after you for violating their TOS. fwiw, Arc2Earth will be adding support for this functionality in the next build. Instead of needing a Google Maps Premium license, you can purchase access at ...


10

which layer do you want, i dont understand? but getting all layer: map.layers getting all layer name: var mLayers = map.layers; for(var a = 0; a < mLayers.length; a++ ){ alert(mLayers[a].name) }; getting last added layer name: map.layers.getLast().name and beside this you can use all this method too: 1.map.getLayer() 2.map.getLayerIndex() ...


8

These terms specifically relate to the ESRI software and data schemas. A feature class is a set of common geographic features, for example roads, or parcels, or land use, as they are stored in a geodatabase or shapefile, or other storage format. Here is the help file on Feature Class Basics. A feature layer is the representation of a feature class after ...


8

The easiest solution is to select the road segment(s) on the map or in attribute table and copy-paste (Ctrl-C - Ctrl-V) them into a text editor. You'll get the WKT string of the geometry with all its node coordinates. If you want to export the whole layer, an easy solution is to use "Save as ..." to CSV and specify OGR creation option "GEOMETRY=AS_XYZ" or ...


8

Do you want to actually delete the layer from the geodatabase or remove it from the mxd? If you just want to remove the layer from your mxd, replace arcpy.Delete_management("CADAnnotation") with arcpy.mapping.RemoveLayer(df, lyr) If you want to delete the data source you can do this. for item in mxds: print (item) mxd = ...


8

There is no universal vector format in GIS. However, some formats are proprietary and other are openly specified (like the shapefile) so that they can be read and/or written by other softwares (if they decide to implement). For data sharing, the best solution to date is to use shapefile, which is now the most widespread format. Shapefile is however an old ...


7

Try... # substitute 'self' with 'qgis.utils.iface' when run from Python console # 'self.iface = iface' would usually precede this command in your class layers = self.iface.legendInterface().layers() for layer in layers: layerType = layer.type() if layerType == QgsMapLayer.VectorLayer: # do some stuff here Culled from consolidatethread.py ...


7

How about this: OpenLayers + any base map you want (or blank) & your data layers & GOOGLE MAPS layer with Custom Styles [search here on SE] as a data layer, not basemap => google maps custom styles created here: http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html and here's one style that seems to work ok: Google ...


7

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.


7

You can do this by using Layer Groups. In the Admin interface, Under the 'Data' section on the left click on 'Layer Groups'. Then, in the usual GeoServer way, create a new layer group (by default you may already have a couple of examples) and then follow the intuitive interface to add layers to the group. Once you have your Layer Group created, go back ...


7

A SearchCursor in arcpy is the most direct route for accomplishing this: import arcpy fc = "c:/data/base.gdb/roads" field = "StreetName" cursor = arcpy.SearchCursor(fc) row = cursor.next() while row: print(row.getValue(field)) row = cursor.next() Note that you can use the where_clause property to perform your selection.


6

Perhaps the features were converted to graphics at some point. In that case, they might appear exactly the same as the original feature class but would not turn off with the feature class, since they are graphics. This is just a guess but worth a look.


6

There are also two other ways: layers = self.iface.mapCanvas().layers() will give you a list of layers or layer = QgsMapLayerRegistry.instance().mapLayers() for name, layer in layers.iteritems(): print name, layer.type()


6

Yes. ArcBruTile - Tile Services in ArcGIS Desktop ArcBruTile display tiles from OpenStreetMap, Bing, Google, SpatialCloud and TMS/WMS-C Services in ArcGIS Desktop. Update: looks like references to Google have been removed from the ArcBruTile site, likely because, as commenters point out, what they're doing violates the Google Maps ToS.


6

"Layer" is an just an attribute of the feature. But you can use OGR SQL and attribute filters: import ogr driver = ogr.GetDriverByName('DXF') datasource = driver.Open('test1.dxf', 0) layers=datasource.ExecuteSQL( "SELECT DISTINCT Layer FROM entities" ) layer=datasource.GetLayerByIndex(0) for i in range(0, layers.GetFeatureCount()): layerName = ...


6

See my LIVE DEMO. Here is working code: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Title</title> <script src="http://openlayers.org/dev/OpenLayers.js"></script> <script type="text/javascript"> function init(){ options = { div: "map", zoom: 2, center: [0, 0], ...


6

To georeference a vector layer, try the qgsAffine plugin. More info here: Where to find qgsaffine in the menu?


6

You need to create the MapDocument and DataFrame objects outside of the loop that runs through your layers. Otherwise you are starting with the original map each time. so i will correct in this code: mxd = arcpy.mapping.MapDocument("CURRENT") dataFrame = arcpy.mapping.ListDataFrames(mxd, "*")[0] for layer in shp_List: outlayer = layer + "_lyr" ...


6

According to the docs here, you can pass the position in as an option when creating the layer control. Available positions are outlined here overlayPane = { "Endpoints" : endpointMarkerLayer, "Links" : linkLineLayer, }; // Add a layer control element to the map layerControl = L.control.layers(null, overlayPane, {position: 'topleft'}); ...


6

The styles are normally saved in public.layer_styles. Being in the public schema it should be accessible to every user. If not, make sure it becomes using: GRANT SELECT ON TABLE public.layer_styles TO users; -- "users" is a group with all your #normal users


6

This is part of the raison d'ĂȘtre of the OGC. Regarding vector data you may wish to look into these standards: Geographic Markup Language (GML) - an XML grammar for the storage of geographical features. It serves as an open interchange format for the transaction of geo-spatial data between different software. Web Feature Service (WFS) - provides an ...


6

It is not as easy as it used to be, but there are some helper methods for the collection. That should allow you to do similar things as ThomasG77 described above. Assuming you have a map named map, with 4 layers i.e. [base_layer, coastlines, heatmap, markers] Then you can get the collection via map.getLayers(), and the array of layers via ...


6

AndreJ and SS_Rebellious provide valid answers. However, there is another option which I find easier than creating the group and dragging layers in to it. You can select all the layers you want in your group (select multiple layers by holding down shift which selects everything between your first selected layer and the second one you click on, or hold ...


6

Assuming you use an ol.layer.Vector with an ol.source.GeoJSON you can use something like this: var vectorSource = new ol.source.GeoJSON({ projection : 'EPSG:3857', url: 'http://examples.org/fearures.json' }); var vectorLayer = new ol.layer.Vector({ source: vectorSource }); map.addLayer(vectorLayer); // show loading icon // ... var listenerKey = ...


6

GDAL suppports that so it should be possible for QGIS as well. However, I could not make it work with my QGIS 2.6.0. Perhaps there is just some missing step and somebody can point what it is. Test with GDAL and VSICURL gdalinfo /vsicurl/http://dl.maptools.org/dl/geotiff/samples/made_up/bogota.tif Driver: GTiff/GeoTIFF Files: ...


5

I am under the impression that the data source type matters more than the number of datasets: features stored in a file geodatabase will render quicker than shapefiles because of spatial indexing. EDIT: In a direct answer to your question I don't believe the number of layers matters as much in the desktop environment. I've seen articles about ArcGIS Server ...



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