texts: Did I set up Tiger Geocoder incorrectly?

texts:
I set up Tiger Geocoder in PostGIS on my local box (PostGIS 2.1.3, PostgreSQL 9.3.5, Tiger 2013 data).

The problem I'm running into is that on almost every street most of the points are clustered, with only a few addresses in their correct locations. You can see an example in the image below:

My first thought was that somehow I had set up the geocoder with the wrong SRID, but I did everything "by the book" and I have tried several times but I still get the same results.

Is this to be expected with Tiger data or am I doing something wrong?


texts: Is there a dissolve function in PostGIS other than st_union?

texts:
I'm looking for a function to dissolve shared boundaries between polygon features in a table. ST_UNION() almost does what I'm looking for, but it creates a multipolygon from all polygons in the layer regardless of whether they share a common boundary or not. I'd rather only dissolve boundaries between polygons that touch each other. I figured, there should be some way using ST_TOUCHES() but then the need for a dissolve function seems so common that I would be surprised if there is no built-in function to achieve this.

The use case looks like this: I downloaded Corine Landcover data for a big European country and I want to dissolve boundaries between different forest types (approx. 75,000 polygons in one table). I tried ST_UNION, but it fails me with an "out of memory" error (30,000 polygons did work though):

create table corine00 as
  select st_union(the_geom) as the_geom,
         sum(area_ha) as area_ha,
         substr(code_00,1,2) as code_00
  from clc00_c31_forests
  group by substr(code_00,1,2)

Note: All forest codes start with '31' and I'm using PostGIS 1.4, GEOS version: 3.2.0-CAPI-1.6.0


texts: How to check if Waste-Water Manhole connect to lines with the right flow direction?

texts: I have a waste-water geometric network with flow direction throw digitize direction. I want to check if each manhole have a line flowing in and a line flowing out. Is there an attribute of line vertex that i can use ? (like last vertex of line and first vertex of the line) what will be the check Procedure ? (I can handle basic python scripts) I'll be glad to get some help with python script for that


texts: ol.interaction.Select not working on OpenLayers 4

texts:
I have a single map and I want to add single click intergration to click to select map objects. But I write some code below, it's not working.

IMSMap.map.addInteraction(new ol.interaction.Select());

and tried this

IMSMap.map.addInteraction(new ol.interaction.Select({
    condition: ol.events.condition.click
  }));

both are not working, I clicked and nothing to happen.
I want to my map works like this sample in this url
http://openlayers.org/en/master/examples/select-features.html


texts: QGIS place label on both sides of the item

texts:
I have assigned multiple of labels for my items. Following the threads here
https://dominoc925.blogspot.com/2017/05/create-labels-from-multi-columns-in-qgis.html
https://anitagraser.com/2011/06/15/multi-line-labels-in-qgis/
or here
How to create vertical labels in QGIS?
but I couldn't find how to place them on both sides of my object.
Since I have 2 breaks, it looks quite troublesome.
I tried to do something in the Placement section, but I don't know what should change there.
How can I place these labels on both sides of my object?


texts:
Mac OS 10.9.5; QGIS 2.8.4-Wien; offending data here

I want to calculate the centroid of a polygon in meters. However, I cannot get QGIS to display in UTM and I cannot transform/project the data to UTM. I followed instructions on a number of answers to similar questions (e.g. here, here and here) and still have the data displaying in lat/longs (in the coordinate box at the bottom of the main screen).

In Project Properties/CRS I have set the project properties to UTM GDA94 / MGA zone 55, checked 'Enable on the fly' CRS transformations. In Project Properties/General/Canvas units I have selected Meters.

I added the vector data and defined current projection under Vector/Data Management Tools. I projected the data to UTM GDA94 / MGA zone 55 and saved the layer in that CRS. When I did this, the extent of the layer was showing in lat/longs, not meters. I've also tried to do this in a couple of other projected coordinate systems (WGS 84 / UTM zone 55S and GDA94 / Geoscience Australia Lambert) and am having the same problem.


texts: Install Postgis in Ubuntu 16.04 in with already postgresql 9.3 installed

texts:
In ubuntu 16.04 with postgresql 9.3 when I tried to install postgis with using command

sudo apt-get install postgis postgresql-9.3-postgis-2.1

It installed postgresql 9.6 and postgis-9.6 version. And when tried to create extension it gives error

CREATE EXTENSION postgis;
ERROR: could not open extension control file "/usr/share/postgresql/9.3/extension/postgis.control": No such file or directory.

Also two servers are running

postgres@db:~$ psql
psql (9.6.3, server 9.3.17)
Type "help" for help.


texts: Creating or adding geometry colunm fails even with postgis enabled

texts:
I'm trying to add a geometry colunm to a table in a database with postgis extention enabled (other tables in this schema even have geometry colunms), but it fails:

ALTER TABLE my_schema.my_table ADD COLUMN geom geometry(MultiPolygon, 4326);

gets me an error:

ERROR:  type "geometry" does not exist

although

CREATE EXTENSION postgis;

returns

ERROR:  extension "postgis" already exists

I'm running Postgres 9.5, but I cannot tell postgis verion because it throws another error

ERROR:  function postgis_full_version() does not exist

Although postgis is listed under extensions in pgadmin.


texts: Render all roads with an equal width in Mapnik

texts:
Is there any easy way to render all roads and paths with an equal width in Mapnik? In the rendition below, all lines have the same line width, but since many of the bigger roads have many lanes or parallel roads that are (nearly) overlapping, they seem fatter.

My source for Mapnik is a PostGIS database with OSM data.

Any ideas?


texts:
Using ArcGIS 10.1, I am interested in symbolizing a series of polylines to generate a pseudo-heatmap like one of the answers to this question.

The essence of the solution idea is to symbolize each polyline as red center, green border, and set the individual line transparency to 20%.  Using ArcGIS, it is trivial to set the entire layer transparency, but then the cumulative, low alpha, overlaps never sum to an opaque level.

Is it possible to set opacity / transparency at the symbol level and not the layer level?

Similar to Displaying transparent overlapping polygons in ArcGIS for Desktop?, but I am interested in polyline and using color, instead of hatching.

Edit

I have tested the ability to do this in two ways:

If I buffer the polyline and add a transparency field, I can directly set transparency for each layer.  Unfortunately, this still appears to 'flatten' the symbology, i.e. the cumulative alpha of overlapping polylines is lost.
By exporting 4 of the polylines, known to overlap, it was possible to manually set the transparency (on the layer) to 80%.  When all layers are viewed the cumulative alpha is displayed as anticipated, i.e. two overlapping lines are 'darker' (40% opaque).

As an aside, I tested this using a google fusion table and the result is as expected, i.e. alpha is per line and cumulative for overlapping symbols.  This can also be done in OpenLayers, but that removes the step from my ArcGIS workflow (and more importantly, my users ArcGIS workflow).

Edit 2

I was able to accomplish this manually in ArcGIS using the following workflow.  This is non-ideal as it requires a duplication of the layer n times, where n is the number of features.

