texts: Failed to connect to the specified server, ArcGIS 10.1 connection using Oracle 11 g

texts:
I am trying to connect an Oracle 11g database to ArcGIS 10, but it's not working and gives the following error: "Failed to connect to the specified server. Operation Failed."

While I am sure about the inputs, and it's as the following:
Database Platform: Oracle
Instance: localhost/dbName
Username and password are correct.

I tried to connect using sqlplus and it worked properly.

I noticed in some posts that if my Oracle is 64-bit, then I should install Oracle client 32-bit and put its directory as the first one in the PATH directory.

I've done all the above and nothing worked, so if there is anything that I'm missing please let me know.
Thanks in advance.


texts: Provider feature filter causes QGIS rendering to stop

texts:
I'm running QGIS 2.14.0 Essen on OSX 10.11.5.

I would like to create a simple thematic map showing a subset of points over a basemap with state and county boundaries. I used an IN query in the 'Provider feature filter' for a point shapefile of towns and it appears to work. I'm not sure when it happens but either after defining symbology or turning on/off a layer, the canvas becomes unresponsive. I cannot zoom with tools or by scrolling on the mouse, I can turn layers on/off in the table of contents, but it is not reflected on the canvas and when I try to pan, it snaps back to a locked canvas.

I thought something had happened with my old map project, so I started over to find the same thing happening.

Any thoughts?


texts: How to turn a 3d model made in Qgis2threejs into a shareable file

texts:
I have made a 3d model using Qgis2threejs, I can open the viewer in my browser and it works fine. I want to be able to provide someone with a link to the viewer, rather than have to send them an html file, how do I do this?
Basically, what is the easiest way to make an exported 3d model made in Qgis2threejs into something that is easily shareable?


texts: Adjusting Style based on Column in CARTO?

texts:
An older version of CARTO allowed for adjustment of the styles based on a Column.  For example, I could show elevation points over a certain elevation as green and points under a certain elevation as red.  I can't seem to find where this is now.

Can someone help here?


texts: Loading satellite spectral bands in Ipython error

texts:
I am quite new to working in the prompt for image analysis and data handling, so I realize this might very well be a very silly problem. In any occasion, I am using my tutor's code in order to radiometrically, atmospherically and topographically correct my images, which are in .tif format. I want to correct each band separately. So far the code looks like this:

    # import libraries

import numpy as np                               #numerical python

import matplotlib.pyplot as plt                  #plotting libraries
from pylab import *
from matplotlib import cm
from matplotlib.colors import ListedColormap

from spectral.io import envi                     #envi files library

import gdal                                      #Geospatial Data Abstraction
                  Library

wdir = 'E:/MOMUT1/Bansko_Sat_Img/OutputII/Ipython/copies/'

def readtiff ():
   filename1 = 'band1'
   info = envi.open(wdir+'band1')
   data = info.load()
   return data, info

[Wallow_TM,infoa]=readtiff(band1.tif)  # This load a Landsat 5 Thematic Mapper (TM) image

It is at this particular point that it returns a name error, saying "band1 is not define".


texts: Arcpy - Python script select many values from attribute table raster

texts:
I run this simple script, line-by-line, and I get the error

  Runtime error SyntaxError: can't assign to literal (, line 1)

What am I doing wrong?

import arcpy
# Set workspace
arcpy.env.workspace = "D:/pro-restaura/ProRestaura-dados/outout-mg/reproject-mg"

# Set local variables
in_features = (arcpy.Raster, "area_pro_restaura_minas.tif")
out_feature_class = "D:/pro-restaura/ProRestaura-dados/outout-mg/reproject-mg/class_UpVeg.tif"
where_clause = "Value" = 2103

# Execute Select
arcpy.Select_analysis(in_features, out_feature_class, where_clause)


texts:
I am attempting am building a map data React app using GIS data. I am accessing public GIS endpoints.
The endpoint is http://gis.infrastructure.gov.au/infrastructure/rest/services/KeyFreightRoute/KFR/MapServer/0
On local development, it is working fine. However, once pushed to live it returns the error: net::ERR_CONNECTION_REFUSED. Due to it being an HTTP endpoint.
The ArcGIS docs describe a solution using config, and I have included the following code:
    esriConfig.request.interceptors.push({
      // set the `urls` property to the URL of the FeatureLayer so that this
      // interceptor only applies to requests made to the FeatureLayer URL
      urls: featureLayerUrl,
      // use the BeforeInterceptorCallback to check if the query of the
      // FeatureLayer has a maxAllowableOffset property set.
      // if so, then set the maxAllowableOffset to 0
      before: function (params) {
        if (params.requestOptions.query.maxAllowableOffset) {
          params.requestOptions.query.maxAllowableOffset = 0;
        }
      },
      // use the AfterInterceptorCallback to check if `ssl` is set to 'true'
      // on the response to the request, if it's set to 'false', change
      // the value to 'true' before returning the response
      after: function (response) {
        if (!response.ssl) {
          console.log('not ssl');
          response.ssl = true;
        }
      },
    });

However, it still isn't working!? In fact, the console.log('not ssl') isn't even logging on the live site (but it is logging on localhost).
How do you access HTTP GIS endpoints?


texts:
I am trying to prepare OpenStreetMap data for routing.  I have downloaded version 4.8.8 of osm2po.  I also downloaded north-america-latest.osm.pbf from Geofabrik.  The command I am running is:

$ java -Xmx16g -jar osm2po-core-4.8.8-signed.jar \
  cmd=tjsg tileSize=x "C:\maps\north-america-latest.osm.pbf"

The process seems to get well on its way, but I keep encountering a fatal error:

FATAL  Exception at Thu May 01 15:16:58 CDT 2014
       Message: java.io.FileNotFoundException: osm\tw_raw.2po
         (The system cannot find the file specified)
       Class: java.lang.RuntimeException
       Stacktrace:
       de.cm.osm2po.primitives.InStreamDisk.<init>(InStreamDisk.java:30)
       de.cm.osm2po.converter.Joiner.run(Joiner.java:206)
       de.cm.osm2po.Main.runJoiner(Main.java:196)
       de.cm.osm2po.Main.main(Main.java:131)

I am not sure if there is a problem with the command as I have executed it, or if there may be a data problem, or what? - I am using Java version 1.7.0_55.

Please let me know if there is any other information which would be helpful in getting to the bottom of this.


texts: Styling polygons based on data from column

texts:
I have a multipolygon layer in QGIS 3.4.

Attribute table looks like this.

I want to style each polygon based on column "Percent Ar".
When I open Layer Properties >> Symbology, I choose "Graduated" from the symbol menu. I think that's where I have to go to accomplish what I want...
Anyway, there's nothing in the "Column" field. When I type "Percent Ar"  the text turns red. If I click outside the field, the text disappears.

How do I assign the color fill for each polygon based on the "Percent Ar" column?


texts: Why won't WMS layer print in layout output, though it is displayed

texts:
Using QGIS version 3.10.2-A Coruña, Mac OS. 10.15.3.
When printing a layout atlas, the wms layer USGS topo does not print.  All other map elements print.


texts: How to correctly set the zIndex of features within an OpenLayers vector layer?

texts:
I initially add a vector layer from a GeoJSON file and label each feature:
var layer1 = new ol.layer.Vector({
        source: new ol.source.Vector({
          url: './json_3573/country_names.geojson',
          format: new ol.format.GeoJSON(),
        }),
        zIndex: 0,
        style: function(feature) {
            return [new ol.style.Style({
                zIndex: 0,
                image: new ol.style.Icon({
                  anchor: [0.5, 46],
                  anchorXUnits: 'fraction',
                  anchorYUnits: 'pixels',
                  src: './images/pin.png'
                }),
                text: new ol.style.Text({
                    scale: 1.1,
                    text: feature.get('sr_subunit').toUpperCase(),
                    fill: new ol.style.Fill({
                        color: '#4f4f4f'
                      }),
                    stroke: new ol.style.Stroke({
                        color: '#fff',
                        width: 2
                    }),
                    padding: [12,12,12,12],
                })
            })];
        },
        rotateWithView: true,
        declutter: true
    });
map.addLayer(layer1);

When later adding another vector 'layer2' with a higher zIndex = 5, the labels and markers from layer1 overlay layer2, ie. the opposite of what I would expect.
var layer2 = new ol.layer.Vector({
    source: new ol.source.Vector({
      url: './json_3573/200km_mesh_3573.geojson',
      format: new ol.format.GeoJSON(),
    }),
    zIndex: 5,
    style: new ol.style.Style({
        fill: new ol.style.Fill({
            color: 'rgba(255,255,255,0.98)'
        })
    })
});

map.addLayer(layer2);

What is the correct way to render all the features and text labels within layer1 below layer2?


texts: Spatialdataframe from a multipoligon array column


texts: How to create contours from smoothed DEM instead of using Terrain to Raster?

texts: I'm fairly new to working with lidar and have been assigned the task of creating 2ft contours for the entire county using USGS-provided lidar tiles. Is there a significant difference in the accuracy of contours when simply generating them from a smoothed DEM versus building a terrain dataset, creating a new raster from the terrain and then generating contours from the derived raster? The contours will become one of our data layers for purchase and may be used for anything from architectural design to wetland mitigation, so I would like them to be as accurate as possible in reducing noise and retaining real information. Any help would be greatly appreciated.


texts: Opening MPK file without ArcGIS Desktop?

texts:
Is there any way to open an ArcGIS map package (*.mpk) file with MapInfo?

I do not have access to ArcGIS Desktop.


texts: Python Expression for Labeling Addresses

texts:
I am trying to create a python label expression where only the first word of the address is labeled. Additionally I only want a label to appear if it is a number not a word.

I have used this script but it still labels numbers in other parts of the field. I only want the first number.

def FindLabel ( [ADDR] ):
  import re
  output = re.sub("[^0-9 ]", "", [ADDR])
  return output

I have also tried this script. It labels the first word, but is not specific on character type.

def FindLabel ([ADDR]) :
    if [ADDR]  is not None:
        split_field = ([ADDR]).split(" ")[0]
        return str(split_field)
    else:
        return None

Is there a way to combine these scripts to achieve the label I'm trying to generate?


texts: Getting count of overlapping portion of different line features within one shapefile using QGIS?

texts:
I have a line shapefile that has overlapping on certain portion of the line features. I need to know the count of where these overlapping occurs and if there is no overlap to keep it as Null or 0 as it still a count of 1 line that passes through the route.
I have a point shapefile of where these lines start and end.

Eg. A line runs from 1>2 another lines run from 1>3 and one from 1>5.  A line runs from 2>3 and another line from 3>4.
In the portion of the red box I know there should be overlapping as the lines that feed 1>2, 1>3 and 1>5 have the same route (geographic location as well).   Portions 2>3 and 3>4 of the line has no overlap.

I am trying to figure out a workflow and I am using QGIS 2.18. Any ideas?


texts:
I am trying to use a USGS product called AppEARS to download data. I want all data across the world, but the interface wants me to specify a region.

How can I write a JSON file that will allow me to draw a "polygon" that essentially covers the whole map (i.e. from -180 to 180, from -90 to 90)?


