I need to create a mask to cover the rest of the world outside of a single city. ().  I've been told by support to open those boundaries "create a new geospatial file that would be made up of a rectangle that covers the whole earth with a hole in the shape of your city in the middle."   From there, I need to upload that file to Mapbox Studio and add it to cover the rest of the world outside of my city. I'm looking to style OpenStreetMap in Mapbox afterwards for that city. So this is a workaround for not being able to edit a single city in Mapbox Studio.  How would I create this mask?
91538
I have a Shapefile with Polygon features  representing the world's land areas (continents, islands).   Is it possible to invert these, and get a geometry that represents the world's oceans and seas?   So the original land Polygons need to become rings in a single global Polygon that covers the planet.  Basically, I'm looking for something like Select > Inverse in Photoshop.   I am using QGIS.
56730
Besides Zillow's creative-commons licensed  shapefiles, what sources of neighborhood boundaries are there? Not just in the US, but all over the world.  Free/open source is ideal, but paid sources could be interesting too.
112601
I've just posted this at StackOverflow and someone suggested I try here. Original:   I'm trying to represent a rectangular area which crosses 180 degrees longitude. For more background see   Here's my test case:  from django.contrib.gis.geos import Polygon, MultiPolygon from my_project.my_app.models import Photo  a = Polygon.from_bbox((30, -80, 180, 80))  # the part to the east of 180 b = Polygon.from_bbox((-180, -80, -160, 80))  # a part to the west of 180 c = Polygon.from_bbox((-180, -80, -100, 80))  # a larger part to the west of 180  ok   = MultiPolygon(a,b) ok2  = MultiPolygon(c) boom = MultiPolygon(a,c)  # This works Photo.objects.filter(location__coveredby=ok)[:1] # This also works so c is ok Photo.objects.filter(location__coveredby=ok2)[:1] # This gives "BOOM! Could not generate outside point!" Photo.objects.filter(location__coveredby=boom)[:1]  # splitting c doesn't help c1 = Polygon.from_bbox((-180, -80, -140, 80)) c2 = Polygon.from_bbox((-140, -80, -100, 80)) test = MultiPolygon(a,c1,c2) Photo.objects.filter(location__coveredby=test)[:1] # BOOM! Could not generate outside point!   By changing the numbers I can make this error come and go. (-180, -80, x, 80) works where x &lt;= -140 for example. For every number there is a threshold like this but I can't find a pattern. For boxes with the same area, some will work and others not. For boxes with the same width some will work and others not.   I can look at the SQL being generated but the areas are represented in binary (EWKB) and I'm not sure how to read it.  Can anyone explain this?
42289
When I composed my     I would have liked to have the camera pitch up enough to show the horizon, except I didn't have enough geometry to extend the cobblestone street and the sidewalk all the way to infinity (mostly because that would require infinite stuff).  Even in that shot it is clear that I need to widen the "sidewalk" to cover up the "sky"box.    Contrast with     where the ray tracer can use the procedurally replicated geometry.   is a failed attempt at faking out the horizon, even with low detail.  It fails because lighting's interaction with the geometry gives it away.  Some techniques that prevent you from having to deal with infinity include   put the scene in a box (usually a room) put the scene in a canyon (which is just a box without a top so you can see the relatively featureless sky) route the road into a tunnel, or around a corner and hide the horizon with other geometry (which is really just a variant on the canyon). have no detail on the ground at all (flat color or gradient)   Those are all dodging the question of interest to me:  What techniques have people used in blender to fake various kinds of detail repeating into the distance (instead of just obstructing the view of infinity)?
124022
I want to export image to drive for my roi. For this i have specified a geometry(roi). But exported map doesn't cover the area specified and it's not showing the color palette. Is there any possible way to export a colored image (which shows in my layer) to Drive? Why it's not covering the region I have specified. Problem is in export.To.Drive section. But all the codes are given to check error that i did.  Code was:    var region = ee.FeatureCollection('users/karmakersourav/shape')   .filter(ee.Filter.eq('NAME_1', 'Chittagong'));   var addNDVI = function(image) {     var ndvi= image.normalizedDifference(['B4', 'B3']).rename('NDVI');     return image.addBands(ndvi);   };    var cloudMask = function(image) {     var clouds = ee.Algorithms.Landsat.simpleCloudScore(image).select(['cloud']);     return image.updateMask(clouds.lt(25));   };   // Select the land mask.   var landMask = function(image) {   var datamask = hansenImage.select('datamask');   // Create a binary mask.   var mask = datamask.eq(1);   return image.updateMask(mask);   };     // Load a Landsat collection, apply the NDVI and cloud/water masking functions over it.   var collection1 = ee.ImageCollection('LANDSAT/LE07/C01/T1_RT_TOA')     .filterBounds(region)     .filterDate('2008-01-01','2008-12-31')     .map(addNDVI)     .map(cloudMask)     .map(landMask)     .select('NDVI') ;   print(collection1);     //reducer   var annualNDVI = collection1.reduce(ee.Reducer.median());   var region_NDVI = annualNDVI.reduceRegions({     collection: region,     reducer: ee.Reducer.median(),     scale: 30 // the resolution of the dataset   });     var ndviParams = {min: -1, max: 1, palette: ['blue', 'white','green']};   var boundParams = {palette: ['black']};   Map.addLayer(annualNDVI.clip(region), ndviParams, 'NDVI', 1);    Map.addLayer(region, boundParams, 'LA', 1);    //here's the problem  Export.image.toDrive({    image: annualNDVI,    description: 'CTG_NDVi',    scale: 30,    region: roi,    fileFormat: 'GeoTIFF',    maxPixels: 1e12,    formatOptions: {       cloudOptimized: true     }   });     My imports was:  var image = ee.Image("UMD/hansen/global_forest_change_2015_v1_3"),       region = ee.FeatureCollection("users/karmakersourav/shape"),       hansenImage = ee.Image("UMD/hansen/global_forest_change_2015"),       roi = /* color: #98ff00 */ee.Geometry.Polygon(           [[[91.26571433292804, 22.382447200369512],           [91.70516745792804, 22.24015355729955],           [91.81503073917804, 21.50608889294255],           [91.99081198917804, 21.158146277513005],           [92.36434714542804, 20.74775339022756],           [92.38631980167804, 21.362918378188724],           [92.68868864595584, 21.285515736407884],           [92.66671598970584, 22.12251851402064],           [92.42501677095584, 22.964696114885136],           [92.43600309908084, 23.237540932485988],           [92.31515348970584, 23.620600408965007],           [92.21627653658084, 23.781555321668222],           [92.04049528658084, 23.691042604440895],           [91.90865934908084, 23.731278240693108],           [91.89767302095584, 23.47960242153599],           [91.75485075533084, 23.28800680321665],           [91.77682341158084, 23.08602889002461],           [91.61202848970584, 22.99503954262493],           [91.46920622408084, 23.277915158047364],           [91.34835661470584, 23.308187798303887],           [91.22750700533084, 23.600467103459394],           [91.28243864595584, 23.872005072934794],           [91.32638395845584, 24.082808607079368],           [91.24947966158084, 24.263221977268092],           [91.06271208345584, 24.223152164577193],           [90.73312223970584, 23.88205115062075],           [90.63424528658084, 23.660857737733508],           [90.54635466158084, 23.328365731356676],           [90.65621794283084, 22.83312931280329],           [90.98580778658084, 22.437667249990497],           [90.98580778658084, 22.071621721722586]]]);
109091
I want to add a new area which will be site wide. Describe the process of getting this new region into my theme, if possible generalize it for adding any new, custom region.
68916
When you add a new mesh, the overlay appears in the bottom left of the screen allowing you to change certain properties. Recently, however, when I try to click on any setting, the box disappears. I've tried clicking, dragging and any combination of both, but the overlay doesn't respond and vanishes as soon as you release the mouse button.    Obviously you only get one chance to change these properties - so I'm stuck without it.  Could an add-on be causing the problem?
12956
I want to develop a simple GIS application using GeoTools. I have looked at the tutorials but i could get to much meaningful from them.   I have a simple JMapFrame to which add can add a featureLayer from a shapefile  public void action(ActionEvent e) throws Throwable{     sourceFile = JFileDataStoreChooser.showOpenFile("shp", null);     if (sourceFile == null) {         return;     }     FileDataStore store = FileDataStoreFinder.getDataStore(sourceFile);     featureSource = store.getFeatureSource();      Style style = SLD.createSimpleStyle(featureSource.getSchema());     Layer layer = new FeatureLayer(featureSource, style);     map.addLayer(layer); }   Now, lets say I want to create a buffer around my features. From what I have understood I have to get the featureSource, then create a featureCollection, iterate through the features and for each of those feature I have to cast them to a Geometry, then create a buffer.   When I have created a buffer should I go all the way back to featureLayer and add it to my map?
81782
I modified an existing model by removing unwanted vertices, then selecting surrounding vertices and creating faces one triangle at a time (By pressing 'F').  On UV unwrapping the mesh, the faces which were added by me seem to stretch from the very bottom left of the map, shown below.    How do I create a face so it appears on the UV map as expected?
407
A reverse clip saves only the part of your spatial object that is outside the bounds of another object, as opposed to a regular clip which saves the parts that are inside the other object.    shows how to do it in ArcMap.  How do I do this in R?  Reproducible example (on Linux machines):  system("wget 'https://github.com/Robinlovelace/Creating-maps-in-R/archive/master.zip' -P /tmp/") unzip("/tmp/master.zip", exdir = "/tmp/master") uk &lt;- readOGR("/tmp/master/Creating-maps-in-R-master/data/", "ukbord") lnd &lt;- readOGR("/tmp/master/Creating-maps-in-R-master/data/", "LondonBoroughs") plot(uk) plot(lnd, add = T, col = "black")   What I want here to do is to save all of the UK except for London. Visually, I want the black shape in the resulting image to be a hole.
94104
We're running MapServer with a map that has just one layer, political boundaries from a SHP file.  This layer is using a basic EPSG:4326 projection, and the map itself is using EPSG:3857.  The resulting images generated by MapServer CGI queries have horizontal lines at certain latitudes:    Beyond this problem, the map is okay and lines up perfectly with the Open Street Map in OpenLayers.  The MAPFILE we're using:   MAP   WEB           METADATA         "wms_title" "Map Server"         "wms_enable_request"  "*"         "wms_srs"             "EPSG:3857"            END   END    PROJECTION     "init=epsg:3857"   END    IMAGETYPE      PNG   EXTENT -20037508.34 -20037508.34 20037508.34 20037508.34   SIZE           400 300   SHAPEPATH      "../data"   IMAGECOLOR     71 245 242    LAYER # States polygon layer begins here     NAME         Borders     DATA         ne_10m_admin_1_states_provinces_shp     STATUS       OFF     TYPE         POLYGON    PROJECTION     "init=epsg:4326"    END      CLASS       NAME       "Borders"        STYLE         COLOR        43 156 51         OUTLINECOLOR 32 32 32       END     END   END # States polygon layer ends here  END    I've verified that the proj.4 EPSG file has the proper definition of EPSG:3857, and don't understand what's happening.  Any insight would be greatly appreciated.
64172
I'm creating a composite image, in order to create a timeseries. I've already created the composited image, but i am having difficulty masking the clouds of the composite image. I've followed the code from a page having similar problems, however when I run the code (after replacing all the l8_mayo to composite as that is the name of my composite var), I get the error code of composite.map not a function. This error does not come up when I run the exact same code from the previous answer. Can someone explain how to overcome this problem? Here is the page I used:  here is my code and the link to my code:  (point is the long, lat for Lake Manyara, Tanzania)  //load images for composite var sr14= ee.ImageCollection('LANDSAT/LC08/C01/T1_SR') .filterBounds(point) .filterDate('2014-01-01','2014-03-01') .select(['B4','B3','B2']);  // Temporally composite the images with a maximum value function. var composite = sr14.max(); Map.setCenter(35.8244, -3.5799); Map.addLayer(composite, {}, 'max value composite');  var getQABits = function(image, start, end, newName) { // Compute the bits we need to extract. var pattern = 0; for (var i = start; i &lt;= end; i++) {    pattern += Math.pow(2, i); } // Return a single band image of the extracted QA bits, giving the band // a new name. return image.select([0], [newName])               .bitwiseAnd(pattern)               .rightShift(start); };  // A function to mask out cloudy pixels. var cloud_shadows = function(image) { // Select the QA band. var QA = image.select(['BQA']); // Get the internal_cloud_algorithm_flag bit. return getQABits(QA, 7,8, 'Cloud_shadows').eq(1); // Return an image masking out cloudy areas. };  // A function to mask out cloudy pixels. var clouds = function(image) { // Select the QA band. var QA = image.select(['BQA']); // Get the internal_cloud_algorithm_flag bit. return getQABits(QA, 4,4, 'Cloud').eq(0); // Return an image masking out cloudy areas. };  var maskClouds = function(image) { var cs = cloud_shadows(image); var c = clouds(image); image = image.updateMask(cs); return image.updateMask(c); };  var composite_free = composite.map(maskClouds);  Map.addLayer(composite_free, 'composite collection without clouds');
2288
I'm working with a geodataframe of points and I need to create a grid of rectangular polygons.   I know how to have bounds of the geodataframe with gdf.geometry.bounds. Now using this information and with 2 variables length and width  (L, W) of rectangular polygon, how can I create a grid ?
84021
Is it possible to customize the shape of popups in OpenLayers? For example, I am creating a pop-up using the following approach:  var popup = new OpenLayers.Popup.FramedCloud(                 "popup",                 OpenLayers.LonLat.fromString(feature.geometry.toShortString()),                 null,                 '&lt;div style="color:#FF0000"&gt;'+feature.data.Name + '&lt;/br&gt;&lt;a href="http://test.url"&gt;test.url&lt;/a&gt;' + '&lt;/div&gt;',                 null,                 true             );   This creates a popup with the following appearance:    Is it possible to change from the rounded corners and a curved 'connection' to a more square pop-up?
25661
I'm currently trying to download data from OpenStreetMap specifically from San Carlos, Venezuela. I'd like to take the OSM file and convert it to SHP for use in ArcGIS.   I've used geofabrik for other country's in the past, but Venezuela is not available for download. Exporting a bounding box of the city directly from OpenStreetMap, then using OpenStreetMap Toolbox to convert the OSM to SHP gives me the lines but it's missing street names and city. Ideally I'd have addresses as well, but I can live with just street names.  Is there any way to achieve this? Export all streets within a city from OpenStreetMap, then convert it to SHP with city and street name attributes?
35067
I have a .tiff and a .tfw file that I want to change into a GeoTIFF. When I try to open the file in ArcMap and ENVI 5.0, it is successful. However, in Google Earth it is not.  Is there anyway to create the GeoTiff in ArcMap or ENVI?
66998
I'm working on a 2d topdown shooter, and now need to go beyond my basic rectangle bounding box collision system.  I have large levels with many different sprites, all of which are different shapes and sizes. The textures for the sprites are all square png files with transparent backgrounds, so I also need a way to only have a collision when the player walks into the coloured part of the texture, and not the transparent background.  I plan to handle collision as follows:   Check if any sprites are in range of the player Do a rect bounding box collision test Do an accurate collision (Where I need help)   I don't mind advanced techniques, as I want to get this right with all my requirements in mind, but I'm not sure how to approach this. What techniques or even libraries to try. I know that I will probably need to create and store some kind of shape that accurately represents each sprite minus the transparent background.  I've read that per pixel is slow, so given my large levels and number of objects I  don't think that would be suitable. I've also looked at Box2d, but haven't been able to find much documentation, or any examples of how to get it up and running with SFML.