Hot answers tagged

5

Step 1 Make bit rasters for each of the unique classes. This can be a 1-band rasters for each class, or a single raster with a band for each class (e.g. GeoTIFF). If using GTiff, you can use the creation option NBITS=1 to conserve space. You may also want to consider twobit rasters to store three-valued logic where the third (e.g. 2) is NODATA, which would ...


4

I played with assign(), ls(), and mget() to accomplish something that I believe will improve your workflow. First I use ls() to get a list of all environment variables that start with "p": names_poly <- ls(pattern='^p.') I used combn() to find all the unique combinations of polygons combos <- combn(names_poly,2) I looped over combos using get() ...


4

Such a slight systematic shift is usually due to a lack of datum transformation before reprojecting the data. You should test the different transformation and your data will overlap correctly. I can't tell which one is best for you based on the information provided, but you can test it relatively fast. EDIT: if this doesn't work, you have two solutions: ...


3

The shapefiles you linked to should be resaved using the Save As... option and with another CRS such as: EPSG: 2157, IRENEET95 / Irish Transverse Mercator I tested this and resaved the shapefiles using "NEW_" as a prefix. I then used the Join attributes by location tool: The output contains the attributes of both shapefiles with no NULL values (red box ...


3

I got the tiles to overlay correctly. The problem was in the re-projection done by both ArcMap and QGIS. When I was checking the reprojected shapefiles in ArcMap and QGIS, they were overlaying correctly and had the correct SRIDs. So I imported the shapefiles in WGS84 in PostgreSQL using the SRID4326 with shp2pgsql then used ST_Transfrom to reproject the ...


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


3

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


3

Here you were thoroughly answered on how to add your basemap (first map) in QGIS What you need to do next is called georeferencing. Go to plugins and make sure that Georeferencer GDAL is on menu Raster\Georeferencer add your second map add at least 6 points from your second map getting coordinates for each from your first map (also feel free to add more ...


3

Zonal Statistics as Table (Spatial Analyst) should work for you. In your case, the range will be represented by the min/max values within the table.


3

I am not aware of any settings that would allow you to select only the top polygons because when you click on the small polygon, you also click on the underlying polygon. Workarounds: Copy top polygons (if there is a way to differentiate them either by attribute or by size) into a new layer and then make your "large polygons" layers non-selectable. Work ...


2

Two ways: use select by location or intersect. Good tutorials on ESRI's site in the hyperlinks, so I won't give instructions here.


2

Perhaps you need to first look at how ifelse works. I get the same results when I use it "stand-alone" and within a call to raster::overlay. a <- rep(2, 5) b <- rep(1, 5) d <- c(2, NA, 2, NA, 2) library(raster) r <- raster(nrow=1, ncol=5) A <- setValues(r, a) B <- setValues(r, b) D <- setValues(r, d) s <- stack(A,B,D) ifelse(a==2 &...


2

The issue is that the two geometries don't share common nodes. For instance, A has vertices mid-way that don't exist in B. While they visually overlap, there are tiny round-off errors from the interpolation used in the algorithm to determine differences, and you see unexpected results. To avoid the round-off errors with overlay operators available with GEOS ...


2

There are several ways you can do this, but the most appropriate for you, in my opinion, is to do classification on your data, Image classification techniques group pixels to represent different features based on different DN Values. You should be able to classify your data if the features show a consistent difference. There are three main image ...


2

You should be able to use the "KML to layer" tool in ArcGIS for Desktop. As long as there is meta data associated with your image this tool will convert the images from KML and then they should plot over your basemap.


2

To put things clear, I assume that you want to compute the area which responds to the following conditions: located inside your DEM altitude interval located inside your vector boundaries located where your second raster (let's call it raster2) has values other than "nodata" (this is the unclear part of your post, feel free to correct me if I ...


2

Simple. Use the PointOnAreaOverlayer transformer. In the parameters dialog set a list name. The polygon features will emerge with a list of which point features fell inside, including their attributes. Then use a ListSummer transformer to add up the attribute X in that list. I put an example workspace (template) on Dropbox at: https://www.dropbox.com/s/...


2

To do this I would use the Union tool to calculate the overlap relationships between polygons. I would then use arcpy.da.UpdateCursor to iterate through each polygon and add up the ranks/weights of any polygons that overlap in that area.


1

I think you should have a look at ESRI's new ArcGIS Earth. It is also a free application, and is in many ways comparable to Google Earth, albeit the display of some of the imagery not as sharp and detailed as in Google Earth. However, the great thing about ArcGIS Earth is that you can very easily add, and overlay, any WM(T)S service on top of the globe, ...


1

1) The OSM Layer (that is, the one named osm) is added to the map, but because you have added the Mapquest layer (the one named openstreetmap) as well, the osm layer is hidden beneath it. And because you haven't added osm as one of the basemaps in your layer control, you have no way to turn off the other layers and reveal it. 2) The precipitation layer ...


1

Before you do, Make a backup of your layer in case if it becomes corrupt. You should be able to do the following: If you are doing a few then do this: Start Editing. Click on the Attributes Use the "Edit Tool " Drag over a polygon. On the Attributes, See if there are two overlaps. If you see two overlaps, delete the ones you wanted. If you are doing the ...


1

If you use leaflet and you don't have an error, you can add a ControLayer on your map with the following lines : //link to tiles var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; var osmUrlcolor='http://{s}.tilexxxxx.com/watercolor/{z}/{x}/{y}.jpg'; //create two TileLayer var osm=new L.TileLayer(osmUrl,{minZoom:1,maxZoom:20}); var osmcolor=...


1

Here some inline answers: As I understand, v.overlay module can be used for polygons overlapping processes. Yes. Polygon clipping, union processes can be done. There are many algorithms for these operations. Yes. Which algorithm is used in GRASS for overlapping precesses? GRASS GIS relies on the GEOS library for these operations: https:...


1

Tx for the feedback, this is important for others who find this question in the future. Are you using WGS84 in your tilestache configuration? There is also a 'projected' attribute you might have to set. You are using VecTile class, I haven't played with that one yet, but you might be able to get it work (or atleast it will give you some clue/ideas to ...


1

I've found my answer: MgSelection mgSelection = new MgSelection(map); mgSelection.Save(resourceService, strMapName);


1

Look at this topic: Remove islands and completely surrounded polygons after polygonization with QGIS There is answer how to select surrounded polygons.After that you can make a new layer from selection. (For QGIS)


1

Also, my original question had also asked how to do this in QGIS, but somebody came and removed that for some reason ... for people who are interested in doing this using QGIS, I found how to do this from this Stack Overflow post: Selecting features within polygon from another layer using QGIS? You can use the "Vector->Research tools->Select by Location" ...


1

I ran into a similar issue today-- I needed to load each tile into a separate canvas element, then operate on each to pixel of each tile to transform the image. Using L.tileLayer.canvas and this example from John Gravois I was able to grab each tile, access the pixels, and then invert the colors (inversion code from this Mozilla Developer Network help page)....


1

It's possible but not trivial. A way to do it is to subclass L.TileLayer in such a way that each tile is wrapped in a <canvas> (like https://github.com/aparshin/leaflet-boundary-canvas/blob/master/src/BoundaryCanvas.js#L244 does), then attaching events to the canvases to fetch the pixel value of a given pixel. You might also run into CORS issues when ...


1

Depending on whether you want a mean or a spatially weighted mean there are a couple things you can do using the rgeos and raster packages library(rgeos) proj4string(grid) <- proj4string(nuts) # I assumed these were the same projection? First find out which grid cells intersect your NUTS polygons grid_nuts <- gIntersects(grid,nuts,byid = TRUE) ...



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