texts: PostGIS: Using a polygon to 'mask' linestrings returns both multi and linestrings

texts:
I have a table of linestrings (OSM roads, in fact) that I'm displaying on a map. I want to filter them so that only those within a certain area are displayed- I've already done this with the coastline (a table of polygons) with great success, just using ST_Intersection. However, that doesn't appear to work on the linestrings. When I try something like this:

ST_Intersection(way,st_geomfromtext('POLYGON(([etc]))',900913))

I get the following:

Error : ERROR:  Geometry type (MultiLineString) does not match column type (LineString)

Presumably the ST_Intersection is returning multiple lines rather than the single one I am expecting- but not all do, because if I change the column to be MultiLineString then it complains that it can't insert a LineString.

How can I ensure that these MultiLineStrings and Linestrings are the same type, and can all be inserted together?


texts: Geoprocessing operations re-introduce geometry errors after "repair geometry" succeeds

texts:
I am working with a shapefile that has many small, detailed polygons. After exporting it to a feature class in a geodatabase, I found that some operations (for example, Snap in the Editing Toolbox) seemed to be hanging. Based on previous experience, I thought that geometry errors were causing my processes to hang. I ran the "Repair Geometry" tool several times until "Check Geometry" no longer identified any errors. Every operation I have performed on the feature class since has re-introduced more geometry errors. Simply using the "Project" tool to project the feature class into a projected coordinate system caused "Check Geometry" to report a multitude of errors (mostly self-intersections) on features that were not identified as having errors on my initial attempt to clean this feature class.

Is there any hope that I can fix this shapefile? Running several "Repair Geometry" processes after every geoprocessing operation is an unattractive option due to the size of this dataset.

Additionally, could something besides these errors be causing my processes to hang?

Thanks.


texts: Getting elevation of surface in a specific point from DEM?

texts:
In my python code, I have to get elevation of surface in given coordinates. I know about Extract values to points tool in ArcMap, but I can't use that since it is very time consuming for me because I do evolutionary calculation and have to use it many many times in my python code.

What I need is a module or tool that takes coordinates and DEM direction then gives a number as height. I don't want to deal with creating feature classes or any other unnecessary stuff.

If you know any tools or module which can help me, please let me know.


texts: Why do objects disappear when I zoom on a dynamic map service?

texts:
I have a dynamic web map service that contains some point objects.
When I zoom in and out, some of the point object disappear and reappear randomly.
The map service is dynamic, no cache has been created for it.
Do you have any hint on what is going on?


texts: Google Earth Engine : Get "table" and not a Chart, of time series multiple polygons

texts:
Based on the example mentioned here, and based on the answer provided below,

// Define a FeatureCollection: regions of the American West.
var regions = ee.FeatureCollection([
  ee.Feature(    // San Francisco.
    ee.Geometry.Rectangle(-122.45, 37.74, -122.4, 37.8), {label: 'City'}),
  ee.Feature(  // Tahoe National Forest.
    ee.Geometry.Rectangle(-121, 39.4, -120.8, 39.8), {label: 'Forest'}),
  ee.Feature(  // Black Rock Desert.
    ee.Geometry.Rectangle(-119.15, 40.8, -119, 41), {label: 'Desert'})
]);

// Load Landsat 8 brightness temperature data for 1 year.
var temps2013 = ee.ImageCollection('LANDSAT/LC8_L1T_32DAY_TOA')
    .filterDate('2012-12-25', '2013-12-25')
    .select('B11');

// Collect region, image, value triplets.
var triplets = temps2013.map(function(image) {
  return image.select('B11').reduceRegions({
    collection: regions.select(['label']),
    reducer: ee.Reducer.mean(),
    scale: 30
  }).filter(ee.Filter.neq('mean', null))
    .map(function(f) {
      return f.set('imageId', image.id());
    });
}).flatten();
print(triplets.first());

// Format a table of triplets into a 2D table of rowId x colId.
var format = function(table, rowId, colId) {
  // Get a FeatureCollection with unique row IDs.
  var rows = table.distinct(rowId);
  // Join the table to the unique IDs to get a collection in which
  // each feature stores a list of all features having a common row ID.
  var joined = ee.Join.saveAll('matches').apply({
    primary: rows,
    secondary: table,
    condition: ee.Filter.equals({
      leftField: rowId,
      rightField: rowId
    })
  });

  return joined.map(function(row) {
      // Get the list of all features with a unique row ID.
      var values = ee.List(row.get('matches'))
        // Map a function over the list of rows to return a list of
        // column ID and value.
        .map(function(feature) {
          feature = ee.Feature(feature);
          return [feature.get(colId), feature.get('mean')];
        });
      // Return the row with its ID property and properties for
      // all matching columns IDs storing the output of the reducer.
      // The Dictionary constructor is using a list of key, value pairs.
      return row.select([rowId]).set(ee.Dictionary(values.flatten()));
    });
};

var link = '6430802a354ca3e5d5267718173afac7';

var table1 = format(triplets, 'imageId', 'label');

var desc1 = 'table_demo_' + link;
Export.table.toDrive({
  collection: table1,
  description: desc1,
  fileNamePrefix: desc1,
  fileFormat: 'CSV'
});

is there no simpler way to get a table of a time series from multiple polygons?
But I don't know, I find it bizarre that there is no simple way to get a table, as this example below where ui.Chart.image.seriesByRegion could be replace by a specific function ?

// Define a FeatureCollection: regions of the American West.
var regions = ee.FeatureCollection([
  ee.Feature(    // San Francisco.
    ee.Geometry.Rectangle(-122.45, 37.74, -122.4, 37.8), {label: 'City'}),
  ee.Feature(  // Tahoe National Forest.
    ee.Geometry.Rectangle(-121, 39.4, -120.8, 39.8), {label: 'Forest'}),
  ee.Feature(  // Black Rock Desert.
    ee.Geometry.Rectangle(-119.15, 40.8, -119, 41), {label: 'Desert'})
]);

var modis = ee.ImageCollection('MODIS/006/MOD11A1');
var modisLST = modis.filterBounds(regions)
                    .filterDate('2003-12-25', '2004-02-25')
                    .select('LST_Day_1km');

// Convert temperature to Celsius.
modisLST = modisLST.map(function(img){
  return img.multiply(0.02).subtract(273.15).copyProperties(img, ['system:time_start'])
});

// Create a graph of the time-series.
var graph = ui.Chart.image.seriesByRegion({
  imageCollection: modisLST,
  regions: fc2,
  reducer: ee.Reducer.mean()
})
print(graph)

I'm working on thousands of points and try to avoid the Chart output 5 and it's even not working since out of limits.


texts: Misaligning shapefiles in QGIS, OpenLayers and ArcGIS Desktop?

texts:
I'm working with a set of shapefiles and have some problems with the "align" of them in QGIS when I load Openlayers to reference some points. OLs has an straight horizontal baseline but the shapefiles have a slighted inclination.

I tried changing CRS-datum etc with no luck.

However, when I open the same shapefiles in ArcGIS Desktop they have a straight base line similar to that of OL in QGIS. Any ideas of the problem? If there is any problem.

https://picasaweb.google.com/117688487090958721662/QGIS


texts: GeoServer renders shape incorrectly/distorted

texts:
I am having trouble displaying country borders properly in GeoServer, as you can see from the link below (map of Italy).

http://trideg.server.de/tridec/wms?service=WMS&version=1.1.0&request=GetMap&layers=tridec:static_hasc_regions&styles=&bbox=489196.9,4109254.4,2426416.9,5987770.7&width=775&height=330&srs=EPSG:900913&format=application/openlayers&viewparams=codes%3A%27IT%27

The problem occurs with country boundaries which have very sharp edges (I assume), e.g. the shape of Albania shows correctly:

http://trideg.server.de/tridec/wms?service=WMS&version=1.1.0&request=GetMap&layers=tridec:static_hasc_regions&styles=&bbox=489196.9,4109254.4,2426416.9,5987770.7&width=775&height=330&srs=EPSG:900913&format=application/openlayers&viewparams=codes%3A%27AL%27

I obtained the ESRI shapefile from naturalearthdata.com and used ogr2ogr to transfer them in a MySQL database, which GeoServer uses as a datasource and created a layer in it.

Anyone has a lead? Either I missed something in the layer configuration (the projections are alright though, as the shapes are positioned correctly in the map), or ogr2ogr messed up the data during the conversion.


texts: QgsVectorFileWriter.writeAsVectorFormat() just kills my kernel

texts:
I would like to save a vector layer with Pyqgis 3, looking at documentation, and other questions on this forum, I wrote :

wrpath = "/home/.../joint.shp"
_writer = QgsVectorFileWriter.writeAsVectorFormat(joint, wrpath, "utf-8", joint.crs(), "ESRI Shapefile")

project.addMapLayer(joint)

But this previous just kills Python kernel, without any error message...
does someone know what I am missing ?

EDIT :
I use PyQgis in a standalone script. The minimal script required is :

##Imports

##Get and load the project instance
project = QgsProject.instance()
project.setCrs(QgsCoordinateReferenceSystem(2154))

grid = QgsVectorLayer(datafile + 'grid.mif', 'Grille', 'ogr')

wrpath = r"/home/edelb/Bureau/joint.shp"
print('Debug1')

#First saving way tested :
grid.selectAll()
processing.run("native:saveselectedfeatures", {'INPUT': grid, 'OUTPUT': wrpath})['OUTPUT']

#Second saving way tested :
_writer = QgsVectorFileWriter.writeAsVectorFormat(grid, wrpath, "utf-8", driverName = "ESRI Shapefile")

print('Debug2')

At first running with Jupyter, no message was sent (just the kernel crashing), then running with PyCharm the following message :

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

Rq : "Debug1" is printed, not "Debug2". Moreover, the two saving ways were tested both separately.

2nd EDIT

A very interesting fact :
I have tried to run this code inside QGIS integrated Python console. It works. But still not as a standalone way ...

Therefore, it might be useful to add here the Qgis API initialization. Before executing any code calling Qgis API, I run the following script :

import sys

pathlist = ['/usr/share/qgis/python/plugins', '/usr/share/qgis/python/plugins/processing',
            '/usr/share/qgis/python', '/usr/lib/qgis/plugins', '/usr/lib/python3',
            '/usr/lib/python3/dist-packages']  # necessary to use Processing plugin
for p in pathlist:
    sys.path.insert(0, p)

from qgis._analysis import QgsNativeAlgorithms
from qgis.core import *
from qgis.processing import *
from PyQt5.QtCore import *

QgsApplication.setPrefixPath("/usr", True)
qgs = QgsApplication([], False)
qgs.initQgis()

# Processing initialization
QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms())  # needed to use native algorithms
import processing
from processing.core.Processing import Processing
Processing.initialize()

print("Initialisation : OK")

Is there something to modify here to fix this segmentation fault I keep having, when I try to write/save a vector layer in a standalone script ?


texts: Why is the SelectionChanged signal triggered every time i click on the layer?

