texts: Extracting xmin, xmax, ymin, and ymax values from circular polygons in ArcGIS for Desktop?

texts:
I need a way to efficiently extract the xmin, xmax, ymin, and ymax values from 66 circular plots. The plots are saved as a polygon shapefile and each plot is about 406 sq meters. I need these values to calculate CloudMetrics for some LiDAR data I am working with. I have access to/familiarity with R, ArcGIS 10.4.1, and ENVI 5.3. LiDAR is being analyzed in FUSION.

I've noticed that if I save each plot as an individual shapefile, ArcMap gives me the extent coordinates under the Source tab in Layer Properties. I Really don't want to do this for every plot so I am hoping there is an easier way.


texts: Simplify a polygon dataset with a minimum distance between the new vertices

texts:
I would like to simplify a polygon shapefile where the resulting output has a minimum distance of 5 kilometres between the new vertices.

We have ArcMap 10 on an ArcView license, FME and QGIS.

I have tried the generaliser transformer in FME using NURBfit smoothing and set the segment length to 5km but it still created vertices within that distance.

Update

The image attached below shows what an order can can look like. So there can't be a vertex within 5km of another vertex.

We would like to be able to generalise multiple shapefiles so there are no vertices within 5km of each other, and without using a bounding box as that would include areas where we don't want.


texts: Clipping multi-band Sentinel-2 composites in ArcMap?

texts:
I am using Sentinel-2 images and I want to clip the image with a shapefile I made. (The shapefile was smoothed with Smooth polygon with a 10m PAEK tolerance).

I have tried the Raster clip tool and the Image Analysis Toolbars with moderate success. I have gotten reasonable clips but the colors change, and I cannot access the attribute table.

How can I clip the raster without altering the way it look?

Because I will also be applying this method to 8A,11,5 composites.

RGB composite image and shapefile outline.

Raster clip (spatial analysis) and input parameters. Saved as a .tif and checked both boxes.

This is the result.

And when I used the Image Analysis Toolbar, I used the default parameters

And I got a result that is more or less the same. Some of the sources I have found say to clip each raster separately but when I tried, my result is still skewed.

Is it the statistics I need to recalculate?

How can I get clips to be the same as the original raster?

Or, is it OK for the values to be different?

I am going to apply a water mask and get the area of a plant that I am familiar with, the bright green seen in the photos.

This is the environment used

-


texts:
Is there a way to extract mountain ridges in QGIS? I have been trying to use the Valley and Ridge Detection SAGA tool, but it freezes for hours and I am wondering if there is a faster or alternative way.
I'm running QGIS 3.10 on a Mac.


texts:
Dataset exist and I am able to get statistics from ArcGIS python window. But it failed as a script with error:
ERROR 000865: Input raster: C:\temp\ras does not exist.
I have tried following suggestions:

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000000r000000

but to no avail.Please suggest how to handle this

import arcpy

stat = arcpy.GetRasterProperties_management(r'C:\temp\ras', "MEAN")
avg = stat.getOutput(0)
print avg


texts: Why is "Generate Transects along lines" invisible in data management tools (sampling) in ArcGIS Desktop?

texts: I want to generate transects at equal intervals along a river's thalweg line. I have created point shapefile separately. I have searched on how to establish the transects at the points created and got to know that it can be done using "generate transects along lines". This tool is not available. I'm currently using ArcGIS 10.6 (licensed). Can anyone suggest me what is to be done in such a case?


texts: How to add polygon layer into raster data?

texts: I performed a supervised land-use classification with Erdas. Landsat data was used in ArcGIS to Digitize urban areas as polygon shapefile. I want to insert these polygons into the land-use raster data. How can I do this with ArcGIS?


texts: No Oracle Button in QGIS Data Source Manager on Linux

texts:
I'm using QGIS 3.10 on a system with Fedora 30 Linux.

In the Data Source Manager is the button for Oracle-database-connections missing. An installation of the same QGIS-version on a Windows-Machine has it.

Do I have possibly to install an Oracle-related package to activate it or is it something with the QGIS-Linux-packaging?


texts: QGIS field-calculator: set attributes to 1 if country name is in a list of values

texts:
In a country table, I create a region field, ECOWAS, with 1 if the country belongs to the regions 'ECOWAS', 0 else.
Country names are in the field "sovereignt".
How can I build a field-calculator expression, in which I would list countries belonging to this region?
I tried:

 "sovereignt" in ('Benin',  'Burkina Faso', 'Cape Verde',  'Gambia',  'Ghana')

which returned the error:

syntax error, unexpected STRING, expecting COMMA or ')'

What is a correct expression?


texts: Hiding single class in ArcGIS Pro legend?

texts:
How do I hide a specific feature in my legend?

The feature River is shown on the map but should be hidden in the legend. The other features are in the same layer.

The only way I can think of is to duplicate the layer, separate the features and not showing the layer with the river features. However, I assume there must be a better way to do this.


texts:
I am looking for a possibility to make a one-to-many table-join in QGIS.
I have a shapefile with postal codes and would like to join them with survey results (more than one). In other words, there is a specific postal code (shapefile) on one side and there are many survey participants on the other side.
postal **code1** ----- survey participant **1**
postal **code1** ----- survey participant **2**
postal **code1** ----- survey participant **3**
postal **code2** ----- survey participant **1**
postal **code2** ----- survey participant **2**
and so on ...

If I do a normal join (right click on Layer --> Properties --> Join) , I just get the first entry of the table with the postal codes.
I found out a way to do it ArcGIS with the tool "Make Query Table", but I´m looking for a possibility to do it in QGIS.


texts: Kernel Density Tool - Can't change Area Unit?

texts: When I pull up the Kernel Density tool in ArcMap Desktop 10.5.1 I can choose different options for the Area Unit. As soon as I choose a point input feature class, this feature becomes grayed out and it is forced to SQUARE_MAP_UNITS, which I am lead to understand means either square km or square miles depending on the linear unit of my data? data frame?. I would like to output my densities in square meters, since that is the most sensible in this context. How can I do that?


texts: GeoServer rendering performance significantly affected by vector icon size

texts:
I'm having the craziest GeoServer experience right now and I was hoping to get some input on what might be causing this behaviour.

I'm using Apache Bench to benchmark rendering performance for a layer via GeoServer's WMS interface and accidentally discovered that the vector icon size has a very significant effect on performance. The image I'm rendering:

25,000 point features
Single rendering rule in SLD
1900x1200 pixels
Request concurrency is 5
GeoServer is 2.6.1
JVM is Oracle Java 7 SE
Not using native JAI

The SLD's single rendering rule looks like this:

<PointSymbolizer>
    <Graphic>
      <Mark>
        <WellKnownName>circle</WellKnownName>
        <Fill>
          <CssParameter name="fill">#FF0000</CssParameter>
          <CssParameter name="fill-opacity">1.0</CssParameter>
        </Fill>
      </Mark>
      <Size>
        <ogc:Literal>50</ogc:Literal>
      </Size>
    </Graphic>
</PointSymbolizer>

This chart shows how response time for the same request varies based on icon size

As this is a vector icon I had assumed that rendering any size had as much impact on performance as any other size, but it appears that beyond a certain size (perhaps 16px) performance begins to suffer and beyond 30px it drops dramatically.

This has obvious implications for how I author future SLDs but right now I am more interested in why this would happen. Any thoughts?

EDIT: With a little more investigation I have found that increasing the (scaled) size of a PNG icon gives a much more linear increase in rendering time and there is a size, for this particular layer, when PNG icons become faster than vector icons. I have also seen that the relationship between icon size and performance is more linear with a smaller number of features. As it looks like the number of features and icon size both interact to affect performance I can only assume this is related to memory usage, I'm just not sure exactly how.


texts:
I work in the construction industry and have a couple of software tools specific for the field, namely AutoDesk products Revit, AutoCAD and Civil.
Presently, I have come across the problem of simplifying polyline geometry, the goal being to significantly reduce the number of segments while staying within a specified tolerance. Unfortunately, the tools that I have are limited in this respect, and to the best of my knowledge there is no function that meets the requirements.
With a bit of googling, I learned that ArcGIS has exactly what I need, a function called
Simplify By Straight Lines And Circular Arcs. Trouble is that ArcGIS is not free and I cannot buy it just for this function. I have found the function Simplify in the open-source QGIS, but it seems not to include circular arc segments.
Ideally, I need the ArcGIS function in the form of pure Python code without dependencies (I can use Python code in Dynamo for Revit, but only bare Python without external libraries like SymPy). Alternatively I need free software that I can use for the task. Can anyone advise me on how to achieve either of these goals, or tell me not to waste my time on it because it's futile?


texts: Removing unnecessary vertices at places with no change of direction?

texts:
I am aware that this question has been asked here: Removing unnecessary vertices?.

I want to focus a different point. How to remove unnecessary vertices without changing the shape at all. As you can see in the example below I want to get rid of vertex 2 and 3. All generalize or smooth functions I saw so far, will somehow alter the shape of the polygon/polyline. So they will mess with vertex 5,6 and 7 in the example.


texts: y2019SO2.map is not a function error in GEE

texts:
I have an error that I didn't understand. How can I fix this? This is my code.

// get the layer for the city
var antalya = ee.FeatureCollection("FAO/GAUL/2015/level1")
    .filter(ee.Filter.or(
        ee.Filter.eq('ADM1_NAME', 'Antalya')));
Map.addLayer(antalya);
Map.centerObject(antalya,7);

// add image collection with filters
var y2019 = ee.ImageCollection("COPERNICUS/S5P/OFFL/L3_SO2")
  .filterDate("2019-04-01","2019-04-30")
  .select('SO2_column_number_density')
  .filterBounds(antalya);
var y2020 = ee.ImageCollection("COPERNICUS/S5P/OFFL/L3_SO2")
  .filterDate("2020-04-01","2020-04-30")
  .select('SO2_column_number_density')
  .filterBounds(antalya);

//hava kalitesi ölçüm istasyonu
var istasyon = ee.Geometry.Point([30.700425,36.914883]);
Map.addLayer(istasyon);

//clip the city from SO2 layers
var y2019SO2=y2019.median()
  .clip(antalya);
var y2020SO2=y2020.median()
  .clip(antalya);

// add layers to map(burası karışık!!)
Map.addLayer(y2019SO2,{min:0,max:0.001,palette:['orange', 'yellow', 'green', 'cyan', 'purple', 'blue', 'white']},"April 2019");
Map.addLayer(y2020SO2,{min:0,max:0.001,palette:['orange', 'yellow', 'green', 'cyan', 'purple', 'blue', 'white']},"April 2020");

var feats = y2019SO2.map(function(image){
  var reducer = ee.Reducer.median();
  var stats = image.reduceRegion(reducer, antalya, 1000);
  return ee.Feature(null, stats).set('system:time_start', image.get('system:time_start'));
});

// plot that feature collectioin
var chart = ui.Chart.feature.byFeature(feats, 'system:time_start')
                .setSeriesNames(['SO2 median']); // order is by default alfabetically
print(chart, feats);


texts: How to create a simple Web Map with ArcGIS REST API

texts:
Following the instructions on this page Working with users, groups, and items—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers and the Add Item documentation I was able build a POST request in POSTMAN to add a new item to the user.

After getting the token, when I try the POST request to add the web map I get this error

{"error":{"code":403,"messageCode":"GWM_0003","message":"You do not have permissions to access this resource or perform this operation.","details":[]}}

This is the JSON that contain some simple Web Map data,

{
    "operationalLayers": [],
    "baseMap": {
        "baseMapLayers": [
            {
                "id": "defaultBasemap",
                "layerType": "ArcGISTiledMapServiceLayer",
                "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",
                "visibility": true,
                "opacity": 1,
                "title": "Topographic"
            }
        ],
        "title": "Topographic"
    },
    "spatialReference": {
        "wkid": 102100,
        "latestWkid": 3857
    },
    "authoringApp": "WebMapViewer",
    "authoringAppVersion": "5.4",
    "version": "2.11"
}


