texts: Dissolving polygons using SAGA leaves gaps?

texts:
I am new in using GIS and I'm having some problems in properly dissolving some polygons. In particular, I have a single layer with about 3,000 polygons (protected areas), some of which overlap (the same geographical site can have multiple designations). I would like to calculate the areal coverage of protected areas, avoiding the overestimation due to multiple designations for the same site. According to what I read on the net, the solution should be to dissolve the polygons in a single one.

I tried with QGIS but it takes a very long time (1 hour for only 1%), so I switched to SAGA GIS: Geoprocessing -> Polygon Dissolve, without selecting attributes (because I want to dissolve all polygons). The process was much quicker but the result is not correct. In fact, in the resulting polygon there are some gaps where protected areas should be.

The error is visible in the picture: on the left the original layer, on the right the result of the operation, with the gaps marked with a red x

Does anyone know how can I solve?


texts: Getting the IDs of nodes on a single line to be placed in a single field in the attribute table

texts:
Is there anyway to find out the IDs of multiple nodes on a single line and place them in a single field? I'm trying to get the IDs of nodes that appear on their respective links to be placed in a single box.

For example, Line 50 has 4 nodes with IDs 12,13,14 and 15. How do i use the field calculator to put all 4 nodes (or more/less) to be placed into Node IDs with a comma separating each node ID?


texts: ArcGIS Desktop and Leaflet (exporting feature classes to GeoJSON)

texts:
I'm looking to access feature classes currently in ArcGIS Desktop from Leaflet (i.e. from a Web Browser with JavaScript).

I know it's possible with ArcGIS for Server (which has a "ArcGIS Data Interoperability for Server" module etc.) - I'd just have to move the data to Server and all would be good.

However, are there other options? e.g. perhaps there is a tool that can export data (as GeoJSON - which Leaflet likes) from ArcGIS Desktop.

I'm considering doing an ArcGIS Desktop add-in (extension) to export to GeoJSON if there's nothing out there.


texts: Loop through ee.ImageCollection in Google Earth Engine to sum pixels of each individual part, and return value(s)

texts:
I have an image collection :

var imcol = ee.ImageCollection(table.map(colFunc));

that contains values for total number of x species supported in each pixel for each image. I want to loop through the collection somehow and use a function like this:

var sum_calc = function(feature){
  return feature.reduceRegion({
    reducer: ee.Reducer.sum(),
    geometry: fc,
    scale: 30,
    maxPixels: 1e9
  });
};

to sum the values of each image to show (essentially) carrying capacity of each image.
I am very new to javascript and Earth Engine. what would be the best way to go about this? I just need the sum value from each image in any format.


texts: Calculating driving time between two layers (patients & hospitals)

texts:
I need to calculate the driving time (following US roads) from patient coordinates to hospital coordinates. In total, I have ~ 250,000 driving time to calculate. I previously used ArcGIS but now I would like to use QGIS instead (version 3.10) as I am soon losing my ArcGIS Pro license. I uploaded my dataset as a vector layer. The dataset has the following variables (in that specific order): patient_id, patient_lng, patient_lat, center_lng, center_lat. I also installer the ORS tool as suggested in a video.
I am having a hard time adjusting from ArcGIS to QGIS as I am not sure where to begin. What tool/plugin do you recommend?


texts: Save as Mapinfo Tabs multiple shp layers

texts:
i want to convert about 200 shp files to Mapinfo tabs. I found How to batch "Layer save as"-process in QGIS? on running through multiple layers and saving them as shp files. But when i tried to adjust the code for "Mapinfo TAB" it didn't work.

Any ideas?


texts: How to obtain and compare neighboring point attributes? (ArcInfo)

texts:
This question is kind of hard to explain in a short phrase, so this is what I'm talking about. I have access to an ArcInfo 10 license.

I have a layer of point features that all have a "Team" attribute that corresponds to a favorite sports team. I would like to define some search radius and, around each point, search for the most common "Team" value in the search radius. Essentially, for each point, I want to determine what the most popular team is in a given search radius. I have over 10,000 points, so this would have to be something fairly automated. My end goal is to turn a bunch of points into some kind of "blob map" that defines regions where a particular sports team is most popular.

I was initially thinking of creating a buffer of desired radius around each point and then spatially joining the attributes of the points to buffer polygons. At that point I'd do some fancy work in Excel or something to determine the most numerous "Team" value, but that doesn't feel like the best way to go. Any help or partial ideas would be greatly appreciated, thanks.


texts: OpenLayers 3 - WMS Transform should be defined

texts:
I load wms from "geoportal" and it's good to time when I want show wms. Problems:

Hidden default map - I want that WMS overlays on OSM
Transform should be defined

It's look that:

And some code:

var extent = [78912.472300001, 78524.1231000004, 875939.472300001, 948244.6231];

var projection = new ol.proj.Projection({
   code: 'EPSG:2180',
   extent: extent
});
ol.proj.addProjection(projection);
ol.proj.addCoordinateTransforms('EPSG:4326', projection,
  function(coordinate) {
    return [
      WGStoCHy(coordinate[1], coordinate[0]),
      WGStoCHx(coordinate[1], coordinate[0])
    ];
  },
  function(coordinate) {
    return [
      CHtoWGSlng(coordinate[0], coordinate[1]),
      CHtoWGSlat(coordinate[0], coordinate[1])
    ];
});

var WMS=new ol.layer.Image({
  extent: extent,
  source: new ol.source.ImageWMS({
    url: 'http://mapy.geoportal.gov.pl/wss/service/img/guest/TOPO/MapServer/WMSServer',
    crossOrigin: null,
    params: {
      'LAYERS': 'Raster',
      'FORMAT': 'image/png32',
      //'TRANSPARENT':true,
    },
    serverType: /** @type {ol.source.WMSServerType} */ ('mapserver')
})
});

Views:

 var _view=new ol.View({
    center: ol.proj.fromLonLat([0, 0], projection),
    zoom: 0,
    extent: extent,
    projection: projection,
});


texts: Adding street names from one layer to another

texts:
I've been tasked with making a network of streets for a city using a shapefile provided to me which has no attributes other than its location and length. This is the shapefile I need to work with and is the full extent of the project.

The problem is that for our purposes there needs to be a field with street names in the attribute table. That's it, that's all we need. Just the original layer, but with street names. My approach to this problem thus far has been downloading the whole road network for my state from Open Street Maps and then clipping it to the city. After that, I spatially joined the two layers so now I have a layer with the attributes of both layers including the street name. The problem is that the extent of the OSM layer includes a lot of roads, alleys, etc, that is not necessary to the project.

How would I go about deleting every part of the network on the joined layer that isn't spatially on top of the original nameless street layer?

Currently the extent of the street network is too large and I need to trim it down to only include what was on the original layer.


texts:
I have a point-layer i Postgis v12 which is ST_point, ST_NDims = 3.

When creating a new point i QGIS and then tries to save it, I get an error:

  Column has Z dimension but geometry does not

When looking in to the object identifier the derived attributes only contains X and Y. However, the rest of the points that loads from the database has a Z-value set to 0 attached to them.
So i get that my created point dosen´t have a Z-value.

Isn't it possible to create new data in 3 dimensional tables from Postgis in QGIS? Even with a deafult value of 0, I don´t even need to specify the Z-value at this moment.

EDIT

If I save the layer in a QGIS-project and open the .qgs-file and look into the datasource-tag for the the layer I have:

type=Point

When changing this to:

type=PointZ

saves the project and try to create a new object, it works fine.

I then go on to Postigs to run the following alter to the table:

ALTER TABLE cl
  ALTER COLUMN geom TYPE geometry(PointZ)
    USING ST_Force3D(geom);

However, when checking the geometry type again it still remain ST_POINT...
Also when trying to create a new point after the "ALTER" of the table, type=Point in the .qgs-file.

How come that I can create a new feature when I change the type to "type=pointZ" in the project? Even if the table is in 3D I can create and store features. And why can't QGIS read this geometry from Postgis without have to set i manually in a project?
As suggested below, I get the correct typ from the query: ST_AsText
Seems to me that QGIS reads ST_GeometryType istead of ST_AsText, or?


texts: Can I load a country-size OSM file in QGIS?

texts:
I've tried several ways to display OSM data in QGIS, but none of them really worked well for me.

For example, I've tried WMS layer, but when I try to print high resolution, it won't give me enough data. I've tried to load into Postgis DB, but only got thousands of nodes displayed. Did not really look like a map ...

Is there any way to load some big file, for example for one country, and display it in Mapnik style in different zoom levels?


texts: What ArcGIS Desktop license level is needed to use ring map tool/script?

texts:
I'm trying to create ring maps with the tool/script found in the link(s) below:

http://www.esri.com/news/arcuser/0408/files/ringmaps.pdf
http://www.esri.com/esri-news/arcuser/fall-2013/looking-at-temporal-changes

I have the basic ArcGIS 10.3 license level.  When I try to run the first step of the tool I get:

  ERROR 000824: The tool is not licensed"

I'm wondering if anyone has used this and knows if I need the standard/advanced license level or if there is a way around this.


texts:
I have installed Python 3.6.8 and am attempting to run QGIS 3.14. I get this message, which doesn't show in any existing questions I could find:

Should I try an earlier version of QGIS?
Tried 3.10 and got same response.


texts:
I am attempting to use a memory vector to crop a raster using GDAL warp but I get the following error:

ERROR 1: Cannot open <osgeo.ogr.DataSource; proxy of <Swig Object of type 'OGRDataSourceShadow *' at 0x000001AF5FC238A0> >.

My code is as follows:

import ogr, gdal

drv = ogr.GetDriverByName("Memory")

feature_ds = drv.CreateDataSource("memory_name")

feature_layer = feature_ds.CreateLayer("layer",srs ,geom_type=ogr.wkbPolygon)

featureDefnHeaders = feature_layer.GetLayerDefn()

outFeature = ogr.Feature(featureDefnHeaders)

geometry = feature.GetGeometryRef() #This feature is a polygon and comes from another dataset

outFeature.SetGeometry(geometry)

feature_layer.CreateFeature(outFeature)

feature_ds.FlushCache()

gdal.Warp(out.tif,
          in.tif,
          outputType=gdal.GDT_Float32,
          cutlineDSName=feature_ds,
          cropToCutline=True,
          warpMemoryLimit="5000")

I have tested to make sure the data is all valid, the code runs and produces the results I expect when I make the vector a shapefile. I just need to know if it is actually possible to use memory vectors or not.


texts: Geoserver - Can't get LegendGraphic of WMS in Cascade

texts:
I have configured a Cascade WMS in Geoserver and published some layers of this server. The Styles are shown correctly in Client Side Openlayers. But when I look at the capabilities no Online Resource is generated, so I can't get the legend URL.
Also there's no menu for styles when I try to edit those layers.

Why Openlayers is rendering the layers with the correct style if there's no style in my geoserver and the GetMap request has no style key?