texts:
i'm making some experiments with the SelectionChanged signal of a QgsVectorLayer.

i try this piece of code :

curLayer.selectionChanged.connect(self.test)

and "test" print a warning message.

The probleme i have is that the signal is triggered every time i click on the layer, even when there's no change of selection ...

Is there something i'm missing in this SelectionChanged behaviour ?

Thanks for your help.


texts: Parsing Geopackage (gpkg) file in JavaScript into array

texts: I am a beginner with GIS. I have the following code that is successfully creating and displaying a map:


texts:
I am building a dojo app using the ESRI JavaScript version 4.5. I built it using these instructions from ESRI:

https://developers.arcgis.com/javascript/latest/guide/using-bower/

I'm trying to render my feature layers with WebGL. In order to do this, I need to include this script tag before loading the JavaScript API into the app:

<script>
  var dojoConfig = {
    has: {
      "esri-featurelayer-webgl": 1
    }
  }
</script>

I downloaded the ESRI JavaScript API to my machine, so I don't have to load it into the app. Where do I include this script tag to make WebGL work?


texts:
I have a layer to analyze and I want to create a thematic map with rule based feature. There is a strange behaviour. I want to find all objects with no data (NULL). All empty objects. The zero value for me is a value. I write:

  namefield = ''

The result is zero but I have 47 objects with NULL value. This is an error. The strange behaviour is if I write:

  namefield != ''

The result is 56 objects. This rule works.
It is impossible to find objects with no data but qgis find only objects with a value.

Is this a bug or a feature?

It is a bug for me!

I use qgis 1.8

Thanks


texts: Lost/disappeared shape_length an shape_area fields

texts:
I have a vast database which includes a shape length and shape area field. One day, after doing some fc to fc layers from said feature class, I opened the attribute table and the shape length and shape area fields had disappeared completely! I have no idea where they've gone.

Any ideas what's happened?

I'm new to GIS so don't know how to manually calculate them and put them back in.


texts: PostgreSQL: Copy the line segment together in another table without copying the intersection with another line segment

texts: Presently these linesegments are in different rows but in the same table and numbers shown in the image are the ids of respective linestrings. I want to copy linesegment 350, 333, 352,4,.. in one table while 1601, 1602,356, 576,580,344,.. in another table. In terms of algebra set A members in one table and set B in another though there is intersection seen visually. This is a representative sample and these sets have more ids than mentioned here and have more sets than two A and B. Can we do using queries in postgis or using python script


texts:
Besides the beePen plugin is there a way of creating freehand polygons and lines in QGIS 3.8.1?

I'm trying to draw freehand lines,etc. over a raster image and would prefer not to have to continuously click to create a vertex.


texts:
I have followed all instructions from this YouTube tutorial.

Create contours and show elevation values
Open GRASS plugin on QGIS - create new mapset and choose the "import loaded vector" command from GRASS and choose your contour layer
v.to.3d.attr (Performs a transformation of 2D vector features to 3D to height based on attribute)

Once I hit step 3 QGIS crashes both 3.10 and 3.12 versions but something that's very essential is that the contour vector layer created from step 2 does NOT have any elevation data and I have been told that causes QGIS to crash at step 3.

Also, after running step two the new contour vector layer has a question mark next to it saying that the layer has no CSR set.

I double click on the question mark and set the same coordinate system reference as the one for the TIFF file which is WGS 84 EPSG 4326 and then proceed to step 3.

Any ideas on how to solve this?


texts: Setting custom page width and height using QGIS Composer?

texts:
I need to produce a number of squared images with QGis Composer (QGis 2.14.11-Essen). There is a multitude of pre-set page formats but they are all rectangular. I would like to provide my own width and height page settings, e.g. 200x200 mm. How can it be done?

There is no way to modify the contents of the Width and Height boxes in the Page Setup dialogue:


texts: Missing images in an image collection creating errors when trying to calculate daily surfaces through ee.List.sequence function

texts:
A MAIAC image collection has multiple images for a single day; however, it also has some days without any effective measurement for a region. I wanted to generate daily surfaces through a mean function, but found that using ee.List.sequence will incur errors in days when there was no effective measurement.
How can I work around days where there are no measurements?
var startDate2016 = ee.Date('2016-01-01'); //missing data for 2/18-2/25
var endDate2016 = ee.Date('2016-03-01');

var maiac_aod_cal2016 = maiac_aod //the GEE asset name
  .filterDate(startDate2016, endDate2016) //endDate does not include data for the last date
  .select('Optical_Depth_047');
//print(maiac_aod_cal.size());

// use image.map function to clip the image collection
var maiac_aod_cal2016v2 = maiac_aod_cal2016.map(function(image) {
  return image.clip(cal10kmbuff);
});

//maintain the projection
var  maiac_aod_prj = function(image) {
  var im = image.select(0);
  return image.reproject({
    crs: maiac_aod_cal2016.first().projection(),
    scale: 1000})};

//calculate daily means because one day might have multiple measurements
var num_days2016 = endDate2016.difference(startDate2016, 'days');
var days2016 = ee.List.sequence(1, num_days2016); //this creates number of days but some days no AOD data

var daily_aod2016 = ee.ImageCollection.fromImages(
      days2016.map(function (day) {
          var aod_day2016 = maiac_aod_cal2016v2.filter(ee.Filter.calendarRange(day, day, 'day_of_year'));
          //the following line of code does not work
          if ( ee.Filter.greaterThan(aod_day2016.size(), 0) ) {
              return aod_day2016.filter(ee.Filter.notNull(['Optical_Depth_047']))
                    .mean()
                    .set({'day_of_year': day,
                        'system:time_start': aod_day2016.reduceColumns(ee.Reducer.min(),
                               ['system:time_start']).get('min')
                        //Error in map(ID=00000000000000000051): Image.date: Image '48' does not have a
                        // 'system:time_start' property.
                    });
          }
}));
var maiac_aod_cal2016v22 = daily_aod2016.map(maiac_aod_prj);


texts:
I have a dilemma? I work with a slope terrain. Slope field is done by a percentage of 10%. My question is, in which direction is oriented this pixel, or any pixels? It is important to know to what direction, if you're designing roads. On image below I represented Slope image, and zoomed 10% slope pixel.

This is result from comments below. This is image made with Qgis2threejs. I still not sure that real slope of each pixel oriented to arrows, like those yellow pixels on top left corner, I mean diagonally. Sorry maybe my answer could be confused.


texts:
I'm developing a QGIS plugin along with PostGIS and I'm facing some problems with labeling. This plugin creates several layers and tables. Some of these layers are views  (labeling layers), so if I edit the one fo the source layer the view changes and then the label. I explain more detailed:

I have the following:

One layer. Let's call it layer1.
One none spatial table. Let's call it table1.
One spatial view from these other two layers layer1 and table1 meant for labeling. Let's call it labelView1.

The point is this, when I edit table1 adding a new element linked by a foreign key with layer1. The label position in labelView1 changes into a messy thing. The Style of labelView1 is the following:

Symbol is a geometry generator. Since I want to create callouts from label to the geometry, wich is a point.
The position of the label is saved on project. In the qgd file.

I have seen this behaviour in Windows10 and in Ubuntu. The QGIS version is 3.4, but I tried to move to the new 3.10 version of QGIS, with the callouts new feature, but is the same result.

As well I tried to reproduce it in a much simple way, but without succed, that's why I want to share a link with a GIF file showing this issue:

https://gifyu.com/image/vMY7

I've done the same but without fixed position,and the labels don't move, but the geometry_generator does.

Is there any way to prevent it if this is a bug?


texts: Merge overlapping points in the same layer by maintaining both attbributes

texts:
I have a road network layer where each line segment is broken off by intersecting line features. I ran the intersect tool to create points along each line intersect to represent 'Intersection' point layer. Now, I have 2 points for every intersect which includes data from both intersecting lines (street names). I want to have one point for every intersect that includes the street names from both lines.

I have tried to Delete Identical, which works, but it removes on random point. I don't know how to merge these overlapping points in the same layer to a new layer that has street name from both overlapping points?


texts: Measurement of accuracy for image segmentation of land cover image in python

texts:
I have a land cover image and I segmented it using K-means clustering algorithm. Now I want to calculate the accuracy of my segmentation. How do I do that?

I have read about dice similarity co-efficient and jaccard similarity

I tried to apply them to my images but soon realized that they will always evaluate to zero as they take into account the matching of intensity/pixel values which are not same for the original and segmented image in my case.
I used this algorithm.
How do I solve this issue? Please guide me, considering me a novice in the field.


texts: Using rasterio and matplotlib to visualize Sentinel-1 data

texts:
I'm trying to work with satellite data for the first time and running into problems. I find the documentation about using Sentinel-1 data in Python lacking, but maybe I'm searching for the wrong things.
I have downloaded a Sentinel-1 granule from the copernicus.eu website, and now I'm trying to get some usable visualization going in Python.
I started with the following small script which I've adapted from rasterio's documentation:
import rasterio
from matplotlib import pyplot as plt

path = '/x.SAFE/measurement/y-00n.tiff
src = rasterio.open(path)
array = src.read(1)
pyplot.imshow(array, cmap='pink')
plt.show()

However, I get the following error message:
TypeError: Image data of dtype complex128 cannot be converted to float

which stems from the fact that the values in array are complex.
How do I go about visualizing this data? Feel free to point me to it should I have missed some obvious documentation, but I couldn't find anything that helped me after googling this for several hours.
PS: I'm not set on using rasterio, but it seemed to be made for this purpose.


texts:
Where can I find a free shapefile of the Soviet Union | USSR?

Ideally, I would like to be able to open it straight-away in QGIS.


texts: Choosing Iterator when using TAB Reader in ArcGIS ModelBuilder?

texts:
I have added the TAB Reader 5.2 tool to a model; TAB Reader (from DataEast) can convert multiple MapInfo tab files to ArcGIS format. However, I would like to iterate through many folders, each of which has tab files.

Is there a proper iterator type to use for this? I have tried using "feature Classes" and "Files" but am subsequently unable to link them up to the TAB Reader tool.

I'm on ArcGIS for Desktop - Advanced v10.3.1


texts: Is publishing geodata in unprojected latlon coordinates better than a local UTM projection?

texts:
This is meant as some kind of reference Q&A.

Unless I am working with truly global data, I always prefer projected, local, metric coordinates so that calculations like area or distances are "right by default" in tools like QGIS. So if I get original data for a country in its UTM zone's coordinate system - perfect!

Many people highly prefer getting their data in WGS84 (4326) or Web Mercator (3857) for ease of use in tools like Google Maps.

I just read a open data release suggestions catalog and publishing geodata in those systems was one of the items. This made me wonder:

Apart from convenience, are there any drawbacks of using one or the other?


texts: Configuring JVM for GeoServer 10 in Centos?

texts:
I am configuring my freshly installed Geoserver 2.10 based on the Geoserver docs.
According to the above URL I need to increase the default heap memory by configuring not my Tomcat container but the JVM (so it applies for all types of containers).

I do that with the following command:

 export _JAVA_OPTIONS="-Xms128m -Xmx756M"