texts: Retrieving XY from point graphics set in WPF network (arcgis 10.0)

texts:
I  have a WPF application using ArcGIS 10. In the application I can set two point by clicking on map and calculate route between them. every time I click on the map, The application creates a GraphicsLayer and a Graphic element using this code:

GraphicsLayer stopsGraphicsLayer = myMap.Layers["myStops"] as GraphicsLayer;
Graphic stop = new Graphic() [Geometry = e.MapPoint };

My question:

I need to get the XY Coordinates of the points clicked on the maps. Does anybody know what elements\attributes\methods to get this information?
Thanks.


texts: Index of band with minimum and maximum values Google Earth Engine

texts:
I have a multiband image with the bands labelled t1 to t12 representing 12 timesteps. I want to know the timestep (band) of the minimum and maximum values for each pixel and convert this timestep to an integer e.g. t7 = 7. Some timesteps have masked values.

Link to the code is here https://code.earthengine.google.com/c9e145f1be528339e1b96d03da12b3ab


texts:
I want to build a continuous data set with the population for 1970, 1981, 1991, 2001, 2011. I already have the population values for the same polygon, at sub-sections level (the lowest), for 1991, 2001 and 2011. The use of georreferenced databases only started (in Portugal) on the 1991 census so it's impossible to have that level of data for 1970 and 1981.
However, I do have the number of buildings for each subsection for all the decades of the XX century.

The questions are: How can I predict/estimate the population values at a sub-section level for 1970 and 1981? If possible, are the number of buildings helpful for the estimation?


texts: Extracting catalog consisting of name of layerdata/table of different geopackages

texts:
Currently we have an organizing and tracking of files problem.
Right now we have our geodata organized in different geopackages (.GPKG files) for specific areas.
The problem is that the amount of  geopackages is growing and it becomes harder and harder to track where each of the data are. Sure, we organized it logically but at the same time it still hard to keep track.
To keep better track of the data, we want to keep an inventory of the contents of the GPKG file (data tables, layer names) including its metadata.

Is there any way this can be done in QGIS itself or do we need to develop a separate script for it?
Contents:

I currently have found a way to extract the information of geopackage so far using SQL, or more specifically SQLite. So far I have created some querry's to extract the tables that are "common" in a geopackage. As for the shematics below, this is the one for Vector data:

And this is the one for raster data:

However, the problem I still have is the extraction of the sample_feature_table and the sameple_title_pyramid because depending on the geopackage the name of the feature table is different.
I know that the name of the feature table's are in the table name column, but I do not see a way to make this below assumption of code workable.
Select * from sample_feature_table;
Select * from sample_pyramid_title;
Where sample_feature_table = gpgk_contents.table_name?
Where sample_tile_pyramid= gpgk_tile_matrix.table_name column?

The sample_feature_table and its raster counterpart are "placeholder table names", the actual name of all the tables are in the table name column.


texts: Editing tables in ArcGIS for Desktop with Python Parser of Field Calculator?

texts:
so I'm trying to edit a table so that the name column will not contain spaces. I just don't know how to write the Python script that should go with it.

This is what I have for the Python script now.


texts: How to move point in Spatialite Layer through manual entry of X/Y coordinates?

texts:
My Spatialite Database (Point Layer) looks like this (arch_locations.sqlite)

Fields:
pkuid
short_ID
name
geometry
X
Y

The field "X" and"Y" I added later (after first creation of DB) using the editing functions within the attribute table. They are of type "decimal number double" and I assigned the expressions $x and $y. Now they show X/Y Coordinates for viewing in an Access Database I have linked to the Spatialite Database through ODBC.

Is it possible for me to move a Point on the layer by manually changing the values in the X and Y column? I will have exact coordinates for some points while others will derive their location through digitalizing georeferenced scanned maps.

Devdatta Tengshe hinted that this might be possible in my other question.
Thanks for reading!

Edit to clear things up:
I created the Database in QGIS through "Layer - new - spatialite Layer". I set it to Point and geometry and digitalized some points on a georeferenced map.
Then I wanted to have two columns which show me X/Y Coordinates to be viewed in Access. I asked here how to do it:
How to add columns with x/y data to Spatialite Layer?

Following this advice I went to the attribute table of the layer, enabled editing and added two columns. Then I used the field calculator to put in the two new columns the expressions $x and $y.

Now I only want to move some of the points I digitalized to an exact position by entering the x/y coordinates in those two columns. It doesn´t matter if I have to add the coordinated somewhere else I just want some points to be moved slightly.


texts:
I have 30 shapefiles, each of which I want to be clipped with another 3850 shapefiles (contain only one polygon). I know I need a loop in Python and use ArcPy. But I'm very new to Python.
Here's my code but I got error:

ERROR 000732: Clip Features: Dataset
C:\Users\Farzane\Desktop\Master97\GNOMEmodeling\Postprocessing\Ropme
does not exist or is not supported
Failed to execute (Clip).

import os
import arcpy
from arcpy import env

# setting my source and target geodatabase
SourceWorkspace = r"C:\Users\Farzane\Desktop\Master97\GNOMEmodeling\Postprocessing\Results"
TargetWorkspace = r"C:\Users\Farzane\Desktop\Master97\GNOMEmodeling\Postprocessing"

#setting my clip feature (which is a polygon)
clipfeature = r"C:\Users\Farzane\Desktop\Master97\GNOMEmodeling\Postprocessing\Ropme\*.shp"

env.workspace = SourceWorkspace

fclist = arcpy.ListFeatureClasses()

for fc in fclist:
    outClipFeatureClass = os.path.join(TargetWorkspace, "clip area_" + fc)
    arcpy.Clip_analysis(fc,clipfeature,outClipFeatureClass)


texts: I have Landsat 8 level 1 data in different date to cover entire region after mosaicking the complete images there is found to be distinct color


texts: MbTiles is not shown at a specific scale in QGIS 3.2

texts:
I've created MbTiles with gdal_translate in the OSGeo4W Shell.

The workflow was at follows:

convert jp2 files to geotiff with gdal_translate
create a Virtual Raster for all raster files (about 1000) with gdalbuildvrt
create overviews for vrt with gdaladdo
create mbtiles with gdal_translate
create overviews for mbtiles with gdaladdo

After this process I've loaded the mbtiles to QGIS 3.2.
The MbTiles was only shown at scale leves between 1:200 and 1:5000. If I wanted to have a lager scale, because I've wanted to see the whole project area, the MbTiles disappeared.

Here is the code I've used in detail:

C:
cd C:/.... #repository
FOR %i IN (*.jp2) do "gdal_translate" -a_srs "EPSG:31255" -of GTIFF -co "TFW=yes" -r bilinear -tr 0.4 0.4 "%i" "%i.tif"

gdalbuildvrt -a_srs "EPSG:31255" -r bilinear -tr 0.4 0.4 -vrtnodata "0 0 0" -input_file_list "C:\...\my_list.txt" vrt_test.vrt

gdaladdo -r bilinear vrt_test.vrt 2,4,8,16

gdal_translate -of MBTiles -co "TILE_FORMAT=JPEG" -co "QUALITY=85" -co "RESAMPLING=BILINEAR" "C:\...\vrt_test.vrt" "mbtiles_test.mbtiles"

gdaladdo -r bilinear --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL --config BIGTIFF_OVERVIEW -ro mbtiles_test.mbtiles 2,4,8,16

Has anybody an idea what's wrong?


texts:
I am doing geomorphological research in South Iceland using ArcticDEM data, LSD TopoTools software and QGIS.

I'm having an issue with my geology layer (an ArcGIS feature layer) being a few hundred metres out of alignment with my output rasters (derived from the software I'm using to analyse the landscape).

In the image the blue-tinted area is the hillshade raster; the orange, grey and speckled areas are part of the geology map, denoting different lithologies. If you look closely at the portion under the orange area, within blue-tinted raster (at the bottom), you can see how the extent of the misalignment. That "exposed" cliff is supposed to be included in the orange area.

I am fairly sure the issue is with the geology layer as my rasters and delimited text layers are aligned with each other, and with the world map (not pictured) I added through the XYZ file route (the rivers match up etc).

The CRS of the geology layer is WGS 84 and the CRS of the raster is UTM 27. I have tried changing them so they can be the same but it ends up sending the hillshade raster off to the Netherlands or rotating the geology layer 90° and placing it in Canada :/

I don't seem to have the ability/permission to use the Move Feature tool in QGIS to manually move the geology layer, and the Vector Geometry -> Translate method returns me red error messages in the Log saying the geometry is invalid.

I also have tried the Raster Projection -> Assign method which didn't work.

All I want is for the layers to allign! I am investigating knickpoints in rivers so the underlying geology is pretty important to my research. If you have any ideas of what I could be doing wrong or what I could do to solve the issue?


texts: Time Manager animations run too fast to simulate real time

texts:
I am using the Time Manager plugin to visualize a set of points with a corresponding start and end time. I can see the points correctly on the map at the correct time. My question is about the visualization options as I want to continuously see what happens every second to simulate real time. I set "time frame size" to "1 second" and on "Settings" I set "Show frame for 1000 milliseconds". However, the time is running faster than 1 second and I don't understand why.

QGIS version is 3.12. and the points in my list have the coordinates and start and end time as the following example.

35.74849    -9.16069    2018-01-01 00:20:00     2018-01-01 21:53:00


texts:
I did a new install of ArcGIS 10.2.2 today along with an uninstall of Hazus 2.1 and an install of Hazus 2.2. The installation seemed to go fine but when I Open Hazus 2.2 I get  the following error:

Code = 800004003
Code Meaning: Invalid pointer
Source adtiRegion.DefineRegion.1
Description:

I can go through the region setup (with the same error appearing each time I hit the next button) Until I get to the State Selection Window, where I have no states to choose nor Counties to choose from in the following window.

I have no idea what is causing this as I followed the instructions included with the download to the letter.

As far as requirements go I am using the following software/hardware
Core i7 Processsor
Windows 7 ultimate (64 bit)
4 Gigs Ram
ArcGIS 10.2.2 Basic w/ Spatial Analyst extension

I have tried reinstalling Hazus 2.2 twice and the results have been the same both times.


texts: Understanding NAD83 datum information on QGIS - State Plane System

texts:
I'm trying to make sense of the CRS definition in QGIS 3.4 for State Plane projections.  I believe the datum should be NAD83, but I'm not seeing this in the definition that shows up in QGIS, and I want to find out 1)is this correct, and if so 2) why is the GIS able to use this definition?
For example, for NAD 83 / Massachusetts State Plane Maineland, here is what shows up:
Extent: -73.50, 41.46, -69.86, 42.89
Proj4: +proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

So GRS80 is specified as the ellipsoid, but I don't see anything about the datum.  Is the ellipsoid enough by itself?  What's going on here?


texts: QGIS crashes when trying to make heatmap

texts:
I'm a new user of QGIS. I need to make a heatmap for my thesis and I'm fairly certain I downloaded and set up the program correctly via online instructions. I imported the GDX points and used a Google Earth basemap and selected the heatmap plugin. After selecting the options I wanted (I'm new at heatmaps, maybe I wasn't doing something right), I clicked ok and the whole program crashed. I'm using a MacBook Pro running OSX Yosemite.

Here is a link to the crash log: http://pastebin.com/sTyxXZ0Q


texts: Earth Engine export scale interpretation

texts:
I'm exporting a Landsat RGB image from Earth Engine. I want to use the full native resolution (30-m pixels) in the output file. However, it seems that using 30 in the scale argument fails to export at full resolution. I tried exporting the same data using a scale argument of 2 with considerable increase in resolution (as well as filesize). Looking at the images across the same region indicates that this isn't an artificial increase in resolution; there is a real increase in image quality. Can anyone explain what's going on here?

