Hot answers tagged layers
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 ...
6
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 ...
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
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()
...
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 ...
4
"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 = ...
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
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
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],
...
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
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 ...
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
One way would be to host your image polygons as WMS using Geoserver, ArcGIS Server or something similar. Each image polygon representing a different feature.
Then use OpenLayers.Layer.WMS to add it as a layer in OpenLayers.
Then as the user clicks to hide them you provide the WMS layer with a filter which would only show the features/images you want by ID ...
3
A layer file can store information about how you want one or more layers to look. This includes symbology, labeling, display scales, definition queries, etc. If you add a layer directly from a geodatabse or SDE layer, you get the default symbology (generally speaking). In this respect, layer files are better/more useful.
3
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 ...
3
You don't need to save to layer file, just do this:
import arcpy, os, sys, traceback
arcpy.env.overwriteOutput = True
mxd = arcpy.mapping.MapDocument(r"C:\Layer_KML\MXD\Test.mxd")
try:
for i, lyr in enumerate(arcpy.mapping.ListLayers(mxd)):
outKML = "C:\\Layer_KML\\KML\\" + "Test" + str(i + 1) + ".kmz"
# These lines are where the ...
3
With an offset of around 200 metres, it looks like a missing data shift.
Your target SRS is exactly WGS84, that is +towgs84=0,0,0,0,0,0,0
If I create a raster grid with ED50 UTM 32 EPSG:23032, it is shifted 200m to the south and 80m to the west to the WGS84 UTM 32 grid.
The shift parameter of ED50 is +towgs84=-87,-98,-121,0,0,0,0
To see which of your ...
2
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 ...
2
@prasad is right you can open 9.3 lyr in 10.
if you want to save them to 10 lyr right click your layer and select Save As Layer File then select Layer files (*.lyr) from Save as type and now you can save it as 10 lyr .
The reverse operation is told here ArcGIS 9 doesn't recognize ArcGIS 10 .lyr files and solution:
If you right click on your layer ...
2
I have a tutorial you can follow at http://ian01.geog.psu.edu/geoserver_docs/data/naturalearth/index.html which should get you started. With out more information about what is actually going wrong (e.g. the log entries) it's hard to see what might be specifically wrong in your case.
2
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 ...
2
If I understand your question correctly:
You can do spatial queries with SelectLayerByLocation. You'll need to use temporary feature layers, but it's easy enough.
Sample code from PSU Master's Program
Once you have your spatial query, you can fiddle down your selection to just the attributes you're interested in with SelectLayerByAttributes using ...
2
This is how I'd do it in ArcMap for a simple desktop user, without any levels of versioning/validation
Create a new field on each layer, 'Year', and set to 2005, 2006, whatever for all items
Merge the layers. This will retain overlapping polygons
Work with them as one layer for splits, selected vertex editing, etc
Make sure that you work in a manner that ...
2
The following National Oceanographic Data Center (NODC) link from NOAA would be a good start.
GIS data in vector format (surface temperature data for 1981 - 2009) for the Arctic region can be found here.
2
Attached is a model that should get you going. Keep in mind the Clip tool in Analysis is designed to clip vector data, not raster data. If you need to clip a raster, alter the model and use Clip (Data Management) or Extract by Mask (Spatial Analyst). Best of luck!
2
Here's a workflow, where MyPolygons is your polygon layer, MyPoints is your points layer, and MyNeighbors is your layer of features that neighbor MyPolygons.
Set your selection method to "Create a new selection".
Select from MyPolygons that completely contain MyPoints. This will result in what you called "Polygon A".
Select from MyNeighbors that boundary ...
2
There were two issues I needed to fix in order to solve this. The first was related to using multiple OpenLayers styles, both at the layer level as well as the individual feature level. I removed the styling for each individual feature, so that only the following layer style was being implemented:
this.layerStyle = new OpenLayers.StyleMap({
'default': ...
2
The first data layer is, as you said, using Italy Zone 1 / West zone based on Monte Mario geographic coordinate reference system. The second data layer's +proj definition looks like UTM* / UTMRER aka TM Emilia-Romagna (ID = 5659) in the EPSG Geodetic Parameter Dataset. Although I'm on the subcommittee that maintains the Dataset, I was on leave when this ...
Only top voted, non community-wiki answers of a minimum length are eligible