Then I check it was applied with this command:

 java -XX:+PrintFlagsFinal -version | grep -iE 'HeapSize|PermSize'

But I have noticed the following: Before I set the above parameters, I checked what where the once existing and I got this:

uintx InitialHeapSize                          := 261347392
uintx MaxHeapSize                              := 4181721088

After assigning the new parameters I have this:

uintx InitialHeapSize                          := 134217728
uintx MaxHeapSize                              := 792723456

Which are actually much smaller than the initial ones. So should I keep the values from before (how did this values were assigned? Are they based on my system's capabilities?) or I should go with what Geoserver docs recommend even though it is less memory?


texts: Problems opening ArcGIS 10.3.1 .shp files in QGIS

texts: I'm using QGIS version 2.12.1-Lyon for Mac and trying to import a .shp file that was apparently created with ArcGIS 10.3.1. I keep receiving the "invalid data source" error message no matter how I try to import the file (drag and drop, import layers drop down menu, QGIS file browser). Is it possible that .shp files created with ArcGIS 10.3.1 are not compatible with QGIS? Is there some sort of tip or trick that can be used to get around this so that I can import the file?


texts:
I've been working on a project for a few months. I closed it and re-opened it and since then any of my projects have problems loading, meaning I just get a blank screen (see attached). If I click on any of my layers I get the loading icon, eventually I have to force quit. I'm on MacBook Pro 15 + El Capitan + QGis Essen.
I opened the same project on windows and it's all fine.


texts: Publishing Map With Mosaic Dataset YIelds Grey Image When Zoomed In

texts:
I'm working with ArcGIS 10.0 and ArcGIS Server 10.0 and I'm trying to publish a map that contains a Mosaic Dataset (I believe it's a new data format at 10.0), but after zooming in to a certain extent the ortho greys out.

I have built/defined overviews and this has helped some ( before building the overviews, I was only getting the Footprint wireframe). The dataset that the Mosaic Dataset is referencing is a single jpeg orthophoto.  If I publish the Mosaic Dataset as an Image Service I get the same results. When creating the Mosaic Dataset, I use all the default parameters and I'm not messing around with visible extents (I'm accepting full extents). Any thoughts as to what's going on here?

Additionally (this may require posting another question),  when I bring the jpeg image into the Mosaic Dataset the quality of the image is greatly reduced, which results in the image looking "over exposed".


texts: Resampling 30m DEM to 100m slope raster properly?

texts: I need to resample a 30m DEM to a 100m slope raster.  Do I just resample the 30m DEM directly to the 100m slope raster? or, do I convert the 30m DEM to a 100m DEM and then create a 100m slope raster from the new 100m DEM file?


texts: trsp route between two points ( not edge to edge )

texts:
I'm trying to solve common problem, how to generate route/navigate between two GPS coordinates and not between two edges using trsp algorithm. I did read many articles here but i'm not sure how should i create temporary edge on huge psql database where even now routing taking several seconds and insert/update can take forewer.

Solution where i will navigate to nearest edge and then calculate distance between edge coordinates and destination coordinates is in my case not good b/c i'm trying to avoid one way streets and this solution is ignoring it.

Another solution i have is to find edge where both start(x1,x2) and end(x2,y2) coordinates are nearest to the destination GPS coordinates ( which does not need to be nearest edge ) and navigate there but found this edge is also very slow.


texts: Trouble importing Feature Classes into Feature Datasets

texts:
I'm sure there must be a simple reason for this but I can't seem to be able to import a shp file or a feature class from another file or sde geodatabase into a Feature Dataset without getting an error.  The feature classes come in fine if I don't don't try to import them into a Feature Dataset.  The feature dataset definitely has the same projection as the feature classes I'm trying to import so I don't think that's the problem.  The Error I get is ERROR 000210 and just says Failed to convert and cannot create output and Failed to execute (CopyFeatures).

Any ideas what I may be doing wrong here.  Seems like something so simple.  I'm trying to use the Feature Datasets to better organize my data which I think is there purpose.

Update:  So as you can see below, Jason helped me find the answer.   As suggested by Matt below, I added a new Idea to the ArcGIS Ideas site.  Here is the link to that, so please promote this up if you agree a better error message is needed here: http://ideas.arcgis.com/ideaView?id=08730000000brxl


texts: Is there a way to mask the area projected in QGIS 3D View?

texts:
I'm attemping to create a 3D map view for export to a PDF.  However, QGIS's 3D map view seems to base its canvas solely on the viewable area within the main window in QGIS proper.  e.g., as you zoom in and out of your 2D map, this adjusts what the 3D map will project.

The problem here is that I have a lot of data that is strung along a fairly narrow corridor, so I have a lot of "wasted" canvas on either side that I do not need in my 3D view.  Is there any way to restrict the area projected in the 3D view, other than adjusting my zoom in the 2D view?  I can't zoom in any further without losing data off the top and bottom of the canvas, and I can't export this current view because there is far too much empty canvas to the left and right.


texts: Creating Line between two other lines using ArcMap

texts:
I work with ArcGIS Desktop 10.8.
I want to create one polyline between two other existing lines and the new line must go through exactly the middle of the two existing ones. Something similar to the following drawing, except that the lines are not straight. Line 1 and 2 are in reality bathymetric curves.
_____________________________________  Existing Line 1
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _  Line that I need create
_____________________________________  Existing Line 2


texts: Is there a way to USE Mapbox Vector Tiles with ImageMosaic?

texts:
I'm trying to use https://docs.geoserver.org/latest/en/user/extensions/vectortiles/tutorial.html
mapbox vector tiles to serve images on an Android App.

OSMDroid doesn't work properly so we are trying to use Mapbox SDK.

The problem with it is that it only support mapbox vector tiles, but to create a timeseries in GeoServer we need ImageMosaic. Using ImageMosaic we can't see the vector tiles options inside GeoWebCache settings.

Is there a solution to this?


texts:
I'm looking for data on commodities (corn and potato). Tools such as USDA's cropscape (http://nassgeodata.gmu.edu/CropScape/) are great but lack global cover.

I found this dataset http://www.earthstat.org/data-download/
but this is for the year 2000 and not very recent.

Are you guys aware of any better datasets containing the location of commodity crops such as corn and potato?


texts: Converting Lat Long to Usable values in QGIS?

texts:
I am using both QGIS 1.8 and 2.0.  So either is helpful.

A client has given me locations of trial pits but i cannot load them into QGIS no matter how hard i try.

For example, 50°24.711 North 7°25.529 West.  The site is near Enniskillen Co. Fermanagh Northern Ireland.  Any system i can find to convert degrees minutes and seconds will not allow 24.711, and seconds only go to 60.


texts:
I would like to change the coordinatereferencesystem for my application

I have this code :

QgsMapRenderer* myRender = mapRenderer();
mQgsCoordinate = new QgsCoordinateReferenceSystem(myRender->destinationCrs());
myRender->setMapUnits( QGis::Meters );
myRender->setProjectionsEnabled( true );
mQgsCoordinate->createFromOgcWmsCrs("CRS83");
qDebug() << " mQgsCoordinate = " << mQgsCoordinate->description();
if( mQgsCoordinate->isValid())
    qDebug() << "CMyQgsMapCanvas::setProjection OK";
else
    qDebug() << "CMyQgsMapCanvas::setProjection NOK";

I have always NOK and the mQgsCoordinate->desciption which return a QString is always Empty !!!
What's wrong ? Did I forget a step to change the CorodinateReferenceSystem ?


texts: Scheduled Tasks no longer run after updating to ArcGIS 10.3

texts:
I have a bunch of scripts written that run daily using Windows Task Scheduler.  Yesterday i updated my version of ArcGIS from 10.1 to 10.3.1.  Python was also updated to 2.7.8 as part of that installation.  After the update, all my scheduled scripts get an error message of "1% is not a valid Win32 application. (0x800700C1)"

Under the settings tab i set "if the task is already running, then the following rule applies:" to "Stop the existing instance"

It is also set to run whether the user is logged on or not.

What am i missing?


texts: What KML features are suitable to display 3D atmospheric density data using Google Earth?

texts:
I wish to use Google Earth to visualise and explore 3D atmospheric density data. In my case it is ionospheric electron density, which is a niche area, but I can imagine this might have been done by someone to display say atmospheric moisture content or pollution levels (or volcanic ash plumes??).

I am new to KML files, but reading over the developer guide it isn't obvious how best to go about this. Would you slice your 3D density data into many 2D layers and use < altitude > elements? Or would it be better to use grid the data into many small cubes and use < polygon >s? Or some other option?

I'm sure this has been done before, but I couldn't find any suitable examples.


texts: How to export a Raster attribute table into a .txt using Model Builder

texts:
I'm using ArcGIS 10.1

I need to export a Raster attribute table into a .txt (or any other format Excel can import), using Model Builder.

Is it possible?


texts: Adding a scale using SDK GXP OpenGeo Suite

texts:
Followed the tutorial using the OpenGeo suite SDK, and looking at adding a scale to my maps however the tutorial doesn't cover adding widgets only plugins. So I am not sure about how I would add http://gxp.opengeo.org/master/doc/lib/widgets/ScaleOverlay.html wherever I place it fr example the tools section I seem to just get a white screen, which tells me something is wrong.

I believe I should call it using

* @require widgets/ScaleOverlay.js

and then as with plugins something like (below) in the tools part of app.js

 {
ptype: "gxp_ScaleOverlay",
 actionTarget: "map.tbar"
},


texts: PostGIS: Using nearest (), and ST_ClosestPoint in a create table

texts:
I have the following datasets stored in PostGIS 9.5 with all the relevent indexes built.

Collected Points - over 4 million points
Polygons - almost 5000 multi polygons (and they are multi polygons)
Road Lines - over 5 millions linestrings
Access Points - 68k point features

For each Collected Point I need to test whether it is in a Polygon, if it is then select the nearest Access Point, if it is not in the Polygon, then select the closest point from the lines.

I have tried a number of methods and the closest I can get to the right SQL was this:

CREATE TABLE test AS
WITH polygon AS (
    SELECT ST_Union(geom) as geom FROM polygons
)

SELECT
cp.*,
CASE
    WHEN ST_Intersects(cp.geom, polygon.geom) THEN (Select ap.geom FROM access_points ap ORDER BY ap.geom <-> cp.geom LIMIT 1)
    ELSE ST_CLosestPoint(l.geom, cp.geom)
END AS closest_geom
FROM
polygon,
collected_points cp,
lines l

this code is running but even on a sample of 150 Collected Points the query has been running for a long time.

Maybe I am trying to do too much in a query or need to use more subqueries or CTS statements.

Can someone please suggest a better solution


texts: Configuring and adding images/links/URLS into pop-ups on ArcGIS Online?

texts:
I am administering an ArcGIS Online Organizational account and am newer to this side of ArcGIS Online.

I am trying to create a map with pop-ups that contain different images for different points, attachments (such as reports) and URLs.

The Help section on ArcGIS unfortunately did not provide me much insight as to how to go about this.

Is anyone able to assist me?


texts: Getting and editing list of strings from file geodatabase

texts:
I have a file GDB that contains Annotation and Polygon feature classes. I would like to create a list of strings with the first part of the name of the polygon features. For example in the data below I would like to create a list that would appear like the following -

['Canal', 'CanalAreas']

I have used ListFeatureClasses in order to get a list of all the polygon classes, but I'm a lot a loss of what the next step is, - a LEN() style function to move the last 6 characters?

lookfor = []
for dataset in arcpy.ListDatasets():
    for fc in arcpy.ListFeatureClasses("*", "Polygon", dataset):
        lookfor.append(fc)

for fc in arcpy.ListFeatureClasses("*", "Polygon"):
    lookfor.append(fc)

I currently have this list hard coded in another script and would like to make it more dynamic so I don't have to worry about data changes etc.


texts: Different results from Spatial Analyst GP Tool and Python

texts:
I am writing a script that has to subtract one raster from another.

The rasters I have represent
  1) Parking Lots (1 = Parking Lot, 0 = not Parking Lot) and
  2) a buffer around the Parking Lot (1 = Parking Lot or 20ft Buffer around Parking Lot, 0 = not Parking Lot or Buffer).