Google Earth Engine code:

var cali = ee.FeatureCollection("TIGER/2016/Counties")
  .filter(ee.Filter.eq('NAME','San Luis Obispo'));

// Load a raw Landsat scene and display it.
var raw = ee.ImageCollection('LANDSAT/LC08/C01/T1')
  .filterDate("2015-01-01","2017-12-31")
  .filterBounds(cali);

// Reduce image collection to median pixel value
var raw_median = raw.median();
var imageRGB = raw_median.visualize({bands: ['B4', 'B3', 'B2'], min: 6000, max: 20000});

// Export imagery
Export.image.toDrive({
  image: imageRGB.clip(cali),
  description: 'SLO_LS8_RGB_30',
  scale: 30,
  region: cali.geometry().bounds(),
  maxPixels: 1e13});

Export.image.toDrive({
  image: imageRGB.clip(cali),
  description: 'SLO_LS8_RGB_2',
  scale: 2,
  region: cali.geometry().bounds(),
  maxPixels: 1e13});

Then loading the data into R (I just used the first file from the 2-"meter" data for a quick comparison):

raster.30 = stack("SLO_LS8_RGB_30.tif")
str(raster.30)

raster.2a = stack("SLO_LS8_RGB_2-0000000000-0000000000.tif")
str(raster.2a)

plotRGB(raster.2a)
plotRGB(raster.30, add=T)

res(raster.30)[1]/res(raster.2a)[1]

The two images look like this:

Scale = 30

Scale = 2


texts:
I asked this question, and I realize that I am going in the wrong direction.

I would like to do this :

var geom = new THREE.Geometry();
// push vertices here
var some_material = new THREE.MeshLambertMaterial({
        map: THREE.ImageUtils.loadTexture(SOME_MAGIC_FUNCTION_TO_RETURN_A_SINGLE IMAGE_FROM_WMS_TILES(lat_bounds,long_bounds))
      });
var mesh = new THREE.Mesh(geom, some_material)

Can I use Openlayers / Leaflet?

I do not see how I could do this, immediately from their documentations.

I seek to construct / use the SOME_MAGIC_FUNCTION_TO_RETURN_A_SINGLE IMAGE_FROM_WMS_TILES(lat_bounds,long_bounds).


texts: How do I visualize a raster based on its properties using Google Earth Engine?

texts:
I am trying to visualize the USDA soil map based on the taxonomy great groups.
On the info page of the dataset, it seems as if this could be found in the properties. More specifically in grtgroup Class Table: color.

My approach so far did not color it properly.

var area =     ee.Geometry.Polygon(
        [[[6.86, 50.75],  [6.86, 50.60],[7.30, 50.60],  [7.30, 50.75]]], null, false);
var soil =ee.Image("OpenLandMap/SOL/SOL_GRTGROUP_USDA-SOILTAX_C/v01")
Map.addLayer(soil.clip(area), {}, 'soil');
Map.centerObject(area,11);
print(soil,'soil')

var names = soil.get('visualization_0_name');
print(names);
var band = soil.get('visualization_0_bands');
print(band);

I already checked the answer to this question and it seems like it is possible to slice out the palette from the properties in the MODIS image.

Is this also possible with the soil dataset and how can I read out the palette values and visualize the image?


texts:
I am new to QGIS. I am working on creating heat map of bird diversity(data downloaded from ebird.org). The issue I face is that how to differentiate between:

There areas where data is not available (bird surveys haven't happened)
Bird survey has happened but a particular bird species is absent at that area

When create a heatmap of the particular bird species with QGIS 3.2.3(windows), the map interprets both situations as same, which is not correct. In the image attached, the white areas are either with no data or places where there are no kingfishers found. I want to color code them differently.

How can I find a way to overcome this?


texts: ESRI ArcEngine SDK - Identify sample doesn't work

texts:
I'm trying to follow the Identify snippet from the ESRI ArcEngine SDK
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/Do_Identify_Snippet/00490000000n000000/

The third line of the tutorial throws a COM exception:

public void DoIdentify(ESRI.ArcGIS.Carto.IActiveView activeView, System.Int32 x, System.Int32 y)
{
  if(activeView == null) return;
  ESRI.ArcGIS.Carto.IMap map = activeView.FocusMap;
  ESRI.ArcGIS.CartoUI.IIdentifyDialog identifyDialog = new ESRI.ArcGIS.CartoUI.IdentifyDialogClass();  //THIS LINE THROWS THE EXCEPTION

{"Retrieving the COM class factory for component with CLSID {F8AAB776-8B1E-11D3-9F7A-00C04F6BC886} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE))."}

I expect to run into some trouble using the snippets, but I can't even call a constructor... : (

Any thoughts are appreciated...

Specs: ESRI ArcEngine 10 VS 2010 C#

Edit:
Maybe I don't have access to the CartoUI library.  I also tried this:

AdvancedDrawingDialogClass t = new ESRI.ArcGIS.CartoUI.AdvancedDrawingDialogClass();

But I got a similar error.

Edit 2:
I found out how to do the identification so I'm going to post it for the community.

for (int i = 0; i < mapControl.LayerCount; i++)
{
  ILayer layer = mapControl.get_Layer(i);
  if (!(layer is IDynamicLayer))
  {
    ESRI.ArcGIS.Carto.IIdentify identify1 = layer as IIdentify;
    IArray array = identify1.Identify(geometry);
    if (array != null)
    {
      object obj = array.get_Element(0);
      IFeatureIdentifyObj fobj = obj as IFeatureIdentifyObj;
      IRowIdentifyObject irow = fobj as IRowIdentifyObject;
      IFeature feature = irow.Row as IFeature;
      IGeometry geometry1 = feature.Shape;
    }
  }
}


texts: Cache lookup failed for function 1 while enabling postgis on postgres 10

texts:
I am trying to enable PostGIS on a PostgreSQL 10 database on Windows. Earlier it used to work fine, but now I am getting an error 'cache lookup failed for function 1' on enabling the extension.

I am using pgAdmin to do it and have tried shell also. I reinstalled PostGIS from StackBuilder also.


texts: PostGIS creating an envelope around a buffer returns strange results

texts:
For a spatial search I need a 900km buffer around a given point(lon 18 degrees, lat 63 degrees) and search all geometries in a table that intersect with the envelope around the buffer( actually a quadrat or rectangle depends where you look at it). The geometry records in the table have SRID 4326.
My problem is the envelope object I get does not seem to be correct. I use the following:

select st_astext(
         st_transform(
           st_envelope(
             st_buffer(
               st_transform(
                 ST_GeomFromText('POINT(18 63)', 4326),
                 3857),
              900000)),
           4326));

First I convert the center point to srid 3857 which is meter based, create a buffer with 900000m radius(a circle in 3857 srid), than make an envelope around the buffer( a quadrat in 3857), and convert it back to 4326 where I will get a rectangle. The result is the Polygon below:

POLYGON((9.9151 59.0917,
         9.9151 66.4469,
        26.0848 66.4469,
        26.0848 59.0917,
         9.9151 59.0917))

I have removed some of the decimals returned. As seen the polygon has a width of about 17 longitude degrees which seems ok, but the heigth is only about 6,6 latitude degrees that is much too short. What am I doing wrong? Is the accuracy for such large buffers so poor? When the center point has the coordinates POINT(18 33) with a lower latitude value the results seem to be Ok. I use PostgreSQL 9.6 and PostGIS 2.2 on Windows.


texts: How to delete duplicate rows where multiple values are duplicated?

texts:
I have a feature class where there are multiple values duplicated in a row, i.e. SRNumber and RESOLUTION_CODE.  I would like to delete all rows where my SRNumber and RESOLUTION_CODE are found in multiple rows.  I have got a good start with this script, everything works aside from actually deleting the rows.  How can I fix this so that my duplicate rows are deleted?

So if SRNumber = 1-23456 and Resolution_Code = 'A' and appears twice, I would like to delete one.

import arcpy

     in_table = r"ServiceRequest.DBO.SO_Dead_Animal"
     fields = ["NumberCYLA","RESOLUTION_CODE"] #replace with own
     curStrings = arcpy.da.SearchCursor(in_table,fields,"NumberCYLA is not null")

     stringsKeysList = []
     numbersValuesList = []
     tableDict = {}

     for row in curStrings:
         print row[0],row[1]
         stringsKeysList.append(row[0])
     del curStrings
     uniqueStringsList = list(set(stringsKeysList)) #only unique values from Strings field

     for uniqueString in uniqueStringsList:
         emptyTempValues = []
         curValues = arcpy.da.SearchCursor(in_table,fields,"""NumberCYLA = '{0}'""".format(str(uniqueString)))
         for row in curValues:
             print row[1]
             emptyTempValues.append(row[1])
             uniqueEmptyTempValues = list(set(emptyTempValues))
         tableDict[uniqueString] = uniqueEmptyTempValues

     print tableDict #a dictionary with string:values
     #{u'String_2': [-4, -2],
     #u'String_3': [None, -3],
     #u'String_56': [-1],
     #u'String_1': [-1],
     #u'String78': [-1]}

     rowsToDelete = [k for k, v in tableDict.iteritems() if v == [-1]] #find which rows to delete
     print "list: ", rowsToDelete
     stringRows = ","
     updRows = stringRows.join(rowsToDelete)
     updRows = updRows.replace(",","','")
     print updRows #update the string to be used with proper syntax in where clause

     where_clause = """NumberCYLA in ('{0}')""".format(updRows)
     upd_cur = arcpy.da.UpdateCursor(in_table,fields,where_clause)
     for row in upd_cur:
         print row[0],row[1]
         del rowsToDelete


texts:
I have created a web map app on arcgis.com.

I have installed ArcGIS 10.2 for Server, and created a services and published it on arcgis.com, but it is local server.

I want to any one opening my web map app from any other PC not my PC

Here is my web map app.


texts: QGIS Python Scripting - Syntax definition

texts:
After playing around with the QGIS Modeler and looking at the python scripts of what I make, I noticed some syntax which I can't find the definition anywhere. Here is a snippet of the python script from a model:

outputs_13=processing.runalg("qgis:fieldcalculator", outputs_12['SAVENAME'], ID, 1, 10, 0, True, $rownum , None)
outputs_14=processing.runalg("qgis:deletecolumn", outputs_13['OUTPUT_LAYER'], longitude, None)
outputs_15=processing.runalg("qgis:deletecolumn", outputs_14['SAVENAME'], latitude, savename_alg15)
outputs_16=processing.runalg("qgis:clip", outputs_15['SAVENAME'], vectorlayer_layer1, None)
outputs_17=processing.runalg("qgis:fieldcalculator", outputs_16['OUTPUT'], Score, 0, 10, 0, True, 2, output_layer_alg17)

Can someone please explain the purpose of ['SAVENAME'], ['OUTPUT'] and ['OUTPUT_LAYER']?

I am trying to develop a script but keep getting errors linked to these terms and I am unsure as to how they are used.


texts: Calculate area and display pie chart by percentage in Google Earth Engine

texts:
I want to display a pie chart with the percentage of the area of each class in Google Earth Engine

here is the code:
https://code.earthengine.google.com/56a5d60822c733af20ce7bfd00fb5fab


texts: Calculating the number vectors from an intersection

texts: So I would like to calculate how many lines go from an intersection. So in more detail I have mapped out trails and then worked out the where these line intersect (node). I now want to work backwards and see how many lines come from the intersection and to which other intersections they connect with. Is this possible to do in QGIS version 3?


texts: Self-intersecting polygon using extreme values

texts:
I have this polygon

POLYGON((1.2E-15 1.1E-15,1.31E-15 1.21E-15,-180 -90,180 90,1.2E-15 1.1E-15))

It uses an extreme coordinates like (1.2E-15 1.1E-15) and (180 90)
When I call ST_isValidReason, it says that polygon is invalid:

SELECT ST_isValidReason( ST_GeomFromText(
    'POLYGON((1.2E-15 1.1E-15,1.31E-15 1.21E-15,-180 -90,180 90,1.2E-15 1.1E-15))') );
st_isvalidreason
Self-intersection[-180 -90]

But when I reduce number precision form E-15 to E-12 it works ok:

SELECT ST_isValidReason( ST_GeomFromText(
    'POLYGON((1.2E-12 1.1E-12,1.31E-12 1.21E-12,-180 -90,180 90,1.2E-12 1.1E-12))') );
st_isvalidreason
Valid Geometry

The question is: is it a PostGis bug or I shouldn't use number like 1.1E-15 for  coordinates?


texts: Importing text as legend or to legend in QGIS?

texts:
I have a layer consisting of appr. 30-45 classes. The majority of the classes has an item description containing multiple lines of text.
In ArcMap I can achieve a layout like this

Is a similar layout possible in QGIS 3.8?

I know I can split text in a new line by the means of the 'Wrap text on' option described in this question.

I guess I could replace every line break in my text document with * and set * as my 'wrap text on'-character.
However this is not very convenient in my case. Besides I can't find a way of adding bold font type to the "header/title" of the class. It would be nice if I could generate a "legend text file" (with tags and breaks) in beforehand and then import it to QGIS in some way.

I have experimented with HTML frame, paste in the legend text and add HTML tags for bold text and line breaks. The problem then is to get corresponding legend symbols (patches). It seems like it would demand a lot of manual editing.

I'm looking for a more automated way of doing it. Is there?


texts: Displaying Esri Grid Format correctly in ArcMap?

texts:
I think I've come across a Bug in ArcMap 10 in displaying rasters.  This particular model comes from the USGS GAP Species dataset with metadata hosted here.  I'd like to know if anyone else has experienced this issue or if this is something I have to pursue with ESRI support.

File type: ESRI GRID

The Value field in the model is limited to a domain containing 1, 2 or 3, which represents a seasonal distribution of the given species (see metadata below).

When added to the map, I'm getting arbitrary values in this field.  You'll notice that all raster cells are grey and seem to fall within the 1-3 value domain.

I've gone into the properties to change from 'Stretched' symbology to 'Unique Values' when I'm prompted to build raster attribute table (which fails).  The distributor of the dataset suggested to try the geoprocessing tool to build the attribute table, but it yeilds this error message.  I went into the source tab and confirmed that the raster pixel type is signed integer and the raster only contains one band.


texts:
Now the only issue is that in image I am not getting the labels, I have on polygon. Please help in that too Please see above attached screenshots here I need labels –
I have updated QGIS it's version 2.12.1-Lyon but it was making same polygon image it can not show length of polygon line and polygon Sr. No on label. for show label on image required any special code or not

from PyQt4.QtGui import *
from PyQt4.QtCore import *
from qgis.core import *
from qgis.utils import *
import time
l = iface.activeLayer()

for a in l.getFeatures():
    attrs = {16: 1}
    l.dataProvider().changeAttributeValues({a.id(): attrs})
    img = QImage(QSize(800, 600), QImage.Format_ARGB32_Premultiplied)
    # set image's background color
    color = QColor(255, 255, 255)
    img.fill(color.rgb())
    # create painter
    p = QPainter()
    p.begin(img)
    p.setRenderHint(QPainter.Antialiasing)
    render = QgsMapRenderer()
    palyr = QgsPalLayerSettings()
    palyr.readFromLayer(l)
    lst = [l.id()]
    render.setLayerSet(lst)
    render.setLabelingEngine(QgsPalLabeling())
    # set extent
    rect = a.geometry().boundingBox()
    rect.scale(1.1)
    composerMap.setNewExtent(rect)
    render.setScale(1)
    render.setOutputSize(img.size(), img.logicalDpiX())
    render.render(p)
    p.end()
    # save image
    img.save("C:/example/Ashwin/%s.jpg" % a['CHALTA_NO'],"jpg")
    attrs = {16: 0}
    l.dataProvider().changeAttributeValues({a.id(): attrs})
    time.sleep(1)

i want to Sr. No and length labels on polygon.
Please see below image. i want to like image part 2.


texts: ArcPy - Syntax Error when using reclassify tool

texts:
I have been writing a code to automate a variety of processes in Arc Toolbox. I have used a line to reclassify before but this time when using it I am coming up with a Parsing Error (SyntaxError). I can't see anything different to the other line where I used it apart from changing the values slightly. Could anyone have a look and shed some light of why it may not be working?

Here's my code:

for year in range(2008,2016):
    for month in ['01','02','03','04','05','06','07','08','09','10','11','12']:

        #This part works
        arcpy.gp.Reclassify_sa("F:/Dissertation/LAI/"+str(year)+"/s_america/"+month+"_"+str(year)+"_LAI_SA","VALUE","3 36 1;36 72 30;72 108 60;108 144 90;144 180 120;180 216 150;216 252 180;252 255 210","F:/Dissertation/LAI/"+str(year)+"/s_america/"+month+"_"+str(year)+"_LAI_REC","DATA")

        # Combine the LAI and the HYSPLIT layer. To be done in such a way that we can work out what crosses over.
        arcpy.gp.RasterCalculator_sa("""r(F:/Dissertation/LAI/"+str(year)+"/s_america/"+month+"_"+str(year)+"_LAI_REC") + r(F:/Dissertation/0201_HysplitOutputs/combined_raster/"+month+"_"+str(year)+"_RAS)""","F:/Dissertation/0201_HysplitOutputs/LAI_calc/FINAL/"+month+"_"+str(year)+"_LAI_CALC")

        # Reclassify this layer so that you have a total number of pixels that were in this category
        #This part doesn't work:
        arcpy.gp.Reclassify_sa("F:/Dissertation/0201_HysplitOutputs/LAI_calc/FINAL/"+month+"_"+str(year)+"_LAI_CALC","VALUE","2 28 1;28 56 2;56 84 3;84 112 4;112 140 5;140 168 6;168 196 7;196 224 8","F:/Dissertation/0201_HysplitOutputs/LAI_calc/FINAL/"+month+"_"+str(year)"_LAI_FINAL","DATA")


texts: pyQGIS: load an in-memory (MEM format) raster as layer

texts:
Say I have an in-memory raster (i.e. a raster made by the MEM gdal driver), how can I load this raster into a QGIS layer? QgsRasterLayer's constructor wants a path to the raster file, but the in-memory raster doesn't have one.

Creating in-memory raster layer using PyQGIS? doesn't quite cover it as the solution seems to be to avoid creating your own MEM raster altogether.

If there is a way to load a numpy array as a QGIS raster layer, that would work too. I'm just trying to avoid having to write to the disk in case of a rapidly-changing raster.


texts: CSV won't import correctly into Arcmap 10.3

texts: I have a spread sheet with coordinates that once I bring in to Arcmap, the attributes disappear. The points are on the map, and when you Identify each point, the data shows up, but when the attribute table is open, the attribute titles are there, but no data below them. I have another table with data that comes in as it should. I was able to Display XY data and reproject, and the attributes showed up, but then there was only one point on the map (there is a total of 15). I've attached a screenshot of the excel table, but let me know what other info is needed.


texts:
I'm having trouble displaying some base maps on parts or my organisations network. I set up a QGIS (2.14.9) project and added a couple of layers. I then add a google basemap using 'Thomas B' instructions from here:

High resolution, printable alternative to OpenLayers plugin for QGIS?

All good.

I took my laptop to work where I have to use a proxy server. OpenLayers and QuickMapServices failed to load until I set the Proxy Server parameters. However,
the xml files just render as a black background because I think they do not use the proxy settings. They work fine if I'm on the orgnaisation's wireless network.

Assuming I'm correct, is there a way to get the xml files to use the proxy settings?


texts: QGIS Diagrams using rule based categories?

texts:
I'm trying to do a spatial analysis on a neighbourhood and I want to tally all the parcels in that neighbourhood according to land use classifications.  However, the land use classifications on the data are way more granular than what I need, so I've basically spent time grouping them into broader categories that are styled in QGIS using rule-based classification.

For a report, I'd like to generate a diagram (pie chart) for the entire neighbourhood, using the rule based symbology I've developed to show what percentage of the total neighbourhood's land is associated with each rule based legend item.  I envision having just one pie chart that shows the percentage of total land area that is represented by my custom rule based legend items.

I'm new to the diagramming features, but it seems that I am limited to developing a pie chart for every parcel within the neighbourhood, as opposed to developing a pie chart for the whole neighbourhood. I'm also limited to using the classifications that are on the underlying dataset, as opposed to the custom rule based groups that I have created.

Is there any foreseen way to achieve this by calculating it based on the rule based legend symbols as opposed to database columns?  And can I just get one pie chart for the whole neighbourhood?


texts: Using FME to convert a MapInfo TAB to GML with style attributes

texts:
I have a FME transformer that converts MapInfo TAB files to GML. What I would like is for the pen colour, pattern and width information to be brought across to the GML somehow. It really doesn't matter how it appears in the GML as the resulting file is parsed by some custom code anyway. It would probably be ideal for it to appear as an XML attribute on each feature in the file, though.

I put in an AttributeExposer with the following attributes:

mapinfo_pen_color
mapinfo_pen_pattern
mapingo_pen_width

and I was hoping to see these in the output, but sadly not. What am I doing wrong?

Here's what I have currently:

The Pen_Color isn't coming through, so I added another attribute Test set to a constant to see whether the expression on the former was the issue. That does not appear in the output GML either.


texts: Misalignment when generating centroids with QGIS

texts:
I was wondering if anyone could shed a light on why this behavior is happening in QGIS?

I'm pretty confident that the issue here is not due to centroids within polygon.

Edit

Added a detailed image


texts: Changing symbology of the selection tool

texts: How do I change the way selected polygons look. Instead of being highlighted in yellow, I would like to have them with a red border and no fill color.


texts: Seeking free data to calculate drive time based on traffic / congestion?

texts:
I'm looking to calculate drive time contours based on traffic data. I have road network data (with distances and speed limits), but the client wants to take real live traffic/congestion data into account for a specific time period. The area of interest is Vancouver, BC.

Is there any freely available Esri data that could assist?

I'm very new to networking analysis.


texts: What is Change Detection and performing such analysis with open source tools?

texts:
From wikipedia page:

Change detection for GIS (geographical information systems) is a process that measures how the attributes of a particular area have changed between two or more time periods. Change detection often involves comparing aerial photographs or satellite imagery of the area taken at different times. The process is most frequently associated with environmental monitoring, natural resource management, or measuring urban development

How is the comparison done? With what tools?
I feel that the description is not complete. Or something is missing.
Where or in which books can I find more information about Change Detection?
What tools should I use to perform such an analysis using the data in a shapefile? (only open-source please)

Some papers on change detection (theory and techniques)
Change detection techniques (D. LU, E. BRONDI, ZIO and E. MORAN, 2004, pdf)
Trend change detection in NDVI time series: Effects of inter-annual variability and methodology
Forkel, M. , Carvalhais, N. , Verbesselt, J. , Mahecha, M.D. , Neigh, C. , Reichstein, M. (2013)
Remote Sensing 5 (2013)5. - ISSN 2072-4292 - p. 2113 - 2144.
Shifts in global vegetation activity trends
Jong, R. de , Verbesselt, J. , Zeileis, A. , Schaepman, M.E. (2013)
Remote Sensing 5 (2013)3. - ISSN 2072-4292 - p. 1117 - 1133.
Relationships between declining summer sea ice, increasing temperatures and changing vegetation in the Siberian Arctic tundra from MODIS time series (2000–11)
Dutrieux, L.P. , Bartholomeus, H.M. , Herold, M. , Verbesselt, J. (2012)
Environmental Research Letters 7 (2012)4. - ISSN 1748-9326 - p. 12.
Near real-time disturbance detection using satellite image time series
Verbesselt, J.P. , Zeileis, A. , Herold, M. (2012)
Remote Sensing of Environment 123 (2012). - ISSN 0034-4257 - p. 98 - 108.
Trend changes in global greening and browning: Contribution of short-term trends to longer-term change
Jong, R. de , Verbesselt, J. , Schaepman, M.E. , Bruin, S. de (2012)
Global Change Biology 18 (2012)2. - ISSN 1354-1013 - p. 642 - 655.
Phenological change detection while accounting for abrupt and gradual trends in satellite image time series
Verbesselt, J. , Hyndman, R. , Zeileis, A. , Culvenor, D. (2010)
Remote Sensing of Environment 114 (2010)12. - ISSN 0034-4257 - p. 2970 - 2980.
Detecting trend and seasonal changes in satellite image time series
Verbesselt, J. , Hyndman, R. , Newnham, G. , Culvenor, D. (2010)
Remote Sensing of Environment 114 (2010)1. - ISSN 0034-4257 - p. 106 - 115.
(I'll add more in the future as If I discover more notable  papers)


texts: Why there's a break between each .hgt srtm tile when importing to QGIS?

texts:
When I import the .hgt srtm elevation data to QGIS, the each tiles(each .hgt files) stitches with with a break or contrast variance or something like this:

And it gets worst when rendering it with Qgis2threejs:

I tried it viewing with 3DEM, the data seems to be perfect in there.
Please help me with this thing.


texts: Rules and roles in GeoServer not working

texts:
I have in a GeoServer (v2.16) two workspaces, with associated users and roles for those users.
 The file in /opt/geoserver/data_dir/security/layers.properties looks like this:

#Thu Mar 12 10:44:20 GMT 2020
mode=HIDE
*.*.w=GROUP_ADMIN,ADMIN
workspace1.*.r=ROLE1
workspace2.*.r=ROLE2

But still both users can see both workspaces. What am I doing wrong?

EDIT

I also tried

#Thu Mar 12 10:44:20 GMT 2020
mode=HIDE
*.*.w=GROUP_ADMIN,ADMIN
*.*.r=GROUP_ADMIN,ADMIN
workspace1.*.r=ROLE1
workspace2.*.r=ROLE2

and it does not work either.


texts:
I'm new to the ArcGIS Online Experience Builder.  I've finalized my experience, but the view of the landing page differs, depending on the browser and/or device type being used (see screenshots below).
For example, the box looks smaller or text within that box is cut off when using Chrome on an external monitor.
How do I ensure a consistent view across all browsers/device types (whether a laptop or desktop monitor)??
I used a blank template when building my experience, if that matters.


texts: Is it valid to have a properties element in an geoJSON featureCollection?

texts:
Is it valid to have a properties element with a featureCollection-element as parent?

This is, according to geojson.org valid:

{ "type": "FeatureCollection",
  "features": [
              { "type": "Feature",
                "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
                "properties": {"prop0": "value0"}
              }
              ]
}

But I can't find is it is valid nor if it is in-valid to have this:

{ "type": "FeatureCollection",
  "properties" : { "description" : "This is the geometry for..." }
  "features": [
              { "type": "Feature",
                "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
                "properties": {"prop0": "value0"}
              }
              ]
}

According to the answer underneath it is not in-valid to put it there, but programs/scripts won't know its there.

So, let me rephrase the question:
(Where) Is it possible to put some descriptive information about the property  as a total??


texts: Drawing some points in QGIS 2.4 using Python

texts:
I'm new to PyQGIS so here goes: Give a new QGIS project, how can we draw some Points on the map?

I tried the following but nothing showed up. Should they be placed in a Vector layer before they can be rendered?

line_start = QgsPoint(50,50)
line_end = QgsPoint(100,150)
line = QgsGeometry.fromPolyline([line_start,line_end])

Update

from PyQt4.QtCore import QVariant

lineLayer = QgsVectorLayer("LineString", 'test layer', "memory")

lineLayer.startEditing()
layerData = lineLayer.dataProvider()
layerData.addAttributes([ QgsField("ID", QVariant.String), QgsField("latStart", QVariant.String), QgsField("lonStart", QVariant.String), QgsField("latEnd", QVariant.String), QgsField("lonEnd", QVariant.String) ])
lineLayer.commitChanges()

QgsMapLayerRegistry.instance().addMapLayer(lineLayer)

This code created a layer but nothing appears on the map even after using the Zoom to layer function on that layer.


texts: Reprojection of shapefile in R and final extraction of values

texts:
I need to extract values from some raster files (stack) using a shapefile. to bring both of them in the same CRS, I first transformed the shapefile using the EPSG codes. Opening it in an GIS software (QGIS, Saga) it was not in the correct place. (also via retrieving the rasters CRS and reprojecting the shapefile).

Afterwards I extracted manually the correct crs code (+proj=lcc +lat_1=46 +lat_2=49 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs) from the "on the fly projection" in QGis for my R-Code.

In the end I came up with the following:

shp<-readOGR(dsn="hagel", layer="testflaechen_20131203")
crs(shp) # get coordinate reference system (CRS)
>CRS arguments:
+proj=lcc +lat_1=46 +lat_2=49 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000
+y_0=400000 +ellps=bessel +units=m +no_defs

shputm<-shp
crs(shputm)<-"+proj=lcc +lat_1=46 +lat_2=49 +lat_0=47.5 +lon_0=13.33333333333333     +x_0=400000 +y_0=400000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs"
compareCRS(shp, shputm)
[1] TRUE
writeOGR(shputm, dsn="hagel", layer="testflaechen_20131203_utm", driver="ESRI Shapefile", overwrite_layer=TRUE)

So the strange thing is that compareCRS tells me that they are the same. In QGis they don't appear to be and also if I use extract() in further steps with shp and shputm it gives me different values.

Another problem or indication that something must be wrong with the projection can be seen in extshp1<-extent(shputm) leading to following values:

    extshp1
    class       : Extent
    xmin        : 649456.4
    xmax        : 657021.6
    ymin        : 488263.9
    ymax        : 505175.5

Although the values should be something like these: extshp<-extent(c(623874.1, 634993, 5343486, 5362521)) (got values manually via drawextent())

shapefiles on dropbox and a sample raster of the region

Actually this all should be simple, but I am really struggling with it.


texts: Creating blank QGIS shapefile templates?

texts:
I am going to be creating (digitising) many repetitive maps which contain the same set of .shp file vector layers. And I was wondering if there was a way to create a template .shp file I can re-use over and over which saves its style, name and blank fields.

What I wish to do: Be able to import a already set up set of layers made up of polygons, points and lines, for example: Paddocks, PowerPoles, Roads which have their names and pre-defined symbology already set up

Currently I am setting up the layers and importing .qml (style) files which is becoming very tedious as I can have up to 30-50 layers. I have tried using Export/import layer definition files but this points back to my original shp files, which I do not wish to edit again. I need a new blank shp file.

Is there a better way to do this?


texts: Defining new custom projections in QGIS?

texts:
I'm trying to define a projection in QGIS. I want to add North America Albers Equal Area Conic. From the spatialreference site I copied the proj4 line:

+proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs

Then I went into QGIS -> Settings -> Custom CRS and pasted the following into the window:

But when I go to view the projection within QGIS I see a very different set of parameters:

Is this ok?

I don't know enough about projections to tell if the parameters generated are the correct ones, or whether something else is going on. It also ignored the name that I provided which made me suspect the parameters may also be incorrect.

I'm using QGIS 1.7.3 on Windows 7.


texts:
I have two tables: one with geom points of species and an other one with height contour lines geoms. My Idea was to find per specie geom the closest point to a contour 'geom' line and then select its elevation. So I can find out between which elevations I can find a specific species

My though was the following:

SELECT od.elevation
FROM shp_opendem od
     JOIN species sp ON ST_ClosestPoint(sp.geom, od.geom)
WHERE sp.name = 'somename'

This isn't running as ST_ClosestPoint is not a boolean which is required in a join.
The exact error message:

ERROR:  argument of JOIN/ON must be type boolean, not type geometry

Any tips how to solve this?


texts: The resulting maps from a r.mapcalc script is not computed properly

texts:
This post is a continuation of my other post Why is my controlling shell script not working?. I created another post because this contains a separate issue that I encountered with the same scripts of the previous post.

I'm trying to do the  Hydrologic Simulation seen in page 10 of this document.

Here is the script:

#!/bin/sh

g.region rast=elevation.dem -p

r.mapcalc "water = 120" #12 inches of water in each cell

g.copy rast=elevation.dem,elev

d.mon x0
d.rast water
i=1

while [ $i != 100 ]
do
  n=1
  while [ $n != 10 ]
  do
    r.mapcalc < water.mapcalc # run the simulation
    d.rast water
    n=`expr $n + 1`
  done
  g.copy rast=water,water.$i
  i=`expr $i + 1`
done

The following is the water.mapcalc script:

water = water + eval(x = elev + water, \
if (x > (y = elev[-1, 0] + water[-1, 0]), \
   -.15 * if (elev > y, water, x - y), \
   .15 * if (elev[-1, 0] > x, water[-1, 0], y - x))+ \
 if (x > (y = elev[1, 0] + water[1, 0]), \
   -.15 * if (elev > y, water, x - y), \
   .15 * if (elev[1, 0] > x, water[1, 0], y - x))+ \
 if (x > (y = elev[0, -1] + water[0, -1]), \
   -.15 * if (elev > y, water, x - y), \
   .15 * if (elev[0, -1] > x, water[0, -1], y - x))+ \
 if (x > (y = elev[0, 1] + water[0, 1]), \
   -.15 * if (elev > y, water, x - y), \
   .15 * if (elev[0, 1] > x, water[0, 1], y - x))+ \
 if (x > (y = elev[-1, 1] + water[-1, 1]), \
   -.10 * if (elev > y, water, x - y), \
   .10 * if (elev[-1, 1] > x, water[-1, 1], y - x))+ \
 if (x > (y = elev[1, 1] + water[1, 1]), \
   -.10 * if (elev > y, water, x - y), \
   .10 * if (elev[1, 1] > x, water[1, 1], y - x))+ \
 if (x > (y = elev[1, -1] + water[1, -1]), \
   -.10 * if (elev > y, water, x - y), \
   .10 * if (elev[1, -1] > x, water[1, -1], y - x))+ \
 if (x > (y = elev[-1, -1] + water[-1, -1]), \
   -.10 * if (elev > y, water, x - y), \
   .10 * if (elev[-1, -1] > x, water[-1, -1], y - x)))

and I used it with the Spearfish dataset.

The result of the code is that the map (elevation.dem) is getting smaller every succeeding iteration. I cannot figure out why it is happening. Isn't it that the result for every iteration (using the script above) should just be the transfer of excess height and not the cropping of the edges of the map?


texts: Openlayers 3 detect the layer by mouse move

texts:
I wanna do something like this ;

Openlayers 3 Vector Layer Example

But I don't want to one layer, 3 or more layer on the map and get feature like the example.

How can I separate the layer programmatically ?

    if (feature) {
    info.innerHTML = feature.getId() + ': ' + feature.get('name');
  } else {
    info.innerHTML = '&nbsp;';
  }

Because I will need to change the feature.get('name') properties each layer.


texts: Georeferencing tiff that contains 1 line of latitude, 1 line of longitude, and scale bar?

texts:
I have a tiff that I pulled from a PDF file. It consists of a scale bar, an NTS mapsheet number, a north arrow, a scale bar, a scale, 1 line of latitude, and 1 line of longitude. I want to georeference this image. to the proper scale.

Furthermore, this image has lines of contour that I plan to vectorize using the ArcScan tool.

Can someone, in relatively easy terminology, assist me with georeferencing this image in ArcMap 10.3?


texts: Transforming .osm file into a .svg file with an equivalent geometry, without applying styling

texts:
I have an existing .osm file (containing a small part of OpenStreetMap database). I am looking for way to convert it into .svg file.

Note that I am not interested in applying any styling based on data, I am interested solely in geometry of objects.


texts: About Mann-Kendall test in Google Earth Engine

texts:
I would like to perform the Mann-Kendall test to attain the spatial change of my yearly growing season composite (named 'growthdata), the'system:index' below in the code is the corresponding year list, i.e., 2000,2001,2002,2003..., this is for differentiating the before and after images. I followed the official guidance from: https://developers.google.com/earth-engine/tutorials/community/nonparametric-trends this code works but I only get the image with all white color( with all 0 value). Can anyone tell me what's the problem with my code?
    enter code here
    ////////////////////////////test mendall code////////////////////////////
var coll= growthdata.select('mean')
var afterFilter = ee.Filter.lessThan({
  leftField: 'system:index',
  rightField: 'system:index'
});
var sign = function(i, j) { // i and j are images
  return ee.Image(j).neq(i) // Zero case
      .multiply(ee.Image(j).subtract(i).clamp(-1, 1)).int();
};

var joined = ee.ImageCollection(ee.Join.saveAll('after').apply({
  primary: coll,
  secondary: coll,
  condition: afterFilter
}));
var sign = function(i, j) { // i and j are images
  return ee.Image(j).neq(i) // Zero case
    .multiply(ee.Image(j).subtract(i).clamp(-1, 1)).int()
}

var kendall = ee.ImageCollection(joined.map(function(current) {
  var afterCollection = ee.ImageCollection.fromImages(current.get('after'))
  return afterCollection.map(function(image) {
    // The unmask is to prevent accumulation of masked pixels that
    // result from the undefined case of when either current or image
    // is masked.  It won't affect the sum, since it's unmasked to zero.
    return ee.Image(sign(current, image)).unmask(0)
  })
  // Set parallelScale to avoid User memory limit exceeded.
}).flatten()).reduce('sum', 2)

var palette = ['red', 'white', 'green']
// Stretch this as necessary.
Map.addLayer(kendall, {min: -800, max: 200, palette: palette}, 'kendall')
print(joined)


texts:
I have created a model in QGIS that uses data to create a set of tables in PostgreSQL via the "Export to PostgreSQL" process

Is there a processing command that will allow me to access these tables as part of my model? At the moment I have to stop and add them manually from the browser

This is latest version of QGIS 3.8. The tables do not have a geometry column


texts:
The estimation of the Topographic Position Index (TPI) is scale dependent, but when estimating this index in QGIS (Raster > Analyses > DEM (Terrain models)), I don't see where I can change this scale, nor its standard value.

Do you know how do I obtain/change that(if possible)? Is it related with the pixel value used in the input DEM raster?


texts: How to convert MTM coordinates to WGS84 with R?

texts:
I have MTM coordinates in the following format
df <- data.frame(xcentro = c(250605,250770,250871),ycentro = c(5186087,5185610,5186140))

and need them to be converted in the WGS84 format.
I expect the rgdal library to be able to do that, but I fail in finding the correct epsg
The only way out I see would be to implement the conversion formulas
https://stackoverflow.com/questions/27824732/how-to-convert-mtm-canada-coordinates-to-latitude-and-longitude
but I cannot believe it was not already implemented somehow in rgdal.


texts: bathymetry (Ocean Floor depth) data - API or similar

texts:
I am looking to extract the ocean floor depth from a given lat/lng.

Research has lead me to lots of sources. Does anyone have any words of wisdom or good sources or the best way to achieve this?

Google Maps Elevation  - https://developers.google.com/maps/documentation/elevation/start / (but means im locked into Google Maps)

Open Elevation https://open-elevation.com/ - not sure of the sources

GEBCO https://www.ngdc.noaa.gov/gazetteer/docs/ - I had a look but there is missing depth information so unsure of completness.

Mapquest https://developer.mapquest.com/documentation/open/elevation-api/elevation-chart/get/ not sure if elevation includes sea, I suspect not.

For me the quickest way woud be use a Public API. IF needed I can roll my own, but I suspect it will add a considerable amount of time onto the project.


texts: How can I improve alignment between google maps and overlays coming from a different coordinate system?

texts:
After some work, I managed to extract some PNGs out of a GIS we have at work. This GIS has some polygons in which addresses are surrounded by them. I managed to create an extractor in Python and to align the overlays and google maps pretty well, although it is not perfect. My question is, what I'm doing wrong or overlooking when making these transformations, to make them align perfectly.

For example, I have this image:

As you can see, it aligns, but not perfectly, I found out a method for alignment using the markers, and dragging them to modify the overlay, but when there are 64 images, it is a very long process.

The overlay PNG comes from a different coordinate system (WGS72 BE UTM). What I did was a Python script that downloads all the tiles necessary for 2 given points (SouthWest,NorthEast), and then prints out the boundaries for all the tiles so I can place them onto Google Maps.

This is an example of the program run:

X1: 348724
Y1: 6294333
X2: 354334
Y2: 6300043
Delta: 4100
Processing...

4 images will be downloaded...
image:  0001  limits:  348724 , 6294333 ; 352824 , 6298433
1
image:  0002  limits:  348724 , 6298433 ; 352824 , 6302533
2
image:  0003  limits:  352824 , 6294333 ; 356924 , 6298433
3
image:  0004  limits:  352824 , 6298433 ; 356924 , 6302533
4

The data is in Santiago, Chile.

Then I convert those limits to Google Maps coordinates (WGS84) and place them.  However, the results are not precise. It would be great to hear your ideas. I hope explained myself correctly.


texts: I classified laying logs (tree trunks) from CHM (Canopy Height Model = Digital Surface Model (DSM) - Digital Terrain Model (DTM)) created from LiDAR point cloud. I converted classified logs into polygon shapefile. I now have polygons that represent logs and CHM image. CHM were clipped by polygons (logs), now I am thinking of calculating volume of each log using QGIS. Is there any existing method?


texts: How to set the paper size to A4 for a PDF export with pyQGIS?

texts:
I have been developing this code, based on the official documentation of QGIS and some codes in gis.stackexchange. But my problem is that I don't know where to establish my height and width to make a A4 size.. I am using the Text Editor of QGIS, version 2.14 (QgsComposition using the constructor with mapRenderer has been working before)

from qgis.core import *
from qgis.utils import iface
from PyQt4.QtGui import QColor
from PyQt4 import Qt

municipios = QgsVectorLayer("MyLayer\\MUNICIPIOS.shp","Municipios","ogr")
l = QgsMapLayerRegistry.instance().addMapLayer(municipios)

el_renderer = iface.mapCanvas().mapRenderer()
composition = QgsComposition(el_renderer)
composition.setPlotStyle(QgsComposition.Print)

lst = [municipios.id()]  # add ID of every layer
el_renderer.setLayerSet(lst)
el_renderer.setOutputSize(QSize(composition.paperWidth(), composition.paperHeight()), composition.printResolution())

x, y = 0,0
w, h = composition.paperWidth(), composition.paperHeight()
composer_map = QgsComposerMap(composition, x ,y, w, h)
composer_map.setNewExtent(el_renderer.extent())
composition.addComposerMap(composer_map)
composition.addItem(composer_map)

print "\n QgsComposerMap funciona"

printer = QPrinter()
printer.setOutputFormat(QPrinter.PdfFormat)
printer.setOutputFileName("C:\\output\\my_pdf.pdf")
printer.setPaperSize(QSizeF(composition.paperWidth(), composition.paperHeight()), QPrinter.Millimeter)
printer.setFullPage(True)
printer.setColorMode(QPrinter.Color)
printer.setResolution(composition.printResolution())

pdfPainter = QPainter(printer)
paperRectMM = printer.pageRect(QPrinter.Millimeter)
paperRectPixel = printer.pageRect(QPrinter.DevicePixel)
composition.render(pdfPainter, paperRectPixel, paperRectMM)
pdfPainter.end()

print "\n se ha exportado a PDF"


texts: How to remove multiple nodata value in ArcGIS?

texts:
I have a raster with black, white and red which represent no data value.

I can remove them with ArcGIS using Nodata but i can only do that for only one color.

Is there any possibility to remove multiple nodata?


texts: Downloading file using URL value in shapefile field accessed via ArcPy cursor

texts:
How do I download files through Python using URLs located in a shapefile with ArcPy?
The script needs to read a shapefile, create folders and download images using URLs in more than 1 field/record (all starting with url*).


texts: Crop/ forest/grass classification in Erdas

texts: I am trying to calculate crop land, forest and grass land  to check the irrigation potential during the period from Landsat 8 image using supervised classification in ERDAS. I am finding difficult to differentiate the crop, grass and forest land.


texts: Extracting flow accumulation to stream shapefile

texts:
I would like to create a shapefile that displays the flow accumulation for a given point in a stream channel. Is this possible?

My client wants a map that shows the accumulated flow/catchment area for each point in a stream channel--as catchment area increases the color of the stream shapefile transitions from red to blue, kind of like a heat map but just for a stream channel.

I am able to approximate this using a flow accumulation raster in ArcGIS 10.1, but the color (and by proxy the flow accumulation data) are lost in the final map product due to the small size of the raster cells relative to the other features.

I'm wondering if there is a way to extract the data from the flow accumulation raster to a stream shapefile? I expect there would have to be some sort of interpolation necessary but I am at a loss on how to proceed.

My potential work around is to query the flow accumulation raster by a series of flow accumulation thresholds, convert these to polylines and layer them on top of each other in the map product. However, there may be up to 20 different polyline shapefiles, so it may be extremely tedious.

Update with workaround solution:

I used Model Builder to put together an iterative model that queried the flow accumulation raster for cells that fell within a specific range of values using conditional inequalities and common tools to convert stream rasters to stream shapefile. The ultimate output was a set of stream shapefiles that corresponded to specific ranges of stream discharge. These shapefiles, though, did not have any discharge data in their attribute tables.

The lack of discharge data was a problem as my goal was to create a single shapefile where the symbology/color would represent the increase in accumulation/streamflow. The workaround was that I modified my model to appended a new field to each attribute table to describe discharge, and the discharge value was linked to the upper limit of the interval from the earlier conditional statement. The resulting shapefiles were then merged into a single shapefile, and the discharge value was used to drive the symbology.


texts:
This is my code:

var map = new ol.Map({
    layers : [
        new ol.layer.Tile({source : new ol.source.OSM()}),
        new ol.layer.Tile({
            extent: [902139.70, 4699598.09, 1095989.85, 5063669.03], // in EPSG:3857
            source: new ol.source.XYZ({
                url: 'http://webgis.regione.sardegna.it/tms/ortofoto2006_EPSG3003/{z}/{x}/{-y}.jpg',
                projection: 'EPSG:3003',
                tileGrid: ol.tilegrid.createXYZ({
                    extent: [1422280, 4300042.99999999068677, 1570760, 4577639.99999999068677],
                    resolutions: [0.5,1,2,4,8,16,32,64,128,256,512,1024,2048],
                    tileSize: [256,256]
                }),
            })
        }),
    ],
    target : 'map',
    view : new ol.View({
        center: [902139.70, 4699598.09],
        zoom: 7
    })
});

The result: Sardinia is 1/2 of the real size.

Did I forget something?


texts:
When I run the script below, I got this error:

rps=10000 #RasterPixelSize

layer = iface.activeLayer()
extent = layer.extent()
xmin = extent.xMinimum()
xmax = extent.xMaximum()
ymin = extent.yMinimum()
ymax = extent.yMaximum()

param = {"INPUT": layer,
         "FIELD": "PolygonId",
         "BURN": 0,
         "UNITS": 0,
         "WIDTH": rps,
         "HEIGHT": rps,
         "EXTENT": "%f,%f,%f,%f" % (xmin, xmax, ymin, ymax),
         "NODATA": 0,
         "OPTIONS": None,
         "DATA_TYPE": 5,
         "INIT": 0,
         "INVERT": False,
         "OUTPUT":"sdx"}

processing.runAndLoadResults("gdal:rasterize", param)


texts: Can two files have the same coordinate system and still don't align /overlap?

texts:
I have two shape files, with the same coordinate system (File 1 and File 2).
I have defined the Projection/Coordinate System of File 2 in ArcGIS using ArcToolbox using the Data Management Tools/Projections and Transformations/Define Projection.

For selecting the coordinate system. I have used the import button and have it use the same coordinate system of file 2.

Everything seems right the current coordinate system of both files is the same, but the files don’t align /overlap. What is wrong with these files?
 The only strange thing that I find is the Units that in both cases are “Unknown Units”.

The data source box of both files is the same :

Data Type:  Shapefile Feature Class
Shapefile:  C:\SIG\Cartografia\Cartas_uso_do_solo\CLC06_PT\CLC06_PT.shp
Geometry Type:  Polygon
Coordinates have Z values:  No
Coordinates have measures:  No

Projected Coordinate System:    ETRS_1989_Portugal_TM06
Projection: Transverse_Mercator
False_Easting:  0.00000000
False_Northing: 0.00000000
Central_Meridian:   -8.13310833
Scale_Factor:   1.00000000
Latitude_Of_Origin: 39.66825833
Linear Unit:    Meter

Geographic Coordinate System:   GCS_ETRS_1989
Datum:  D_ETRS_1989
Prime Meridian:     Greenwich
Angular Unit:   Degree


texts: How to export objects from wikimapia to openstreetmap?

texts: How to export objects (buildings, houses) from wikimapia to openstreetmap? What is the way?


texts: Checking if SQL where clause is valid with Make Feature Layer?

texts:
Unfortunately it's possible to apply an invalid SQL where clause when using arcpy.MakeFeatureLayer_management. This can cause issues later in a script. For example, I created a feature layer and subsequently tried to apply Snap_edit to the layer, which caused IDLE to crash without throwing an error. The cause was a misspelled field name.

Is there an efficient way to check if an SQL was applied properly to a feature layer?


texts: I tried to run Arcgis API jupyter notebook sample with deep learning model MaskRCNN, but model is still running at CPU instead of GPU. I have installed the newest API 1.8.2, with all deep learning packages as it is in documentation. Do anybody know what could be a problem?


texts: QGIS 2.4 - Python 2.7 PyQT4.Qtcore.QStringList Import failed

texts:
I receive an import error when trying to import QStringList from the QGIS Python console (or when loading a custom plugin).

from PyQt4.QtCore import QStringList
Traceback (most recent call last):
 File "<input>", line 1, in <module>
ImportError: cannot import name QStringList

I receive no error when using the same import from an ipython console or executing a standalone python script.

Python 2.7.5+
[GCC 4.8.1]

Please advise


texts: Are GIS tools suitable for physical capacity and placement management?

texts:
I'm a complete newbie to GIS systems, I've been watching some introductory videos about GIS but I'm not yet sure if GIS tools are the right tool for solving my problem.

I have a database with thousands of "locations". Locations are usually rectangular and of varying sizes. I also have "contents" of varying sizes that must be placed inside a location. Contents are not always rectangular but i think that using the minimun bounding rectangle might be acceptable.

Keeping track of the free space measured in square units its trivial but of course there might be many cases where the remaining space can not be used due to the geometry of the content.

Could a GIS database like Mysql's spatial extensions or postgis answer to a question like "Which of the locations has enough suitable free space for the new content?"


texts:
I'm trying to achieve this kind of labeling using QGIS. Apparently, it doesn't seem to be easily supported. Would you have an idea for a workaround ?

I managed to have circled text using "Diagrams", which it seems I can even place using an X and Y coordinate field ! But I have no idea on how to draw a line between the circle and the building...
I have about 400 circles to place, and they could quite often change, so I can't rely on a manual method.

Any idea ? Thanks a lot !

So here's what I've got using the plugin you suggested :

Not bad at all !! Thank you VERY much !

I'm only struggling to put the number in the center of the circle. I see there are two fields : LblAlighH and a LblAlignV. Entering "center" in LblAlignH centers the number horizontally, but I tried "middle" or "center" in LblAlignV without anything happening...
(in the image, I've entered center for LblAlignH in the one at the bottom)

Would that be possible ? :)

(Are you by any chance the developer of that plugin ?)

Okay, "half" in the VAlign field seems to work fine ;)

To create the circles, I used line decorations in the Arrow_Label_XXX layer :

And here's the final result :


texts:
I've been Slippy Tiles Wiki page for equations to convert lat/long values (given via the user) to tile references, and then work with the data relating to the tile.

My problem is the wiki's equation always does one of the following:

Returns a location 20+ miles away from my given lat/long. The range is ~18 miles to 200+ miles, no consistency.
Returns absolutely nothing, and the tile_row value (XXXXX) is always off by a considerable amount. This ranges from 40 (10810 instead of 10850) to 300+ (10417 in stead of 10817).

This happens for all lat longs, sourced from varying online mapping tools. So far I've tested this with Google Maps, OSM's own browsing tool and used lat/long generation tools for random locations across the UK.

Here's my code so far:

    public void UserQuery()
    {
        Console.Write("Please enter a latitude value: ");
        double userLat = Convert.ToDouble(Console.ReadLine());
        Console.Write("Please enter a longitude value: ");
        double userLong = Convert.ToDouble(Console.ReadLine());

        _merc.TileLat =  Math.Floor((1.0 - Math.Log(Math.Tan(DegreesToRadians(userLat)) + 1.0 / Math.Cos(DegreesToRadians(userLat))) / Math.PI)  * (1 << ZoomLevel));
        _merc.TileLong = Math.Floor((userLong + 180.0) / 360.0 * (1 << ZoomLevel));
    }

    private double DegreesToRadians(double angle)
    {
        return Math.PI * angle / 180;
    }

The longitude value works perfectly everytime, it's just in there for reference.

The wiki's version of the equation is:

((1.0 - Math.Log(Math.Tan(lat * Math.PI / 180.0) +
        1.0 / Math.Cos(lat * Math.PI / 180.0)) / Math.PI) / 2.0 * (1 << zoom));

but my problem is that the last / 2 before bitshifting returns a value half of what's generally expected, so 5308 instead of 10616. In terms of changes made to the equation, that's the only difference. I created a small method to work out radians => degrees because the original was hard to read and track (problems with brackets).


texts: Coordinates Reprojection with GDAL in C++

texts:
So I am trying to re-project a coordinate from WGS 84 / UTM zone 33N (Meters) to WGS 84 (DD). I have tried the below methods but both times when it gets to the portion to translate it throws Unhandled exception at 0x00007ff62fb056d5 in GDALTestApp.exe: 0xC0000005: Access violation reading location 0x0000000000000000. I am using VS 2012 to run an compile.

Code Sample 1:

    OGRSpatialReference srFrom;
    srFrom.SetWellKnownGeogCS("WGS84");
    srFrom.SetUTM(33, true);

    OGRSpatialReference srTo;
    srTo.SetWellKnownGeogCS("WGS84");

    OGRCoordinateTransformation* coordTrans =
    OGRCreateCoordinateTransformation(&srFrom, &srTo);

    double x1 = 1291784.057793292;
    double y1 = 2724159.114436987;

    int reprojected = coordTrans->Transform(1, &x1, &y1);

Sample 2:

    char **sr = nullptr;
    char *srTmpPtr = nullptr;
    GDALTransformerFunc transformer = nullptr;
    void *transformArg;
    GDALDatasetH srcDS = nullptr;
    GDALDatasetH dstDS = nullptr;
    double x1 = 1291784.057793292;
    double y1 = 2724159.114436987;
    double dfZ = 0.0;
    int bSuccess = TRUE;

    //Init the GDAL Lib
    GDALAllRegister();

    //Process the spatial reference conversions
    //Set the Destination
    srTmpPtr = SanitizeSRS("EPSG:4326");
    sr = CSLSetNameValue(sr, "DST_SRS", srTmpPtr);
    CPLFree(srTmpPtr);

    //Set the Originating
    srTmpPtr = SanitizeSRS("EPSG:32633");
    sr = CSLSetNameValue(sr, "SRC_SRS", srTmpPtr);
    CPLFree(srTmpPtr);

    //Create a transformation object from the source to destination coordinate system.
    transformer = GDALGenImgProjTransform;
    transformArg = GDALCreateGenImgProjTransformer2( srcDS, dstDS, sr );

    //Clean Up
    CSLDestroy(sr);

    transformer(transformArg, FALSE, 1, &x1, &y1, &dfZ, &bSuccess);

Update -- Here is the list of requested files located in my GDAL_DATA directory:
compdcs.csv
coordinate_axis.csv
cubewerx_extra.wkt
datum_shift.csv
ecw_cs.wkt
egm08_25.gtx
ellipsoid.csv
epsg.wkt
esri_extra.wkt
esri_StatePlane_extra.wkt
esri_Wisconsin_extra.wkt
gcs.csv
gcs.override.csv
gdalicon.png
GDALLogoBW.svg
GDALLogoColor.svg
GDALLogoGS.svg
gdalvrt.xsd
gdal_datum.csv
geoccs.csv
geos.dll
gml_registry.xml
gt_datum.csv
gt_ellips.csv
header.dxf
inspire_cp_BasicPropertyUnit.gfs
inspire_cp_CadastralBoundary.gfs
inspire_cp_CadastralParcel.gfs
inspire_cp_CadastralZoning.gfs
netcdf_config.xsd
nitf_spec.xml
nitf_spec.xsd
ogrvrt.xsd
osmconf.ini
ozi_datum.csv
ozi_ellips.csv
pci_datum.txt
pci_ellips.txt
pcs.csv
pcs.override.csv
pdalcpp.dll
PDALManifest.xml
PDALManifest2.xml
pdal_util.dll
prime_meridian.csv
proj.dll
projop_wparm.csv
ruian_vf_ob_v1.gfs
ruian_vf_st_uvoh_v1.gfs
ruian_vf_st_v1.gfs
ruian_vf_v1.gfs
s57agencies.csv
s57attributes.csv
s57attributes_aml.csv
s57attributes_iw.csv
s57expectedinput.csv
s57objectclasses.csv
s57objectclasses_aml.csv
s57objectclasses_iw.csv
seed_2d.dgn
seed_3d.dgn
stateplane.csv
trailer.dxf
unit_of_measure.csv
vdv452.xml
vdv452.xsd
vertcs.csv
vertcs.override.csv

--Update 2: Call stack view:

--Update 3: Call Stack with symbols downloaded:

-- Update 4: It appears that the coordTrans is returning a null pointer for some reason even though the code has been tested by other users and works.

-- Solution: The fix ended up being the missing proj.dll.


texts:
I would like to make several map images (e.g. SVG or PNG) like those on wikipedia but in not popular projection. I am interested in scripting solution.

Here I found this note:

Generation Notes
perl xml2svg.pl -P12 --proj=cylindrical_equidistant:0,0.793353340291235 -x8000 world98

(I haven't found this script yet. Where is it?)

Also I found mentions of Generic Mapping Tools and Mapnik.

There are also several other flavors of maps on Wikipedia. I believe, more ways to create a map images exist.

So what are preferred map rendering techniques and datasets for Wikipedia?


texts: Why Does Fiona Crash Python When Creating an Output File?

texts:
I've basically followed the Fiona online manual verbatim to write an output file but my code crashes when I call Fiona.open() to create said output file.

Traceback reports that the reason for the crash is 'w' is not supported.  How can this be?

I've assigned the source file's driver, crs, and schema into variables which are used when making the call to create an output file.  I have verified that these variables are not null.

Is there something else I need to do?

NEW

This is what traceback shows:

  unsupported mode: 'w'

  Traceback (most recent call last):

  File "/home/userid/workspace/TestScript.py", line 63, in

  with fiona.open(destinationDatabaseFile, 'w', driver=source_driver, crs=source_crs, schema=source_schema) as destination:

  File "/usr/lib64/python2.7/site-packages/fiona/init.py", line 176, in open

  enabled_drivers=enabled_drivers, crs_wkt=crs_wkt)
   File "/usr/lib64/python2.7/site-packages/fiona/collection.py", line 121, in init

  "unsupported mode: %r" % self.mode)

  DriverError: unsupported mode: 'w'

This is my code snippet (run-time error occurs on 3rd fiona.open call):

    with fiona.open(sourceDatabaseFile, 'r', layer="SomeKindaSrf") as gdb:

    source_driver = gdb.driver

    source_crs = gdb.crs

    source_schema = gdb.schema

    with fiona.open(sourceDatabaseFile, 'r', layer="AnotherKindaSrf") as gdbStructures:

   with fiona.open(destinationDatabaseFile, 'w', driver=source_driver, crs=source_crs, schema=source_schema) as destination:

       for feature in gdb:
           for buildings in gdbStructures:


texts: Quick Import FME Reader Gallery Not Populated with FDS (ArcGIS 10.5 Adv Licence)

texts:
I wanted to import GeoJSON files, but after installing the Background GP and Data Interop packages, I find that the FME Gallery contains only GML and WFS formats. This is with both ArcGIS 10.4 and ArcGIS 10.5 on advanced licence.

I tried this solution :
ArcGIS 10.5 FME Data Interoperability ArcGIS Online reader not working

..but it did not make any difference.

I can use QGIS to get the files for now but is there a libary online where I can import FDS files?


texts:
What exactly is 'anti-aliased image generation'?

I tried to google it, but didn't quite get it.


texts: Replacing n values in raster using two different rasters in R

texts:
I have 2 rasters:

raster 1 is a water mask where 1 means water and 0 surface;
raster 2, I want to exclude water using raster 1.

So, I want to make a script like that:

if water is 1, put nodata in the similar pixel in raster 2.

I'm trying, but I cannot do it in R.


texts: ArcGIS lookup (Spatial Analyst) returns ERROR 000861 raster not valid

texts:
I have the HWSD loaded. I want to export multiple attributes so that they are stored as raster values. This can be done with the Lookup tool from Esri. Running this tool gives the following errors:

I have tried the following:

Google the error (no helpful answers)
Check path names for whitespaces (no change in error)
Convert the input raster from .bil to .tif (no change in error)
Check if all extensions are enabled

Backgroundinfo:

ArcGIS 10.6
Win 10 pro 64 bit (version 10.0.16299 build 16299)

Any ideas on how to solve this problem?


texts: Filter Sentinel-2 Image Collection for many tiles

texts:
I used the code snippet below to filter a Sentinel-2 S2_SR collection by metadata (S-2 Tile).
This snippet helped me to obtain imagery that covers the Tile 32UQC.
Now I would like to get a Sentinel-2 Collection for the following Tiles:

32UPU
32UPV
32UQU
32UQV
33UUP
33UUQ

Does anyone know how to deal with this task? Or should I repeat the <Collection>.filterMetadata method for every Tile I listed above?

// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Finding images in the Sentinel2 L2A Collection
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

var s2_2018_03_01TO2018_03_31 = ee.ImageCollection("COPERNICUS/S2_SR")
  .filterMetadata('MGRS_TILE', 'equals', '32UQC')
  .filterDate('2018-03-01', '2018-03-31')
  .filter(ee.Filter.lte('CLOUDY_PIXEL_PERCENTAGE', 50));


texts: PostGIS - ST_Difference creates extra line segment

texts:
I have some line of sights from one point, collected into a multilinestring. I want to cut the multilinestring using PostGIS' ST_Difference and a border-dataset (a single multipolygon).
I used this query:
select a.id,
       st_makevalid(st_multi(st_difference(a.geom, b.geom))) geom
        from lineofsight a,
        border b

When i cut the dataset, it behaves mostly as I expected, as the part of the multilinestring crossing the border gets removed.
start input
(green lines are the multilinestring, the brown/grayish area is the border-polygon)

after ST_Difference:

the issue
Inspecting the result from ST_Difference, I have noticed that it sometimes creates short linestrings that don't necessarily touch the border
Has anybody else experienced this? And do they know what can be done to prevent it?
(red spot is the extra linestring):

(zoom-in)


texts: Unpausing dynamic items in ArcGIS Layout?

texts:
I have been using this software for years and have never had a layout do this before. I think I accidentally clicked something and now all my active layout items are greyed out as if I paused them, like pausing the loading of a dataframe. Legend, dataframe, north arrow, and scale bar are all greyed out with a grey gradient. Layout text items display normally.

Has anyone had this happen before and does anyone know how to display these items normally again?


texts: Use LonLat coordinates to perform queries on API

texts:
I'm programming a map with OpenLayers (4.6.5) and I use this API :

https://adresse.data.gouv.fr/api

What I want to do is /reverse/, I want to retrieve coordinates that I'm using in my popup (see my Codepen) to perform a query like this :

https://api-adresse.data.gouv.fr/reverse/?lon=2.37&lat=48.357

With my code I'm retrieving a lon-lat table. How could I separate my two coordinates and integrate it in my request ? Should I create a vector layer (the API is returning GeoJSON files) or an http request ?


texts: How to SWITCH_SELECTION after Select Layer By Location in ModelBuilder?

texts:
I have to use Geoprocessing tools in ModelBuilder.

My requirement is compare features in a Source personal geodatabase with those in a Target personal geodatabase and if the target personal geodatabase has extra captured features then to export them as a shapefile.

I am using Select Layer By Location tol first select all intersecting features in source and target personal geodatabases and then trying to switch selection in that same Select Layer By Location tool.

How can I SWITCH_SELECTION in the select in location Select Layer By Location tool?


texts: Issue while plotting Raster and Shapefile on tkinter canvas

texts:
I am trying to plot shapefile (EPSG:4326) and raster data (EPSG:32645) on tkinter canvas using rasterio and geopandas. I am using the following code to plot the same:
from tkinter import *

import rasterio
import geopandas as gpd

from matplotlib.backends.backend_tkagg import (NavigationToolbar2Tk)
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg as FigureCanvas
import matplotlib.pyplot as plt

preview_window = Tk()
fig = plt.Figure(figsize = (8,4), dpi =100)

ax_preview = fig.add_subplot(111)

canvas_preview = FigureCanvas(fig, master = preview_window)

gdf_preview = gpd.read_file(r'D:\Shapefiles\CG\CG.shp')

with rasterio.open(r'C:\Users\User\Desktop\PRODUCT1\Landsat\T1.tif') as src_preview:
    src_crs_preview = src_preview.crs

    preview_img = src_preview.read([1,2,3])
    ax_preview.imshow(preview_img.transpose(1,2,0))

gdf_preview  = gdf_preview.to_crs(src_crs_preview['init']) # Matching CRS of Dataframe with Raster

gdf_preview.plot(ax = ax_preview, facecolor = 'none', edgecolor = 'red')
plt.close()

ax_preview.axis('equal')
ax_preview.set(title="",xticks=[], yticks=[])
ax_preview.spines["top"].set_visible(False)
ax_preview.spines["right"].set_visible(False)
ax_preview.spines["left"].set_visible(False)
ax_preview.spines["bottom"].set_visible(False)

canvas_preview.draw()
fig.subplots_adjust(left=0.0, bottom=0.0, right=1.0, top=1.0)

canvas_preview.get_tk_widget().pack(side='top', fill='both', expand = 1)
toolbar = NavigationToolbar2Tk(canvas_preview, preview_window)
toolbar.update()

canvas_preview._tkcanvas.pack(side='top', fill='both', expand = 1)

preview_window.mainloop()

After running the above code I am getting the output as:

Issue which I am facing is that after running the above code, the shapefile is plotted in red (highlighted with yellow box in the figure) in the left top corner of the raster data which it should not because before plotting shapefile I am changing the CRS of shapefile to match it with the CRS of the raster data (using the command "gdf_preview  = gdf_preview.to_crs(src_crs_preview['init'])").
Can someone please help me out in solving the issue.


texts: I'm looking for projection functions to convert coordinates in 4326 to coordinates in 4258 and viceversa. Any suggestions?


texts:
I'm new to GIS and my SQL knowledge is limited.

I've been working on a project that I was given for my internship. For the project to work, I need to be able to calculate the shortest path from a certain point to another. For this I've created the nodes table which holds the spatial data of nodes and through it I have created the edges table which has

edge_id, source_id, target_id, and distance

as columns. I can confirm that the data on both tables are 100% correct. Now my problem is, I can't get pgr_dijkstra() to work no matter what I do.

What I'm trying to do at the moment is just to see the path from a point to another. From what I learned of some research,

 SELECT * FROM pgr_dijkstra(

    'SELECT edge_id as id,
           source_id as source::int4,
           target_id as target::int4,
           distance as cost::float8
    FROM edges', 1, 85, false,false
);

should calculate the shortest path from node 1 to node 85 but the results I get are completely wrong.

I don't know why, and I don't know what to do at this point.


texts: How to get SplineWithBarriers to work in C#

texts:
I have been having fits trying to get SplineWithBarriers to work but to no avail.

My environment:
Windows 7 64 bit
Visual Studio 2010 Team Edition
ArcMap
Release Version 10.0
Product Version: 10.0.2.3200
Spatial Analyst License

Should also mention this is C# code.

I have tried all I can think of and everything looks correct except I continue to get an "E_FAIL" exception whenever it is run. I am hoping someone on this forum has done this and is able to point out my problems. Thanks for any and all help.

Following is my full method.

private void DoSplineWithBarriers()
{
    SplineWithBarriers swb = new SplineWithBarriers();

IWorkspaceFactory wksFact;
IFeatureWorkspace featWks;
IFeatureClass inPtsFC;
IGeoFeatureLayer geoFeatLyr;

wksFact = new ShapefileWorkspaceFactoryClass();
featWks = wksFact.OpenFromFile("C:\\Workarea\\swb", 0) as IFeatureWorkspace;

inPtsFC = featWks.OpenFeatureClass("pointsFeature");
geoFeatLyr = new FeatureLayerClass();
geoFeatLyr.Name = inPtsFC.AliasName;
geoFeatLyr.FeatureClass = inPtsFC;

featWks = wksFact.OpenFromFile("C:\\Workarea\\swb", 0) as
IFeatureWorkspace;

IFeatureClass barriers;
barriers = featWks.OpenFeatureClass("barrierFeature");

Raster outPutRas = new Raster();

swb.Input_point_features = (object)inPtsFC;
swb.Z_value_field = (object)"DEPTH";
swb.Output_raster = (object)outPutRas;
swb.Input_barrier_features = (object)barriers;
swb.Output_cell_size = (object)0;
swb.Smoothing_Factor = 0.0;
swb.ToolboxDirectory = "C:\\Program Files
                        (x86)\\ArcGIS\\Desktop10.0\\ArcToolbox\\Toolboxes";

Geoprocessor gp = new Geoprocessor();
gp.AddOutputsToMap = false;

try
{
    gp.Execute(swb, null);
}

catch (Exception ex)
{
    string msg = "";
    msg = String.Format("Exception creating spline: {0}\r\nStack trace:\r\n{1}",
    ex.Message, ex.StackTrace);
}

}