Tag Info

Hot answers tagged

5

The answer to this kind of issue should be to rasterize the information on to tiles on the server and simply serve the user tiles of the routes that they want to see. There are a plethora of options for doing this, but I think this train of thought is the best solution. Render the desired view on the server and only pass the tiles to the user, wash and ...


3

I wanted to point out that you can rewrite the mean function, mean, which you can write yourself to do anything you want, including ditch the 0 values and calculate the mean. For example, if you want to ignore 0s: meanIgnoringZeroes <- function(x) { mean(x[x!=0],na.rm=T) } Then you can pass the function, meanIgnoringZeroes to overlay: mean <- ...


3

To do this I would use two tools: Intersect (Analysis): Computes a geometric intersection of the input features. Features or portions of features which overlap in all layers and/or feature classes will be written to the output feature class. then Summary Statistics (Analysis) Calculates summary statistics for field(s) in a table.


3

Take a look at the raster function in the raster package. It will let you create a raster with a specified extent, number of rows/columns and resolution. Here I will use characteristics of your data summary to create a 100x100 raster within the specified extent. I am passing an extent object to define the x and y limits. You can also use the specific ...


2

sp provides a shorter form to select features based on spatial intersection, following the OP example: pts[ply,] as of: points(pts[ply,], col = 'red') Behind the scenes this is short for pts[!is.na(over(pts, geometry(ply))),] The thing to note is that there is a geometry method that drops attributes: over changes behaviour if its second argument has ...


2

This is an example of what you can do with rasterVis and sp packages. You will have to adapt to your own use. library(rasterVis) library(sp) # Download States boundaries (might take time) out <- getData('GADM', country='United States', level=1) # Extract California state California <- out[out$NAME_1 %in% 'California',] # Plot raster and California: ...


2

Here is one approach that I think would work for you. 1.) Add a unique field to each of the input polygon layers. 2.) Populate each field with an identifier you can easily associate to that species. 3.) Iteratively run the Union tool for each layer union-ing to a master polygon layer. Now all of these unique fields will be included in your output polygon ...


2

Assuming you are using ArcMap: Make sure that every square is a polygon feature with a unique ID number. Clip the Grid using the Polygons to create a new shapefile. Perform a Union of the new clipped-grid.shp and the original Polygons. The resulting union.shp should tell you the ID of the original square that was clipped, and the name of the polygon that ...


2

Here's an idea, based on using Feature To Line. With ESRI, the tool is only available at the ArcInfo/Advanced license level, but with QGIS I'm sure you can find an version of it. So you could, as I often do, supplement your ArcView/Basic license workflow with free QGIS tools. Run Feature To Line to convert the lake features to lines (make sure you're ...


2

This is imo a great question. If you would be interested in just finding the intersection between two polygons, you'd use the Intersect GP tool and then adding the area of the resultant features back to the wetlands. But you are interested not in intersection yet essentially in the edge, or a segment which polygons share. There is a very nice GP tool in ...


2

You cannot have R objects called "2000", so presumably these are fake names? Your example actually should work, so you may want to double check why you think that the results are incorrect. @aaryno's approach should work. I would do this: library(raster) s <- stack(r2000, r2001, r2002, r2003, r2004, r2005) x <- reclassify(s, cbind(0, NA)) r <- ...


2

There are two possible approaches to the problem, using Intersect or Union. First it would be helpful to understand what the Overlay options you mention actually do. Intersect only returns areas of overlap, Union returns all areas from both layers. It is further worth noting that in ArcGIS you are limited to two input layers per operation unless you have an ...


2

You can: Create your own solution with Leaflet http://leafletjs.com/ and one of the plugins from a list below http://leafletjs.com/plugins.html#overlay-data Use http://umap.openstreetmap.fr/ with external data overlay. Check layers. It's not as easy as paste a link into google map search, but much more power-full. Yuo could upload your data or use a link ...


2

1) The easiest solution is to use the processing module in the QGIS Python console: import processing processing.runalg("qgis:joinattributesbylocation","BKMapPLUTO.shp","DCP_nyc_freshzoning.shp","['intersects']",0,"sum,mean,min,max,median",0,'result.shp') 2) Without a GIS, you can use Fiona (read and write shapefiles as Python dictionaries) and Shapely ...


1

If i got you, your question itself is answering the question. You used A∩B i.e. Intersection symbols so use intersection analysis to separate out common areas, for A∩B run intersection between A and B, for A∩B∩C run intersection between A, B and C- mind intersection operation input can be multiple.Documentation is at here.