Copy the layer and paste to the same dataframe.
Define a definition query on a unique field.  In my case I used a grouping:
`"id" >= 20 AND "id" < 30.
Repeat 2 until all features are in their own layer...
Add the features to a New Group Layer
In Group Layer Properties select Symbol Levels
Check 'Draw this layer using the symbol levels specified below'
Manually check Merge for each layer

I suspect that the above workflow can be automated as a python add-in.  I will need to explore that next.

Result with black background:


texts: How to remove last created QgsRubberBand by clicking in Map Canvas area where doesn't exist any feature?

texts:
By combining information from these posts:

Get the identified feature

How to create and remove multiple QgsRubberBands in PyQGIS?

I produced following code for getting feature attributes and creating and removing its respectives QgsRubberBands after clicking on Map Canvas where features exist for a polygon vector layer.

from qgis.gui import QgsRubberBand, QgsMapToolIdentifyFeature
from PyQt5.QtGui import QColor

def onFeatureIdentified(feature):
    fid = feature.id()
    rbList.append( [feature.id(), QgsRubberBand(iface.mapCanvas(), True)])

    print ("feature selected : " + str(fid))

    for i, item in enumerate(feature.attributes()):
        print (feature.fields().names()[i] + ": " + str(item))

    if len(rbList) == 2:
        iface.mapCanvas().scene().removeItem(rbList[0][1])
        del rbList[0]

    rbList[0][1].setColor( QColor( 'red' ) )
    rbList[0][1].setWidth( 5 )
    rbList[0][1].addGeometry(feature.geometry(), None)

rbList = [] # To store the created rbs and feature ids

layer = iface.activeLayer()
mc=iface.mapCanvas()
mapTool = QgsMapToolIdentifyFeature(mc)
mapTool.setLayer(layer)
mc.setMapTool(mapTool)
mapTool.featureIdentified.connect(onFeatureIdentified)

After running above code, it can be observed that it works as expected (see following images):

however, I cannot find out any useful method (at pyqgis script) for removing last created QgsRubberBand by clicking in Map Canvas area where doesn't exist any feature. It could be manually done by using following instruction at Python Console:

iface.mapCanvas().scene().removeItem(rbList[0][1])

My question is how can I implement former instruction in the previous code to get expected result.


texts: Alternative repository for QGIS 2.0 plugins?

texts:
Is there any alternative to the official repository for plugins of QGIS 2.0?

I found a source which refers to OpenGeo Explorer
For more info:
http://qgis.boundlessgeo.com/static/docs/intro.html


texts: Displaying results through polygon tool on Leaflet map using event listeners

texts:
I have certain documents residing on within my database. Currently i am able to display their Geojson on the map by drawing a polyogon within a certain area and then clicking on a button but i want to be able to do this whole process in such a way that if user creates a polygon on the map for query, it automatically returns the result without any button involved in between. which event handler should i be using for that?

JS code

angular.extend($scope, {
  center: {
    lat: 51.505,
    lng: 10.09,
    zoom: 3
  },
  controls: {
    scale:true,
    draw: {}

  },

  layers: {
    baselayers: {
      mapbox_light: {
        name: 'Mapbox Streets',
        url: 'https://api.mapbox.com/styles/v1/mapbox/streets-v10/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoicmVoYW5zNTE2IiwiYSI6ImNpeWxjcWNkODAwNGwzM3FxamR6a2gxOXkifQ.PuUfs90MyfmVGYVqx0AoUw',
        type: 'xyz',
        layerOptions: {
          apikey: 'pk.eyJ1IjoicmVoYW5zNTE2IiwiYSI6ImNpeWxjcWNkODAwNGwzM3FxamR6a2gxOXkifQ.PuUfs90MyfmVGYVqx0AoUw',
          mapid: 'mapbox.streets',
          format: '@2x.png'
        },
        layerParams: {
          showOnSelector: false
        }
      }
    },
    overlays: {
      draw: {
        name: 'draw',
        type: 'group',
        visible: true,
        layerParams: {
          showOnSelector: false
        }
      }
    }
  }
});

leafletData.getMap().then(function(map) {

  leafletData.getLayers().then(function(baselayers) {
    var drawnItems = baselayers.overlays.draw;

    map.on('draw:created', function (e) {
      var layer = e.layer;

      drawnItems.addLayer(layer);

      console.log(JSON.stringify(layer.toGeoJSON()));
      coordinates_selected = layer.toGeoJSON();
    });
  });
});

function fetching data from server

function callingspatialsearch(){
  console.log('calling spatial search');
  var deferred = $q.defer();
  httpRequests.
  spatialsearch(coordinates_selected)
    .then(cb1)
    .catch(errorHandler);
  return deferred.promise;

  function cb1(response){
    $log.debug('result of search2: %o', response);
    var t= response.data.hits.hits;
    var c=[];
    for (var x in t){
      c.push(t[x]._source.metadata.o2r.spatial.geometry);
    }
    console.log(c,'response array');
    deferred.resolve(response);
    angular.extend($scope, {
      geojson: {
        data: c,
        style: {
          fillColor: "green",
          weight: 2,
          opacity: 1,
          color: 'white',
          dashArray: '3',
          fillOpacity: 0.7
        }
      }
    });
  }

  function errorHandler(e){
    $log.debug('search error: %o', e);
    deferred.resolve(e);
  }

}


texts: Can raster files from ArcGIS for Desktop be visualized in Google Maps?

texts: I have raster files created using ArcGIS (Desktop application). On the other side I develop an application using google maps. Can I visualize those raster files somehow on google maps API?


texts: Connecting points to lines via network layer in QGIS

texts:
So I have a set of three layers:

A set of points
A road network layer
A line layer (e.g. which represents a cable)

I need to find the shortest paths which connect the points (Layer 1) to the line layer (Layer 3) via the road network (Layer 2). I tried doing this by first converting the line to a set of points on QGIS 3.8 on Windows and then using GRASS 7.6 on CentOS 7 and using the v.net.distance algorithm to achieve my objective.

However, before this, I had to prepare the three layers using v.net and when doing so I encountered an error stating v.net: rect.c:338: RTreeRectVolume: Assertion volume >= 0.0' failed. Aborted (core dumped), which I believe was due to the large number of points that the line converted to.

For the time being, I've had to make do with a few points spaced far apart on the line layer and connecting the points from Layer 1 via v.net.distance. However, as evident from the image below this leads to inaccuracies when I try to calculate distances from the cable to the points as it often travels a long way along the cable before branching out to the road network.

On the image below: Road network: light grey. Line Layer: green. Points: red Triangles.

So in summary, what I need to do is find a way by which I get the shortest path to connect the points (in Layer 1) to the line (in Layer 3) via the road network (in Layer 2)

I am considering any solution using QGIS, GRASS GIS or a combination of both.


texts:
My employers are looking into a partnership with a company that provides RTK base stations (they specialize in Topcon equipment) and are planning to replace our old total station with a Topcon HiPer SR receiver, controller as yet undecided. I'm being asked to research base stations/GNSS receivers but I learned nearly nothing about base stations besides that they are useful things during my GIS training and my Google skills have been failing me. I work in a N-S running valley in the Canadian Rockies that's full of gentle hills and am mostly looking to collect accurate data points from urban infrastructure (utility networks, roads, etc), and my questions are:

Will an RTK base station still provide accurate (within a few cm) data collection if the area in question is not very flat?
Do certain brands of RTK base stations perform better than others or are they all about on par?
Are there any features I should specifically be looking for/avoiding in a base station set-up?
Are there other options for high-accuracy data collection that would work equally well/better than a base station/GNSS receiver in my situation?

(I'm new here so I apologize if this question is no good or needs work)


texts: What's the QGIS Legend Format Syntax to label percentage values?

texts:
I asked a question about formatting legend text a while back and I'm happy to see the issue has been solved in QGIS 2.6:
How to remove trailing zeros from QGIS Graduated Style Class labels?

But I'm having trouble tracking down a syntax guide for the new legend format options.

Is there a guide available as I haven't managed to track one down (QGIS documentation search for 'legend format' returns no results)?
Is it possible to enter decimal values and for this to be presented as a
percentage (ie multiply by 100 and stick % on the end)?


texts: Understanding QgsRasterBlock size using PyQGIS?

texts:
I'm making a QGIS 3 processing algorithm to perform an unsupervised classification with K-Means. When I'm reading the image bands I realized that the following code only works when the image's pixel type is uint8.

(input is a QgsRasterLayer)

    #Getting input attributes
    band_count = input.bandCount()
    rows = input.height()
    cols = input.width()
    pixelType = input.dataProvider().dataType(1)

    #Making a matrix to store multiband data
    img = np.zeros((rows * cols, band_count),
           gdal_array.GDALTypeCodeToNumericTypeCode(pixelType))

    #Loading the bands into the matrix
    for b in range(band_count):
        img[:,b] = input.dataProvider().block(b+1, input.extent(), cols, rows).data()

When working with a uint16 image, the code returns:

ValueError: could not broadcast input array from shape (2557248) into shape (1278624)

How can I load my band pixels (in any type) into my img array ?

My uint16 image is getting blocks with the double of the size expected.

PS. I can make this work using GDAL, but I only want to use pyqgis.


texts: Backed up shapefile is no longer a "valid or recognized data source"

texts:
I'm working on a project regarding the coastline of Tampa Bay and over a long period I've edited a 2004 snapshot of the coastline from a line shapefile into a polygon shapefile representing the coastline in 1940.
Last night I had to make an inset map of the area and thought it would look better if I removed the rivers. To do that I copied the shapefile to C:\Users\me\Downloads (working folder is D:\OneDrive\FLGIS\Boundaries) and removed the rivers of the original shapefile in ArcGIS Pro, which meant the edits were irreversible (I couldn't copy the file within the map for some reason).
Now I need the copied, unedited shapefile, so I deleted the original shapefile and moved the copy back to its place. Now I can't add it to any GIS program nor can I replace the data source of the original file. In QGIS it says "invalid data source" and ArcGIS Pro says "layer's data source could not be changed" or "failed to add data."
The last backup was made at the end of July and I have modified it slightly and backed up more recent variations (e.g. as a line shapefile or a polygon shapefile with lakes), so it's not the end of the world. However, I would like to know what exactly corrupted it and how it is corrupted and whether it can be fixed. The linked ZIP includes the shapefile files (coast_1940) as well as the metadata for the original shapefile (coast_feb04).
https://drive.google.com/file/d/1UoOAbLg8bORz4XDEnGGb9SuOQ8yQ7efU/view?usp=sharing


texts: QGIS 3.4 feature filter maximum() does not work

texts:
I would like to filter a layer with the maximum value of field_a, grouped by field_b. I tried this expression: "field_a"= maximum ( "field_a","field_b") But it doesn't work (there are no more features in the layer). When I use this expression for Select by Expression, the features are selected. Is there a way to filter them (without selecting)?

[Edit] I want to filter a existing layer (right mouse click -> filter). I don't want to select features or to create a new layer.


texts:
I've got gigs of .hmr raster files from our customer and I need them to be converted into GeoTiffs or something else which can be nicely imported into Geoserver system. I wonder if I can do it with GDAL tool and how?

Preferably I'd use gdal java library, but haven't look into that yet and don't know if that's even possible.

Greetz


texts: How to convert layout elements to graphics

texts:
I have many projects (mxd) and I´d like to convert ANY "live" elements like legends, scale bars, scale texts etc. into graphic automatically using arcpy. Is there a way? In questions and answers I could not find anything which would help me with that.

These elements have their names, e.g. Legend, Scale Bar and so on. If I wouldn´t want to convert all of them, how do I select which element to convert? Because there can be more elements with the same name, for example 3 legends with "Legend" as the name of the element. Could anybody help?

ArcGIS for Desktop 10.1 Basic, Python 2.7


texts:
A week ago I had an exam and there was a question:

  What are the main steps of zoning in a GIS?

I didn't understand the question and asked the instructor what does she mean by zoning (in Persian پهنه‌بندی) and she gave me this explanation:

  -- For example you have an image or a vector of a region and want to determine which parts are used for agriculture, which parts are sterile, etc.

  -- I'm afraid do you mean the same as classification?

  -- I can't give you more instructions

I didn't understand and I gave the following answer (main steps of classification)

Extracting features (more than one) for each pixel or each information unit
Optimizing the features to choose the best ones that can provide better separability between classes
Optimizing the classifier parameters (eg. in SVM we need to optimize C and Gamma based on the data that's going to be classified
Training the classifier if we're taking a classification approach (this step is not needed for clustering)
Classifying pixels based on optimized features through optimized classifier

But seems that this answer is wrong. Then:

What's the difference between classification/clustering and zoning?
What are the main steps of zoning in a GIS?


texts:
I downloaded a webapp builder template (javascript) that I've placed on my own web server and is running fine.

However, I am not able to modify the widgets in the config.json file to the settings that I want.

For instance, I want the "Coordinate" widget to have meters instead of feet, however, when I adjust the config.json file in the widget file, these changes aren't reflect.

Has anyone encountered this issue?

I read the webapp builder documentation (http://doc.arcgis.com/en/web-appbuilder/extend-apps/coordinate.htm) but can't seem to figure it out.

This is the json in the current config file (for the app itself, not just the widget):

  {
    "label": "Coordinate",
    "uri": "widgets/Coordinate/Widget",
    "position": {
      "left": 200,
      "bottom": 20
    },
    "config": {}
  }

This is the json in the widget config file:

{
  "outputunit": "dms",
  "spatialReferences": []
}

The latter says DMS but the units still show up as feet.


texts: Update: I managed to find a way to add a custom projection. However, the next problem has presented itself. I end up with a line being drawn across my map. Any advice on how to fix this?


texts: Can use of GML Simple Features profile by Web Feature Service (WFS) be advertised?

texts:
The ArcGIS 10.1 documentation on Working with WFS services says:

  The GML Simple Features profile is recommended for use with ArcGIS and
  is the basis for WFS support in ArcGIS.

Is there an easy way to determine whether a particular WFS is encoding using that or an alternative profile - perhaps by looking at its GetCapabilities?

It's interesting to note that not a single service URL was suggested when I asked whether anyone knew of a public WFS using the Simple Features profile.

I'm also trying to uncover an answer to this via the ArcGIS Discussion Forums now.


texts: Preparing Huff model with data to use in QGIS?

texts:
I'm trying to find out about the notion of  potential of acessibility using the methods of Huff.

I´m using QGIS, with point data (with the variables that I would like to use) and polygons for Europe NUTS and LAU-2.

What I am looking for is the ability to calculate areas of influence of the different points using the method of Huff.

With QGIS, I cannot find tutorials or videos about how to make it work with the python console.

So can there be any examples about to prepare a Huff model with data that we might use on QGIS? (I´ve already seen the posts relative to the Huff method on the forum but I do not know how to make it work properly with the python language)

PS: I have a  correct background with python programming, but I have problems with the way of making it work with GIS methods for this kind of theme.


texts: Finding number of overlapping polygons in two geodataframes using Python

texts:
I have two shapefiles:

catchments: polygons for 18 catchment areas (tend to be 'regional')
DA: polygons for ~2300 Dissemination Areas from Statistics Canada (tend to be 'neighborhood sized')

I want to determine how many Dissemination Areas as in each catchment. For example, catchment A spans 3 DAs, while catchment B spans 5 DAs.
import geopandas as gpd

DA = gpd.read_file("path to shapefile")
catchments = gpd.read_file("path to shapefile")

DA = DA.to_crs(epsg = 26917)
catchments = catchments.to_crs(epsg = 26917)

catchment_names = catchments["CatchName"].unique()

selection = catchments.loc[catchments["CatchName"]==catchment_names[0]]
result = selection.intersection(DA)

The results GeoSeries is as long as DA, but the results are a few "Polygon Empty" and the rest of the items are 'None'.


texts: Analysing differences between 2 dataset versions

texts:
In my GIS department, we purchase vector GIS data and regular updates. Each update delivery includes a new "snapshot" of the dataset, which is a brand new version of the entire dataset. As you can imagine, we need to analyze the differences between consecutive versions, that is the lists of features that have been inserted, deleted, or changed (geometry and/or attributes). The dataset structure does not change from a version to another (feature types, attributes names and types, geometry types, etc.).
I started developing my own tool, GeoDiff, to analyze these differences.
Is there any existing practice, standard, or tool to do this?
I guess it is quite a common problem, which should have solutions!


texts: Why does joining all layers in a group not work?

texts:
I am attempting to re-join all layers within a group to another layer ("Main.shp") outside of this group. The idea is for users to change values in one of the group's layers. As these layers are initially joined, the have to be re-joined in order to see the updated values in "Main.shp". So the code below basically:

Identifies the "Main.shp" layer
Identifies all layers within a specified group
Defines the field parameters used for the joining process
Removes the joins
Adds the joins back to "Main.shp"
Refreshes "Main.shp"

When the code finishes, there is a progress bar shown in the Status bar but it hangs. If I go see the Join properties of "Main.shp", I noticed that the Memory cache is not enabled for some layers (this changes randomly) whereas intially it was enabled for all layers:

And no layers can be viewed, they just become invisible. I have to restart QGIS again in order to see the updated values in "Main.shp".

After the comment by @Matte, I am now fairly certain that the cause of this issue is due to the caching of layers. If one joined layer is not cached, the "Main.shp" will not load and eventually crashes QGIS. I have edited the code below. Unfortunately when running the function, not all of the layers are immediately cached. I have to run it a few times before it works for all layers.

Is there a way to ensure that all joined layers are cached?

Code:

shp = QgsMapLayerRegistry.instance().mapLayersByName( "Main" )[0]
shpField = 'ID'
root = QgsProject.instance().layerTreeRoot()
subGroup = root.findGroup('Group')
def update():
    for child in subGroup.children():
        if isinstance(child, QgsLayerTreeLayer):
            shp.removeJoin(child.layer().id())
            childField = 'ID'
            joinObject = QgsVectorJoinInfo()
            joinObject.joinLayerId = child.layer().id()
            joinObject.joinFieldName = childField
            joinObject.targetFieldName = shpField
            shp.addJoin(joinObject)
            shp.createJoinCaches()

update()
shp.triggerRepaint()


texts: Why am I unable to activate certain Planet Labs images through the Python API?

texts:
I have successfully activated and downloaded thousands of Planet Labs images through the Python API.

However, many (but not all) "PSScene3Band" "analytic" images are remaining inactive for hours (at least) after I attempt to activate them.

The code I am using to manage the process of activating and downloading them is retrieving new images from the specified sites as they appear, so it seems that there is something about these specific images that is causing problems.

I am able to download them through the online Scene Explorer interface.


texts: How to make a geo reference image using GeoTool based on a matrix mapped data?

texts:
My ultimate objective is to make a geo reference image and make it as a raster layer to overlay the image above my openlayers map.

I have a set of geo coordinate data, and each coordinate is assigned to a value. The value is used to represent a color code.

cell           coordinate           value        Color
[x0 , y0]      [125.0 , 36.0]         1          Yellow
[x0 , y1]      [125.0 , 36.1]         1          Yellow
.
.
[x1, y0]       [125.1 , 36.0]         1          Yellow
[x1, y1]       [125.1 , 36.1]         2          Orange
.
.
[x2, y0]       [125.2 , 36.0]         1          Yellow
[x2, y1]       [125.2 , 36.1]         2          Orange
[x2, y2]       [125.2 , 36.2]         3          Red
[x2, y2]       [125.2 , 36.3]         3          Red

Hence, I will have a matrix mapped data which looks like below:

Now I want to create a geo reference image with inner projection : EPSG 4326 and outter projection : EPSG 900913

Can this be done by using GeoTool? If can, then how?

Help is needed.


texts: Unable to create one-way EGDB --> EGDB replica

texts:
I have an Enterprise geodatabase with 30 feature datasets, each containing multiple feature classes.  Both parent and child are Oracle databases.  I've successfully created replicas for 28 of those datasets.  However, I am now not able to create any new replicas.  I am creating the replicas via a Python script that runs the arcpy.CreateReplica_management command using the following parameters:
arcpy.CreateReplica_management(fds,"ONE_WAY_REPLICA",replica,repname,"SIMPLE","PARENT_DATA_SENDER","DO_NOT_ADD","DO_NOT_REUSE","DO_NOT_GET_RELATED",None,"ARCHIVING")

The script runs for only a couple minutes before throwing an exception with the generic error 000582.
The ReplicaLog.dat file gives the following:
ReplicaMsg time='9/23/2020 10:09:27 AM' type='LOG_MESSAGE_TYPE_ERROR' code='90012' elapsed='162.771000 seconds' method='GeoDBReplication::CreateChildReplicaEx' objectClassName='' replicaName='GEODATA.test'> The item was not found.</ReplicaMsg
I suspect that script is unable to register the replica on the parent database, but not sure how to troubleshoot or resolve the issue.
A few things I've tried are:

I did unregister (on parent and child) one of the previously created repliacas, and attempted to recreate, but this produced the same errors as above.
I confirmed that the child database can accept replicas from other Enterprise geodatabases, so I don't think there is an issue with the child database.
I've attempted to look for orphaned replicas using the guidance in https://community.esri.com/thread/114158.  However, the sde.versions table does not list any of the existing replicas.  I presume this is because my replicas are setup using archiving for tracking changes, but not certain.

Does anybody know how to resolve the above described situation?


texts: Quick way to select by attribute and zoom to selection in QGIS

texts:
I need to visually control hundreds of points in a layer on top of aerial photographs. Using the attribute table, selecting (with column filter expression) and zooming manually is cumbersome - so I plugged together a processing script which has the layer and the field, in which I'd like to search, hardcoded to the script..

That script helps - however, It would be much more handy to have a dockwidget in which I could put the search strings, without having to open the algorithm dialog each time I want to search a feature..

Can I put this script to a dockable widget without making a plugin?

Or maybe there are other methods (maybe built in or by available plugins) to quickly search values repeatedly in a field of a layer?

Another idea would be to assign a shortcut to the processing script and thus save me from having to start the algorithm by clicking it in the processing toolbox - but I don't know if this is possible..

    from PyQt4.QtCore import *
    from qgis.core import *
    from qgis.utils import *

    #====================================
    ##[User scripts]=group
    ##input_str=string
    #====================================

    canvas = iface.mapCanvas()
    allLayers = canvas.layers()
    n = len(allLayers)
    for i in range(0, n):
        if allLayers[i].name() == 'waypoints':
            break
    tarL = allLayers[i]

    # Get a featureIterator from an expression:

    expr = QgsExpression( "\"name\"='" + input_str + "'" )
    it = tarL.getFeatures( QgsFeatureRequest( expr ) )

    # Build a list of feature Ids from the result obtained above
    ids = [j.id() for j in it]

    # Select features with the ids obtained
    tarL.setSelectedFeatures( ids )

    # Zoom to selected features:
    canvas.zoomToSelected()


texts: Plot a point at a user input distance perpendicular to a polyline

texts: I have a straight polyline and the distances in metres of the points I want to plot perpendicular to that line. The points are all different distances and should be measured from a different point along the polyline. Is there a simple way to get these points plotted?


texts: Convert a large RasterStack to Array in R

texts:
I am trying to transform a large RasterStack to an array in order to compute some extraction. The classical approach raster::as.array() is not working since the files are very large and it's taking too long.
I've tried another approach, by first extracting the values from the RasterStack and then building an array, however, it's not working. Probably is related to the way I am filling the arrays, but I couldn't understand very well. I would be grateful for any help :-)
Here goes an example:
library(raster)

### Data
ext <- extent(0,100,0,100)
r1 <- raster(nrows=100, ncols=100,ext)
r1[] <- sample(seq(from = 1, to = 6, by = 1), size = 10000, replace = TRUE)
r2 <- raster(nrows=100, ncols=100,ext)
r2[] <- sample(seq(from = 1, to = 6, by = 1), size = 10000, replace = TRUE)
r3 <- raster(nrows=100, ncols=100,ext)
r3[] <- sample(seq(from = 1, to = 6, by = 1), size = 10000, replace = TRUE)

s <- stack(r1,r2,r3)

### My approach
r_val <- getValues(s)

r_arr <- array(r_val, dim = c(100, 100, 3))

### Classic approach
r_arr2 <- raster::as.array(s)

### Check if equal
matequal <- function(x, y)
  is.matrix(x) && is.matrix(y) && dim(x) == dim(y) && all(x == y)

matequal(r_arr, r_arr2)

[1] FALSE


texts: Google Maps API printing - tiles partially missing

texts:
I am working on a single page application using the Google Maps API that features a print option (among other things). I am currently using a slightly adapted version of the printAnyMaps function found in this jsfiddle to print the map. My problem: Sometimes a row of tiles is partially missing (see screenshot below).

I applied some border styling for easier debugging:

 #main-map { border: 1px solid blue; }
 #main-map div { border: 1px solid red; }

What could possibly cause this shift? Is there a promise I should be waiting on before calling window.print()?

The blue border styling actually shows that the map container covers the intended area, so it is indeed a tile/map content error I think.


texts: ESRI JavaScript API ArcGISDynamicMapServiceLayer Scale Dependency Visibility

texts:
Background:

I am building a JavaScript web app using ESRI's JavaScript API v3.8, and our ArcGIS Server v9.3.1.  I have layers I am rendering using the ArcGISDynamicMapServiceLayer, and I have been trying to find a way to access scale dependency visibility and have only been able to access the defaultVisibility.

Not Preferred Solution:

Using FeatureLayer for each layer allows me to check the MinScale against the map's current scale to determine whether the layer can be visible at that scale.  I am trying to find a way to do this comparison using an ArcGISDynamicMapServiceLayer since it renders symbology based off of my map template or MSD file.

I would prefer to avoid setting up a dozen or so layers using FeatureLayer because I have to render each layer's symbology individually, since I am using ArcGIS Server v9.3.1, and it does not render it for me like 10.x+.  This becomes tedious when I have a dozen or so layers each with a few class divisions.

Goal

I am using checkboxes for layer visibility, and if the layer isn't visible at the current scale, I am disabling and clearing the checkbox.  I am using this as a way to tell the user that the layer isn't visible at this scale. A disabled control should be easier to understand than having a 'checked' checkbox and no layer showing up.

Anyone run into a similar situation?  I am just trying to avoid coding in the symbology for all the layers as FeatureLayers.

Thanks!


texts: Extracting and assigning polyline attributes by multiple polygon boundaries (ArcGIS)

texts:
I have a polygon shapefile containing many (200+) polygons, and a polyline shapefile representing river channels. I wish to add an attribute field to my polygon shapefile of the sum of polyline lengths contained within each individual polygon, with the ultimate goal of finding a drainage density distribution for the polygon population.

I'm sure this can be accomplished with a script, but I have zero experience with python.

Is there a combination of tools or attribute table edits I can make to accomplish this?

I'm using ArcMap 10.2


texts: Collecting shapefiles from different users - any rules for quality data/quality control?

texts:
Apologies in advance for this very basic question!

My company collects market information from forestry projects in an annual survey. This year, we are trying to add a spatial element to our analysis. The current plan is to ask survey respondents to upload a shapefile of their project.

My question is: if we collect all of these shapefile responses from individual companies, will there be any difficulties in merging them into a single global map? Ex: do we need to make sure that each shapefile is set to the same projection? Or is there something else I need to check for quality control?

I don't know much about shapefiles or qGIS, so I'm worried that I might not think of a basic question to ensure quality data. Right now, I'm planning on the survey saying "Please upload a shapefile (.shp) of your forest project here". Is that okay?


texts: failed to Writing conditional (if/then) statements into Field Calculator of ArcGIS for Desktop using Python parser?

texts:
I wrote this following several examples but it is still wrong. I need to populate a new field based on 5 ranges of values.

    def marks(Wards for try.JHRatio ):
  if (Wards for try.JHRatio <= 50):
     return 0
  elif Wards for try.JHRatio >50 and Wards for try.JHRatio <= 90):
     return 1
  elif (Wards for try.JHRatio >90 and  Wards for try.JHRatio <= 110):
     return 2
  elif (Wards for try.JHRatio >= 110 and  Wards for try.JHRatio <= 500):
     return 1
  elif (Wards for try.JHRatio > 500):
     return 0

    marks(!Wards for Try.JHRatio!)


texts: How to export/generate a RGB/stack raster based on raster visualization palette in R

texts:
I have this data:

r <-raster(volcano)

And the plot generated:

plot(r)

How to generate or export a raster with this color palette (or any other) with spatial reference?A RGB/stack raster. For instance, in QGIS we can export a raster as a rendered image after defined the renderization.


texts:
I'm trying to create a model on QGIS 2.18.4 which will allow me to create multiple fixed distance buffers on a selected point(500m, 1km, 2km, 3km,...,50km) with a few clicks, rather than having to do it one by one using the MMQGIS Create Buffer function.

Because I'm working on WGS84, my solution below reprojects the selected point to World Equidistant Conic which uses meters as its distance unit. I then create the buffers, then reproject the created buffers back to WGS84.

My question is, why does my final output appear different from when I create it with MMQGIS? (See screenshot of Singapore below. Purple circle is a 5km buffer I've created using MMQGIS, and the blue circle is what I've created using my model.) I've looked at the MMQGIS python code (see code below) and it appears to apply the same workflow and CRS I've used in my model.

def mmqgis_buffer_geometry(geometry, meters):
if meters <= 0:
    return None

# To approximate meaningful meter distances independent of the original CRS,
# the geometry is transformed to an azimuthal equidistant projection
# with the center of the polygon as the origin. After buffer creation,
# the buffer is transformed to WGS 84 and returned. While this may introduce
# some deviation from the original CRS, buffering is assumed in practice
# to be a fairly inexact operation that can tolerate such deviation

wgs84 = QgsCoordinateReferenceSystem()
wgs84.createFromProj4("+proj=longlat +datum=WGS84 +no_defs")

latitude = str(geometry.centroid().asPoint().y())
longitude = str(geometry.centroid().asPoint().x())

#proj4 = "+proj=aeqd +lat_0=" + str(geometry.centroid().asPoint().y()) + \
#   " +lon_0=" + str(geometry.centroid().asPoint().x()) + \
#   " +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs"

# For some reason, Azimuthal Equidistant transformation noticed to not be
# working on 10 July 2014. World Equidistant Conic works, but there may be errors.
proj4 = "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=60 +lat_2=60 " + \
    "+x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"

azimuthal_equidistant = QgsCoordinateReferenceSystem()
azimuthal_equidistant.createFromProj4(proj4)

transform = QgsCoordinateTransform(wgs84, azimuthal_equidistant)
geometry.transform(transform)

newgeometry = geometry.buffer(meters, 7)

wgs84 = QgsCoordinateReferenceSystem()
wgs84.createFromProj4("+proj=longlat +datum=WGS84 +no_defs")

transform = QgsCoordinateTransform(azimuthal_equidistant, wgs84)
newgeometry.transform(transform)

return newgeometry

def mmqgis_buffer_point(point, meters, edges, rotation_degrees):
if (meters <= 0) or (edges < 3):
    return None

# Points are treated separately from other geometries so that discrete
# edges can be supplied for non-circular buffers that are not supported
# by the QgsGeometry.buffer() function

wgs84 = QgsCoordinateReferenceSystem()
wgs84.createFromProj4("+proj=longlat +datum=WGS84 +no_defs")

# print "Point " + unicode(point.x()) + ", " + unicode(point.y()) + " meters " + unicode(meters)

polyline = []
for edge in range(0, edges + 1):
    degrees = ((float(edge) * 360.0 / float(edges)) + rotation_degrees) % 360
    polyline.append(mmqgis_endpoint(point, meters, degrees))

return QgsGeometry.fromPolygon([polyline])

Why is this happening? What can I do to get the same result as when using MMQGIS?


texts:
I've got several shapefiles stored as geopackages and I want to merge all of them by using rbind. But unfortunately the geometry columns are namend differently as "geometry or "geom" and because of that I cannot rbind them. I can't see any reason why R is naming them differently.
They're all pointshapes from the same research area and with the same crs and basically with same columnames (besides the geometry field for some reasons).
I've tried simply renaming the geomety column resulting in the error attr(obj, "sf_column") does not point to a geometry column
as well as recreating the geometry column, but then it takes the same name every time.
But I found a workaround by renaming the columns and simply making the sf to a data frame and assigning the geometry afterwars. But it seems to me a bit hacky, so maybe do you have a more elegant way or maybe you can explain me the reasons for the different names in the first place.
My code:
wd <- setwd("filepath")

files <- list.files(path=wd, pattern="*.gpkg", full.names=TRUE, recursive=FALSE)
points_all <- data.frame()

for (i in c(1:length(files))) {
  file <- st_read(files[i])
  names(file) <- c("Value", "Coord")
  points_all <- rbind(points_all,file)
  points_all <- data.frame(points_all)
}

points_all <- st_set_geometry(points_all, points_all$Coord)


texts: Link in the dart theme in web appbuilder

texts: I'm using the dart theme in the web appbuilder. When I add a link in the Attribute tab, it won't show in the banner. Does anyone have an idea why?


texts:
I have 3 global images of land cover (300m spatial resolution). I simply want to clip each land cover image into 3 different regions (9 total). I also want to reclassify the images.

The way I would usually do it is to repeat the code per desired output using .clip(), .remap() and Export.image.toDrive(). To know exactly what I want to achieve, see Part 1; lines 1-90. However, I keep getting the error; "User memory limit exceeded." I am not sure why, maybe the region is too big?

Nonetheless, I now want to loop over the whole process to make the code more efficient. I attempt a "loop" in Part 2; lines 91-134. I insert the code for the loop here.

//  Load vector boundary
var pantropics = ee.FeatureCollection('users/jjohanness1992/ESA_Equatorial_Tropics/boundary_pantropics');

//  Define start and end value for vector layer attribute 'label'
var start_region = 1;
var end_region = 3;
//  label = 1 (Americas), label = 2 (Australasia), label = 3 (Africa)

//  Load images
var esa1995 = ee.Image('users/jjohanness1992/ESA_1992_to_2018/ESA1995');
var esa2000 = ee.Image('users/jjohanness1992/ESA_1992_to_2018/ESA2000');
var esa2005 = ee.Image('users/jjohanness1992/ESA_1992_to_2018/ESA2005');

//  Prepare image reclassification codes
var oldgroup = ee.List([0,10,11,12,20,30,40,50,60,61,62,70,71,72,80,81,82,90,100,110,120,121,122,130,140,150,151,152,153,160,170,180,190,200,201,202,210,220]);
var newgroup = ee.List([0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,4,4,5,5,5,5,6,6,6,7,8,8,8,9,10]);

//  Perform 'loop' operation
var i;
  for (i=0;i<=2;i++){
    var imagestack = ee.List([esa1995,esa2000,esa2005]);
    var year_dict = ee.Dictionary({
      '0':'1995',
      '1':'2000',
      '2':'2005'
    });
    var year_string = year_dict.get(ee.Number(i).format()).getInfo();
var j;
  for (j=start_region;j<=end_region;j++){
    var region = pantropics.filter(ee.Filter.eq('label', 'j'));
    var imagexregion = ee.Image(imagestack.get(i))
    .clip(region).remap(oldgroup,newgroup);
    var region_string = ee.Number(j).format().getInfo();
Export.image.toDrive({
  image:imagexregion.uint8(),
  description:'esa-'+region_string+'-'+year_string,
  folder:'esa-loop-test',
  region:region,
  scale:300,
  crs:'EPSG:4326',
  maxPixels:1e13,
  fileFormat:'GeoTIFF'});
  }
}

However, I cannot get my "loop" to run. After running the task in the 'Tasks' tab, it turns red after a ~30 seconds, with the following error message; "Error: Image.clipToBoundsAndScale: The geometry for image clipping must not be empty.". Please find my GEE script here.

I find this weird because firstly, I used .clip() not .clipToBoundsAndScale(). This is because I do not want the image to be clipped to the bounding box of the regions, I want them clipped to the exact region boundary. Secondly, this error message means that the regions are not identified, or are blank, which is why the clipping cannot be conducted. Unless .clip() is wrong and I should be using .clipToBoundsAndScale({geometry:region,scale:300}) instead.

Maybe I am wrongly using some functions in my code.

Edit:

The pantropics asset took up ~64 Mb in GEE space. I exported it to Google Drive to inspect it. The Shapefile is now ~124 Mb, and when previewed in QGIS, looks fine. The only difference is that previously, the Shapefile had only 3 dissolved regions for Americas, Africa and Australasia, but this export has 12 features in total. See picture for comparison (maybe the geographical region was too big, and GEE had to segment it into these 12 smaller subregions).

I re-ingest this new asset into GEE, and re-run the loop. Although the code looks like it runs, as tasks are being created in the Tasks tab, after some time, the browser crashes.


texts: Google Maps Physical not render-able below a certain scale?

texts:
Having some troubles opening Google Maps Physical layer in QGIS using OpenLayers. I cannot seem to have the layer load below a scale of 1:29,802.

Is this normal?

My projection is set to 3857 and my QGIS version is 2.18.9.


texts: What is the proper way to do an automatic rollback of a vector layer edit?

texts:
I'm trying to rollback automatically the changes in features of a in-memory vector layer that don't meet certain criteria.

The code I'm using for testing looks like this:

...

def some_function()
  tmpLayer = QgsVectorLayer("LineString", "Aristas_tmp", "memory")
  tmpLayer.geometryChanged.connect(self.onLineGeometryChange)
  return

...

@pyqtSlot(int, QgsGeometry)
def onLineGeometryChange(self, featureId, geom ):
  capa_aristas = find_layer("Aristas_tmp")
  # Disconects the signal to avoid entering an endless loop
  capa_aristas.geometryChanged.disconnect(self.onLineGeometryChange)
  capa_aristas.rollBack()
  capa_aristas.geometryChanged.connect(self.onLineGeometryChange)
  return

(find_layer is a function taken from MMQGIS plugin that iterates through the QgsMapLayerRegistry)

This code has the effect of undoing any change made to the layer, but with some problems:

There are inconsitencies in the GUI, i.e.: the layer leaves edit mode (the pencil in the legend disappears and further edits are not allowed), but the buttons in the digitize toolbar are still enabled.
If enter edit mode again, the last edited feature appears in the destination location of the previous edit, but if I move it again, the rollback moves it to the right place (the initial position)
If I repeat the process 5 or 6 times, QGIS crashes with this message:
Fatal: ASSERT: "mChangedGeometries.isEmpty()" in file /tmp/buildd/qgis-1.9.0+git20121010+dd67935~squeeze1/src/core/qgsvectorlayer.cpp, line 4042

(as you can see, I'm running QGIS 1.9.0-master)

I guess I hit some kind of bug, but want to be sure that I'm calling the API in a proper way.

Anyone can confirm if this usage of rollback() is "legal"?


texts: Ways to reduce buffer if it passes through a certain layer

texts: I am trying to do WiFi analysis on signal strength in ArcGIS Desktop, and one of the big problems that I am running into is how to reduce the signal when it comes in contact with a wall, as it does in real life. I would like to use buffers for their visual effects over rasters, but I will use anything that can accurately display what I want. Ultimately I would like to be able to add construction materials to the reduction, but just recognizing the walls in the buffer would be a good start. I am open to solutions within current ArcGIS tools, or python. I have started to create a python toolbox to do this, so either solution would work for me. Any ideas on how to get my buffers to recognize walls?


texts: Can reference system in Leaflet be changed without disrupting data position?

texts:
I have a leaflet map that uses default CRS (EPSG3857) with multiple markers placed on it. Their LatLng are read from JSON file. I want to change map CRS to Simple, keeping markers on exact same screen positions they were.

Now I am not sure how to achieve this. I tried messing around with Leaflet ICRS methods (latLngToPoint, pointToLatLng, project) but without much success. Is this achievable in Leaflet itself or do I need to use external scripts to reproject the data? Changing to CRS.Simple is one time thing, I just need to modify existing data to stay visually the same on new CRS.

Using Leaflet 0.7.7


texts: How can I make buffer with ST_Buffer in PostGIS

texts:
I am trying to make a buffer(0) as a fix-geometry process in PostGIS 2.2.2.
It like this:

  SELECT ST_Buffer(ST_GeomFromText('POINT(100 90)'),0,4);

I am using sources from this man-page. It creates an output that goes like this:

  ----------------------
  010300000000000000000
  (1 row)

But I am not sure if I am actually just simulating the creation of a buffer in PostGIS or I am actually making a buffer on database#scheme.table

What I would like to is to make an ST_Buffer of all the geometries (polygon) in the table. Seems like getting something wrong. The syntax is foreign to me though.

I have experienced that it isn't like: ST_Buffer(scheme.table, 0) but how am I to understand these examples?


texts: How to aggregate layers into themes using ArcGIS Web AppBuilder?

texts:
County of Simcoe have a nice interactive map based on ArcGIS Web AppBuilder, at https://maps.simcoe.ca/Public/

This application contains functionality I haven't seen before in a WAB map - it aggregates layers into "themes", allowing the user to change the contents of the map with a single click:

Is this function provided by an existing WAB widget, or is this something that Simcoe have written from scratch?


texts: Referring to a variable using Field Calculator in QGIS Modeler

texts:
I need to use a variable inside Field Calculator in QGIS Modeler and don't know how.

@variable and variable don't work.


texts: QGIS software missing on laptop after trying to update to latest version

texts:
I am facing an issue with QGIS installation. I tried to upgrade my QGIS to version QGIS 3.14, I couldn't locate it on my laptop anymore. However, I can see it in the uninstall section of my laptop. I have tried uninstalling it and re-installing it back, yet, I am still faced with same problem.
Following the file path I created during the installation, I found the QGIS 3.14 folder on my 'program files', but didn't find a shortcut icon. I saw and run the qgiscrashhandler.exe, but a System error pop-up tells me that Qt5Widgets.dll, Qt5Gui.dll, Qt5Core.dll were not found. Reinstalling the program may fix this problem. I have reinstalled and redownloaded QGIS software countless times, yet the issue subsists.
How can I resolve the issue?


texts: Getting data/geometry from Azure Database into Azure Maps

texts:
I'm currently working on a proof-of-concept where we're using an Azure Database as our data storage. I've got one table in there containing a few bits of information, and a geometry column (geometry is all multipolygons).
Now, we'd like to be able to both see and edit these geometries in Azure Maps. From my Googling, it seems that you can't just "hook" the two together - there has to be some intermediary, which is fair enough. I've written a node.js file, currently local on my PC, which can query the data (currently filters on a field, but it'd be easy to send a bounding box).
I guess my question is "what is the recommended way to get Azure Maps and Azure Database talking?" If the preferred method is a node.js, I take it I then need to create a json/geojson from the result and have that displayed in Azure Maps, but how would I go about that? And how would I send/post information back?
I'd also like to stay as clear of Visual Studio as I can, and preferably have a lightweight solution.


texts: GPX file not converting using ArcToolbox

texts:
I have a number of .gpx files that I want to convert so that they can be viewed in ArcGIS. When I have tried using the ArcToolbox 'convert from GPS' tool, it has previously worked. Recently however, when I go through the process of converting the files from .gpx to .shp, no file is generated. The results log says that the Output Feature class is empty, but there is definitely data there, which can be viewed when you use a gpx viewer such as explorer. I have never had this problem before and don't know why ARC thinks the files are empty.

Any suggestions on why it's doing this and if there is another way that I can convert .gpx to .shp?


texts: Letter is gone from attribute field name after saving edits

texts:
This field name loses the letter A after I save edits.
Link to SOA
Before save.

After save and edits applied.

However, the edits are saved if I take out the white spaces.


texts: Auto populate fields with different values from another field in QGIS?

texts:
Is it possible to populate a number of fields in a shapefile in QGIS with different values based on the values of one other field?
Essentially what I want to be able to do is to populate fields to allow export of features from a shapefile as a GeoJSON into a separate database with a number of fields populated to a certain format.
So for example I enter a text value, let’s say “AA_BB” via a value map drop down in the attribute table and I want another text field to automatically enter “XXX” and two numeric fields to enter a value eg “4” and “22”. I know it’s weird but it’s to try to relate two completely different styling formats between two completely different systems.
I was thinking Value Relations would maybe do it but I can’t figure out how to configure that.
Anyone any suggestions? I don't know how to script.


texts: Can I have more than 4 layers on my map in Cartodb?

texts:
I know Cartodb has the layer feature where you can create four different layers within one map, but is there a way to create more?
I want my viewers to be able to choose between more than four layers in order to select which points they want to see, so is there a way to create more layers using html? Does someone have a template?


texts: Why is there no XML-File with metadata when I download Landsat 8 data on USGS?

texts:
I am trying to create a Data Cube with Open Data Cube for my Bachelor's Thesis. In the Python-Files from Open Data Cube to prepare the data for indexing there is a XML-File with metadata needed:
https://github.com/opendatacube/datacube-dataset-config/blob/master/agdcv2-ingest/prepare_scripts/landsat_collection/usgs_ls_ard_prepare.py
But when I download Landsat 8 data from USGS there is only a txt-File with metadata and no xml-File. Where do I get this xml-File?


texts:
A table Oracle have a Shape field of type SDE.ST_GEOMETRY, I want to convert it to latitude and longitude.

I need the Latitude and Longitude to build dynamic maps on Google Maps.

I saw on the Internet this tip, I tried this:

SELECT sde.ST_X(shape) x, sde.ST_Y(shape) y FROM pontes;

But returned this:

              X | Y

  692789,990308064 |    7020476,32990657

I think these are coordinates (XY) ArcGIS, but I need the latitude and longitude.

How to convert a Shape (SDE.ST_GEOMETRY) to Latitude and Longitude?


texts: Why such a large difference between overlapping LiDAR DEM values?

texts:
Background:

Using Arc Desktop 10.5.1, I have been tasked with mosaicking two adjacent LiDAR rasters (I'll call them A and B). They were flown, processed and supplied under contract by different vendors, A in 2013 and B in 2015.

Each raster was accompanied by a detailed project report, signed off by a professional land surveyor. Both projects used surveyed, GPS ground control points. Reported accuracy and RMSE values are all less than 0.1 feet.

Both rasters were supplied to me in the same CRS, with identical cell sizes (three feet), both single band, 32-bit floating point.  To ensure that both rasters align, I snapped B to A .

A and B share a common boundary. They overlap along that boundary, with the overlapping width varying between ~ 300 - 600 feet.

The problem:

I expected the elevation values between the two projects to be very similar.  However, where they overlap, the cell values for A and B  differ, ranging from -96 to +57 feet (!)

Please allow me to restate this: If I select a point within the overlap zone, the reported elevation values for A and B may differ by as much as 96 feet.

How is this huge range (153') in elevation values between the two rasters possible when so much professional attention was given to each of the two projects?


texts: Exporting from Atlas to PDF in QGIS GUI and adding metadata with Python

texts:
I'm trying to add metadata to all my PDF files generated by an Atlas export in QGIS 3.10. GUI.

Is there any Python signal to which I can connect a slot, that gets executed when each Atlas page export finishes?

Unfortunately, studying the PyQGIS API documentation didn't take me any further.


texts: Query shapefile for crop_to_cutline using gdalwarp

texts:
I have a shapefile with several polygons. I would like to clip a series of rasters but only use a single feature from the shapefile feature class. I am using gdal_warp. There is an option to query the feature class using sql by using the -csql option in the tool.

Can any one provide an example of how this looks in the command line?

Perhaps this is only used when connecting to a spatially enabled database as a datasource?


texts:
I designed a workflow, that although functional, is very slow and prone to errors. I am sure there is a better approach, but I cannot wrap my head around it. The environment is ArcGIS arcpy (Python 3), the data is located in a SDE database.

The task is to fill the initially empty table (FIN TABLE), with data from the feature class (featureIN). I need to group features with the same Field1, 2, 3, and write back the received GlobalID into ProcessID.

My approach is to

Dissolve based on Field1, 2, 3
Use a SearchCursor on the resulted dissolved features
Look up the attributes (Attr1, 2) from featureIN. Keep Last. (SearchCursor)
Write the data to FIN TABLE (InsertCursor)
Catch the GlobalID (SearchCursor)
Write it back to featureIN (UpdateCursor)

With that workflow I manage to process 10 rows/s, which takes too long given the large dataset I have.

Is there a better approach? How can this be optimized?

EDIT:
Here is the rough workflow in python:

INfc = 'featureIN.shp'
dissTMPfc = 'DISSOLVE.shp'
OUTtb = 'FIN TABLE'
dm1 = {'Field1': 1,'Field2': 2,'Field3': 3,'Attr1': 4,'Attr2': 5 } # FieldMap

#### Step 1 Dissolve based on Field1, 2, 3 ####
fieldsDIS = ['Field1', 'Field2', 'Field3']
arcpy.Dissolve_management(INfc, dissTMPfc, ';'.join(fieldsDIS), "", "MULTI_PART", "DISSOLVE_LINES")

#### Step 2 Use a SearchCursor on the resulted dissolved features ####
cursorDIS = arcpy.da.SearchCursor(dissTMPfc, fieldsDIS)
for row in cursorDIS:

    # build where clause for each row
    whereClause = ""
    i = 0
    for field in fieldsDIS:
        if i > 0: whereClause = whereClause + " AND "
        if row[i] is not None:
            whereClause = whereClause + field + " = '" + str(row[i]) + "'"
        else:
            whereClause = whereClause + field + " IS NULL"
        i = i + 1

    ### Step 3 Look up the attributes (Attr1, 2) from featureIN. Keep Last.
    cursorIN = arcpy.da.SearchCursor(INfc, fieldsIN, whereClause )
    updRow = []
    for row2 in cursorIN:
        for key in dm1.keys():
            updRow.append(row2[dm1[key]])

    ### Step 4 Write the data to FIN TABLE (InsertCursor)
    with arcpy.da.InsertCursor(OUTtb, fieldsOUT) as cursorTAB:
        objectid = cursorTAB.insertRow(updRow)

    ### Step 5 Catch the GlobalID (SearchCursor)
    searchFields = ['OBJECTID', 'GlobalID']
    whereClause2 = 'OBJECTID = {0}'.format(objectid)
    with arcpy.da.SearchCursor(OUTtb, searchFields, whereClause2) as searchCursor:
        for row3 in searchCursor:
            globalid = row3[searchFields.index('GlobalID')]
            f.write(globalid)

    ### Step 6 Write GlobalID back to featureIN (UpdateCursor)
    with arcpy.da.UpdateCursor(INfc, ['ProcessID'], whereClause) as cursorINupd:
        for row in cursorINupd:
            row[0] = globalid
            cursorINupd.updateRow(row)


texts: USGS DEM Easting and Northing metric and unit

texts:
I have to do some programming work with DEM files.

I got some DEM files from http://geobase.ca/geobase/en/find.do?produit=cded the 1:50,000 version and read in the data. According to the DEM specifications, there is a quote:

  "... a 4x2 array containing the ground
  coordinates of the quadrangle boundary
  for the DEM. The coordinates of the
  quadrangle corners are ordered
  cloclwise direction beginning with the
  SW corner. The array is stored as
  pairs of eastings and northings."

Question:
1. Is easting and northing same as UTM metric?
2. Are UTM coordinates supposed to be written as easting-northings or northing-eastings?
3. What is the standard unit for UTM coord? meters? arc seconds? In the DEM file I have, I figured it is in arc seconds.
4. How to I convert, specifically for this DEM (see above) I have, from the "4x2" array to meters?

Below is one of the DEM header data I extracted. Which this data, specifically, the SE coord (2nd line) and the 4x2 array (SW, NW, NE, SE coord) is it sufficient to point on the map where this quadrangle is? I tried very hard to map this data to Google Earth but I cannot seem to work out the maths... hope someone can enlighten me.

DEM Name: 092g01DEMe
SE Coord: -12215 0.0000, 49 0 0.0000
DEM Level Code: 1
Ground Reference System: Geographic
Ground Reference Zone: 0
Ground Unit: arc_seconds
Elevation Unit: meters
Ground Resolution (lat, lng, elev): 0.75, 0.75, 1
Elavation Array Szie: 1201 x 1201
Percentage void: 0
SW Coord: -440100, 176400
NW Coord: -440100, 177300
NE Coord: -439200, 177300
SE Coord: -439200, 176400


texts: Cartodb.js: Uncaught TypeError: layers is not a function

texts:
Here is my code:

    cartodb.createVis(map, 'https://blahblah/viz.json')
      .done(function(vis, layers) {
        console.log("Layers has " + layers.length + " layers.");
        layers(1).setInteraction(true)
        ...

when it gets to the last line, I get the error above. Is the syntax wrong or something? I am inexperienced with js and html. The previous line resolves fine, I get the message "Layers has 3 layers" in the console.

I am including cartodb.js 3.15.8.


texts: Getting absolute elevation from WMS raster tiles

texts:
When I use GetMap on a raster layer of a WMS GeoServer, the color scale adjusts automatically, so the scale is relative to the retrieved content of the requested area.
How do I extract numerically the absolute altitude/elevation ?
Alternatively, is there a way to tell the WMS server (GeoServer) to provide the absolute values ?


texts: QGIS 3.18 dyld: Symbol not found: __cg_jpeg_resync_to_restart

texts:
MacOS High Sierra (10.13), QGIS 3.18 Zurich, GRASS 7.8, GDAL/OGR 2.4.1, Python 2.7
DYLD_LIBRARY_PATH set to "/Applications/QGIS-3.18.app/Contents/MacOS/lib"
With a fresh installation of QGIS 3.18, when trying to create a VRT, the process return  :
GDAL command output :
dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /Applications/QGIS-3.18.app/Contents/MacOS/lib/libjpeg.9.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
/Applications/QGIS-3.18.app/Contents/MacOS/bin/run_gdal_binary.bash: line 13: 77707 Abort trap: 6 "$THISDIR/_$ALGNAME" "$@"
Process return code error 134

The 3 path exported by run_gdal_binary.bash exist.
Noticed that libjpeg.9.dylib is linked by libjpeg.dylib
GRASS warn that "Module built against version 2021-02-10T17:13:06+00:00 but trying to use version 2021-02-10T17:08:53+00:00. You need to rebuild GRASS GIS or untangle multiple installations." although it has been installed just once a week ago.
Trying to merge DEM produces a larger output where appears the same reference to "Symbol not found: __cg_jpeg_resync_to_restart" and other python error.
What went wrong? QGIS? Dynamic library? Something broken in Python script?


texts: Can input to ModelBuilder be selected features in ArcMap?

texts: I want to find out if the manually selected features in ArcMap can be the input to a ModelBuilder tool.  If not, is it possible to copy or export selected features in ArcMap using ModelBuilder?  Once in ModelBuilder, the data will be manipulated and exported to a dwg file but I first need to figure out how to get the selected features in ArcMap as the input to ModelBuilder.


texts: ArcGIS Online Identify operation on webmap via REST

texts:
Is it possible to perform an Identify operation on an ArcGIS Online webmap via the REST API (not via the javascipt api), equivalent to identifying on an ArcGIS Server map service? With Server, we use something like:

http://arcgisserverurl/MapServer/identify?identifyparametersgohere

So we're looking for something like:

http://www.arcgis.com/sharing/rest/content/items/webmapid/identify?identifyparametersgohere

Big picture: We have quite a bit of code set up to access street centerline data from the identify operation on an ArcGIS Server map service.  We're now finding clients who have their data on ArcGIS Online, and are trying to figure out a way to use our current code to access the data.

If it's not possible to identify on a web map, what options are available to query ArcGIS Online data via a REST API?


texts: Separating LAS Dataset (.lasd) into point files of each class?

texts:
I am want to examine my DEM, DSM, and other models I'm generating from LiDAR data in the model wizard to find the method with the least amount of error.

I want to separate the ground, and non-ground points into separate point shapefiles so I can use them within the model wizard and view the error and generate the error prediction surfaces as well as view the semi-variograms of different model parameters.

I would like to have points with the elevation value as a field within the point feature, and have a point feature for each class of the .lasd.


texts: Creating a new layer based on criteria of multiple layers

texts:
I'm really new to ArcGIS and have been trying to search for whether this is possible but don't know the correct terminology to look it up.
I have two layers on my map, one of lines and one of points. Both layers have a field called 'Route ID'. The routes taken are on the lines layer, with routes happening on many different days and sometimes going in the same places but sometimes in different places, so there are lots of overlaps from different days/times of routes on the map, but each line has its own corresponding 'Route ID'. The points layer is of observations made on a route, with sometimes multiple points recorded on a single route, and point has the corresponding 'Route ID' assigned.
I have edited my points layer so that only one category of observations is now present. However, this means I now have a few routes (too many to visually identify) that contain none of the category of observation I'm interested in. I want to remove these routes, so that my lines layer contains only route lines for routes that have a 'Patrol ID' that matches the 'Patrol ID's on the points layer.
The resulting lines layer would contain any line that had a matching 'Patrol ID' to a 'Patrol ID' found in the points layer. So basically what I'm asking is, is there a way in ArcMap to remove data from an attribute table in layer 1 where layer 1's 'Field Name' doesn't match any of the rows in layer 2's 'Field Name'?


texts: How can I stop QGIS from crashing when opening layer properties of large raster?

texts:
I am using a VRT to organize and examine a very large LiDAR dataset (>250GB). I never display the full extent, so I can normally navigate around without any problems loading the tiles.

But QGIS crashes when I try to open up the layer properties to change the display properties of the VRT (specifically I want to make the color scale relative to the current display extent.) My guess is that this is occurring because QGIS then tries to calculate some global layer properties, such as max and min values, which blows it up.

Does this sound like a probable cause? Is there any way to stop QGIS from calculating the layer properties?


texts: Why does QSpatialite show the same table twice?

texts:
I have created a point table in QSpatialite, by creating a new table first and then adding a geometry column, as described here.

The table shows up twice in QSpatialite, which surprised me a bit:

I didn't really care about that (maybe having two different views of the table is appropriate) and thought that they would be linked somehow. Then I added two columns to the first item named 'Gebaeude_P' (the one labeled with a table-like looking icon). In QSpatialite I can see those two extra columns in both tables, but in QGIS I can see them only in the attribute table for the first one.

From the log message panel:

2016-05-02T16:05:12 1   Error executing query: SELECT styleQML FROM layer_styles WHERE f_table_catalog='path_to_db.sqlite' AND f_table_schema='' AND f_table_name='Gebaeude_P' AND f_geometry_column='Geometry' ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1

What happened here? I'm also having difficulties creating tables and table views with QSpatialite. Most of the time, the data simply isn't visible in QGIS.


texts: Calculating residual sum of squares and standard error from linearFit model

texts:
I used the linearFit() reducer to get trend analysis for NDVI (dependent variable), and time (t) is my one independent value.

What code can I use to calculate the residual sum of squares and standard error from this linearFit model in google earth engine?


texts: ListRasters based on filename using Arcpy

texts:
I am trying to create a python script for ArcMap which calculates the ndvi from two raster images for each RGB/NIR pair in a folder. However, I am unsure how to create two raster lists; one which lists only NIR images and the other which lists RGB images. Below is an example of the filename formats of the input images for the automated NDVI calculation.

'TER Jenkins Leroy 36000_Home Farm_Field 1_na_NIR_140825_0-50622.tif'

'TER Jenkins Leroy 36000_Home Farm_Field 1_na_RGB_140825_0-50622.tif'

'TER Jenkins Leroy 36000_Home Farm_Field 2_na_NIR_140825_1-50622.tif'

'TER Jenkins Leroy 36000_Home Farm_Field 2_na_RGB_140825_1-50622.tif'

'TZR Costanza George_Eden_Field 1_na_NIR_140825_2-50648.tif'

'TZR Costanza George_Eden_Field 1_na_RGB_140825_2-50648.tif'

Here is the code I have so far:

import arcpy, os
from arcpy import env
from arcpy.sa import *

env.workspace = r"C:\Users\chester\Documents\Test_Dataset"
outws = r'C:\Users\chester\Documents'
cirlist = arcpy.ListRasters(*CIR*)
rgblist = arcpy.ListRasters(*RGB*)

imagelist = zip(sorted(cirlist), sorted(rgblist))

for i in imagelist:
    name = os.path.join(outws, i + 'NDVI')
    outras = (Raster(i[0]) - Raster(i[1]))/(Raster(i[0]) + Raster(i[1]))
    outras.save(name)


texts: Why does ArcMap 10 export circles instead of diamonds?

texts:
My default symbol for building is a small square.
A jpg export or any other export renders it as a small circle.

It's a killer for hydrology maps which use circles for many other items.  Solutions?

From the posts i went back and looked at the default symbols that the open-source layer provided.  It LOOKED like a square rotated.  But it was something else...yes a circle!
Not sure why this happens in Arc...However I simply changed my symbol and voila! it exported just fine.

While i got what i needed the probelm persists.  When i went back and looked at the square it said it was a polygon!  Odd.  Anyway thanks to these posts i now have a work around; many thanks


texts:
I want to perform a spatial join (one-to-many relation) between two Spatial Dataframe layers in R. More specifically, I have a set of lines (SpatialLinesDataframe) that need to be joined to the ID of a neighborhood (SpatialPolygonsDataframe) if they overlap with it.

I tried using the over function (as indicated below) and get the following error:

over.list <- over(lines, neighorhood, returnList = TRUE)

  Error in RGEOSBinPredFunc(spgeom1, spgeom2, byid, func) :
    rgeos_binpredfunc_prepared: maximum returned dense matrix size exceeded

I presume this is due to the size of the sp objects (475365 and 170045, respectively). What is the best approach to go about doing this?


texts: Looking for GIS dataset of Japan which includes smaller areas

texts:
I have found several sources for GIS shp files which include Prefectures and Cities in Japan, these go to the Ward level i.e Tokyo > Shibuya-ku. What I am looking for is data that includes smaller areas within Wards, i.e Tokyo > Shibuya-ku > Harajuku

I have spent a long time looking around with no luck, does anyone have an idea where I can find this data?


texts: Is there a process that will name files using attributes from the clip layer?

texts:
My original file is thousands of points across the US. I would like to create separate files for each state and have them named using the attributes from the clip layer.

I have been able to get the separate files using Clip from the processing tool box but I then have to go in and rename each file.  Is there a way to select the output name by attribute?  I want each file named after the state they are in.


texts:
I have several layers/maps in QGIS Girona 3.0 version and I'm thinking about uploading to Pi version 3.14.
Would I be able to keep using the same files in the new version?


texts: Understanding lifecycle of .NET geoprocessing tools on ArcGIS for Server?

texts:
I've done a number of .NET geoprocessing tools for ArcGIS 10.1 that get published as geoprocessing services on ArcGIS Server.

Lately we've seen behavior that makes me question something I thought I long understood - the role of a tool's "FunctionFactory" (IGPFunctionFactory).

I thought:

the role of the factory was to create and hand out the Functions (IGPFunction) or their Names (IName/IGPName/GPFunctionNameClass) (in GetFunction(), GetFunctionName(), GetFunctionNames())
that one instance of the Factory gets created per process (ArcMap- desktop), (SOC - server), automatically by ArcGIS at process start, by virtue of the Factory being registered in its component category
so that you could rely on it to be in place before any instance of a tool/service could be used.

And so one thing I use the Factory for is one-time initialization (in a static ctor of the Factory) of services that are shared in common by all the tools exposed by the factory, such as configuration and logging.

Lately, promoting to a new environment, in a 2-machine cluster, we've seen cases (rare - one in a few dozen requests) where requests to a service are handled, but factory-based initialization has not yet occurred - so though the service is running, it is not yet configured (and so the request fails to be handled successfully), and neither is the log, so the error doesn't get logged (except by ArcGIS Server's own logging).

Any thoughts on what I'm missing?


texts: Calculating watershed using snap pour points?

texts:
I am trying to calculate a watershed layer and have followed instructions from this previous question:

General steps to create watershed boundary in ArcGIS Spatial Analyst?

I have combined all these steps and run it as one in ModelBuilder. Its current status is snapping pour points, but it has been doing this very slowly for the last 20 minutes. I know asking this is akin to asking "how long is a piece of string" but having never used this tool before in ArcGIS 10.3 does it generally take a long time to run?


texts: ST_Force2D in SQL Server alternative? 3D loading problems from QGIS to PostGIS

texts: I am having problems loading a 3D layer from MS SQL Server to PostgreSQL PostGIS database with QGIS. The PostGIS data loader in DB Manager and other import tools in QGIS have problems with 3D export to PostGIS.   Since I don't need the Z component, I wanted to remove it. PostGIS has a  ST_Force2D function. I can't find such a function for SQL Server. I don't want to use external ETL tools. How can I strip Z values from SQL Server geometries?


texts: Extract by Attributes in Model Builder, "Table Name is Invalid"?

texts:
I'm attempting to use "Extract by Attributes" in model builder as part of a larger model. I'm trying to pull 6 different attributes out one by one in order to create random points within their areas. "Extract by Attributes" is the first process, and keeps returning the message "Table name is invalid". When I run it independent of the model it works fine with the same files that are plugged into the model.

Is there anything I'm missing here?

I'm running 10.2 on a Lenovo thinkpad with an I5 processor.


texts: Loading a GeoJSON layer in QGIS from localhost

texts:
I have been using the Protocol option for adding a new vector layer in QGIS and it works great for loading GeoJSON from a remote server using a URL. However, when I try loading the same data from a localhost tomcat service I always get an "Invalid Data Source" error.

Is there any way to load from the localhost service, or is it only possible from remote web sites, or does it not allow the specifying of a port number? I have tried http://localhost:8082/..., http://127.0.0.1:8082/... and http://0.0.0.0:8082/... but all give the same error.


texts: Nearblack pixel makes all pixel value to 0

texts:
I am trying to remove the dark edges around a boundary of a Drone image. I tried to use nearblack tool of gdal. However, it turns the entire pixel value to 0. This could be because all the pixel values are close to zero.

The pixel value minimum and maximum is 0.0149 and 0.0198 respectively. I want to remove or convert to no-data for 2 pixels thickness around the boarder of the data.

Below is the code I have attempted.

nearblack -o "stripped000-IMG_0037_4_gcp.tif" -of GTiff "wrap000-IMG_0037_4_gcp.tif"

Is there a way to only cut out the boundary pixels without affecting pixels inside?


texts: Hyperlink in ArcGIS JavaScript API map identify dialog?

texts:
IBM's Maximo Spatial 7.6.1 uses the ArcGIS JavaScript API/map service to serve up a web map to Maximo:

In the Maximo map, I've included URLs as values in the GIS layer.

I want to be able to use the URLs as hyperlinks in Maximo that would open in a new tab/window in the browser.

Is there something I can do on the GIS side so that the URLs are treated as hyperlinks?


texts: Creating new vector which is "inverse" of existing vector (e.g. water surrounding island) in QGIS

texts:
I want to create a new vector layer which represents the surrounding water of a particular island I am working with in QGIS. Is it possible to create a water shape based on an "inverted selection" or the empty areas of an existing vector layer?
As @jdavid05 mentions, I do need to create another vector. The question is still a duplicate, though, as I think the following method here applies: Create a new vector layer that fills space between other polygons in QGIS


texts: Getting layers to show up again to left of ArcMap

texts:
The list (Table of Contents) with all my layers disappeared in ArcMap.
How can I get the list back again?


texts: Why don't OpenStreetMap building footprint shapefiles match up with Google Maps or Google Earth?

texts:
I've been accessing OpenStreetMap shapefiles using osmnx and then exporting those files into kml files so that I can view them on Google Earth. However, when I do so it appears that the building boundaries in the OpenStreetMap shapefiles are a bit off of what I'm seeing on Google Earth (and both of them are also different from Google Maps).
Does anybody know why this might be?


texts: When using the QGIS2web plugin (OpenLayers3 option), no HTML file created

texts: I'm using the Qgis2web plugin (the OpenLayers3 option), and there is no HTML file  created. The folders appear (Layers, Styles, and Resources). My web browser opens when the folders are created, but it just goes to my homepage, not the map. Any idea as to why this is happening?


texts: Determining phenological events based on Greatest increase NDVI approach?

texts:
I have a problem with a phenological study.  The study area is in temperate zone of Asia. I have been doing phenological research using MOD VI product. I wanted to extract phenological events (onset/offset date, length etc) from NDVI and EVI, based on Greatest increase NDVI value method. After calculating the NDVI ratio, also I built a graph by result of NDVI ratio. But during determination of the average onset date of vegetation green-up and dormancy based on max and min value of NDVI ratio, some unreliable thing get me into trouble. For example: in forest area, max value of NDVI ratio occurred in middle of July corresponding threshold is 0.4 while in grassland area, onset of green-up occurred in middle of May corresponding threshold of 0.09. When I saw the graph, onset of green up in forest already started in beginning of May. So that's why I said it is unreliable.

Therefore, I wish to ask:

Did you have a such kind of problem If you did phenological research using Greatest increase NDVI approach?
If so, how did you solve this problem to determine onset date of green-up and dormancy.


texts:
Is there any simple integration for calculating count of points in polygon using QGIS-Python integration?

In other words, are there any pre-defined functions for points in polygon of QGIS using python, so that we can use them in our python script?


texts: Finding and deleting overlapping polygons using QGIS

texts:
I have generated these (green) polygons in ArcMap 10.5.1 by: import XY data > buffer 5 m > minimum bounding geometry (plus a couple of other steps).

self-intersect of polygons
The screenshot is a self-intersect of the polygon layer. I need to achieve zero overlaps between polygons, by deleting the minimum number of them. I have tens of thousands of polygons.
Can someone suggest a way around this?
Related question in arcgis thread here.


texts:
I try to add a constraint based on geometry type to a "street" table that prevents anything except Linestring geometry or Null.

alter table streets
add constraint streets_geom_linestring_chk
check(st_geometrytype(geom) = 'ST_LINESTRING'::text OR geom IS NULL);

When I try to store geometries in the table:

update streets set geom=st_geomfromtext('LINESTRING(0 8,12 8)') where id=1;

I got an error, that the new row for relation violates check constraint.


texts:
I have made a buffer around a point using the CRS WGS84.

I made my buffer by Selecting a point and using the Buffer tool within the Processing toolbox.

I ideally wanted my buffer in meters but because I am using WGS84 and my data was originally ED50 31N, all the data is in Degrees, so I have had to estimate my diameter through trial and error to get to the correct distance.

The latitude of the center point is 58.352847, and my longitude is 0.862616.to measure the distance of my diameter I used the Measure line tool. However my buffer is circular.

If I am correct, using WGS84 should make my buffer more of an elliptical shape. therefore is my CRS not truly changed even though I have manually changed it within the Project Coordinate Reference System within Project properties and applied changes.

If however, my CRS does anyone know how to make the buffer (black circle) within the figure below into an elipical shape. The reason being as I need a 500m exclusion zone around the point however horizontally it is giving me a diameter of 500m, but vertically a diameter of 1000m. (Shown in the WGS84 Projection (I use QGIS V 3.2)


texts:
How do I combine two shapefiles into one shapefile?

My GPS unit tells me this:

  (arcpad 8 juno) the map projection for *.shp does not match the
  current map projection

If you could provide more insight into the error message that would be useful.


texts: Importing ArcGIS colour scheme into QGIS

texts: I've just imported a soil map of Ireland into QGIS.  However, all soil associations are displaying in one colour.  The associated zip file includes a 'layer file' containing the colour scheme for the soil associations in ESRI ArcGIS format - please can someone tell me if and how I might import this into QGIS?


texts: What is the difference between EPSG:900913 and EPSG:3857?

texts: I'm using the QGIS google layers plugin to digitize a parcel as a shapefile. Later I want to import it to PostGIS. I know that google maps use a special 'google mercator' projection. What is the correct code of this projection: 900913 or 3857? Or are these two codes describing the identical projection equations?


texts: Create A Maximum-Gradient Vector Overlay QGIS

texts:
I have generated several vector layers of different gradients and geographic areas (PUMAs, ZCTAs & Census Tracts).

Is there a way I can overlay all these layers with the aim of identifying the ultimate hotspots?

Data merge won't do the trick.


texts: Does CartoDB support alphabets other than Latin?

texts: Does anyone know if CartoDB supports alphabets other than Latin? I'm trying to upload some data with Cyrillic characters but have had no success.


texts: Displaying world country shapefiles centered on Pacific Ocean using Robinson or Miller Cylindrical projection in QGIS?

texts:
I wish to display a map in QGIS (world country shapefiles) showing all countries but centered on the Pacific area.

I am not familiar with Proj4, so is there any way this can be done in QGIS?


texts:
I am creating some maps for bird species records, an example for “A” and “B” birds is shown below. I managed to use Data Driven Pages to create a map for each species set of records that show species distribution and breeding status.  So far the created maps are fine, however, I have a problem in printing. The DDP keeps repeating printing species map which depends on number of each species records in the index layer. I just want to print one map per species.

I am using ArcMap 10.3


texts: All CAD drawing is one layer and few merged features, and no annotation when opened in ArcGIS

texts:
I have a CAD drawing wich openes normally in AutoCAD. Hoevwer when it is opened in ArcGIS to import some data from it all the lines are on the same layer (insert) and all faetures of the similar location and objectes are merged into one faeture.  also there are no annotation or texts readable by ArcmGIS.

How can I resolve this problem? at least how can I read annotations and diffretiate between line types in ArcGIS?

below is example of the drawing in AutoCAD and ArcGIS.


texts: I need one attribute value from FME and use it in python script as a parameter. How can I do this? Do I have to have def_init_() def input(), def close() also?


texts: Algorithm for converting from projected coordinate system to geographic one using Helmert transformation

texts:
I have a data in projected coordinates system and I need to convert them to WGS84. I know the parameters of position vector transformation and I know the projection details of my projected coordinate system.

I think I need firstly transform my projected points to geographic one and secondly use Helmert transformation to transform between geographic coordinates.

I think I need to use my projection details for projected system to transform it into geographic, but I am completely helpless with it.

I am looking for algorithm, I mean some code or pseudo code, not for a software, since I wish to implement this later in javascript.

Here is what I've got.

If I may borrow Helmert transformation function from the accepted answer to this post (What is the process to calculate Helmert parameters?), my position vector details are:

#displacement in meters
c0 = c(485.000000,169.500000,483.800000)
#rotation in arcseconds
r=c(7.786000,4.398000,4.103000)
#scale in ppm
s=0.000000

And my projected system details are:

  S-JTSK_Krovak_East_North WKID: 5514 Authority: EPSG

  Projection: Krovak False_Easting: 0.0 False_Northing: 0.0
  Pseudo_Standard_Parallel_1: 78.5 Scale_Factor: 0.9999 Azimuth:
  30.28813975277778 Longitude_Of_Center: 24.83333333333333 Latitude_Of_Center: 49.5 X_Scale: -1.0 Y_Scale: 1.0 XY_Plane_Rotation:
  90.0 Linear Unit: Meter (1.0)

  Geographic Coordinate System: GCS_S_JTSK Angular Unit: Degree
  (0.0174532925199433) Prime Meridian: Greenwich (0.0) Datum: D_S_JTSK
  Spheroid: Bessel_1841
      Semimajor Axis: 6377397.155
      Semiminor Axis: 6356078.962818189
      Inverse Flattening: 299.1528128


texts:
I'm having an issue harvesting a WFS (GetFeature) endpoint using GeoNetwork.
I can hit the endpoint through the browser so I know that's fine.
When I create the harvester I enter in the "Service URL" as the "GetFeature" endpoint. Then for the "OGC WFS GetFeature Query" I have been entering this XML
<wfs:GetFeature
  service="WFS"
  version="1.1.0"
  xmlns:wfs="http://www.opengis.net/wfs">
<wfs:Query typeName="XXXXXXXXXX"/>
</wfs:GetFeature>

This is where everything seems to go wrong, I get one of two results, depending on me changing between different XML code, not submitting a query or submitting the key pairs as string.
There is a red "!" that appears in the top left corner and an unhelpful java message down the bottom of the form.
Or an error message that tells me my XML is unable to parse, and wipes my Query.
Has anyone encountered this before ?
Perhaps it is a known bug, or a user error.


texts:
I'm using Sharpmap to create a GIS application. I'm trying to get a small overview map on top of my map so it gives an idea what part of the map is being viewed.

Is there a simple/implemented way of doing this? Or do I need to add another map and interact with this map on every change?

Just need a push in the right direction.

Thank you in advanced!


texts:
I have the following script that converts a list of .tiff files in the working folder to .kea files using gdal_translate.
When I run the script in the command line it works fine and creates the .kea files.
However when I try to run it on a Jupyter Notebook it does not seems to work.
Is something missing from the code?
import os.path
import sys

def replaceGTIFF_kea(inputtext):
outputtext = ""
for w in inputtext:
    w = w.replace("GEOTIFF","KEA")
    w = w.replace(".TIF",".kea")
    # this line should be unnecessary since Landsat MTL files use capital letters
    # but just in case you have one that doesn't
    w = w.replace(".tif",".kea")
    outputtext += w
    return outputtext

# find all *.TIF files and *MTL.txt files in the current directory
 directory = os.getcwd()
 dirFileList = os.listdir(directory)
# print dirFileList
 tifFileList = [f for f in dirFileList if ((f[-4:]=='.TIF')or(f[-4:]=='.tif'))]
 MTLFileList = [f for f in dirFileList if (f[-7:]=='MTL.txt')]

#output format (GDAL code)
outFormat = 'KEA'

# run gdal_translate on all TIFs to convert to KEA
for t in tifFileList:
    gdaltranscmd = "gdal_translate -of "+outFormat+" "+t+" "+t[:-4]+".kea"
    print (gdaltranscmd)
    os.system(gdaltranscmd)

# create a new header file referring to .kea files rather than .TIF
for m in MTLFileList:
    inputtext = file(m).readlines()
    outputtext = replaceGTIFF_kea(inputtext)
    outputfilebase = m[:-4]
    outputfile = outputfilebase + "_kea.txt"
    out = file(outputfile,"w")
    out.write(outputtext)
    out.close()


texts: Unclear how to implement weighted average of GoLive velocity data

texts:
I am trying to apply the weighed averaging scheme outlined in Scambos et al. 2007 to GoLive surface velocity data in Antarctica.

Essentially, for a given Landsat scene I have a number of ice velocity images, formed from image pairs spanning different intervals and dates. The goal is to stack and average colocated ice velocities. Fahnestock et al. (2016) defines a simple weighting scheme, but then states the weighted average is calculated according to the method outlined in Scambos et al. 2007.

This is where the confusion sets in, as I do not comprehend what the notation in Scambos et al. (2007) trying to convey in equation 7 in the attached screenshot. They write:

  "Images, or intermediate image composites, were added to create the final mosaic by the following scheme. Given two existing band 1 composites, B0 and B1, each having C0 and C1 count images and associated weight images W0 and W1, combined on them already, we create a new composite consisting of CN, WN, and BN

"

Can anyone elucidate the operation in equation seven for me (especially the meaning/utility of the semicolon)?


texts:
I have created my custom form for features editing, using layer.setEditForm("form.ui") and layer.setEditFormInit("init") properties. init method receives dialog, layerId and featId as arguments. Everything works ok, but now I need to get a geometry of a new feature before closing the form.

Is there any way to do it?

Feature id gets assigned to "0" and looks like doesn't exist in the features list before accepting changes.


texts: Calculating full text string between two joined tables in ArcMap?

texts:
Using ArcMap 10.2.2, I performed a basic table join between a few of our electric feature classes to update the "Line and Pole" field with the attributes in the "Fuse Size" and "Fuse Type" fields.

We actually noticed multiple problems.

First, a string like "25 Amps" (from the "Fuse Size" field) came across as "25", leaving off "Amps" - this occurred with all records.
Also, for the "Fuse Type" value, "Load Break" was abbreviated and populated as "LB".

Both field types are strings. We went in and corrected the syntax manually.
But, any ideas as to why these scenarios occurred?

We haven't been able to find much after researching the problem.


texts: Why Table to Excel tool does not work properly in ArcGIS Pro?

texts:
I have been using a Python/ArcPy code use to generate many Excel files (.xlsx) from shapefiles. After the last Pro update end users start complaining that they get message when they try to open those Excel files.
First, I thought it was something wrong from my end, code, server etc. but when I do the process manually. I got the same error.
When I  try to open ESRI generated Excel file I get the message below

Then I click Yes and get this message

It seems nothing get lost but it is frustrating popping multiple windows and make users think they did something wrong or something wrong with the file itself.
I found this
https://stackoverflow.com/questions/18539267/xlsx-error-removed-records-named-range-from-xl-workbook-xml-part-when-tried/44416204#44416204
but I don't have any control of the template or problem mentioned here.
Is there way to fix our own or we need ESRI to fix that?