Tag Info

New answers tagged

0

You can use an attribute form the feature to determine if the feature should be visible. I haven't tested it, but i think this should work: $.each(pois.features, function (index, feature) { if ( feature.attributes.description == 'UV-foto' ) feature.style.display = 'none'; });


2

I'm told that in the upcoming QGIS 2.6 when joining multiple layers via the JOINS option (Layer Properties > Joins), editing the attributes of one layer will immediately update the attributes of the joining layers so basically in real-time. If this is the case then you could create a duplicate of the same layer, save it as another shapefile, edit its ...


1

It works with this demo using your code So, how do you call init() and how your HTML look?


0

Your longitude and latitude on your icon is reversed in comparison to your view.. Also you'll probably have to use ol.proj.transform(Longitude, Latitude fromProjection, toProjection) on the icon as well. (Not sure what your projection_lan and projection_lat is)


1

Please DO NOT use Set CRS for Layer if you want to reproject a vector layer to another CRS. This will corrupt your data, because it does not recalculate any coordinates. Use Rightclick Save As ... under a different file name and different CRS. You better set the layer back to the previous CRS, or delete it and reload a fresh copy.


1

Without more exact knowledge about your source route system and event overlays it is difficult to say exactly what is going on. It would appear that your route is not being created with a starting measure of 0, since negative measures should normally not be created by these tools unless those measures exist on the route. The Create Route tool can generate ...


1

This interaction does not support custom projections. In the code, the private ol.interaction.DragAndDrop.prototype.handleResult_ calls the code below: var readFeatures = this.tryReadFeatures_(format, result); This code itself return format.readFeatures(text) (where format is ol.format.GeoJSON). If custom projections were supported, it would be ...


1

OpenLayers has a GetCentroid function for getting the centre of a polygon if you don't want to bring it in from the database directly: http://dev.openlayers.org/apidocs/files/OpenLayers/Geometry-js.html#OpenLayers.Geometry.getCentroid From there you should just be able to treat the point as a regular point feature. See also this example: ...


1

If I understand your question, you want to be able to change a property on all or some of the features (on separate layers) on the map. From the ol.map object, you can get the layergroup property. This will give you access to all the layers on the map, you can then just do something like: var layers = map.get('layergroup').getLayersArray(); for (var i in ...


0

as @Andrew-OpenGeoCode mentions- arcpy would provide a programmatic solution. An alternative to a script might be the intersect tool. You should be able to intersect the points and polygons to create a new feature which contains attributes for both features. You could then create 3 new columns and use the field calculator to compare the attributes to check ...


0

Im using ArcGis 10.2," to Andrew" , in which layer i should write vba statement/phyton? Could you show me an example? Now im checking admin div by admin div with select by location, it`s a lot of work...i would like to automize this work. Before, i tried transform my second layer to raster and then i used zonal statistic tool. The result of this procedure ...


0

It sounds like you have two sets of data. A first set (points) appears to be points-of-interest (POIs) with geographic level information (e.g., 1st admin div, 2nd admin div, populated place, etc). The second set (polygon) are the outline shapes (area) of the administrative divisions. If so, I would do the following: A. Iterate through the set of points. B. ...


0

The basic trick is loop through the features and concatenate result to the innerHTML. var info = document.getElementById('info'); info.innerHTML = ''; // clears out the current content var feature = map.forEachFeatureAtPixel(pixel, function(feature, layer) { info.innerHTML += feature.getId() + ': ' + feature.get('name') + '<br/>'; });


0

Inappropiate place of Openlayers.StyleMap assignment, it should be declared in the layer creation.


1

You could create a GDALDataset with as many bands as you have raster bands, then copy the data from each of your bands into the corresponding band in the GDALDataset. Here's some example code in C++ (since that's where I'm most familiar with GDAL). //create the dataset const char *filename = "example.tif"; GDALDriver *pDriverTiff = ...


5

You're right Will, you have to save the features first before you can save it as a shapefile. When you toggle the editing icon to add your points, toggle it again. You should see a message come up: (Alternatively if you have the layer's attribute table loaded, you can save the features by clicking on the save icon). Now you should be able to load the ...


1

In the end I wrote the following script that solved my problem. The script converts raster pixels with a specified value to vector lines. For example the blue pixels (value = 0) are converted to vector lines. There is definitly room to improve the script, as you can see in the result image. The script can be found and edited here. Raster Image Raster ...


1

When interpolating points, I tend to personally use Heatmaps (download the Heatmap plugin from Plugins > Manage and Install plugins...). You can then find the option in Raster > Heatmap: I made a simple point layer in the form of a square and ran the Heatmap function. I then set the colouring filter in the Layer Properties: And I get this as a result: ...


3

QGIS documention actually gives examples (one includes temperature data) using Inverse Distance Weighted and another example using a TIN. be sure to look at "Common problems / things to be aware of" - per the linked page above: 1) Evaluate the sample data. Do this to get an idea on how data are distributed in the area, as this may provide hints on which ...


1

thanks my friend Chris, he's truly help me resolved the problem... and the anser will be like this.. http://jsfiddle.net/v18kuxgf/ polygonLayer.events.register('featureadded', null, function(event) { var feature = event.feature, geometry = feature.geometry; if (geometry.getArea() ...


4

You need to do this in a two-stage process using the Vector->Analysis Tools->Mean Coordinates tool in the second step. This tool will return the mean coordinates for sets of point within a layer if they have a unique ID field. So, if you have a polygon layer which defines your areas, do a spatial join (Vector->Data Management->Join attributes ...


1

MMQGIS plugin have your merge funcion... other merge funcion can be found in Processing/gdal Processing/saga but MMGIS works as you aspected



Top 50 recent answers are included