Tag Info

New answers tagged

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


0

I've not got a straight answer for you but some thoughts - apologies if they're too obvious. When you right click on the layer name and select the "Show Feature Count" box does it return the number you expected? When you click on the layer in the Add PostGIS Layer screen, does the geometry column, data type, SRID projection and spatial type (Point, ...


1

You can do this using the "Tabulate Area" Tool (Spatial Analyst Toolbox). You won't need to convert the data because you can use the polygon layer as the "zone" layer (sometimes called the "class" layer) and the raster land cover as the "value" layer. The class/value values will likely be numeric (which may explain why you didn't see any land use types after ...


3

I am not sure if I fully understand the question you are asking, but if you are looking to put the number that is stored in the ID column in the attribute field over the point location on a map you can do two very simple things, label by attribute and make the point 'invisible'. 1) Label based on the attribute column. 2) Change the point symbology to be a ...


2

Using QGIS, Vector -> Reserach Tools -> Polygon from layer extent gives you a polygon that you can use for clipping the other vector data to. There is a GDAL module called gdaltindex that does the same without using other software: gdaltindex N51E007.shp N51E007.hgt creates a bounding polygon for a sample SRTM data file. For a python solution to ...


0

You can use the spatial adjustment method in ARC GIS. Once you add into arc Map, you need to make it editable than after spatial adjustment option is enable.And you also import your control point Spatial Adjustment->Link->Open Link....... For more details please refer Spatial Adjustment section of ESRI help


0

A FOSS solution is available. GRASS has a repair geometry tool. Dirk is correct though if you have Arc then repair geometry. v.clean is the GRASS approach.


0

If you have the GDAL plugin installed, you can use the Clip Raster by Mask Layer tool to clip your DEM to a vector polygon: If this is the tool that you are trying to use already, then is there some kind of error that is being reported when you run the tool? Knowing what that is may help to diagnose the problem.


0

This happens when you "hide" the Land layer. Mapbox uses a white layer for land if it is "hidden." The solution is to "show" the Land layer. Then choose the color you looked for originally in the map to style the Land layer. The final map will look as desired.


1

So that was simple. Searching for mapbox.js, I saw that a newer version is out. Using the latest css/.js: <script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.2/mapbox.js'></script> <link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.2/mapbox.css' rel='stylesheet' /> Shows a retina projection.


0

The NNJoin plugin is an alternative for small datasets.


0

The GRASS v.distance function in the GRASS plugin should do the job. The NNJoin plugin should work for small datasets, and less cumbersome to use.



Top 50 recent answers are included