What I need is a single raster representing just the buffer area without the actual Parking Lot, basically a ring around each Parking Lot (1 = ring around Parking Lot, 0 = not ring around Parking Lot).

When I perform this task manually in ArcMap (v10.1) using the Minus tool in the Spatial Analyst Extension, it works appropriately.  When I try the same thing in Python (testing from the command window in ArcMap), the subtraction does not occur and the buffer with Parking Lot raster is returned unchanged.  The same result occurs whether I use arcpy.sa.Minus(buffer, parkinglots) or buffer - parkinglots.

This particular workflow is part of a larger script so doing it manually in ArcMap is just not an option.  Any suggestons?

UPDATE:

I tested this a slightly different way.  I create a new model that performed the Minus operation the same way I did it manually in ArcMap.  It worked.

According to the documentation, there are 2 ways to accomplish a subtraction.  You can either use the - operator or the equivalent Minus GP tool within the Math toolset of the Spatial Analyst Tools toolbox (arcpy.sa.Minus).

So, I tried something else, I exported that model to script.  What I found was fairly interesting.  In the script that was exported from my model, the Python code was arcpy.gp.Minus_sa.  I haven't found any documentation about this, but it worked.


texts: Distance from point or edge when using ST_ClusterWithin with polygons

texts:
When using ST_ClusterWithin with polygons, is the distance calculated from the polygon's centroid or it's edges?

This information is absent from documentation.


texts: Arcpy PointGeometry does not carry forward the ID

texts:
I used this as starting point

I have the following code:

Test data

data = numpy.array([(0, 51.1047664, -114.3722785, 1205, 'I:\\0_Tools\\Testing\\gis\\disciplines\\aerial_imagery\\Agisoft_Automation\\ImageProcessing\\Test_Images\\Small\\2014-05-07-Bragg-0001.JPG'),
                             (1, 51.104791, -114.3755528, 1209, 'I:\\0_Tools\\Testing\\gis\\disciplines\\aerial_imagery\\Agisoft_Automation\\ImageProcessing\\Test_Images\\Small\\2014-05-07-Bragg-0002.JPG'),
                             (2, 51.10452519998783, -114.39971750000001, 1372, 'I:\\0_Tools\\Testing\\gis\\disciplines\\aerial_imagery\\Agisoft_Automation\\ImageProcessing\\Test_Images\\Small\\2014-05-07-Bragg-0003.JPG')],
                            dtype=([('Id', 'int'), ('SHAPE@X', '<f8'), ('SHAPE@Y', '<f8'), ('SHAPE@Z', 'int'), ('Path', 'S255')]))

pointGeometryList = []
        for pt in lat_long_data:
            point = arcpy.Point(pt[2], pt[1], None, None, int(pt[0]))
            print point.X
            print point.ID
            point.ID = pt[0]
            pointGeometry = arcpy.PointGeometry(point, spatial_ref)
            pointGeometryList.append(pointGeometry)

        arcpy.CopyFeatures_management(pointGeometryList, "c:/temp/points2")

When run the print.X and print.ID statements print the expected result, however when I look at the output table the ID is 0 across all records, I cannot figure out why.


texts:
I'm trying to do a simple map in Qgis using mapquest has background.
I have read that and followed the scale values but even while using those, I get some bad blur on my map.
I can't figure out to do take it away.
I just wanted a simple base map for my map but it seems it's not so easy to find, i thought mapquest could be the one but ... doesn't work well :/


texts: Wrong results from custom reference system

texts:
I'm trying to define a custom CRS in QGIS using PROJ4 format.
Here's the string I used:

+proj=tmerc +ellps=GRS80 +datum = ETRS89 +lon_0 =11.86 +lat_0 = 0 +x_0 =40000 +y_0=-6013000 +units=m +towgs84=0,0,0,0,0,0,0 +to_meter +nodefs

here's the original geodetic infos:

WGS84 coordinates lat = 54.95 lon = 11.86 should give me something like x = 39763 y = 79272 instead I get y = 14296754 x = 757997.

Does anybody know what I'm missing/doing wrong?

Please be kind with this newbie


texts:
I am working with MODIS Aerosol data (the Level-2 AOD_550_Dark_Target_Deep_Blue_Combined product). I am retrieving the data using the LAADS DAAC data API, and requesting all swaths as GeoTIFF files.

I know that level-2 products are not georectified to a common grid (as L3 products are), but I was wondering if I need to re-grid my GeoTIFF files to extract data for some latitudes and longitudes.

My approach for extracting the data is quite simple, I am just using the rasterstats Python library and querying the points I need from each file. Is this data going to be different from the same extraction from the re-gridded data of the same file? I am just wondering that the re-gridding needs interpolation. Hence, I will modify the data array and create some bias.

Any recommendations?


texts:
I have three layers: 1-Parcels 2-Buildings 3-DEM

I imported them all into CityEngine and I aligned parcels and Buildings to Terrain (DEM).

I noticed that, in large parcels (see Figure 1), some buildings are floating. The reason is, the large parcel vertices have been aligned to terrain. But the middle part of the parcel has not been aligned to the height locally. So, when I align the building to the terrain, it aligns it to the terrain based on the height of the footprint of the building. Accordingly, it aligns it to a higher height and it shows the building is floating in the air.

What would be the best method for fixing this issue? Can I align a layer to a layer?


texts: Is there an 'average' algorithm for st_resample()?