1

A simple "ifelse" statement should suffice in evaluating a condition. Here we create two random vectors of [1,2] and apply an ifelse to evaluate the condition of if x = 2 and y = 1 THEN change (1) ELSE no change (0). ( x <- round(runif(10, 1, 2)) ) ( y <- round(runif(10, 1, 2)) ) ifelse( x == 2 & y == 1, 1, 0) Since this is just an ...


1

Somehow, you have to create an offset between the markers to the user be able to click on each. My suggestion is to listen pointermove event and show the markers separately. I was facing with this same issue and here is my solution. UPDATE So, based on comments. My idea is: create an array attribute of the features id at the same location. On click check ...


1

Try: var html = feature.get('address'); html += feature.get('name'); html += feature.get('whatever'); content.innerHTML = html; popup.setPosition(coord); UPDATE: If you want some markup in the popup: var html = '<h3>Here is ' + feature.get('name') + '</h3>'; html += 'And if you need some <button id="" onclick="">click</button>'; ...


1

So there it is, your fiddle forked and merged. You get rid of jquery popover and implement Openlayers popup: content.innerHTML = feature.get('name'); popup.setPosition(coord);


1

That depends on the values you are attempting to calculate, and the relationship between the two layers boundaries (how coincident they are). Since it sounds like they're numeric values, a spatial join is probably not the way to go. Also note that the right-click join method doesn't give you full control over a spatial join as the GP tool does. I'm not ...


1

Thanks to everyone for all of the help! I was able to create an equation in the Raster Calculator (using the Con expression) that stacks my layers and keeps only the visible pixel values. Here is the two-part method that I used: Ran first calculation to stack middle layer (R2) on top of bottom layer (R3) Con("R2" == 2,"R2","R3") Ran second ...


1

You could try mosaicing: Add every of your rasters to mosaic (top layers should be first). Set Mosaic Operator to First. Set Nodata value. Save mosaic as tif file. UPDATE: If you have changed your raster's symbology type to "classified" and want to overlay this images, then you can use Reclassify tool before mosaicing.


1

As Felix is unwilling to answer this I will have a go. The tool to intersect two (integer) rasters is Combine which will merge the attributes of up to 20 rasters. It is unclear from the tool help what happens to raster attributes other than value, should they be built, after running this tool but from the graphic it appears only the value will be copied ...


1

this is pretty easy! You can use the createLayer function of CartoDB.js two times and add those layers to your map object. Documentation here: http://docs.cartodb.com/cartodb-platform/cartodb-js.html#cartodbcreatelayermap-layersource--options--callback Sample code here (I nested the creation of both layers, but it's not needed): <div ...


1

Because of the way the BoM appears to produce those images, the "content" will always be in the same locations in geographic space, and in the same location in pixel space. So you should be able to use a Leaflet JS image overlay, specifying whatever turns out to be the equivalent of the outer bounds of the source PNG for the imageBounds argument. An ...


1

You can open Esri file geodatabase in QGIS. I am not real familiar with how to run the analysis in QGIS, but I am pretty sure it can be done.


1

Since the popup content is dynamic, you need a map.on listener for the popupopen event. This will bind the overlay to the image in the popup: JSFIDDLE $(document).ready(function () { $("img[rel]").overlay(); $('#test1').fadeOut(); var map = L.map('map').setView([-41.2858, 174.78682], 14); mapLink = '<a ...


1

My quick testing, using ArcGIS 10.2.2 for Desktop on Windows 7 SP1, indicates that Intersect is faster than Spatial Join. This test, run from IDLE: import arcpy,time if not arcpy.Exists(r"C:\temp\test.gdb"): arcpy.CreateFileGDB_management(r"C:\temp","test.gdb") if arcpy.Exists(r"C:\temp\test.gdb\fnPoly100"): ...


1

Intersect, or Union as Aaron mentions, are Overlay tools that should get you a set of polygons that have attributes of both. Identity is also an option if you have an Advanced license, and is probably the most suitable for your end goal. Basically you want to cut up land use polygons if they cross a catchment boundary and then assign the catchment id to the ...


1

Just to be clear, the 'old' raster(s) is/are NOT in a Mosaic dataset currently, and the old raster is in one large (seamless) raster. The 'new' rasters are tile-based and have already been loaded into a Mosaic dataset. Here is my recommended solution: Create an 'old' Mosaic dataset from the 'old' seamless raster using the tile boundaries from the new ...



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