http://192.168.1.14:8080/geoserver/jahr/wms?SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&tiled=true&LAYERS=jahr%3ACentros_Municipales&STYLES&WIDTH=256&HEIGHT=256&SRS=EPSG%3A4258&BBOX=-0.4625%2C39.42875%2C-0.43125%2C39.46

Someone had the same problem?


texts: Linking Geoserver WMS layer to Google Earth?

texts:
I tried with what was available in Geoserver Layer preview as kml. It gives the geom itself at higher zooms, not the image for that area.

What to do to get only the png/jpeg images from Geoserver and show it in Google Earth, over normal satellite view?


texts: Import shapefile then export coordinates

texts:
I have received some shapefiles which I believe are from ArcGIS.  Each "file" consists of a number of physical files, e.g.

kv_27.dbf
kv_27.shp
kv_27.shp.xml
kv_27.shx

I need to extract the coordinates from these files.  I am trying to use QGIS and the instructions here:

How to get Shapefile point coordinates into .xls?

I am opening the files using Add layer >> Add vector layer

My first question is which file or files should I open?

When I try to carry out the command

Vector >> Geometry tools >> Add/Export Geometry Columns

Once I click OK I get the error message:

Currently QGIS doesn't allow simultaneous access from different threads to the same datasource. Make sure your layer's attribute tables are closed. Continue?

Neither option (yes/no) provides the coordinates.

Could someone explain what it is I am doing wrong?


texts: Find index of Linestring element at feature, when hovering - openlayers/GeoJson

texts:
I have a Geo-JSON Linestring, this is drawn by 800 elements in OpenLayers 4.6.5.

I'am trying to use the map.forEachFeatureAtPixel, and print a pop-up when hovering for individual elements on the linestring. However, i have trouble identifying which element in the Linestring i'm CURRENTLY hovering over.

I can extract the whole array of 800 elements from my Linestring;