texts:
Currently, the docs for ST_Resample() give options for NearestNeighbor (English or American spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm.

ref: http://postgis.net/docs/RT_ST_Resample.html

In the same page, they give a link (http://www.gdal.org/gdalwarp.html) to the GDAL warp resampling methods in which average is an option. However, after running it with average as a parameter for the st_resample function, it spit out the same raster (values are the same) with a different pixel size. The funny thing is, running st_valuecount on the two rasters gives the identical number of pixels too which doesn't make sense.

I would like to resample my 10m raster to a 30m raster resolution by calculating the average within each 30m grid. Any ideas?


texts: ERROR 000989: Python syntax error: Parsing error SyntaxError: invalid syntax (line 2)

texts:
I have a Field Calculator I am using with Python and I keep getting the above error.  Below is the screenshot of my Field Calculator I am using.

What am I doing wrong here?


texts: R: Using map() and plot() with the same projection

texts:
I am trying to plot a shapefile (SpatialPolygonDataFrame in R) of 180 census tracts on top of an outline of the US using map(). The .prj file for the census tracts lists the projection as follows:

 PROJCS["USA_Contiguous_Albers_Equal_Area_Conic",GEOGCS["GCS_North_American_1983",
 DATUM["D_North_American_1983",
 SPHEROID["GRS_1980",6378137.0,298.257222101]],
 PRIMEM["Greenwich",0.0],
 UNIT["Degree",0.0174532925199433]],
 PROJECTION["Albers"],
 PARAMETER["False_Easting",0.0],
 PARAMETER["False_Northing",0.0],
 PARAMETER["Central_Meridian",-96.0],
 PARAMETER["Standard_Parallel_1",29.5],
 PARAMETER["Standard_Parallel_2",45.5],
 PARAMETER["Latitude_Of_Origin",37.5],
 UNIT["Meter",1.0]]

And when I call proj4string() on the tracts, I get the projection in this format.

"+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"

I tried setting the projection within map() to match this .prj file, but when I go to plot my census tracts on top, they don't show up anywhere.

 map("usa", project="albers", par=c(29.5,45.5))
 plot(tracts, add=TRUE)

I feel I'm misunderstanding either how to add the projection properly, or how to over-plot polygons on top of map().


texts: Copying shapefile to Feature Dataset using ArcPy?

texts:
How do I copy a shapefile to a Feature Dataset?

Here is is my script.

import arcpy

import os

arcpy.env.workspace = "C:/temp"

dataset1 = "C:/SDE.gdb/temp1"

arcpy.CopyFeatures_management("scrap.shp", "dataset1")

Instead of copying the scrap.shp located in c:/temp into the dataset called "temp1"...it creates a point feature class called "temp1" in the root of SDE.gdb


texts: Problem with adding GeoJSON to OpenLayers 3

texts:
I transformed (.geojson file)from EPSG 2180 to 4326 using

ogr2ogr -f "GML" -lco GEOMETRY=AS_XY -t_srs EPSG:4326 test.geojson file.geojson

I would like to add to map, but I received this error :

Below script:

      #map {
        height: 100%;
        width: 100%;
      }

    OpenLayers 3 example

    My Map

  var map = new ol.Map({
    target: 'map',
    layers: [
       new ol.layer.Tile({
          source: new ol.source.OSM()
       }),

new ol.layer.Vector({
      title: 'added Layer',
      source: new ol.source.GeoJSON({
         projection : 'EPSG:4326',
         url: 'gjson/test.geojson'
      })
  })
        ],

    view: new ol.View({
      center:[0,0],
      zoom:2

    })
  });
</script>


texts: Google Earth Engine Hansen Forest Cover - annual loss

texts:
https://code.earthengine.google.com/b15af44386f0770df3ba21d38022c8d6

I am trying to get annual forest loss using the Hansen dataset in Google Earth to get a video. I have added the yearly loss image to the map to try to see if by 2018 it matched the main "loss" layer but it doesn't (Red are annual loss images and yellowish is the total loss layer). I think I am not doing the mask correctly but I haven't figured out why.

Here's my code:

var GUA_Pet = ee.FeatureCollection("users/andrealiralo/GUA_PET");
Map.centerObject(selected, 8);

// Collection
var gfc2018 = ee.Image('UMD/hansen/global_forest_change_2018_v1_6').clipToCollection(selected);

var prj = gfc2018.projection();
var scale = prj.nominalScale();

var treeCover = gfc2018.select(['treecover2000']);
var treeLoss = gfc2018.select(['loss']);
var lossyear = gfc2018.select(['lossyear']);

var treeLoss = treeLoss.mask(treeLoss);
var treeGain = treeGain.mask(treeGain);
var lossyear = lossyear.mask(lossyear);

Map.addLayer(treeCover, {palette: ['000000', '#37c756'], max: 100},
'Forest Cover 2000');
Map.addLayer(treeLoss, {palette: ['#cbd71d']}, 'Loss');

// %%%%%% ANNUAL LOSS %%%%%%%%%%%
var years = ee.List.sequence(01, 18).getInfo();
var annual_loss = years.map(function(year){
  var mask_treeLoss_yy = lossyear.eq(year);
  var treeLoss_yy = treeLoss.updateMask(mask_treeLoss_yy);

  Map.addLayer(treeLoss_yy, {palette: ['FF0000']}, 'Loss Year
  '+String(year));

  var treeLoss_yy_proj = treeLoss_yy.reproject(prj.atScale(scale))

  return treeLoss_yy_proj
});

The video doesn't work, something to do with the projection that also haven't solved but the layers do show up.


texts: Populate Geography data in SQL Server Management Studio GUI

texts:
Is there a specific syntax to use to populate a Geography type field in SQL Server Management Studio (SSMS). The below screenshot shows the SSMS GUI and the location field is of Geography type.
I have tried the following which does not work
POINT (-20.104581710276683 -20.104581710276683 4326)
I am aware that it can be done using SQL, but I am looking for a method that works on the GUI.


texts: Uncaught Type Error: t.addLayer is not a function

texts:
I am trying to add a JSON file to my webmap in leaflet but I keep getting this error.
I am calling an external js file and adding it as a variable to my map
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Bunuba Heritage Map (BETA2)</title>

   <link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css"
integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ=="
crossorigin=""/>

<link rel ="stylesheet" href= "/Minimap/src/Control.MiniMap.css"/>

<link rel="stylesheet" href="FullScreen/Control.FullScreen.css" />

Bunuba Heritage Map (BETA)


texts:
I want to access landsat data from gcp-public-data-landsat bucket using vsigs . My code looks like ,

import os, sys
from osgeo import gdal

print(gdal.VersionInfo('–version'))
print(sys.version)

url = "/vsigs/gcp-public-data-landsat/LC08/01/044/034/LC08_L1GT_044034_20130330_20170310_01_T2/LC08_L1GT_044034_20130330_20170310_01_T2_B1.TIF"

gdal.UseExceptions()
gdal.SetConfigOption('CPL_CURL_VERBOSE', 'YES')
gdal.SetConfigOption('CPL_DEBUG', 'YES')
gdal.SetConfigOption('CPL_VSIL_CURL_ALLOWED_EXTENSIONS', '.TIF')
gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', '123123')
gdal.SetConfigOption('GS_ACCESS_KEY_ID', 'blablabla')
src = gdal.Open(url)
print(gdal.Info(src))

But it shows

GDAL 2.4.2, released 2019/06/28
3.6.8 (default, Oct  7 2019, 12:59:55)
[GCC 8.3.0]
Traceback (most recent call last):

  File "<ipython-input-13-5aadfee561e4>", line 1, in <module>
    runfile('/home/souvik/Desktop/Final_Year_Project/google auth/untitled0.py', wdir='/home/souvik/Desktop/Final_Year_Project/google auth')

  File "/usr/lib/python3/dist-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
    execfile(filename, namespace)

  File "/usr/lib/python3/dist-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/home/souvik/Desktop/Final_Year_Project/google auth/untitled0.py", line 52, in <module>
    src = gdal.Open(url)

  File "/usr/lib/python3/dist-packages/osgeo/gdal.py", line 3242, in Open
    return _gdal.Open(*args)

RuntimeError: `/vsigs/gcp-public-data-landsat/LC08/01/044/034/LC08_L1GT_044034_20130330_20170310_01_T2/LC08_L1GT_044034_20130330_20170310_01_T2_B1.TIF' does not exist in the file system, and is not recognized as a supported dataset name.

I also tried using rasterio , but it also shows parsed path problem. Also I have seen https://github.com/OSGeo/gdal/blob/master/autotest/gcore/vsigs.py .But could not figure out. Please tell to acsess it simply using GS_SECRET_ACCESS_KEY and GS_ACCESS_KEY_ID .


texts: Dem file in .adf format, while .tiff is needed

texts:
I would like to use this standalone tool to get different kind of Dem visualizations (http://iaps.zrc-sazu.si/en/svf#v). I see that the program accept only .tiff DEM.

Now, the DEMs I got are not in that format; rather, I see that the files are .adf

I am wondering if I need to convert the DEM I have into .tiff, and how it can be accomplished (possibly in ArcGIS 10.1).


texts: Web AppBuilder Developer Edition - on(someNode, "click", someFunction) Executes N Times When Widget Opened for the N-th Time

texts:
I have an on(someNode, "click", someFunction) in the onOpen() of Widget.js. The problem is that if the widget is closed then reopened (2nd open), the click event on someNode fires twice. If close and reopen the widget again (3rd open), the click event fires three times, so on and so forth...
Is there a way to let the click event on someNode only fire once after reopening the widget?


texts: Reading ESRI Geodatabase Metadata with QGIS

texts:
I have used the ArcMap tool to create a geodatabase in an Postgres/PostGIS database and have loaded a feature class and an XML file that contains metadata for the feature class into the geodatabase using FME. Now when I right-click the feature class in the Catalog window of ArcMap, I can see the metadata.

It would be great if I could also see that metadata in QGIS. However, when I try to load it into the QGIS canvas it doesn't even show as a spatial table. I know it is a spatial table because I can load it into ArcMap. Is there any way that I can put this table on the map and also view its metadata in a similar way to ArcMap? I have used the Metatools plugin, but that is only for shapefiles.


texts: create polylines with different colors in leaflet

texts:
I have one function which creates poly line & adds that polyline to map

function makeRoute(e)
{
    if(pointsSelection.length > 0)
    {
        pointsSelection.push(e.target.getLatLng());
        var firstpolyline = new L.Polyline(pointsSelection, {
        color: 'blue',
        weight: 5,
        smoothFactor: 1
        });

        firstpolyline.addTo(map);

        pointsArrayCollection.push(pointsSelection);
        polyArrayCollection.push(firstpolyline);

        selection = [];
        pointsSelection = [];
    }
    else
    {
        alert("Please select more than one point");
    }
}

my problem is that It adds line with same color every time.

I want to add poly lines with different colors every time.

So how can I change color of polyline dynamically.


texts: How to plot a shapefile with colors according to a column numbers in R?

texts:
reclass = function(x){
 ifelse(x == 0, 10,
     ifelse(x > 0 & x <= 20, 0, NA))
}
arch$ranks<-as.factor(unlist(lapply(arch$ranks,reclass))
arch.col = topo.colors(nlevels(arch$ranks))
for(i in 1:nlevels(arch$ranks)) {
    plot(arch[arch$ranks== levels(arch$ranks)[i]], col=arch.col[i])
}

The above script returns the map that i want but it has no colors. The desired outcome would be to take the 10's in the "ranks" and paint it one color and the zeros and paint them something else altogether.

 arch$ranks
  10
   0
  10
  10
  10
  10
  10
   0
   0
  10
  10

I want to make the colors of 10's with one color and the colors of 0's with another. Hope this makes it clearer.


texts: Why PostGIS st_transform length is different?

texts:
I have two query
select sum(st_length(shape)) from sde.ways;

result is: 24268

And
select sum(st_length(st_transform(shape, 3857))) from sde.ways;

result is: 32047

Same Linestring geometries are calculated but the sum of total is different.
I noticed this while getting the transformed GeoJSON responses on my OpenLayers map. The total length of geoemtries on the map is different from database. My web OpenLayers map projection is EPSG:3857. So I am sending transformed data.
How can I solve this problem?


texts: Leaflet / JQuery -cannot add or remove class to divIcon marker

texts:
(this is related to a previous question of mine)

I am adding a divIcon (an svg) as the icon for features in a geoJSON, using Leaflet.
I can add a class to the html property of the icon, but I cannot seem to dynamically add or remove the class using jQuery.  I would like to do this to change the size of the icon at different zoom levels (unless anyone else has a better idea how to do this?)

code snippets below:

this part works as expected; the icon is the size given in the css class (although the 'size' property seems to be ignored)

var icon = L.divIcon({"iconSize":new L.Point(50, 50), "iconAnchor": AnchorIcon,  "popupAnchor": PopIcon, html: '<svg id="thisIcon" class="thisIcon15" ><use xlink:href="#marker"/></svg>'});

but if I try to dynamically find if this class exists on a zoom event with JQuery, the return value is false:

map.on('zoomend', function(e) {
  console.log( $('#thisIcon').hasClass("thisIcon15")  ); // false

I tried directly referencing 'svg' in the JQuery call as well...no luck.

EDIT: I found that 'addClass' and 'removeClass' cannot be used directly with svgs (LINK).

I tried the workaround suggested in that link, but although I get the new SVG at the right size, the old one does not disappear; instead the resized SVG appears on top of the old one.  From what I can see, the size property given in the icon declaration is not being honored.  If  i could find a way to add all the different sized icons to each point, then toggle the opacity of each one, that could work.


texts: Use ArcGIS-server restapi to return geometries as Json objects

texts:
I'm very new to ArcGIS-server REST api, but have been using ArcGIS desktop and other web maps for a while.

In one of the Buffering example,
I found one GP service which takes geometres in as parameters and return buffered gemetries as json objects.

This seems to be very interesting to me. I'm thinking about writing another REST GP service myself, which can take a string parameter and create a bunch of gemetries as Json object. (The reason for that is I'm creating some spatial elements on the fly with users' request)

But it's very difficult even to find a place to start...
Should I write a python script which can return a Json object and then publish that script as a service?

If anyone can give me a hint on where to start, it would be much appreciated!!!

Thanks


texts:
I've got some shapefiles that I want to be able to turn into maps on a hand held GPS (Magellan Explorist 350H). So far I've had no success trying to convert the files to gpx and upload that way. I've also tried some free software DNRgps and ITN converter. The latter allowed me to convert a file to a "Magellan SD" file type (sort of; it split the file into a bunch of sections, so I would have to convert each section, and who knows how that would turn out on the actual GPS), but then I could not figure out how to get it onto the GPS.

It seems like this should be a straight forward thing to do. My searching around on the internet has not provided any straight forward answers. Hopefully someone on here can help.

I am able to convert the files to gpx, however they are not in a usable form. The gpx breaks down the shapefile into a bunch of different routes. If I force it to track it breaks it down into a bunch of little tracks. These aren't really helpful since what I'm trying to convert is some shapefiles of roads. After converting them to gpx I was having trouble uploading them to the Magellan device. The Magellan software VantagePoint doesn't recognize the tracks or routes as having any content.


texts: Tie up LineString to the feature when dragging it in OpenLayers

texts:
I have an application in OpenLayers which shows a number of devices (Feature) on a map. The devices are linked between each other by cables (MultiLineString).

searchBoxModule.functions.createConnection = function createConnection(from, to) {
var fromGeom = new OpenLayers.Geometry.Point(from.geometry.coordinates[0], from.geometry.coordinates[1]);
var toGeom = new OpenLayers.Geometry.Point(to.geometry.coordinates[0], to.geometry.coordinates[1]);
var multilineString = new OpenLayers.Geometry.MultiLineString([new OpenLayers.Geometry.LineString([fromGeom, toGeom])]);

var layer = MapView.getConnectionsLayers();

if (layer) {
    layer.addFeatures([new OpenLayers.Feature.Vector(multilineString)]);
}}

The issue is that MultiLineString is basically an array of points which have no relationship to the features. So, currently when I drag a feature to a different location on the map the lines (cables) visually connecting them don't change and it looks like the cables have been disconnected.

Did anyone had this kind of issue? Any recommended solutions to that?


texts: QGIS 3.16 - unpractical changes to intersect tool?

texts:
I currently am testing QGIS 3.16. I just ran intersect without any input modifications on a buffer layer with 12 polygons (first input) and a layer with 417 administrative districts (second input). The expected result (as created using 3.10) was a single layer which contains the 12 polygons, split by the administrative districts into smaller polygons and with the attributes of the districts attached to the buffers. Instead I got 1000 layers after the tool ran for about 7 minutes, of which only 3 contain data. Those 3 each represent the parts of an administrative district which my buffers cover.
I skimmed the change logs for 3.14 and 3.16 but couldn't find any explanation of these changes. What did I miss?
/edit: So, saga:intersect does what I expected/need. I still would like to understand the changes.


texts: Adding frequency (count) of a point shapefile on an animated map?

texts:
I have a crime (point) data on a map which is animated via time slider using a 1-week-period.

I see all the points I added without a problem, I also added a dynamic text indicating the time period on each frame video shows.

I just would like to add in a text (I guess this should also be dynamic) the count of crimes (points) on each time period (week).


texts: Trying to use “Pit Remove” tool gives out “'ascii' codec can't encode character" error

texts:
It does not only happen with pit remove, but with other tools as well. I get this error in all of them.

'ascii' codec can't encode character u'\xb0' in position 158: ordinal not in range(128) See log for more details

Does anyone know how to fix this?


texts: How do I obtain a valid token for updating layer definition in a feature service?

texts:
I'm attempting to automate data updates of an ArcGIS Online feature service using the REST API.

So far, I've been able to successfully:

Get a valid token from https://www.arcgis.com/sharing/rest/generateToken
Upload a new GeoJSON file to https://www.arcgis.com/sharing/rest/content/users/{user}/items/{feature}/update, passing in the token from step #1
The above does not seem to update the service, so I republish by passing my token and {overwrite:"true"} to https://www.arcgis.com/sharing/rest/content/users/{user}/publish

This is great, it meets the original goal of having an updated dataset in an automated fashion. However, any default styling I configure for the layer goes poof when I republish it. To fix this, I'm trying to use the functionality at https://services5.arcgis.com/{id}/ArcGIS/rest/admin/services/{service}/FeatureServer/0/updateDefinition to pass in the renderer and label information that I'd like to use. Whenever I pass in the same token for steps 3 & 4, it replies with:

{"error":{"code":498,"message":"Invalid token.","details":["Invalid token."]}}

When I check the info from that endpoint to make sure I don't have to go someplace else for my token, I see it is nearly the same URI that I used in step 1. Changing my token URI to the new value doesn't seem to make the token any more valid.

From http://services5.arcgis.com/{id}/ArcGIS/rest/info?f=pjson:

{
    "currentVersion" : 10.41,
    "fullVersion" : "10.4.1.210",
    "owningSystemUrl" : "http://www.arcgis.com",
    "owningTenant" : "{id}",
    "authInfo" :
    {
        "isTokenBasedSecurity" : true,
        "tokenServicesUrl" : "https://www.arcgis.com/sharing/generateToken"
    }
}

I can visit the endpoint above in my browser and it allows me to edit it without a problem (inspecting my browser traffic shows that it does not pass a token in the post, but instead a cookie with authentication inside)

I've tried requesting a separate token specifically for this one call, and I've tried passing in a { serverURL: 'http://services5.arcgis.com/{id}/arcgis/' } parameter with that token call. Neither of those seem to work.

I feel like I'm missing something simple, but I'm running out of ideas!


texts: Distance calibration between GNSS RTK receiver and display/processing device?

texts:
Are there any known procedures for calibrating a precise position of an external processing/display device (e.g. a smartphone or a tablet) relative to the GNSS receiver?

Apparently, such a procedure is unnecessary when the display/processing unit is mounted on the pole in a fixed position like this:

However, if the distance between the receiver and the processing unit is not fixed, how does one handle measurement and calibration of this distance? Imagine, for example, a surveying session when one has to walk around the area holding only the display/processing unit in their hands, while the receiver position does not change (think underground utility mapping).

Or, when a GNSS receiver is mounted in a backpack like this:

When we talk about centimetre accuracy, any hands and/or backpack movements will introduce a measurement error. Of course, most of the tablets/smartphones have IMUs whose readings should help make necessary adjustments, but the question of initial distance calibration remains open.


texts: Creating contours from DEM for multiple files using ArcMap ModelBuilder?

texts: How can i create an ArcMap model in ModelBuilder to iterate through a folder and applying contouring tool on all tif DEM files on that folder.


texts: Calculating polygon around point and extract gridded data

texts:
I'm trying to calculate 50km circles around lat-long points and then extract gridded rain data (1km x 1km). However, for some reason my long-lat points are shown in the center of the U.S (picture related) and not where they are supposed to be. I have tried several projection transformations which more or less all deliver the same result.

Please find attached a working example which shows the problem on a subsample.

library("daymetr")
library("ncdf4")
library("raster")
library("rasterVis")
library("sf")

coords <-structure(list(id = 2L, Longitude = -71.4836857,Latitude = 43.0202135), row.names = 1L, class = "data.frame")

# Downloads precipitation tile from Oak Ridge National Laboratory Severs into tempdir()
download_daymet_tiles(location = c(43.59510,  -71.93360, 42.44533,  -71.0337),
                      start = 2015,
                      end = 2015,
                      param = "prcp")

## Read netCDF precipation data
ncpath <- paste0(tempdir(),"/prcp_2015_11935.nc")
nc = nc_open(ncpath)

raster = raster(ncpath, band=4)

crs(raster)

dat_sf <- st_as_sf(coords, coords = c("Longitude", "Latitude"), crs = 4326) %>%
      st_transform(3488) # transform to NAD83 California Albers, which uses metres as its unit.

# Buffer circle by 50km and transform to crs of raster object
dat_circles <- st_buffer(dat_sf, dist = 50000) %>%
  st_transform("+proj=lcc +lon_0=-100 +lat_0=42.5 +x_0=0 +y_0=0 +lat_1=25 +a=60 +rf=6378137 +lat_2=45")

# Create Map of Raster Data and Circles
mapTheme <- rasterTheme(region=brewer.pal(8,"Greens"))
plt <- levelplot(raster, margin=F, par.settings=mapTheme)
plt + layer(sp.polygons(as_Spatial(dat_circles), fill = "red"))


texts: Generate Proj4 definition from given parameters

texts:
I'm an archaeologist and I'm struggling with the generation of a reference coordinate system for georeferencing the Spezialkarte der Osterreichisch-Ungarischen Monarchie (XIX century). I've found the parameters I attach to this message but I'm not able to create the correct proj4 definition.

This is a link to the map I'm trying to georeference.

Can anyone please help me?


texts: How would I go about getting the user input from a popup that contains a text input in Mapbox GL JS?

texts:
I want to make a list of places I'd like to visit. When I click on the map a marker is placed and a popup appears above the marker. The popup contains a text input field and a submit button to save whatever the user inputs.
I would like to know how to get the user input when submitting the information.
this may seem trivial, but i'm at a loss on how to do this in mapbox gl js.

I Intend to use this in a React app at a later stage to save the info to the local state of a component.

Here's a simple gist just to give you a context:

https://gist.github.com/Aknotofknots/364bf05fa763614c2116e31fe400e95b


texts: How to calculate area of 1 x 1 degree cells in a raster

texts:
I have a simple array (not geo-referenced in any way) in Matlab (which is not a language I know a huge amount about...so I can export it to other languages if needed) which has the dimensions 180 x 360 and contains data for each 1 x 1 degree area of the globe. I need to calculate the area of certain cells in this raster.

Obviously the area will vary based on longitude, but I have no idea how to calculate this area, particularly as my array is not georeferenced. I saw a reference online to the area function in the R raster package, but I'm not sure how to get my matlab data into a Raster object within R.

Does anyone have any suggestions as to how best to calculate these areas?


texts: Cannot add packages using ArcGIS Pro Python Package Manager

texts:
I am trying to install a Python package in ArcGIS Pro but cannot get it to work. Somehow this worked for me with an earlier version of Pro. I am now using 2.6.3
The things that I have tried so far:

Cloning within Pro with the Python Package Manager (PPM) didn't work. So I followed the instructions here.
I can see the clone environment, but I cannot add packages. PPM spins for a while but nothing happens. The part of issue is that PPM doesn't echo any errors so cannot tell what the issue is.
Also tried the Python Command Prompt in the Arcgis Pro folder. Only then I saw that the problem was with the HTTP errors.
HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/esri/win-64/arcgispro-2.6-0.tar.bz2>
I was suspicious that it had something to do with the secure connection. So checked it with the curl -Iv https://conda.anaconda.org but the connection was successful.
Tried it as a an offline user too but still had no luck.


texts: Refreshing values in Attribute table automatically after they were changed in database

texts: I've connected QGIS to an external database, which records the entry and exit of vehicles in a car park.The objective is to follow the entries and exits of vehicles in real time. However, the attribute table in which the data is recorded in QGIS does not update automatically. How can I do this?


texts: Adding Legend to Time Lapse in Google Earth Engine

texts:
I am trying to add a Legend to a time lapse video. In my final print I have an image collection and the video specifications are already defined.
print(ui.Thumbnail(ImageCollection, videoArguments)); //print gif
print(ImageColletion.getVideoThumbURL(videoArguments));

is there any way to add a continuous (gradient) legend as an RGB object (or text) using visualization properties?


texts:
I have an Asus ZenBook Laptop with a 3200 x 1800 touchscreen, i tried enlarge icons but the ArcToolBox and other icons not fit on a 13.3 inches display.
Other "more common" apps that do not have much problem.
How to get the best configuration?
Sorry for my english.


texts: Finding minimum number of inspection points using QGIS?

texts:
I am working on a pipeline inspection project and there is a high liklihood that some inspection tool deployment/retrieval station will need to be installed on the pipe network.  the problem is determining the best places to locate the stations.  Analytically it would seem that I am looking for a minimum set of loactions P such that the network distance l between any two points "adjacent" pi, pj to eachother on the network is less than or equal to a given distance L

P = min{ p(x,y) | l(pi,pj) <= L }

I am at a loss as to where to start in solving this problem.


texts: How to create a tabular legend in ArcMap 9.3?

texts:
I want to create a legend in ArcMap 9.3 like the image below for a polygon layer. How can I do that?

The values in the first column (Molid, Brad, etc.) and in the second row of legend (1-40, 41-90, >80) are stored in two different attributes of the polygon layer. The text "categoria de vârstă (ani)" is the title of the legend.


texts: Unable to access Web Adapter 10.2.2 through JBoss EAP 6.1.0

texts:
I am working on ArcGIS server 10.2.2 for Java but facing some problem related to Web Adapter.

I have successfully configured Web Adapter with JBoss web server and able to access it from its URL (http://x.x.x.x:8080/arcgis/webadapter) but the problem is that after changing the  port of JBoss server to 80, Web Adapter is not accessible from URL. When I reconfigured Web Adapter with some other name for say geoservice (http://x.x.x.x/geoservice/webadapter) it's working fine.

Can't we use same Web Adapter with JBoss server running on different ports?


texts:
i have a lot of feature class (see figure 1)
the objective is to create one feature class that combines the attribute table (especially one field) of each feature class

the attribute table of each feature class looks the same (see figure 2).

how can a create the following result? (see figure 3)
the field  'centra_buitengewoon' (each time the last field of the attribute table) would be add to the general attribute table

I was thinking about the tool 'join field' but that one is really, really to slow (7 houres for one feature class and i have around 50 feature class.....


texts: Looping through data to perform one to many join in ArcPy?

texts:
I want to join the attribute tables of two feature classes in ArcGIS and populate the fields from one table to another. This is a one to many join and there are duplicate rows of data in the join table that match the source table. If a row of data has not already been populated by the join fields, it will populate that record. All subsequent record matches will be inserted as new rows.

Data process diagram:

There is an existing answer to a similar question here:
Joining one-to-many using ArcPy?

The solution I am currently working on uses dictionaries and cursors to process the data (as suggested by PolyGeo). I cannot simply create a dictionary on ID1 as this is not a unique field so rows with dupe ID1's will be omitted. I have instead created a dictionary which stores both ID1 and ID2 together as the dictionary keys and the remaining data fields as the dictionary values. This way I can have unique keys for the dictionary. Then, I iterate through each row of the source table and find records in the join table, create a list of 'matched' records, then either populate an existing record with empty join data or insert a new row.

It would be great if someone could share a hint or let me know if I am on the right track with my approach.

import arcpy

SourceFC = r'C:\Test_Data.gdb\SourceFC'

JoinFC = r'C:\Test_Data.gdb\JoinFC'
JoinFCfields = ["ID1","ID2","data1","data2","data3"]
JoinFC_dict = {(r[:1]): r[2:]) for r in arcpy.da.SearchCursor("JoinFC",JoinFCfields)}
# Dictionary keys = (ID1, ID2)
# Dictionary values = (data1, data2, data3)

with arcpy.da.InsertCursor("SourceFC") as insertcursor:
    with arcpy.da.UpdateCursor("SourceFC") as updatecursor:
        for SourceFC_row in updatecursor:

            # Pull records from Join table that match ID1 in Source table
            joinmatch_list = [(k,v) for k, v in JoinFC_dict if k[0] == SourceFC_row[0]]

            for joinmatch in joinmatch_list:
                # Updating source table field row with join table data
                SourceFC_row[1],SourceFC_row[2],SourceFC_row[3],SourceFC_row[4] = joinmatch[0][1],joinmatch[1][0],joinmatch[1][1],joinmatch[1][2]

                if SourceFC_row[1] is None:
                    # If Source table row has not already been populated, populate with join data
                    updatecursor.updateRow(SourceFC_row)

                else:
                    # For all subsequent 'many' joins, insert a new row with source + join data
                    insertcursor.insertRow(SourceFC_row)


texts:
I have population points for Germany and a polygon of an urban area. I've joined population data with the polygon to obtain the population of that urban area.
Now my aim is to obtain a layer with points that fall outside the polygon. Is there a way to do so?


texts: Consideration for a Good Silverlight based mapping application

texts:
I am starting to work on a Silverlight 4 based web mapping project using latest ArcGIS Server API. The application will involve multiple map services (for many themes) with selection, queries, and reporting for each map service. I am starting to gather some ideas on how to make this application extensible so that any additional map services can be added later on. For this project, in addition to map services, I will be using Oracle for backend for non-spatial data access. I am not sure if this will impose restrictions while building WCF services considering the fact that it's not SQL Server.

I am looking for some feedback from folks who have implemented Silverlight based GIS solution and some of the factors that needs to be considered for a good/robust design. These would include: MVVM, logging, unit testing, security etc.


texts: Copy a layer and its settings to a different style in MapBox

texts:
In MapBox, I have two distinct styles and need to use one heavily-customized group of layers which is currently in Style A, into Style B.

Doing it by hand (re-creating each layer in the group) could mean hours of work given the complexity of the settings, whereas having a copy/paste feature could mean achieving the same thing in seconds.

Is there a way to take a layer from one style and copy it (along with its settings) into another style, or do we have to re-create the layer — or group of layers — from scratch for each style we need it in?


texts:
When I try to add lat/lon data using the Add XY Data tool, I am not given the choice of selecting my latitude and longitude fields but rather Field 1, 2, 3, etc. I have used the Add XY Data tool regularly so am familiar with the small formatting issues required to successfully import data. I recently upgraded to 10.2.

The columns all have appropriate headers: Name (first column), Latitude, (2nd column), Longitude, Z, etc. As I mentioned I have used the Add XY Data tool regularly so am familiar with the formatting issues required to successfully import data. The first option as a field to select is Field18 (as seen in screenshot), which makes no sense. I selected field 19 and 20 for lat and long but this did not work. I believe this is an issue with the tool itself. I am not sure. Anyone have a fix?


texts:
I have a world digital elevation model which has been classified into 5 showing the different heights.

My issue is that viewing and printing this image as it is results in a speckled look due to the highs and lows being so close together.

I would like to know a method which can smooth out the speckled look, I would like to print it at multiple sizes showing world heights.

I am using QGIS


texts: Testing a GeoServer "Scrolling" performance

texts:
I'm looking for a way to test the responsiveness of various layers when scrolling around the map. So after a layer is loaded and the user is moving around the map looking a specific area or whatever.

We are currently using GeoServer and OpenLayers for the application and are looking into ways to increase the performance of the application. I've messed around with Jmeter but it seems to be just testing get requests and not necessarily the users experience when using the application. I've also tried using the developer tools in Chrome and recording the performance while doing a preset scrolling/zooming pattern. This seem to work pretty well but is obviously not going to be very precise.

So essentially are there any tools/techniques that I can use for testing responsiveness of a layer when scrolling around the map?


texts: Defining Namibia Schwarzeck Projection Parameters in Custom CRS using QGIS

texts:
I am using QGIS 3.16.
I would like to create a custom CRS using the following projection parameters:
Namibia Schwarzeck Projection Parameters:
Semi-major axis:    6 377 483.86500
Semi-minor axis:    6 356 078.96325
e2  0.006674372231
Inverse flattening: 299.152812800000
Shift X:    -616.80000
Shift Y:    -103.30000
Shift Z:    256.90000
Scale correction:   0.00000
Origin longitude:   17.00000
Origin latitude:    -22.00000
Scale factor:   1.00000
False easting:  1.00000
False northing: 0.00000

How do I go about it?


texts: Setting transparency for layer in ArcPy?

texts:
I have a blank map. And I have a shapefile. I would like to add the shapefile to the map document, change its colour (which I figured out using @AlexTereshenkov's answer to Adding a layer with specific color to map in ArcPy) and set its transparency.

My plan is to make a layer from the shapefile (MakeFeatureLayer_management), add the resulting layer to the map document (mapping.AddLayer) and then change the transparency using arcpy.transparency.

As it was explained to me in the other question, I need to reference the map layer not the feature layer. I assume the same applies for setting the layer's transparency. I tried both:

import arcpy, os

### Set directory
arcpy.env.workspace = ...
arcpy.env.overwriteOutput = 1

### Define inputs
yellow = "symbology/yellow.lyr"
city = boston
year = 2000

# Set map document
mxd_city_year = arcpy.mapping.MapDocument(r"...\blank_map.mxd")
DF = arcpy.mapping.ListDataFrames(mxd_city_year)[0]

# Add layers
arcpy.MakeFeatureLayer_management("states/continental_US.shp", "us")
basis = arcpy.mapping.Layer("us")
arcpy.mapping.AddLayer(DF, basis, "AUTO_ARRANGE")
map_lyr = arcpy.mapping.ListLayers(mxd_city_year, wildcard="us", data_frame=DF)[0]
arcpy.ApplySymbologyFromLayer_management(map_lyr, yellow)

# Set transparency (the part that does not work!)
map_lyr.transparency = 0
basis.transparency = 0

# Save map
mxd_city_year.saveACopy("thresh_" + city + "_" + year + ".mxd")

However, neither referencing the feature layer (basis.transparency = 0) nor the map layer (map_lyr.transparency = 0) seems to work. Does anyone know why?


texts: Cheapest path through polygons and lines from point to point

texts:
I want to find the cheapest path or the least cost path from one point to another point. The points are part of a vector map and do not lie on a network. All features being part of the map have different costs assigned as costs/meter to cross.

So far my solution is to rasterize all of the features except the points and perform a least cost path analysis with SAGA GIS. To be able to do least cost path analysis, I first generate an accumulated cost surface with r.cost or SAGA GIS accumulated costs. This however, produces a not perfect vector-line, because the line aligns with the edges of the raster cell and therefore uses a not perfect path. In the image below the produced paths are green and the cost surface is more expensive, the darker the red gets.

Can you think of an improvement of my approach or is there a better method to get a path between the points with taking into account the costs?


texts:
I'm working with Python and GeoPandas. I have two parcel layers that are identical and in the same coordinate reference system. The parcel number field is not unique so I am unable to join on that field. I performed a spatial join but this produced undesirable results.
sjoin_parcels = gpd.sjoin(parcels_2021, parcels_2020, how='inner', op='intersects')

There are about 600,000 parcels in the data set but sjoin_parcels has 1.9 million records. I thought about converting one layer to points and using the centroid to perform the join but am concerned about irregular polygons and their centroid not being in the polygon. Based on their description here, within and contains do not seem to be the right solution either. Is there a way to perform the join so that it joins features that are coincident?
I've also tried a merge on the geometry attribute but that returned an empty dataframe.


texts: Accented characters in csv file appear as '?' when importing to QGIS

texts:
The tabular data (.csv file) and the data in the attributes table of the vector (.shp file) I am trying to join includes accented characters - they are place names in Pamana. For example 'Río Abajo' and 'Curundú'. The problem is that when I import the csv file as a vector file QGIS can't seem to read the accented characters and puts a little '?' instead for those characters. So I just get NULL values appearing in the joined attributes table - all the data for the unaccented names turns up perfectly. I have tried changing the names to unaccented latin characters, from the earlier example 'Río Abajo' becomes 'Rio Abajo'. But then the names don't match up with the place names already in the attributes table of the shapefile I am using  (administrative areas for Panama) so the NULL values appear again.
Hope you can help.