Tag Info

Hot answers tagged

19

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


15

Two 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 10.0 or 10.1 move it into a Basemap Layer - this will improve drawing performance dramatically PS If you like the sound of pyramids for vector data, be sure to vote for this ...


8

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


7

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


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

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

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


6

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


5

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


5

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


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


5

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


5

The Openstreetmap plugin does what you want. Unfortunately, OSM hit a 64-bit-numbering limit, which forced all software using node numbers to be rewritten. The improved Openstreetmap plugin will be available with QGIS 2.0, which will be out within the next few months. Until then, you can look out for Geofabrik shapefile extracts. They include not all ...


5

Any file included in the Install\ directory of your add-in project will be carried along in the Python add-in when you run makeaddin.py. You can include layer files or anything else really. You'll find the absolute path to them on disk via path_to_layer = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'mylayer.lyr') in your whatever_addin.py to ...


4

You can open layers contained in a project into the current QGIS session by using the Import Layers to Project plugin. This will let you choose which layers you would like to load into your current QGIS session. You could also take a look at the Embed Layers and Groups functionality. This allows you to open layers from a project. It stops you from ...


4

what it means as conceptual, you can check out GIS Dictionary from ESRI, here. Feature Class In ArcGIS, a collection of geographic features with the same geometry type (such as point, line, or polygon), the same attributes, and the same spatial reference. Feature classes can be stored in geodatabases, shapefiles, coverages, or other data formats. ...


4

Woohoo! Figured it out. This thread had the solution to change the CSS rather than the JS. .olImageLoadError { /* when OL encounters a 404, don't display the pink image */ display: none !important; } This help article was helpful too, but I have not idea how to tell TileMill/MapBox to generate blank tiles rather than missing tiles. I'll get there ...


4

Achieving this will involve both the client library you are using as well as GeoServer. On the GeoServer part, you can retrieve the names of the ATMs using gs:Unique WPS process. To use the WPS process, you must have installed the WPS plugin. Refer to this for details on GeoServer WPS plugin. You can create the gs:Unique query to use in your request using ...


4

Given the fact that you have some points of control, you should be able to use an Affine transformation to shift your vector data. Have a look at this recipe. The process is a two part process: Use your control points to define the coefficients of your affine function required take the coefficients and apply them to the ST_Affine() in postgis. If you put ...


4

You should be able to use the GetCapabilities method of the WMS server to list all the data and operations available to you. Something like the following (though I've not got access to test what this returns) should hopefully be what you're looking for: ...


4

When I load a bunch of layers into QGIS from PostGIS, they seem to load in reverse alphabetical order. This appears to be a bug (even in master branch) when using the add layer action Add PostGIS Layers... and should be reported on the QGIS bug tracker. However, if you use the new browser to load PostGIS layers, they will not be reversed. The new DB ...


4

Red points are the default point style that GeoServer will use when you don't ask for anything else. So you need to tell GeoServer what you would like it to draw. It sounds as though you would like it to be a label in which case you'll need to create an SLD file with a TextSymbolizer in it. See the SLD cookbook for an example.


4

This is fairly simple and you can do it all natively in QGIS (i.e.without exporting to PostGIS). Convert you polygon to lines (Vector->Geometry Tools->Polygon to lines) Convert the lines back into polygons (Vector->Geometry Tools->lines to polygons) Difference your new polygons against the original polygons Step 2 is the key here. Step two creates a set ...


4

If you have a contour lines layer with associated elevation attribute, you can query the contour lines in reference to the elevation values. More in detail, you could define a rule-based style in Vector properties --> Style in order to query the elevation values you are interested in. For instance, suppose you have contour lines with equidistance 5 m and ...


4

Your problem is that you have added your data using Postgres data type Point, http://www.postgresql.org/docs/9.3/static/datatype-geometric.html Rather than the PostGIS geometry, or Geography type http://postgis.net/docs/reference.html#PostGIS_Types GeoServer has a PostGIS Data Store connector, rather than a Postgres Data Store connector. Good Luck


4

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


3

Oh, you're doing this in a geoprocessing tool. GP tools try to protect the TOC from manipulation (such as suppressing the outputs of tools called within tools from going to the TOC), so you're going to need to tell it explicitly that you mean to keep this layer around. "But I haven't added a layer!" -- it goes by name, not by reference, so as far as it's ...


3

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()


3

In simple terms ... I try to think of a feature class being a spatial dataset, i.e. not much more than x,y coords and attributes on disk, while a layer applies symbology (and many other lesser known properties) to a spatial dataset. A layer does not store data, just symbology and a link to where the data is located on a disk somewhere. Feature classes ...


3

See if this helps with the Illustrator part of your question: Losing large portions of elevation contours from QGIS to PDF Short answer on QGIS layers to PDF layers support, not yet. My guess would be some form of support might show up by way of the GDAL/OGR providers. While the version 2 GDAL driver and OGR driver have model-tree layer support for writing ...



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