map.on('pointermove', function (evt2) {
var linefeature = map.forEachFeatureAtPixel(evt2.pixel, function
(kfeature, layer) {
console.log(kfeature.N.geometry.A);
return kfeature;
}

I have tried to experiment with forEachSegment, without any promising result:https://openlayers.org/en/latest/apidoc/module-ol_geom_LineString-LineString.html

Same for the findIndex(), i don't get any results.

How do I identify the elements in my Linestring?
Or suggestions for other ways to solve this?


texts: Manually add a new point to PostGIS table

texts:
I did accidently delete a table row - or well, in fact a whole subway station.

My attempt to solve the problem was this PostGIS function:

ST_GeomFromText('POINT(coordinates)')

But then PostgreSQL started to complain about some SRID connection with the spatial_ref_sys table. What did I do wrong? Is it possible to add this through QGIS instead?


texts:
I want to use some points(point_695) to extra their values in timeseries landsat8 images from 2014-01-01 to 2014-05-15, to get 695 timeseries trajectory. When I use reduceRegions to do the extra, It only got return when I use

  point_695.limit(2) or point_695.limit(2)

when I select more than 2 points, the whole reduceRegion function does not work and returns nothing. My question is that:

  Does there size limit for run reduceRegion function? if does, how can I revise the script? ps: My points located sparsely in a very large area.

here is the main problem part of my code:

var probavProjection = ee.ImageCollection('VITO/PROBAV/C1/S1_TOC_100M').first()
                .select('NDVI').projection();

var ndvitimeseries = dataset.map(function(image) {
   var ndvi = image.normalizedDifference(['B5', 'B4'])
  return ndvi
})

var point_ndvi = ndvitimeseries.map(function(image){
  var date = image.getString("system:index").slice(12)
  return image.reduceRegions({
      collection:point_695**.limit(2)**,
      reducer: ee.Reducer.first(), //andrei: mean
      scale: 100,
      crs: probavProjection,
    }).map(function(f){return f.set("date", date)})
})
print(point_ndvi.first())
point_ndvi = point_ndvi.flatten()//.distinct(["Field1","date"]);
print(point_ndvi.**limit(2)**,"flatten")```


texts:
For debugging my QGIS-plugins in Visual Studio 2008 I have to start QGIS and attach the process (with Ctrl-P) to my debugger in VS. This is because the plugin is a dll and has to be loaded during QGIS start.

Is there an ability to have QGIS opened all the time and load the plugin.dll new if needed?


texts:
I am new to GRASS GIS. I need to run my program with the r.thin command, and I will not get any results as I proceed according to the program. My map is a png image in 2 bits.
How do I execute this command correctly?
My input image in "png" format is as follows:

And my output image after executing the "r.thin" command is as follows:

As it is clear, no thinning has been done and only the color of the image has changed.


texts: Connection between OpenLayers and GeoServer is faulty

texts:
I have connected my GeoServer to my OpenLayers website and it seems like something is wrong about the connection.

I added a WMS layer in JavaScript like this:

But when I load the page the result is this:

When I use layer switcher, when I turn this layer on(visible) everything else goes white.

When I turn this layer's visibility off I get all the other layers according to plan.

Supposing that I use everywhere else in the map projection 900913, what could be my mistake?

What is wrong is that I can't see my other layers, the base layers etc?

Please if you need any additional information I will provide as soon as possible.


texts:
I'd like some input on choosing an elective for my GIS study. My choices are:

1) Database management in GIS
2) Python and Spatial Analysis in GIS
3) Project management in GIS

From what I understand, programming and database skills are both hot commodities; however, I think I would enjoy project management and the "big picture" approach.

I already have a Master's in Geography and have taught undergraduate geography, but I'm going back to get these skills so that I can do geography outside of the classroom.

Would each of those classes match up with a different role within the GIS field, or is there more overlap?


texts: Get 2 Selected Layer out of the MapTableLayer

texts:
I have a Method that calculates the Area of 2 Layers of different topologic Relations, which needs 2 collections.

In the Button where I use this method, I want to get just 2 of the selected Layers in the MapLayerTable.

Now I don't really have a clue how I can get this done.
I already have a code sample, where I just select one Layer (The first one):

for(int i = 0; i < map.layers().size(); i++){
    if(map.layers().get(i).isSelected){
        FeatureLayer layer1 = (FeatureLayer) map.layers().get(i);
        SimpleFeatureCollection coll1 = layer1.getSimpleFeatureSource.features();
     break;
     }
}

is it possible to upgrade this code, so it gets me only 2 Layers as SimpleFeatureCollection? (The first two selected)

Or is there an easier Method to get this done?


texts: OTB-QGIS plugin does not appear in QGIS 3.2 after manual installation

texts:
I have followed this instruction to connect the qgis-otb-plugin manually.

But after completing all the steps, OTB does not show under Settings > Options > Providers.

I cloned the qgis-otb-plugin repository with GitHub Desktop to c:\qgis-plugins\qgis-otb-plugin and set the QGIS_PLUGINPATH to the same path. Restarted. And then nothing. Can someone help?


texts: How to obtain closest point of point over polylines layer in PostGIS 1.4 (without st_ClosestPoint)?

texts:
I´ve got a polylines layer (pipes) and a points layer (valves) and In Postgis 1.4 I would like to obtain the closest points but exactly on the closest polyline. In other words, i need to locate each valve over the closest point on a pipe but taking into account that there is not only one polyline but many and that i am using postgis 1.4 and St_ClosestPoint() that could help to solve this problem doesn't still exist on my postgis version.

If theres a way to add the St_ClosestPoint() function to my Postgis 1.4 could also help but i think i need to create a new function for this.
Thanks in advance.


texts: Creating buffer in QGIS without including surface of original polygon?

texts:
I have to have a layer (shapefile) with a polygon that has a 100-m buffer zone around each polygon of my original file. With the QGIS Buffer (fixed distance) tool, I get polygons that include the original polygon. But I only want the outside for each polygon.
If the buffer for polygon A intersects the buffer for polygon B, I don't want to lose that part of the "outside" buffer (so I can't use the différenciation symétrique tool (sorry, I'm on a French version of software and I don't know it's equivalent in English). Alternative would be a smart intersection that is polygon-to-polygon based on an ID to get rid of the inner part.

My original datafile is the green and the buffers are underneath in blue.

Just the buffer layer that I tried in blue.


texts: How do I synchronize field properties with the database properties?

texts:
I have a feature class with a property that is out of sync with the database table. The field property is "Allow NULL values" and it's currently set to "No". Earlier today, before I was aware of this setting in the feature class field properties, I deleted the "IS NOT NULL" constraint on the database table. The database table says this column should accept NULL values but the FC, when viewing in ArcMap, says NULL values are not allowed.

How do I synchronize the FC and database? Is there a metadata table somewhere that needs to be refreshed? Is there a better way to change the field property?


texts: I have a TIFF created from a pdf using GIMP2. The co-ordinate pairs for the extents are shown in the TIFF. I need to convert this TIFF to a GeoTiff and ultimately to a shpfile. The CRS is known.


texts: What is the correct spelling: CSW or CS-W?

texts: In different publications I read sometimes CSW or sometimes CS-W for the standard of transferring metadata-documents. What is the correct 'official' spelling?


texts: Refreshing imported modules in ArcGIS Python Toolbox?

texts:
When using a python toolbox (.pyt) in ArcMap, I'll typically follow a pattern where the .pyt file itself is simply a wrapper to collect input arguments and define the tools themselves.  Supporting code is kept in separate unit-testable modules.

Example:

import supporting_module

class MyTool(object):

    ...

    def execute(self, parameters, messages):
        """The source code of the tool."""
        some_input = parameters[0].valueAsText
        some_output = parameters[1].valueAsText

        supporting_module.do_something(some_input, some_output)
        arcpy.SetParameter(2, some_output)

This works out really well but I've run into one frustrating issue during development.  Right-click -> Refresh on the .pyt in ArcMap only refreshes the .pyt file's code.  It does not refresh the imported modules, so I have to close and re-open ArcMap whenever I change something there.  Fortunately, since I'm testing the code independently, I don't have to do this a ton, but it's still a major hassle.  Is there any way around this?  Somewhat related - is there any way to fully refresh the Python console (i have a custom site-package that I must also close/reopen ArcMap to pull in changes from as well)?

I'm using ArcMap 10.2.1.


texts: In a similar idea to http://flowingdata.com/2010/05/25/world-atlas-of-flickr-geotaggers/ and http://flowingdata.com/2010/05/25/map-of-where-toursists-flock/ I would like to extract OSM planet data, say the coordinates of schools, and overlay them on a map so that when zoomed out you would get a kind of heatmap of where the world's schools are. Surely this should be relatively easy but I can't find a tool to do it. OSM planet does give coordinates of points by point type, after all, doesn't it?


texts: mod_tile: how to avoid cache expiry during DB rebuild

texts:
I'm running an OSM tile server with the default stack (mapnik, tirex, mod_tile, apache).
Since I need only specific areas, I usually pre-render all tiles.
Now I want to rebuild the Postgres DB bcs of a schema change (in order to satisfy specific style requirements). How can I avoid tiles requests to fail during that time because of mod_tile cache expiration policy? I'm using the default mod_tile config and don't yet know much about it.


texts:
I'm trying to connect to a Web Map Service with the Geotools WMS classes.
My problem is, that the response-object "capabilities" doesn't contain all layers.  When I'm doing the request in a browser, I can see all layers.

URL url = null;
      try {
        url = new URL("http://www.test.de/wms?service=wms&version=1.1.1&request=GetCapabilities");
      } catch (MalformedURLException e) {
      }

      WebMapServer wms = null;
      try {
        wms = new WebMapServer(url);
      }
catch(Exception e){}

WMSCapabilities capabilities = wms.getCapabilities();

      Layer[] layers = WMSUtils.getNamedLayers(capabilities);

      List<Layer> alle = capabilities.getLayerList();

The GetCapabilities.xml is (part of the document):

<?xml version="1.0" encoding="UTF-8"?>
<WMT_MS_Capabilities version="1.1.1">
<Service>
    <Name>OGC:WMS</Name>
    <Title>Titel</Title>
    <Abstract>  abstract.</Abstract>
    <KeywordList>
        <Keyword>WMS</Keyword>
    </KeywordList>
     <Layer queryable="0" opaque="0" noSubsets="0">
        <Title>Rasterdaten</Title>
        <Name>Rasterdaten</Name>
        <SRS>EPSG:31467</SRS>
        <BoundingBox SRS="EPSG:31467" minx="3340000" miny="5230000" maxx="3615000" maxy="5550000"/>
        <LatLonBoundingBox minx="7.60" miny="47.40" maxx="10.00" maxy="50.00"/>
        <Layer queryable="0">
            <Name>DOP_RGB</Name>
            <Title>DOP_RGB</Title>
            <LatLonBoundingBox minx="7.60" miny="47.40" maxx="10.00" maxy="50.00"/>
        </Layer>
    </Layer>
      <Layer>
        <Name>Touristik</Name>
        <Title>Touristik</Title>
        <SRS>epsg:31467</SRS>
        <BoundingBox SRS="EPSG:31467" minx="3340000" miny="5230000" maxx="3615000" maxy="5550000"/><LatLonBoundingBox minx="7.33273" miny="47.4683" maxx="10.6673" maxy="49.8177" />
        <Layer>
          <Name>Radwege</Name>
          <Title>Radwege</Title>
          <SRS>EPSG:31467</SRS>
          <BoundingBox SRS="EPSG:31467" minx="3340000" miny="5230000" maxx="3615000" maxy="5550000"/><LatLonBoundingBox minx="7.33273" miny="47.4683" maxx="10.6673" maxy="49.8177" />
                  <Layer queryable="0">
                   <Name>DTK50-grl</Name>
                   <Title>DTK50-grl</Title>
                   <LatLonBoundingBox minx="7.60" miny="47.40" maxx="10.00" maxy="50.00"/>
                  </Layer>
         </Layer>
         <Layer queryable="0" opaque="0" noSubsets="0">
            <Title>Thematische Linien</Title>
            <Name>Thematische Linien</Name>
            <SRS>EPSG:31467</SRS>
            <BoundingBox SRS="EPSG:31467" minx="3340000" miny="5230000" maxx="3615000" maxy="5550000"/>
                  <Layer queryable="0">
                    <Name>DTK50-gll</Name>
                    <Title>DTK50-gll</Title>
                    <LatLonBoundingBox minx="7.60" miny="47.40" maxx="10.00" maxy="50.00"/>
                  </Layer>
                  <Layer queryable="0">
                    <Name>DTK50-bll</Name>
                    <Title>DTK50-bll</Title>
                    <LatLonBoundingBox minx="7.60" miny="47.40" maxx="10.00" maxy="50.00"/>
                  </Layer>
         </Layer>
     </Layer>
</Capability>

The node "Rasterdaten" isn't shown in the capabilities-object. Does anybody know, why?


texts: Indexing long text fields failing using arcpy AddIndex?

texts:
Arcpy AddIndex_management won't index long text fields, is there a workaround?

I tried:

arcpy.AddIndex_management(r'C:\workspace\foo.dbf', "Text")

and got the error:

Runtime error  Traceback (most recent call last):   File "<string>", line 1, in <module>
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 5993, in AddIndex
  raise e ExecuteError:
  ERROR 999999: Error executing function.
  Attribute indexes cannot be created for fields with a length that is greater than 80.
Failed to execute (AddIndex).

I have also tried this with shapefiles as well as dbf's with the same error.  I need to index a text field in order to perform a JoinField() more quickly with arcpy.

Is there a work around to do this that doesn't involve shortening text fields?

I haven't seen a reason not to index fields longer than 80 characters; especially since the text fields I'm indexing have been calculated and are therefore not very prone to typos. For example, if you had a series of field of species names and you wanted to join that to a table containing descriptions of those species, you would be joining on a potentially long text string.


texts: Is it possible to save a gpx on Oruxmaps

texts:
I'm using the feature "Find route" in Oruxmaps, which will compute off line a track with GraphHopper.
Thing is I cannot find a way to save it as gpx. Is it possible ???


texts: switching page and print properties bombs within ArcMap

texts:
within jobs launched from workflow manager, I am having a recurring bomb glitch when my users try and change their printer settings, or switch between printers/plotters.

Print drivers are updated.  Doesn't seem to matter on a specific printer/plotter.

Base maps settings pointing at a particular printer will hold, but if they go to change them, often ArcMap will bomb.


texts: Converting column with data type string to double using ModelBuilder?

texts:
I am using ModelBuilder to create a tool. In the middle I have to convert the string values of two columns of a data (in attribute table) to double (for calculations in later steps).

Can I do this using ModelBuilder itself rather than doing it manually?


texts: Python script creation, intersection Points and polygons

texts:
I have these two shapefiles, one with polygon geometry and the other with point geometry, that I am working on in QGIS. I want to create a script using Python to see the intersection of points and polygons, and where there is an intersection fill in the value of a field I created.

Psuedo code for this would be something like

for polygon in Aveiro_Polygon.features():
    for point in Aveiro.features():
        if point is contained within polygon:
            point.setAttribute(someValue)


texts: Blank table when exporting a feature selection of a image collection

texts:
I'm trying to get reflectance data of some points that i've gotten from another database through a Json table of pings.

I've used this code to get the data but returns only the title of columns with null reflectance values:

var rrs = ee.ImageCollection("NASA/OCEANDATA/MODIS-Aqua/L3SMI")
  .filterDate('2018-1-04', '2018-1-05')
  .select('Rrs_645', 'Rrs_555', 'Rrs_443')
  .filterBounds(geometry);

var reduceR = function(image) {
  return image.set(image.reduceRegion({
    reducer: ee.Reducer.first(),
    geometry: geometry,
 }));
};

var mRrs=rrs.map(reduceR);

Export.table.toDrive({
  collection: mRrs,
  description: 'rrs',
  fileNamePrefix: 'rrs',
  fileFormat: 'CSV',
  selectors: ['Rrs_645', 'Rrs_555','Rrs_443']
});

Thannnks


texts: Creating new layout using arcpy.mp in ArcGIS Pro

texts:
Our team uses arcpy.mp to automate production of large volumes of maps. We have created an ArcGIS Pro project which contains several commonly-used map templates (as layout objects), such that team members can use python scripts to select one of the templates in the project and create maps quickly. Since we have only been able to use arcpy.mp to modify existing layouts in the project, we need to use base python to copy the entire project before editing the templates.
What we would like to do is copy a layout template, create a new layout, and then modify that new layout without needing to copy the entire project directory. I can't find any functionality in arcpy to create new layouts.
Is there a way to make new layouts from python scripts?


texts: Edit the default 'Extract Values' ArcGIS script tool input parameter display name?

texts: Is there a way to change the default display name of the 'Extract Values' ArcGIS script tool input parameter? I would like to change the 'Raster' display name and the 'Output field name' text to something more custom. As for this tool I want the user to input a shapefile and define a buffer.


texts: Automating creation of toe of slope from DEM using ArcGIS for Desktop?

texts:
I was looking for an automated process to "identify" the toe of a slope from a DEM and ran across this ESRI thread and technique:

I am at Step 7 but have no idea how this is accomplished. I get it is in Raster Calculator but how???

  Re: Finding toe-of-slope in a DEM

  Author William Huber

  Date Nov 29, 2003

  Message There are a lot of approaches that might be effective. Here's
  one. Implement it using the Raster Calculator.

  (1) Create an indicator grid of "flat" areas. In the example
  (attached), I have begun with a DEM of part of Highland County, VA.
  The "flat" areas are those with a slope of less than 6 percent.

  (2) Creat an indicator grid of "steep" areas. This is the complement
  of the flat areas.

  (3), (4) Use the indicator grids to mask the original DEM, creating
  grids showing elevations only where the slope is flat or steep.

  (5), (6) Compute neighborhood means of the steep elevations and flat
  elevations.

  (7)Create a "valley edges" grid at cells where the mean of the steep elevations exceeds the mean of the flat elevations.**

  (8), (9) Simplify this valley edge grid by performing a Boundary Clean
  operation, then shrink it by a cell or two.

Any help would be appreciated. Or maybe there is a different way.


texts: How to create svg symbols that have modifiable fill color, stroke color and stroke width?

texts:
I want to create some svg symbols for Qgis using Inkscape, those symbols must have attributes as described in the question. For the last two days, I have been experimenting as instructed by Sourcepole and mimicked some symbols came bundled with qgis that have desired attributes without any success.

Finally I experimented with the simplest form of symbol: I created an svg that contains only a circle in Inkscape and tried to modify it.

The original file (circle.svg) have this line:

<path
   sodipodi:type="arc"
   style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.01988637;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"

I modified it into:

<path
   sodipodi:type="arc"
   style="fill:param(fill) #ffffff;fill-opacity:1;stroke:param(outline) #000000;stroke-width:param(stroke-width) 1.01988637;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"

Saved as circle_modified.svg and selected it as point symbol, but Qgis couldn't change all three parameters at the same time.

What did I do wrong or should do differently?

My system: Qgis 1.8.0 on Ubuntu 12.04 64 bit, Inkscape 0.48, Gedit 3.4.1 text editor.


texts: Combining two images one over other using ArcPy

texts:
I have to combine images from different satellites (with different spatial and spectral resolution) such that features of both are present in the final image. I am using ArcGIS.

Please help me with your solution.


texts: How to optimize QgsFeatureRequest with filter expression

texts:
I have a point PostGIS layer (my_layer) which has more than 66000 features. I am getting the features I want but it takes too long. My code is:

    resultList = []
    req = QgsFeatureRequest().setFilterExpression(' "some_field_name" = \'some_value\' ')
    for feat in my_layer.getFeatures(req):
        name = feat.attribute("some_other_field")
        resultList.append(name)

How can I optimize it so that I can get the results quicker?


texts: Converting proximity from PIXEL distance to GEOmetric distance in QGIS

texts:
I used the Raster>Analysis>"Proximity (Raster distance)" tool in QGIS in order to create a raster of distances to a particular value in another raster. This is the same sort of thing someone might do for a proximity to mainland analysis... only I'm using it for proximity to something else (a bathymetric slope of more than 10 degrees).

When I run the Proximity tool with my slope raster as the input file, and "Dist unit" as GEO, I receive a warning that "Pixels not square, distances will be inaccurate." I think this makes sense, as I'm using EPSG:4326.

Unfortunately for me, the distances are important, and they are far off reasonable values in my region of interest (though their relative magnitudes make sense, which is useful). If I use PIXEL as the "Dist unit" instead, I do not receive this warning, and the distance values for the generated raster make sense. But how do I generate a raster from this with values that represent geometric distances (in meters)?


texts: DMS vs Numeric format for latitude and longitude

texts: Is DMS format still widely used in industries these days? It seems to be way less suitable to operate comparing degrees with floating point.


texts: How to locate M values in ArcGIS Silverlight API?

texts:
I am trying to work with M values in the Silverlight API.

I gather that the IdentifyParameters would be used to identify a milepost by clicking along the line, but what would I use to query an M value so the app could zoom to it upon a user-entered value?

To be clear, I am looking for a function quite like an address locator, but for M values.


texts: Embedded python script module import issue

texts:
I have two ArcGIS python scripts. One is a primary python script that calls a number of functions from a second python script.
Everything works well, i.e. primary tool calls and uses functions from a second script, when the two scripts are placed in the same directory and the primary python script is NOT embedded into python toolbox.
However when the primary python script gets embedded into ArcGIS toolbox, the second script cannot be access any more by the primary script and therefore cannot be imported into the primary script as a module and functions cannot be used.

The work around would be to copy over all functions from the second script to the primary script or to copy second script into the toolbox directory but that is not the proper way to solve this issue.

Is it possible within ArcGIS to embed a script into a python toolbox with other scripts that are used by the primary script?


texts: ArcGIS Android SDK MapView.removeLayer method not working

texts:
I'm currently exploring ArcGIS's Android SDK.

However, I've found that when adding a ShapefileFeatureTable to a FeatureLayer:

    FeatureLayer featureLayer = new FeatureLayer(shapefileFeatureTable);
    featureLayer.setRenderer(new SimpleRenderer(new SimpleFillSymbol(
            getResources().getColor(android.R.color.holo_blue_bright),
            SimpleFillSymbol.STYLE.SOLID)));
    mapView.addLayer(featureLayer);

and then trying to remove it:

    mapView.removeLayer(featureLayer);

it doesn't work! (the layer is still visible)

I've tried to change the following:

    mapView.addLayer(featureLayer,0);
    mapView.removeLayer(0);

and this doesn't work either.

EXPLANATORY NOTE: I'm trying to add and remove the feature layer because I want to show a GraphicsLayer on the map, but if I don't load a FeatureLayer first, the MapView stays completely black.  I tried to set the SpatialReference and the background grid, but the only thing that worked was adding a bogus FeatureLayer first.  I eventually "fixed it" by calling:

mapView.addLayer(featureLayer);
featureLayer.setVisible(false);

But I still think it's suboptimal solution.  Any ideas??


texts: PyQGIS script to add multiple delimited text layers from folder to project

texts:
I have a folder of ~120 csv files.

I would like to add them all to my QGIS project.
I know this is accomplished with the 'Data Source Manager' and 'Delimited Text' option. However, instead of adding them one by one I would like a script to run in the Python console to add every one of them in the folder.

I have started the potential frame for this code:
import os

#Define the source folder
src_folder = 'C:\Users\Rollins\Documents\PVQ_Stuff\General_Election'

#Iterate through the files in the folder
for file in os.scandir(src_folder):
    if file.name.endswith('.csv'):
        #Define the csv name when imported as a layer
        layer_name = file.name[-6:-1]
        #This part I made up! I have no idea if any of this syntax is correct, but it's my
        # best guess for calling the 'delimited text' tool multiple times and defining the
        # parameters based on the current file in the folder
        params = {'FILE_NAME':file.name,'LAYER_NAME':layer_name,
                    'ENCODING':'latin9','FILE_FORMAT':custom_delimiters[semicolon],
                    'GEOMETRY_DEFINITION':no_geometry}
        processing.run("qgis:datasourcemanager:delimitedtext", params)

As I write in the above code, I don't know how to select the 'delimited text' tool and input it's parameters using a script.


texts:
I have a PostGIS table with some polygons (stored using the geography data type).  They represent regions on a spherical earth.

For each pair of vertices chosen from among all the polygons, I want to calculate whether those two vertices are "visible" to each other. (There are n*(n-1)/2 such pairs, where n is the total number of unique vertices across all polygons in the table.)  By "visible to each other," I mean that the great-circle path between the two vertices does not intersect any of the polygons in the table.

What is the fastest way to do that computation, preferably in PostgreSQL/PostGIS?

I've got something that works, but it's slow.  I just naively iterate over all pairs and see if the LineString between them intersects any polygons.  (PostGIS's geography data type handles all the hard math on the sphere for me.)  So I wonder if there's a clever data structure or algorithm that might speed things up.


texts: Is it possible to draw a .pbf from an ArcGIS Feature Server

texts:
I'm unable to draw an ArcGIS FeatureServer .pbf result in OpenLayers 6.4.3. The request completes successfully but nothing appears. The layer in question is the NFIS Fire Perimeter Layer.
https://services3.arcgis.com/T4QMspbfLg3qTGWY/arcgis/rest/services/Public_Wildfire_Perimeters_View/FeatureServer/0
My code looks like this...
    let url = "https://services3.arcgis.com/T4QMspbfLg3qTGWY/arcgis/rest/services/Public_Wildfire_Perimeters_View/FeatureServer/0"
    let extent = this.props.extent;
    let urlFormatted =
      url +
      `/query?f=pbf&returnGeometry=true&spatialRel=esriSpatialRelIntersects&` +
      `geometry={"xmin":${extent[0]},"ymin":${extent[1]},"xmax":${extent[2]},"ymax":${
        extent[3]
      },"spatialReference":{"wkid":102100}}&` +
      `geometryType=esriGeometryEnvelope&inSR=102100&outFields=*&outSR=102100&resultType=tile`;

    this.vectorSource = new VectorTileSource({
      format: new MVT(),
      url: urlFormatted
    });

    /**
     * The layer hosting the source vector.
     */

    this.vectorLayer = new VectorTileLayer({
      id: this.props.id,
      visible: true,
      source: this.vectorSource,
      zIndex: 200
    });

    this.props.map.getLayers().push(this.vectorLayer);


texts: How to retain attributes in Feature to Polygon tool?

texts:
I have a polygon of Karaikal city which I split into different sections using Feature to Polygon tool.
Below shown is the table of Karaikal polygon before split

After splitting into different sections using feature to polygon tool the kml_name field is blank. Refer image below.

Is there any way how I can preserve the values in kml_name field?

Or Do I have to update that column after splitting? If yes, then how?


texts: Darken the whole map except a specific rectangular area

texts:
I want to darken the whole world map except for a specific rectangular region.

I create two layers:
a darkOverlay, and a highlightedLayer

My darkOverlay is as follows:

var darkOverlay = new ol.layer.Tile(
{
    opacity: 0.2,
    source: new ol.source.TileJSON(
        {url: 'https://api.tiles.mapbox.com/v3/mapbox.world-black.json?secure'})
});
map.addLayer(darkOverlay);

For my highlighted area, I created a vector layer, in which I will later create a Rectangle feature inside of that layer:

var highlightedLayer = new ol.layer.Vector({
        source: new ol.source.Vector()
    });
map.addLayer(highlightedLayer);

I want the highlightedLayer to always be on top of my darkenOverlay:

darkOverlay.setZIndex(0);
highlightedLayer.setZIndex(1);

Create a rectangle that is the "highlighted area" (i.e. the non-darkened area):

var source = highlightedLayer.getSource();
var geometry = new ol.geom.Polygon.fromExtent([x1, y1, x2, y2]); // some random points
var feature = new ol.Feature(geometry);
feature.setStyle(new ol.style.Style(
    {
        fill: new ol.style.Fill({
            color: 'rgba(0, 0, 0, 0)' #blue  <-----------------------
        }),
        stroke: new ol.style.Stroke({
                color: 'rgba(255, 0, 0, 0.8)',
                width: 1
            }
        )
    }
));
source.addFeature(feature);

If I replace the 'rgba(0,0,0,0)' with 'blue', I correctly see a blue rectangle surrounded by dark overlay everywhere else.
However, I want the inside of the rectangle to have no fill at all, not even the dark overlay.
If I replace 'blue' with 'rgba(0,0,0,0)', I get the dark overlay inside of my rectangle.

How can I get the darkOverlay to NOT show up inside of my rectangle?


texts: Using Dissolve and Multipart to Singlepart in QGIS?

texts:
I started with a network of polylines.
In QGIS I used dissolve to 'merge' all lines according to an attribute value. This did exactly that, but included non-connecting lines which I don't want. I then tried to use Multipart to Singlepart hoping this would split the newly dissolved network at the non-connecting points. However this seems to split back to the original network prior to using dissolve.

Am I following this process incorrectly or is there a better solution to what I am trying to do?


texts: poly2nb {spdep} not identifying neighbours correctly

texts:
I am trying to do some spatial generalised linear mixed models for areal unit data with the CARBayes package. As part of this, I need to identify the polygon neighbours into a neighbour list using spdep::poly2nb.

The shapefile I have of NSW is located here: Dropbox with shapefile

There is a freely available Australia wide version at: ABS.gov.au but I'm only after NSW.

library(spdep)
library(sf)
library(sp)
library(lwgeom)

p <- read_sf("NSW_POA_arc.shp")

p.nb <- poly2nb(p)

coords <- st_coordinates(st_centroid(st_geometry(p))) # this seems to miss some polygons

plot(st_geometry(p), border="grey")
plot(p.nb, coords, pch = 19, cex = 0.4, add=TRUE)

For some reason poly2nb isn't recognising that some of the polygons are neighbours to each other. I've tried using the snap feature but this only vaguely works at snap = 0.0001. It also adds connections to non-neighbours.

xx <- poly2nb(p, snap = 0.0001)
plot(st_geometry(p), border="grey")
plot(xx, coords, pch = 19, cex = 0.4, add=TRUE)

I'm not sure if its a topology issue but lwgeom::st_is_valid says that the polygons are valid.

Any ideas would be amazing. I'm very new to writting these questions properly so any feedback is welcome.
Many thanks


texts: Change localhost:8080 to my domain name in Geoserver

texts:
I'm new in Geoserver and openlayers 3 and i want to publish my layers to be access from my subdomain (I want to change localhost:8080/geoserver to subdomain/geoserver)

i'm using

Windows 7
xampp
Geoserver 2.8.1
Openlayers 3

i found these lines but i don't know where to put it !

ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>
ProxyPass /geoserver "http://localhost:8080/geoserver"
ProxyPassReverse /geoserver "http://localhost:8080/geoserver"


texts: Is there a list of free application modules (or "Fachschalen", in German) for QGIS somewhere?

texts:
I'm looking for application modules (in the form of plugins) that cover sets of related tasks like asset management, in a basic UI. A simple use case example: a water gauge (point feature with a 1:n relation to a non-geometry table), that is being maintained/checked periodically; each maintenance gets its own table entry with status/date/etc. The entries are sortable/searchable within the UI using forms.

I went through the plugin-list and the closest thing I could find was norGIS. I did some research and pretty much everything I found was companies offering application module(s) (programming) as service, but couldn't find any templates. Are there none? I realize they'd need tailoring, but not having to start from scratch would be nice. In case there are none, is http://www.qgisworkshop.org/html/workshop/plugins_tutorial.html still the best way to start off?


texts:
My imported postgres database size for plane.osm is more than 300GB under slim mode.

It added four tables for Tiles Creation.

planet_osm_line, planet_osm_road, planet_osm_polygon, planet_osm_point

Each Table contains attributes which are:

  osm_id
   access
   addr:housename
   addr:housenumber
   addr:interpolation
   admin_level
   aerialway
   aeroway
   amenity
   area
   barrier
   bicycle
   brand
   bridge
   boundary
   building
   construction
   covered
   culvert
   cutting
   denomination
   disused
   embankment
   foot
   generator:source
   harbour
   highway
   historic
   horse
   intermittent
   junction
   landuse
   layer
   leisure
   lock
   man_made
   military
   motorcar
   name
   natural
   office
   oneway
   operator
   place
   population
   power
   power_source
   public_transport
   railway
   ref
   religion
   route
   service
   shop
   sport
   surface
   toll
   tourism
   tower:type
   tracktype
   tunnel
   water
   waterway
   wetland
   width
   wood
   z_order
   way_area
   way

Now I want to configure it to Geoserver for a specific attribute.

Example: in polygon, I need to import building alone.

I am following this GeoServer and OpenStreetMap and Publishing a PostGIS Table but it's not specificly clear about the above.

I need to know if it's possible in Geoserver? And how ?


texts: How to find linestrings which aren't joined

texts:
Given a PostGIS table with a column of linestrings, which are expected to all be joined (they represent a network), how can I query the table to determine whether or not they are all joined (i.e. it should be possible to reach any linestring from any other, by traversing the network)?

I was thinking of creating some kind of aggregate geometry and comparing some measurement of that aggregate geometry (e.g. total "length") with the sum of all lengths, but haven't been able to get anywhere.


texts: How to concatenate time and date field into one field using ArcGIS for Desktop Field Calculator or Python?

texts:
I have two fields, one is ISSUEDDATE and the other is ISSUEDTIME.  I would like to concatenate fields so that the ISSUEDDATE is in m/dd/yyyy hh:mm:ss format.

My ISSUEDTIME field is a string and ISSUEDDATE is a date field and the ISSUEDDATE isn't consistent.  Some of the values read as m/dd/yyyy 7:00:00 AM while others are m/d/yyyy. ISSUEDTIME isn't consistent either as some are AM/PM and others are 24 hour time.

How can I accomplish this without adding a field?

I have tried to concatenate the two fields, but it fails.  Since there are two time formats, the solution below fails also.  I can execute this via selection and field calculate but would like for it to be done in one go.


texts: Transforming coordinates using R - SWEREF to WGS84

texts:
I have some coordinated in SWEREF 99 TM which I cannot convert into WGS84 using the proj4 package in R.

temp <-  data.frame (x = c(598223, 598812, 598824, 598232, 597614, 597629),
        y = c(7095460, 7095426, 7094827, 7094227, 7094821, 7095433))

ptransform(temp,
    src.proj = '+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ',
    dst.proj = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs', silent=TRUE)

Note that the output is not equivalent to coordinates in Sweden - latitudes are equivalent to those near the equator.


texts: Display problem while using openlayers with jquery

texts:
I want to use jquery with openlayers for rich interface. I have used layout-master for simple layout. But the problem is, when I add simple map using openlayers 'map' will not display at the center.!

<!DOCTYPE html>

        <link type="text/css" rel="stylesheet" href="../api/layout-master/source/stable/layout-default.css">

It works fine if I use simple html(no jquery)

I am not able to find the error in my code.


texts: Adding multiple raster with Raster Calculator

texts:
I'm trying to add multiple raster layers to one output raster using addition in the Raster Calculator. The problem is that the output raster only contains data from the smallest of the four raster.

I'm looking for a tool that could make those four raster to the same extent before using Raster Calculator or maybe some expression in the Raster Calculator tool that could make the output raster to the same extent as the biggest of the four rasters.


texts: Understanding Google Earth Engine GOES-16 image string

texts:
I am trying to use the NOAA/GOES/16/MCMIPC for weather analysis in Google Earth Engine (https://developers.google.com/earth-engine/datasets/catalog/NOAA_GOES_16_MCMIPC#description) but I cannot find documentation on how to read/parse the image string:
var imageName = '2020211203115800000';

So I can select a date range, in particular finding out what images are available.


texts: Need syntax to restyle some data via dynamic layers and ArcGIS REST API

texts:
I produce maps using Leaflet and the Esri Leaflet plugin.

Here is a MapService layer from the USGS pertaining to the risk of debris flow.  Note that if attribute combhazcl=3 then this data is colored red by the server.  Yes, this service supports dynamic layers.

https://earthquake.usgs.gov/arcgis/rest/services/ls/pwfdf_2018/MapServer/6

What is the REST syntax to change the color of just the combhazcl=3 data?  I do not work for the USGS and thus cannot change the default styling on the server.

Here is my call for one tile without any restyling.

https://earthquake.usgs.gov/arcgis/rest/services/ls/pwfdf_2018/MapServer/export?bboxSR=4326&layers=show:6&size=256,256&imageSR=3857&format=png&transparent=true&dpi=&f=image&bbox=-117.48779296875,33.72433966174761,-117.4658203125,33.706062655101206

And here is my call for the same tile trying to make combhazcl=3 green.

https://earthquake.usgs.gov/arcgis/rest/services/ls/pwfdf_2018/MapServer/export?bboxSR=4326&layers=show:6&size=256,256&imageSR=3857&format=png&transparent=true&dpi=&f=image&layerDefs={6:"combhazcl=3"}&dynamicLayers=[{'source':{'type':'mapLayer','mapLayerId':6},'definitionExpression':'combhazcl=3','drawingInfo':{'renderer':{'type':'simple','symbol':{'type':'esriSFS',"style":"esriSFSSolid","color":[0,0,0,0],'outline':{'type':'esriSLS','style':'esriSLSSolid','color':[0,255,0,255],'width':3}}}}}]&bbox=-117.48779296875,33.72433966174761,-117.4658203125,33.706062655101206

Yes, the above tile call did select just the data where combhazcl=3.  But I am unable to restyle that data.

Can anyone shed light on where I have gone astray with the syntax?

In general I am able to restyle dynamic layer data without any trouble.  But this is the first time I have tried to restyle data where the server defines different styling based on an attribute value.


texts: Does Zonal Statistics value change when applied on subset of data using ArcGIS Spatal Analyst?

texts:
I have generated zonal statistics using feature zone data on a value raster. This shapefile contains about 20000 polygons and the analysis went without a hitch.

While testing quality, I ran the same operation on 10 polygons taken from the same data. The values in zonal max changed this time. I compared the values by overlaying the polygons on the value raster and found that the pixel values belong in the polygon, but just not the maximum pixel.

I am aware that an internal raster conversion takes place for computing stats. I want to know what exactly happens during the process of zonal statistics and whether sample size affects the output.

I have ArcGIS 10 with an Arcview license and spatial analyst.


texts: Overlaying two raster images with no spatial reference

texts: I have two images (X-Ray and Neutron Tomography Scan) of a human bone fragment.  I want to use ArcGIS 10.2 to accurately overlay (geo-reference) these two images which have no spatial coordinates. any suggestions please ?


texts: Why is st_buffer function not creating an R object that correctly displays in mapview?

texts:
Trying to get st_buffer function to display a buffer within mapview.  Got it to work, but I had to first perform a transform (I doubt this is necessary).  Looking for a more straightforward way to do this.

library(sf)
library(mapview)

data("breweries")

test_coords <- st_geometry(breweries[1:2,])

# This code doesn't work. Not sure why.
# buff_test_coords <- st_buffer(test_coords, dist = 10000)
# mapview(test_coords) + mapview(buff_test_coords)

# This code words. Not sure what's special about transforming to 3488
sf_test_coords <- test_coords %>% st_transform(3488)
sf_buff_test_coords <- st_buffer(sf_test_coords, 10000)
sf_buff_test_coords2 <- st_transform(sf_buff_test_coords, 4326)
mapview(test_coords) + mapview(sf_buff_test_coords2)


texts: How to read Geotiff tags and pixel per pixel values using GDAL C#

texts:
I'm new here and I'm new at programing with GDAL C#.

My question is how I can get the value of SRTM GEOTIFF pixel to compare with it's neighbors, and how can I get the values of Geotiff tags.


texts: Exporting time series of multiple polygons to .csv without using ui.Chart.image.seriesByRegion command

texts:
Following the example provided in the GE tutorial  (see below), how can I export the data to a .csv without using the ui.Chart.image.seriesByRegion?

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

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

// Create a time series chart.
var tempTimeSeries = ui.Chart.image.seriesByRegion(
    temps2013, regions, ee.Reducer.mean(), 'B11', 200, 'system:time_start', 'label')
        .setChartType('ScatterChart')
        .setOptions({
          title: 'Temperature over time in regions of the American West',
          vAxis: {title: 'Temperature (Kelvin)'},
          lineWidth: 1,
          pointSize: 4,
          series: {
            0: {color: 'FF0000'}, // urban
            1: {color: '00FF00'}, // forest
            2: {color: '0000FF'}  // desert
}});

// Display.
print(tempTimeSeries);


texts: Selecting features by year in datetime field

texts:
I have a shapefile with a datetime field. I want to split the features by year and save into a geodatabase. My approach has been to create a list of years, and from there iterate over the list and perform a select by. However I've struggled to make a selection - see below -
import os
import arcpy
from datetime import datetime

SHP = "D:\Data\Footprints\Footprints_test.shp"

#create gdb
arcpy.CreateFileGDB_management("D:\Data\Footprints", "Footprints_test.gdb")
GDB = "D:\Data\Footprints\Footprints_test.gdb"

#calculate date field
arcpy.management.ConvertTimeField(SHP, "raw_date", "yyyy-MM-ddTHHmmss.s;3081", "cap_date", "DATE", '')

#years
year_list = [(set(datetime.strftime(row[0], "%Y") for row in arcpy.da.SearchCursor(SHP, "cap_date")))]

#save to gdb
for x in year_list:
    arcpy.SelectLayerByAttribute_management(SHP, "NEW_SELECTION", cap_date_q.date.year = x)
    arcpy.FeatureClassToFeatureClass_conversion(SHP, GDB, "Footprints_"+str(x))
    arcpy.SelectLayerByAttribute_management(SHP, "CLEAR_SELECTION")

Obviously the

cap_date_q.date.year = x

syntax is wrong. However, I've really struggled through the documentation.
How do I properly interact with the date field?


texts: Maplex Stack Label Feature Not Honoring Force Split or Max Lines or VBNEWLINE 10.4

texts:
I'm trying to place labels in the form of a callout box at the end of a line using the Maplex label engine (otherwise I was not able to keep the label horizontal but still at the end of the line). I need it to be EXACTLY 2 lines, and the text is hardly changing at all for the different features. What I need:

Project Start Location
Milepost 263

What I'm getting:

Project Start
Location
Milepost 262

or everything on a single line.

The only thing changing is the number at the end. However, the label engine isn't respecting any of the settings I have tried, so I need a workaround. It always makes the label either 3 lines or 1.

What I've tried:

Setting maximum number of lines to 2. This makes the label take up a
single line. It doesn't seem to matter what I change for the minimum
and maximum number of characters per line (right now it's set to max 30).
Using "VBNEWLINE" in the label expression, and setting max lines to either 2 or 3. It just ignores it, and either goes to 1 line or 3.
Putting a comma in the expression, unchecking "visible" and checking "forced split" and "split after" for commas. When I set max lines to 2, it put everything on a single line and showed the comma. When I set it to 3, it hid the comma but broke the lines as before.
Using VBNEWLINE or "Project Start Location" & chr(13)+chr(10) & "Milepost "  &[BMP] and turning off label stacking. This put everything on a single line.
The Maplex tab setting "remove extra line breaks from label" in the label expression settings is unchecked.
Removing surrounding labels in the map by deleting annotations and turning off layers.

I'm out of ideas.


texts: ESRI layer does not support "SHOWLABELS"

texts:
I am trying to create a script that exports labels to annotation using the tool in ArcPro 2.4. I have created the contour layer, converted it to Layer and that works fine, but I am stuck on the creation of labels below is my script for the portion I am stuck on , this generates a label fine however the label is the ID column rather than the Contour column and I cannot work how to specify an expression. I have tried the ESRI help and suggested code (https://pro.arcgis.com/en/pro-app/arcpy/mapping/labelclass-class.htm) but this has not been any use it seems to suggest my layer does not support "SHOWLABEL" yet it generates fine using my code.

for lyr in aprxmap.listLayers():
    if lyr.supports("SHOWLABELS"):
        lyr.showLabels = True
        lyr.expression = "[Contour]"
        lyr.SQLQuery = "Type_ = 'Contour'"
        print("Convert Labels \n")
        arcpy.cartography.ConvertLabelsToAnnotation(aprxmap,
                                                    1000,
                                                    r"tester.gdb",
                                                    "try",
                                                    "DEFAULT",
                                                    "GENERATE_UNPLACED",
                                                    "NO_REQUIRE_ID",
                                                    "STANDARD",
                                                    "AUTO_CREATE",
                                                    "SHAPE_UPDATE",
                                                    "GroupAnno2",
                                                    "SINGLE_LAYER",
                                                    lyr,
                                                    "FEATURE_CLASS_PER_FEATURE_LAYER",
                                                    "NO_MERGE_LABEL_CLASS")`


texts: pyqgis: how to get the existing Paletted Raster Layers' color

texts:
rasterlayer = QgsRasterLayer(infilename, layername)
renderer = rasterlayer.renderer()

rasterlayer is the active layer with renderer type is Palette,
I want to get current Palette Color, how could I do? Is the Attribute in  renderer?


texts: How to upload lines created by joining longitude, latitude pairs?

texts:
The data in a Mapinfo table contain longitude and latitude pairs. I have joined the point pairs using :

Making the table mappable
Setting the projection to WGS84 and
update TABLE set obj = createline(x1,y1,x2,y2)
The lines are created and
Map Catalog is created using Easyloader

I wanted to upload it using Easyloader but it shows an error message that it could not open the table mytable.tab (mytable is a tab file). What is the process of uploading any table to the database?

The database is MSSQL.

Edit ---------------------------------------------------
After Peter Horsbøll Møller's suggestion I saved a copy and the error was

  A .Net Framework error occoured during execution of user defined
  routine or aggregate "geometry": System.FormatException:24117:The
  lineString input is not valid because it does not have enough distinct
  po Data Values:18418


texts: Automate the import of graphics (curves) in QGIS atlas?

texts:
I'm working on QGIS 2.18 (Windows) and often use the atlas generation tool. But for a specific study, I would very much like to be able import within the composer not only map objects, but also graphics (curves) automatically.
Would some people advise a way to do that?

Am I obliged to program something with python (I'm not programmer but I'm ready to start)? R could be also an interesting solution?


texts: Update Bootstrap Switch with Leaflet Layer Group

texts:
I have this JSFiddle that shows two example layers that can be toggled on and off using the Bootstrap Switch to add and remove them from the map; this works fine.

The problem I am having is updating the state of the individual layers switches when the group switch is toggled. As per the example I can create a switch to add the group of layers to the map, however the switches for the individual layers do not update to show the user that is a layer that is effected by the group of layers being added.

I thought this might be possible through the hasLayer method but I'm not entirely sure how this would be implemented.


texts: QGIS: Why do I get permission denied when saving style to postgres

texts:
In QGIS I am trying to save a style to a postgres database but I always get the error "Unable to save layer style. It's not possible to insert a new record into the style table. Maybe this is due to table permissions (user=rful011). Please contact your database administrator."

The user has all rights on the database.


texts: update one shapefile attribute table with values from another dbf table

texts:
I try to explain here what I am trying to do:

I have one shapefile and one independent dbf table with the same fields. In the dbf table all the fields are populated but in the shapefile attribute table just one, lets name it "OneField". What I want to do is to check that the values from "OneField"(Shapefile) are the same as the values in "OneField"(dbf table) and if so, to populate the remaining empty fields in the shapefile attribute table with the ones in the independent dbf table.

At the moment I am trying just to copy the values from the independent dbf table to the shapefile attribute table but I am stuck.(when I run this code I get a message that pythonwin stopped working and nothing happens to the tables). Can you give me a hand please?

Here is the code:

import arcpy

table = "link/to/table.dbf"
fc = "link/to/shapefile.shp"

# Create a search cursor

rowsTable = arcpy.SearchCursor(table)

# Create an update cursor

rowsFc = arcpy.UpdateCursor(fc)

for row in rowsTable:
    row = row.getValue("OneField")
    valueTable = row
    for row in rowsFc:
        row = row.setValue("OneField", valueTable)
        rowsFc.updateRow(row)
        row = rowsFc.next()
    row = rowsTable.next()

del row, rowsFc, rowsTable

Thank you very much


texts:
Is there a way to bring data from a postGIS database into Google Earth to view live?

I know of the asKml function in PostGIS, but I'm interested to know if anyone had managed to hook up a kml so that it is live against the database and not just a static kml.


texts:
I'm running into a problem when saving a coordinate into one of my models in (Geo)Django.  My point field is setup as:

location = PointField(blank=True, null = True)

So while running some tests in the django shell I noticed my coordinates were changing...

obj.location = 'POINT(-120.18444970926208 50.65664762026928)'
obj.save()
print(obj.location.x)

-120.1840742

print(obj.location.y)

50.6569673

Another thing I've noticed If I set the point using an UPDATE in postgres and then...

print(obj.location.y)

50.65664762026928

but if I run a save and check the coordinate again I get...

obj.save()
print(obj.location.y)

50.6569673

Anybody have any ideas where I can start looking to sort this out or any suggestions what may be causing this.

Thanks,
Dustin

Software:

Django 1.3.1
GDAL 1.9.1
Python 2.7.2
PostGIS 1.5.3
GEOS 3.3.3
PostgreSQL 9.1.4


texts: Multiple Users Accessing Same ArcSDE File?

texts:
I am in charge of an ArcSDE with my Municipality with a large amount of data over 300+ separate files. I have multiple departments that have access to this ArcSDE with multiple users in each department. No users besides myself and one other (my associate) edit any information. Everyone else is only viewing the data (in ArcMap).

My problem is that when it comes time for myself or my colleague to make edits or perform file property changes (add domains etc.) to files, the files are being used by other users (usually more than one) which cause file locks.

I want to know how I can still make these edits/ file changes while other users are still viewing the files.
I have proposed that when these file locks occur I ask the users to exit out of ArcMap the only issue is some users have very old PC's and the start-up time for these MXD's can be very long and asking them to boot off ArcMap multiple times a day is not a reasonable request.
It would be ideal for me to be able to make my desired edits while other users are reading the files and these files would update for the user once they exit out and reopen the file connection to the ArcSDE. So basically while reading the file nothing changes (even though I made edits while they had the file open) until they close ArcMap and re-open it.

Any information at all regarding this topic?

UPDATE

I have been doing further research and it seems that I need to further look into versioning. However not sure the structure of the ArcSDE was configured in when it was originally configured (if that matters). If anyone else has some experience with this and could give me some insight on how going about this, or am I even heading toward the right direction?


texts: What densification method does SDE.ST_Geometry use to approximate arcs as segments?

texts:
Oracle 18c; ArcGIS 10.7.1

I have an SDE.ST_Geometry polyline FC that has arcs.
In a related post, we established that  true arcs/curves are only available to ArcObjects, whereas the actual geometry contains approximated segments of the arcs.
Only those approximated segments are available to SDE.ST_Geometry functions (not the arcs).
Question:
What densification method does SDE.ST_Geometry use to approximate  arcs as linear segments?

Distance
Angle
Offset
Other?


texts: How can I add a Raster Calculator tool on QGIS Processing Modeler?

texts:
I'm trying to add the Raster Calculator to a model I'm creating using the Processing Modeler of QGIS 2.6 Brighton. It does not allow me to add the normal Raster Calculator tool under Raster, so I tried using GDAL Raster Calculator tool but it only allows me to include 6 layers into the mathematical expression; I need to include 7 layers.

Is there any other way to add the Raster Calculator to the Model in which I can include all of my 7 layers into my mathematical expression?


texts: Export each feature individually as CSV inside FeatureCollection

texts:
I have a property (list type) called 'aggregLANDSAT' within 50 features.
These 50 features are added together in FeatureCollection.

> var coord = function(table, rowId, colId, rowProperty, colProperty){
  var rows = table.distinct(rowProperty);
  var joined = ee.Join.saveAll('matches').apply({
    primary: rows,
    secondary: table,
    condition: ee.Filter.equals({
      leftField: rowProperty,
      rightField: rowProperty
    })
  })
print(joined.select('matches'), 'unidos pelo mesmo ID');

var colWithMeans = joined.map(
    function(ft){
       return ft.set(
         'aggregate by date', ee.FeatureCollection(ee.List(ft.get('matches'))).aggregate_array('date'));
      }

    ).map(
      function(list){
        return list.set(
         'aggregLANDSAT', ee.FeatureCollection(ee.List(list.get('matches'))).aggregate_array('LANDSAT'));
      }
    );
  print(colWithMeans,'Add propertie "aggegLANDSAT" in each feature')

How can I export each of these features, containing the property I mentioned?
The code goes here LINK


texts: Disable Panning in ArcGIS API for Silverlight map?

texts:
Is there a way to disable panning when using the ArcGIS Silverlight API?

Other than enabling a Draw object.


texts: Removing and adding markers every 5 seconds freeze the browser after a several minutes

texts:
I am creating around 300 markers on Leaflet map and every 5 seconds I am getting new data from the server and I'm removing markers from the map and adding markers with new data. But the problem is that  browser freezes after several minutes (around 20 or 30 minutes).
Here is my code for adding markers on the map
var map = L.map('map').setView([48.48106, -123.3921], 13);

L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
  maxZoom: 18,
  attribution:
    '&copy; OpenStreetMap contributors',
}).addTo(map);
var mapHelper = new OpenStreetMapsHelper(map);

function showMarkers() {
  mapHelper.removeEntities('Vehicles:0', true);
  for (let i = 0; i < vehicleData.length; i++) {
    let bearing = Math.floor(Math.random() * 360 + 1);
    let dataItem = vehicleData[i];
    let vehicleBubble = mapHelper.createPushpin(
      [dataItem.lat, dataItem.lng],
      mapHelper.vehiclePushpinOptions(bearing, 1),
      {
        mouseover: function (e) {
          console.log('mouse over');
        },
        mouseout: function (e) {
          console.log('mouse out');
        },
      }
    );
    mapHelper.addEntity(vehicleBubble, 'Vehicles:0', 9999);
  }
  setTimeout(showMarkers, 5000);
}

showMarkers();

The whole code is bit longer so I am adding all my code here as I have to keep code minimal. Please see working example here https://embed.plnkr.co/plunk/tZOC6bTmUfLvvNJi
I took little help from @TomazicM to generate marker positions.
I have to change marker position as well as marker icon because marker icon changes depending on vehicle bearing.


texts: QGIS importing CSV files only as attribute tables, although they contain coordinates in the right format

texts:
I've got an issue importing CSV files to QGIS 3.12 Bucuresti and/or 3.4 Madeira.

Months ago I created a point distribution map for several species with several CSV files containing geographical data. I created the CSV files using Excel. The coordinates were determined with Google Earth or taken from literature or other sources. I made sure all coordinates had the same format. It worked all fine.

Now I wanted to work on those maps again, using the same data. When opening  QGIS (it doesn't matter which of the two versions) it appeared a window, that some layers were not available. I simply imported them again using the Data source manager, which solved the problem for all but one layer. Below a picture of the Data source manager for the not working file. The respective CSV file could only be imported as an attributes table. Hence the coordinates given in that file were not shown on the map. Some time later the same thing happened to a second layer, which worked fine just two days before.

I tried several things aside from checking the coordinates format. I copied the respective coordinates manually into a new file and imported it. It still was only an attributes table. I copied the respective coordinates into a working file and imported it to QGIS. Now the whole, formerly working file was imported as an attributes table, not assigning the coordinates to the map. I had a look on the CSV file itself and compared it to working CSV files. I couldn't spot a difference. I looked in several forums, but couldn't find a solution for this problem.

My understanding of QGIS has come to an end. What can I do to make this work?

Here an excerpt of the not working csv file ([...] indicate elisions):

ID;Justification;Country;Province;Locality;Year;y;x;Literature
1;locality approximated;Argentinia;Chaco;Valle del Parana;2002;31°S;60°5' W;"Arzamendia, Vanesa; Giraudo, Alejandro Raúl [...] sequence=1."
2;giant area;Brazil;Rio Grande do Sul;Central Depression;;29°80' S;51°50' W;"Aguiar, [...]5774806205."


texts:
Context

I am currently working on the migration from ArcMap 10.3 to ArcGIS Pro. We have several tools that won't work anymore in ArcGIS Pro and I am checking what native solutions could be used before going to a customized development.

One of the tool we currently have generates a html page when clicking on a parcel and queries 5 different layers (all the layers have the same ID or parcel number).

I would like to migrate it in ArcGIS Pro using arcpy and reportlab if possible. I thought about reportlab as the html template is basically a table.

What has been done

I already used the SearchCursor to extract the fields I was interested in and the where_clause to select only rows I wanted. However, I managed to do it within 1 layer at a time.

I checked the forums to see if I could perform spatial queries with arcpy, and I found the MakeQueryLayer, however I do not wish to create a new layer but just extract information related to a parcel number over 5 feature layers and display it in a pdf.

I am trying with MakeQueryTable following ArcGIS Pro help/examples online :

import arcpy

tableList = ["c:\\path\\Projects\\MyProject1\\sde.sde\\A.CAD_Adresses\\A.CAD_ADRESSE", "c:\\path\\Projects\\MyProject\\sde.sde\\A.CAD_Communes\\A.CAD_COMMUNE", "c:\\path\\Projects\\MyProject\\sde.sde\\A.CAD_Immeubles\\A.CAD_BIENS_FONDS"]

fieldList = [["A.CAD_ADRESSE", 'EGID'], ["A.CAD_COMMUNE", 'TITRE'], ["A.CAD_BIENS_FONDS", 'EGRID'], ["A.CAD_BIENS_FONDS", 'MUTNUM']]

keyField = "A.CAD_BIENS_FONDS.EGRID"

arcpy.MakeQueryTable_management(tableList, keyField, fieldList)

I keep getting a runtime error:

Traceback (most recent call last):

File "<string>", line 1, in <module>
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 6316, in MakeQueryTable
raise e
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 6313, in MakeQueryTable
retval = convertArcObjectToPythonObject(gp.MakeQueryTable_management(*gp_fixargs((in_table, out_table, in_key_field_option, in_key_field, in_field, where_clause), True)))
File "c:\programfiles\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 506, in <lambda> return lambda *args: val(*gp_fixargs(args, True))

RuntimeError: Objet : erreur lors de l’exécution de l’outil

I also had to adapt the syntax as I also got errors. I followed this post

For this example I only worked with 3 layers, I have 5 to deal with. But the IDs in common will be the EGID and/or the EGRID number.


texts:
I seem to recall USGS Earthexplorer providing current and historic 4 band NAIP imagery over the last few years.  It appears that these data have been migrated to the National Map.  However, the National Map only appears to have 2011 4-band NAIP imagery.  The USDA FSA points users to the NRCS Geospatial Data Gateway, although these downloads only appear to be 3 band images without the nIR band.

What are the best sources for downloading historic and current 4 band NAIP imagery at 1m spatial resolution?
Are there any Oregon specific download sites?


texts: ArcMap layout dynamic text, remove group by decimal point

texts:
I'm currently designing layout of my data driven pages map.
I would like to put x/y coordinates in corner of current layout view.
I'm using text box with dynamic text code like this:

<dyn type="dataFrame" name="DataFrameName" property="lowerRight.x" decimalPlaces="0"/>

Result of this code is: 5.578.750

I would like to know is there a way to remove group by decimal point formatting? Some kind of additional parameter inside code?
My second goal is to wrap number after point so coordinates look like this:

5
578
750

I'm working in ArcMap 10.3.


texts: How to use bitwise operator in ArcGIS desktop to extract required pixels?

texts:
MODIS QA dataset gives quality flags in decimal numbers that are required to be converted into binary format to assess data quality.

For a 8-bit system of MOD15A5 image, the decimal values 16 and 97 correspond to 000 10 0 0 0 and 011 00 0 0 1.

Here, the extreme right digits i.e., 1 and 0 shows the quality. Based on the right most value of converted binary form, how to convert the pixels' decimal values to 0 and 1.

I tried using bitwise operator of spatial-analyst in ArcGIS desktop, but ain't getting how to use the functionality.


texts: Palleted/Unique values rendering not displaying in QGIS

texts:
I have a multi-band raster in the form of a GeoTIFF. The raster contains 4 bands. Band 2 has 27 unique values ranging from 151 - 281. I would like to display each value discreetly using the 'Paletted/Unique values' option in Band rendering. When I click 'classify' the correct values are displayed but when I apply and close the dialogue nothing is displayed in QGIS.

If I use 'Singleband Pseudocolor' it displays fine but I'd like to display discrete colours without having to go through each value and change the colour. What's going on here? Why is Paletted/Unique not working?


texts: User input and passing variables with ModelBuilder

texts:
I have created three modelbuilder tools that must be run in sequence.  After running each tool, the user must examine several shapefiles and potentially change the input parameters of the next tool.

Each tool works fine, but I am unsure what the best method is to pass variables between tools.

I tried combining the tools as nested models, but could not figure out how to get user input and change model parameters after each submodel runs.

I also tried combining the tools into one python script.  The input window popped up for the first tool, I set the parameters, and it ran, but the second tool did not run. No error code was returned so I do not know why the script did not finish running.

I am considering creating an intermediate table in the scratch workspace and using it as an array.  Is this the only way to pass variables between tools in modelbuilder if I need user input after running each tool?


texts: Why do UAV-derived NDVI values fall far outside -1 to 1 range after empirical line calibration?

texts:
This question was marked as being a duplicate of Landsat8 NDVI values not in the -1 to 1 range but I've posted my question because:

I am not using Landsat; and
there was no explanation of how to resolve the problem. How would one use conditional logic to rectify the problem?

If it's negative reflectance in the red band causing me grief, why would some of my NDVI maps look fine and others look like the ones in the screenshot? All acquisition dates have negative reflectance in the red.

I used Con() statements to rescale my reflectance maps for a single acquisition date between values of 0 and 1 as per the other thread. I now get a max NDVI of 1 which is good, but my minimum is still negative (< -800). Kind of at my wits end at this point. An NDVI of -800 is mathematically impossible if the reflectance range is 0 to 1.

I am trying to radiometrically calibrate UAV imagery collected using filter-modified digital cameras sourced from Sensefly. In the field, I had a Spectralon tile (99% reflective in the VIS-NIR spectra) in addition to a black ceramic tile. I used a hyperspectral ground sensor with incident light sensor to measure the black tile during and after each flight. Images were processed through eMotion into 12-bit TIFF format then orthomosaiked using Pix4D.

I used ArcGIS to extract mean pixel values for the tiles. Spectralon means had to be extracted separately using individual images shot on the ground since the tile is only 3x3 inches. The multiband orthos were split into single bands using Arc as well. I then ran a linear regression (PROC REG in SAS) between the mean pixel value in a given channel and the closest ground sensor channel. Since then, I've slowly been applying the regression equations to the respective bands using the raster calculator.

My problem is that my NDVI values calculated using the calibrated imagery do not make any sense at all. The min/max ranges go from -600 to well over 2000, sometimes even 2 x 10^6! Pix4D also has a built into radiometric calibration tool which uses only a Spectralon tile (I've since been told that 99% reflectivity is too much for this tool) and the NDVI values I calculated using those reflectance maps generally make sense, but mine should be better since I use 2 tie points instead of 1.

To make matters more confusing, I have one flight (see below) where I had a black, a camo-green, and a white ceramic tile in addition to the Spectralon. That calibration looks beautiful. I also have 2 flights with black, green, and Spectralon tiles.

Attached are several screenshots from Arc that show the min/max NDVI values from the two custom calibration methods. I have one from Pix4D but I do not have the reputation to attach it.


texts:
I want to analyze viewshed from some point. For that, I installed the viewshed plugin, and run it.

elevation raster: dem
observation points: observer(only one point)

But it just shows the message "One object selected in the layer observer.", left bottom of QGIS window.

And there is no error message and no result file.

And the observer layer really was selected one point.


texts: Cannot find header files after installing QGIS with apt on Ubuntu

texts:
I followed the Official Install Tutorial and installed QGIS2.8 or 3.0 using sudo apt-get install qgis python-qgis. I did not install python-plugin-grass because of dependency problem. The QGIS client 2.8 or 3.0 was running well. However, I cannot find header files of QGIS in directory /usr on Ubuntu. There were only shared libraries(.so) in /usr/lib/qgis.
How to install QGIS-api on Ubuntu? I want to write some code with the QGIS C++ API.


texts:
I'm working on a QGIS3 plugin and having problems deleting layers (from previous run of the plugin) from the main interface. I have two layers - a user supplied input polygon file and a plugin generated output polygon file.
It works the first time I run it, and loads the layers as expected. However, when I try to run interface_clean() to remove the previous versions of the layers, I get

  [2019-06-10 16:01:13.503881] font color="orange"[warn] Could not
  load selection in layer

  [2019-06-10 16:01:13.534769] font color="red"[Unexpected error] File "change_mapper.py", line 790, in run
      self.interface_clean()

Followed by a class RuntimeError

  wrapped C/C++ object of type QgsVectorLayer
  has been deleted

The layer names disappears from the Layers Tab but the vectors are continuing still to be visible in the display.
I assume I am making a horrible error in my coding.

Can anyone help?

To display vector objects

def display_input_vector_object(self):

    # Load vector object into main window
    QgsProject.instance().addMapLayer(self.vector_file_obj)

    # Set layer colour to be purple
    layer = self.iface.activeLayer()
    single_symbol_renderer = layer.renderer()
    symbol = single_symbol_renderer.symbol()
    symbol.setColor(QColor(142,0,142,85))
    layer.triggerRepaint()
    self.iface.layerTreeView().refreshLayerSymbology(layer.id())

def display_final_vector_object(self):

    self.current_layer = self.iface.addVectorLayer(self.out_vectorFilename, self.displayName, "ogr")
    if not self.IndexIncrease:
        land_class = {                                                              # Create dictionary to store 'attribute value' : ('symbol colour', 'legend name')
            '0': ('#0f0', ''),
            '1': ('#ff0000', 'Significant Negative Change')
        }
    else:
        land_class = {                                                              # Create dictionary to store 'attribute value' : ('symbol colour', 'legend name')
            '0': ('#0f0', ''),
            '1': ('#00ff00', 'Significant Positive Change')
        }

    categories = []                                                             # Create list to store symbology properties
    for classes, (color, label) in land_class.items():                          # Iterate through the dictionary
        symbol = QgsSymbol.defaultSymbol(self.current_layer.geometryType())          # Automatically set symbols based on layer's geometry
        symbol.setColor(QColor(color))                                          # Set colour
        if classes == '0':                                                      # Set symbol with value = 0 to be transparent
            symbol.setOpacity(0)
        category = QgsRendererCategory(classes, symbol, label)                  # Set the renderer properties
        categories.append(category)

    expression = 'DN'                                                           # Field name
    renderer = QgsCategorizedSymbolRenderer(expression, categories)             # Set the categorized renderer
    self.current_layer.setRenderer(renderer)
    self.current_layer.triggerRepaint()                                              # Refresh layer

To clear vector objects

def interface_clean(self):

    # Check for any previous versions of files in interface.

    layers = [layer for layer in QgsProject.instance().mapLayers().values()]
    for layer in layers:
        if (layer.type() == QgsMapLayer.VectorLayer):
            if (layer.name() == "User selected input polygons"):
                QgsProject.instance().removeMapLayer(layer)
            if (self.displayName in layer.name()):
                QgsProject.instance().removeMapLayer(layer)

I do not understand why I am getting a complaint about loading files when I'm trying to remove them.

Can anyone see anything obvious that I am missing?


texts: Writing Variables Values into Feature Class Table in ArcGIS Modelbuilder

texts:
I am trying to use the ModelBuilder for my master thesis. What I want to do is:

1) Create two new fields in a watershed feature class (contains several watersheds)

2) Use the watershed feature to clip each single watershed from a DEM

3) Calculate the hypsometric integral for each watershed

4) Write the derived values:
   a)"Value" = Number of watershed,
   b)"integral"= hypsometric integral for each watershed
   into the new fields of the input watershed feature class. ( I have drawn arrows in the screenshot.

The steps 1-3 are OK, that's working, but I have no idea how to do step 4. Is this possible? Is there a more elegant solution than my idea?


texts: Creating Mapbook with Hyperlink texts in PDF using QGIS Atlas?

texts:
I'm using QGIS 2.8.1 Atlas and creating a mapbook using a grid layer that has an attribute with a URL in it.

I want to use the URL in the attribute to be a hyperlink in the PDF once its published.

Is there just an expression I can use to do this?


texts: Using very large image formats with GDAL

texts:
I would like to use gdalwarp and gdal_translate with some very large raster images (313,040 x 313,040 px) and I'm wondering what the best format or method is to do this, if it's even possible.

I have the file in Photoshop, which at that size can only output Large Document Format (.psb) files, which I don't think gdal can read.

Will gdal even be able to handle such a sized document?

If so, how can I convert it to a format gdal can use?


texts: Moving one polygon layers data to another polygon layer based on distance

texts:
I'm trying to set variable shape polygons to a hexagon grid. I want to do something like a spatial join, but without merging data as in "One_to_one", and only having one polygon fill one hexagon unlike "One_to_many"

Here is a subset:

I was thinking that I can calculate centroid of the polygons and match them to the closest hexagon, but I don't know how to just match one polygon to one hexagon.

In the end it should look something like this:


texts: Using globe view in Google Earth Engine?

texts:
I'm working on a tool to visualize climate data in Google Earth Engine, and it'd be very nice if I could view the Earth as a 3D globe (i.e., from "space", rotate it, etc) rather than a 2D projection.

Is this possible with Earth Engine?

I'm unsure whether there's an obvious interface option I'm missing, whether I'd need to do this in the javascript somehow, or if it's simply impossible.


texts: Tally of sequences of points within point-specific buffer, rolling over timestamps, in PostGIS?

texts:
In a given string of points, I've been able to designate buffers for each point in the string (i.e. a string of points are relocations over time). However, I'd like to be able to then summarize how many sequences of points of more than, say, X points, fall within a single point-specific buffer. The idea being that this would quantify how many sequences of more than X points within a string of points are within one buffered area.

Here is some code thus far:
SELECT id, ST_Buffer(geom_utm, 20)
FROM schema.my_table
GROUP BY id
ORDER BY id;

Note: each point has an individual id to it, and its geom is in UTM (hence the 20 for 20 meter buffer).

Here's an image of a string of 20m buffers around each point in the string:

This image shows buffers around points which are on a map, ordered via timestamp. As you can see the buffers are heavily overlapping in some areas (see the dark blue spots). I'd like to count how many points occur in those areas where there is almost total overlap (i.e. dark blue spots). Those dark blue spots represent times where the individual (i.e. thing triggering GPS fixes) is not moving as much, because over time the individual remains within a point's buffer for a certain time window. I'd like to count how many times the individual stays within a given point's buffer for more than, say, X timestamps after the original point's timestamp. Or another way, how many times do we see point buffers overlapping entirely for at least X timestamps in a row.

Ideally, every point would have a code which states whether it is within a "resting" period or not, as in if you find some X points after an original point which are all within a buffer, all of those points would get a "1" because the individual was still from point A for X more points. Points where there is no resting, i.e. no buffer overlaps for more than X points, would get a "0", which means they are not resting at that timestamp.


texts:
I am trying to convert coordinates from ArcMap to QGIS, as the project that I am working on is in ArcMap, but I only have ArcMap on the University computer and I would like to work from home, furthermore, I do not have experience with ArcMap.

In ArcMsp, when I go to the Layer properties and then select the "Extend" tab I see the coordinates (top, left, right, bottom) in the DHDN_3_Degree_Gauss_Zone_4 coordinate system.

In QGIS, I imported, via the XYT Tiles Plugin Google Satellite, a satellite image of the world. Now set the coordinate system to DHDN / 3-degree Gauss-Kruger zone 4, which I believe is the same as in ArcMap (not sure if "-Kruger" might be my problem, but I couldn't find "just" Gauss).

However, when I now export the layer in QGIS with the "Save As"- Function and applying the coordinates of ArcMap to QGIS (north, east, west, south) the wrong location is saved.

Could somebody tell me what I am doing wrong?

I am using ArcMap 10.7.1

I need the images from the project as these are historical and I want to cut out this area in the present-day from Google Satellite. I already "extracted" them from the project and tried loading them into QGIS. Google Satellite automatically uses the EPSG:3857 - WGS 84 / Pseudo-Mercator CRS and the historical image automatically uses the EPSG:31468 - DHDN / 3-degree Gauss-Kruger zone 4 CRS. However, when I import the historical image I get the following prompt:

I guess this is just the warning that QGIS will transform the image to the WGS 84 CRS.

Do I have to enter something for the Destination Transform?

Right now I just click okay, as WGS 84 is the same CRS as Google Satellite uses. But, this results in the historical image being way off.


texts: How to add google satellite as a base layer for a geoserver generated openlayers page

texts:
İ have added a shapefile to geoserver and generate a WMS page. I want to add google satellite  as a base layer but i can't do it.

Any hint on how to add google satellite as a base layer?