texts: ArcObjects: How to remove a custom layer?

texts:
How is a custom layer supposed to be destructed?
I have a custom layer that implements drawing by overriding IActiveViewEvents::AfterDraw.
The problem is that sometimes when the custom layer is removed from the Scene/Table Of Contents it is still drawn!?

The FinalRelease() method is never called in my custom layer.

I would expect it to be ArcScenes responsibility to delete my custom layer when it is removed?; which in turn would call my FinalRelease() method.
If my custom layer is not in the Scene/Table Of Contents; how comes it receives IActiveViewEvents::AfterDraw calls?
I would expect ArcScene to draw only layers in the Scene/Table Of Contents.

Here is an overview of my code:

    class ATL_NO_VTABLE MyLayer :
    public ILayer,
    public IGeoDataset,
    public IGraphicsContainer3D,
    public IActiveViewEvents,
    public IPersistVariant, ....
    {

    public:
    HRESULT FinalConstruct()
    {
        return S_OK;
    }

    void FinalRelease() // newer called!
    {
        return S_OK;
    }

    // called after layer has been removed!?
    STDMETHOD(AfterDraw)(IDisplay * Display, esriViewDrawPhase phase);

    ...
    };

    HRESULT addMyLayer() // called by user clicking a button
    {
      IMyLayerPtr myLayer(CLSID_MyLayer);
      IApplicationPtr ipApp(CLSID_AppRef);
      IDocumentPtr doc;
      ipApp->get_Document(&doc)
      if(doc)
        return S_FALSE;
      ISxDocumentPtr sxdoc;
      sxdoc = doc;
      if(!sxdoc)
        return S_FALSE;
      IScenePtr scene;
      sxdoc->get_Scene(&scene);
      if(!scene)
            return S_FALSE;
      return scene->AddLayer(myLayer, VARIANT_FALSE); // I add the layer, but who removes it?
    }

Thanks in advance for any answers!
Andreas


texts: Join attribute by location giving bigger results QGIS

texts:
I have created a grid over South Africa, each cell being 10 km x 10 km. In addition, I have a raster layer that has been polygonized, each polygon containing a population count. The total of these population polygons equate to 53 million inhabitants

Because my computer can't handle the analysis of all the population polygons (1,5 million) I've decided to create this coarser grid, to group population estimates.

Therefore, I've joined the grid with the population polygons ("Join attributes by location"), so that each grid cell can now contain a total population, made of several pop estimates. However, when I use the tool "statistics by categories", the total sum of population inside the grid equates to 63 million...
I don't understand why there is a difference in population estimates. The sum of all the grid cells should equate to 53 million inhabitants.


texts: Combining two z values with same x and y in ArcMap?

texts:
I have a point file with elevation values I want to combine with a raster of the same area. I'm assuming I will need to extract points from the raster to store as a .shp file.

Then I need to combine the two sets of z values to create one elevation (in this case i'm adding the one to the other.) Can this be done within ArcMAP 10.3.1?


texts:
I have several Landsat 5 Images to merge together. As far as I saw from tutorials and previous questions there are two main methods (and none seem to be working for me):
1 - raster » miscelaneous » merge
2 - SAGA's Mosaic Rasters Layers
I just reinstalled Qgis 3.10 Coruna in Windows. All landsat images were obtained with the SCP pluggin
I made some screen shots to further explain:
These are the images I want to merge

Method 1- Merge
I set the following parameters. I didn't forget to assign "0" as no data.

The end result was quite surprising. Not only it eliminated the overlapping pixels but also created this rectangular areas with a 0 value. Those areas are outside the limits of both images.

Method 2 - SAGA's Mosaic Rasters Layers
I followed the parameters in one previous question:

but the results weren't generated

I confirmed: both images are in the same Datum. What can be the problem?


texts: Determining web service endpoints of existing web application

texts: I am new to the world of GIS web services, but am wondering if there is a way to determine the web service endpoints that an existing web application embedded on a web page (silverlight) is using?


texts: Getting list of layers when opening a QGIS project on a standalone app?

texts:
I am trying to make a standalone QGIS app to read a .qgs file for rendering an image based on the vectors using LayoutManager.
The problem is that when I try to print project.mapLayers() I get an empty dictionary

I don't know if it is the best method to do this.

There is my code:

import os

os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = r'C:\Program Files\QGIS 3.4\apps\qt5\plugins'
os.environ['PATH'] += r';C:\Program Files\QGIS 3.4\apps\qgis-ltr\bin;C:\Program Files\QGIS 3.4\apps\qt5\bin'

from PyQt5 import *
from PyQt5 import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from qgis.core import *
from qgis.gui import *
from qgis.utils import *

from PyQt5.QtWidgets import QApplication

QgsApplication.setPrefixPath("C:/OSGeo4W64/apps/qgis", True)
qgs = QgsApplication([], True)
qgs.initQgis()

project = QgsProject.instance()
prj = project.read(r'C:\Users\Utilisateur\Desktop\Standalone\Livrable TW\P2.qgs')
print(project)
print(prj)

######################
print(project.mapLayers())
layers = project.mapLayers()
######################

manager = project.layoutManager()
layoutName = 'Layout1'
layouts_list = manager.printLayouts()
# remove any duplicate layouts
for layout in layouts_list:
    if layout.name() == layoutName:
        manager.removeLayout(layout)
layout = QgsPrintLayout(project)
layout.initializeDefaults()
layout.setName(layoutName)
manager.addLayout(layout)

# create map item in the layout
map = QgsLayoutItemMap(layout)
map.setRect(10,10,10,10)

# set the map extent
ms = QgsMapSettings()
ms.setLayers(layers)
rect = QgsRectangle(ms.fullExtent())
rect.scale(1.0)
ms.setExtent(rect)
map.setExtent(rect)
map.setScale(750*18)
map.setBackgroundColor(QColor(255,255,255,0))
layout.addLayoutItem(map)

map.attemptMove(QgsLayoutPoint(5, 20, QgsUnitTypes.LayoutMillimeters))
map.attemptResize(QgsLayoutSize(180, 180, QgsUnitTypes.LayoutMillimeters))

legend = QgsLayoutItemLegend(layout)
#legend.setTitle("Legend")
layerTree = QgsLayerTree()
for layer in layers:
    layerTree.addLayer(layer)
legend.model().setRootGroup(layerTree)
layout.addLayoutItem(legend)
legend.attemptMove(QgsLayoutPoint(200, 5, QgsUnitTypes.LayoutMillimeters))

scalebar = QgsLayoutItemScaleBar(layout)
scalebar.setStyle('Single Box')
scalebar.setUnits(QgsUnitTypes.DistanceMeters)
scalebar.setNumberOfSegments(4)
scalebar.setNumberOfSegmentsLeft(0)
scalebar.setUnitsPerSegment(100)
scalebar.setLinkedMap(map)
scalebar.setUnitLabel('m')
# scalebar.setFont(QFont('Arial', 14)) # <--- Deprecated
scalebar.update()
layout.addLayoutItem(scalebar)
scalebar.attemptMove(QgsLayoutPoint(20, 190, QgsUnitTypes.LayoutMillimeters))

title = QgsLayoutItemLabel(layout)
title.setText('My Title')
title.setFont(QFont('Arial', 24))
title.adjustSizeToText()
layout.addLayoutItem(title)
title.attemptMove(QgsLayoutPoint(10, 5, QgsUnitTypes.LayoutMillimeters))

layout = manager.layoutByName(layoutName)
exporter = QgsLayoutExporter(layout)

fn = 'C:/temp/layout_export.png'
exporter.exportToImage(fn, QgsLayoutExporter.ImageExportSettings())

qgs.exitQgis()

Edit:
Edit: I complete my question because I have continued searching a solution. My problem seems that it could came from the prefix who may not be correctly defined because when I try to import vector layers and verifying if the layer correctly imported with

vlayer.isValid()

it returns

False


texts: Unsuccessful migration of my_worspace from GeoServer 15.2 to GeoServer 16.0

texts:
What I have to do for migration of my workspace from one GeoServer to another (from 15.2 on server#1 to 16.2 on server#2)?
What I do:
-replace directory tomcat/webapps/geoserver/data/my_workspace_dir
-restarted tomcat.
What I have had? this:
-have had workspace in GUI geoserver
-have had styles in GUI geoserver (but all are broken, when I opened them,
they throw this: org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public org.geoserver.wms.web.data.StyleEditPage(org.apache.wicket.request.mapper.parameter.PageParameters)' ...
- no one source (DB) or layers from my workspace

What I have to do?


texts: Creating series of points along polyline?

texts:
I have a series of polylines, these represent various linear landscape features (Roads, hedges,rivers). I need to convert these to a series of points equally spaced (so hedges a point every 2m, a river a point every 5m etc) in order to model them in a 3D program.

How do I do this? I have done it previous in ArcView 3, but using ArcGIS 9.3 now and lost.


texts:
I am trying to install Tilestrata on a DigitalOcean server. I already have it up and running on an AWS instance. But although I think I'm doing the same thing I did to install it on AWS, so far I have been stymied in getting it running on DO by the following error:

safeuser@Server:~/tileserver$ node server.js

/home/safeuser/node_modules/tilestrata/lib/TileServer.js:499
    var callback = function(err) { if (err) throw err; };
                                                  ^
Error: Unable to initialize "basemap" layer: "expected < at line 1"
    at /home/safeuser/node_modules/tilestrata/lib/TileServer.js:106:19
    at /home/safeuser/node_modules/tilestrata/node_modules/async/lib/async.js:52:16
    at done (/home/safeuser/node_modules/tilestrata/node_modules/async/lib/async.js:243:17)
    at /home/safeuser/node_modules/tilestrata/node_modules/async/lib/async.js:44:16
    at Object._onImmediate (/home/safeuser/node_modules/tilestrata/lib/TileRequestHandler.js:125:4)
    at processImmediate [as _immediateCallback] (timers.js:330:15)

It seems like it's having issues with the Mapnik XML file, but I've checked the file and the route to the file, and it should be fine. It's the exact same project.xml file I'm using successfully on AWS. Here is the contents of my server.js file:

var tilestrata = require('tilestrata');
var disk = require('tilestrata-disk');
var mapnik = require('tilestrata-mapnik');
var dependency = require('tilestrata-dependency');
var strata = tilestrata();

// define layers
strata.layer('basemap')
    .route('tile.png')
        .use(disk.cache({dir: './tiles/basemap/'}))
        .use(mapnik({
            xml: './project/project.xml',
            tileSize: 256,
            scale: 1
        }));

// start accepting requests
strata.listen(8080);

I must be missing something here, and I've been investigating for days. Any insights would be most welcome.


texts: How to calculate a field upon row creation?

texts:
I want to create a calculated field that will auto populate whenever a new row is inserted into a feature class.  I can do this with the Field Calculator, but that requires manual intervention.

Is there anything like the calculated column in MSSQL where you enter a formula and the result is calculated on a read, but not persisted?


texts: Performing Raster Algebra and Multicriteria Analysis using FME?

texts:
I'm trying to use FME to do some raster algebra for some Multi-Criteria Analysis.  At the moment, I have three rasters, all with the same extents and resolution: Slope, Hydro, and Infrastructure Mask.  In the future, I will be adding additional layers (Vegetation, for example).

The slope raster is a classified raster representing low to high slope.  The categories are:

5: Less than 5 degrees (Preferrable)
2: 5-10 degrees
1: 10-15 degrees
0: Greater than 15 degrees (undesirable - No Go)

The Hydro raster is a classified raster of buffer distances from waterways.  The categories are:

5: Within 50m of a waterway
4: Between 50-100m of a waterway
3: Between 100-500m of a waterway
2: Between 500-1000m of a waterway
1: Greater than 1000m of a waterway

The infrastructure mask has a value of 0 wherever there is some kind of infrastructure (Road, Pipeline, Powerline, Well, etc) and a value of 1 everywhere else.

I would like to combine the Slope and Hydro (and eventually other layers) using FME. Ideally, I would like to add the values together, except, if the slope has a value of 0, the resulting raster should be zero.  For the moment, I am using a RasterExpressionEvaluator Transformer to combine the layers, but I'm not sure of the right syntax to get what I want.

This is the expression I'm using:

if(A[0]==0,0,($(Hydro_Weight)*B[0]+$(Slope_Weight)*A[0]))

A is the Slope Raster and B is the Hydro Raster. Hydro_Weight and Slope_Weight are parameters that the user enters before running the workspace.  Essentially, what I'm doing is: if the slope is 0, then the result should be 0, otherwise, add the weighted values of the slope and hydro rasters.  This seems like the correct way to go but all the cells in my output have a value of -128.

Is this the correct way to use the RasterExpressionEvaluator?


texts:
I'm developing a web map for my town. I made my own vector layers and, to avoid the too much "white", I decided to use as base layer OSM. The problem is that when I use the array of resolutions to set the zoom (in the other ways I'm not able to set the zoom) I get the cross-origin error. Here is the code of the osm layer I made:

var osm = new OpenLayers.Layer.OSM(
             'OSM',
             null,
             { zoomOffset: 4, resolutions: [4.777314267158508, 2.388657133579254, 1.194328566789627, 0.5971642833948135], tileOptions: { crossOriginKeyword: null }}
             );
         map.addLayer(osm);

With this, by setting the origin keyword on "null", I don't get the cross-origin problem, but it doesn't load the tiles (error 404). If I remove the resolutions array, the tiles are loaded correctly, but then the zoom is not controlled and user is free to zoom to the whole planet. I'm using Openlayers 2.13.1 with IIS Express and Geoserver 2.5.2. Of course, I'm already using a proxy.
Any suggestions on where this problem comes from and how to fix it?


texts:
How to calculate coordinate of a selected points in QGIS? Not just x, y, I need like this: X = 77° 1' 5.032" E Y = 28° 38' 58.034" N.
Refer the attached image the (x,y,z) columns coordinate generated in QGIS but the
(COORDI) column is generated in ArcGIS. this (COORDI) column how I get in QGIS?


texts: Sending Raster File in ArcMap, Attributes Gone

texts: On my computer, I opened a .tif file in ArcMap 10.1 and reclassed the values into two categories - this results in a new file. I then send that file to another computer and open it in ArcMap but rather than having two distinct values the raster is displayed as a stretch. When I try to get unique values, nothing happens. Solutions? Thanks.


texts:
Looking to convert this Arcpy script to pyQGIS. I sure Hope pyGIS has an user input that works outside the command line.

# make custom button to search Parcels by Parcel Number
# and zoom to selected parcel
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]
input_PIN = raw_input('Enter your value :')
sql_exp = """"PIN" = '""" + input_PIN + "'"
Llayer = arcpy.mapping.Layer(r"C:\common\Gene\Parcels.shp")
Llayer.definitionQuery = sql_exp
arcpy.mapping.AddLayer(df, Llayer)
dfNEWextent = Llayer.getExtent()
df.extent = dfNEWextent

PYQGIS Code:

from qgis.core import *
from PyQt4.QtCore import *
from PyQt4.QtGui import QInputDialog
QgsApplication.setPrefixPath("C:\Program Files\QGIS Pisa\bin", True)
QgsApplication.initQgis()
cLayer = iface.mapCanvas().currentLayer()
input_PIN = QInputDialog.getText(None,'Parcel Number','Enter PIN:')
expr = QgsExpression(""""PIN" = '""" + input_PIN + "'")
it = cLayer.getFeatures( QgsFeatureRequest( expr )
ids = [i.id() for i in it]
cLayer.setSelectedFeatures( ids )
iface.mapCanvas().zoomToSelected()


texts: How to configure Geoserver ProxyBaseUrl serving multiple other proxies

texts:
We have unsecured, internal GeoServers behind an internal load balancer.  Access to the load balancer is only available from internal network traffic or an authenticate web proxy.  We are able to set the Proxy Base Url setting in GeoServer so that internal traffic can direct to the load balancer.
When we publish our services, we have a single proxy url in the GetCapabilities file which only resolves internally.  We do not control the other client applications (OpenLayers, QGIS/ArcMap? etc...) and the proxies that they use to access our services.
Some clients are requesting the GetCapabilities file from GeoServer via their proxy and then attempting to use the proxy base url (sent in the capabilities file) to access map images.  This obviously won't work as they are then not directed via their original proxy.

How do we define our base proxy url for services that can be consumed by multiple unknown proxies without exposing our service as an externally resolvable url?
We have a number of approaches in mind, none of which are elegant:

1) Create different GeoServer instances for each proxy

2) Create a GetCapabilities file rewrite at our load balancer / proxy to rewrite the base url depending on the original request origin

3) Expose the service to the internet with basic authentication


texts: Parse Error on PostgreSQL when using ST_AsText

texts:
I am new to using POSTGIS and PostgreSQL.

I am trying to convert PostGIS coordinates into lat and long values. When I copy one of the values and query like

SELECT ST_AsText('0101000000A7E8482EFFC55B402063EE5A42064140');

The query runs without an error. But when I try the query for the entire table column like

SELECT ST_AsText(GPS) from schema.table;

I am getting an error saying

" 0101000000A7E8482EFFC" <-- parse error at position 22 within geometry

The column data type is text. I am unsure why the ST_AsText is unable to read the whole text and stops at position 21.

Additional information:
PostgreSQL version : 10.7
pgAdmin : 4.5
PostGIS: 2.4.3

I am using Python SQLAlchemy to Insert the tables directly into PostgreSQL.


texts:
How does one input NASA Aeronet data successfully into Monteverdi for atmospheric correction? I have downloaded a level 2 combined almucantar product but I get the error: ERROR:  The file 130101_131231_GSFC.dubovik is not conform.

I am uncertain what file format it is expecting. Does anyone have an example of the formatted input or data type from Aeronet?


texts: QGIS label placement from another layers

texts:
I am trying to amend the default syle of the new OS-Open-Zoomstack so that when water is labeled it curves on line. This would be easy if the label was in the feature but unfortunately it's in a completely different layer for water.

Features are in a layer called "OSOPEN_ZoomStack_v0_3surfacewater" and then "Local". The labels are under "OSOPEN_ZoomStack_v0_3names" then "water".

What I want is the names water feature to use the placement setting Curve, on line and follow the line of the surfacewater local.

I'm not sure if this is possible as there is no easy way to link the 2 layers other than the names water feature is on top of surfacewater local.

This is a bit hard to explain, hopefully a picture makes this easier. I would like the "Crook Beck" label to follow line of the water, but the feature and labels are on separate layers as described above.


texts: QGIS: How to displace points close to each other (but not overlapping) and save as a layer?

texts:
I'm preparing a point vector file for printing, and I would like to displace the points within it so that the markers will be far enough apart that they do not overlap. I am not using QGIS to render the print map, so I would like to output a vector file where the points have been displaced.

The QGIS Processing plugin has a Points Displacement algorithm that works great for overlapping points that are on the exact same point, but is there a way to do this with a buffer? So that the output file has no points that are, say, within 50 meters of each other?


texts: ArcGIS Server not updating Active Directory Changes?

texts:
I am using ArcGIS Server 10.4 on Windows Server 2012 r2

I have users from active directory with built in roles on the server.

organization policy is to force users to change their AD passwords every 3 months, when this happens ArcGIS Server is not picking up these changes (sometimes it does and sometimes it doesn't) what is causing this non-consistent  event and how can I fix it?

my temp solution was to re-load the AD connection into the server every time a user creates a work order for this issue. there must be a better way


texts: Running the processing algorithm 'selectbylocation' on only over selected rows of "intersect" layer

texts:
I can run the below processing algorithm

 myresult = processing.run("qgis:selectbylocation",
{             'INPUT': selection_layer.name() ,
              'PREDICATE': 0,
              'INTERSECT': w_r_t_selection_layer.name(),
              'METHOD': 0,
             }
)

But how to run the above process only on selected rows of INTERSECT layer?

When we run the same processing via QGIS GUI, there is checkbox to obtain that function but I cannot find any way to do same via Python scripting.


texts:
I'm converting a COM Extension to an Add-In.  The old extension installed a PDF alongside the .dll and an Command in the extension start the PDF Viewer process (using Process.Start(pdflocation).

I'm running into trouble duplicating this with the Add-In structure.

In Visual Studio I have my PDF file included in a 'Resources' folder I made.  I've got the PDF's Build Action set to AddInContent. Where can I find this file after the Add-In is deployed?

I used Assembly.GetExecutingAssembly().Location; to see that the .dll file is located in C:\Users\myuseraccount\AppData\Local\ESRI\Desktop10.2\AssemblyCache\{<AddIn GUID>}\ but I do not see my Resources directory here (or even the Images directory containing the images that my Add-In buttons and tools use)

So like the title states... How do I access files in an Add-In that have a Build Type of AddInContent?


texts: How can I manipulate the number of points visible according to scale?

texts:
I've gotten trillions of points extracted from a DEM and they are to be labelled. It's fine at scales such as 1:500 but it gets too cluttered especially if I need to make maps of this with scales up to 1:24000. Is there any way to make less points visible as the user zooms out without creating new feature classes?

A bit more about the data: the points are in a grid fashion and there is no way of identifying them by row or column which makes select by location quite difficult.


texts:
I have an Oracle Spatial table (in 12c) with a polygon geometry type. I added a text column to the table that I would like to populate with the well-known text of the polygon's centroid. In concept this is really simple but I'm having trouble using the SDO_CENTROID function properly. This is my SQL statement so far:

update parcel
set centroid_wkt = sdo_util.to_wktgeometry(sdo_geom.sdo_centroid(shape,  usgm.diminfo))
from user_sdo_geom_metadata usgm;

When I execute this it tells me SQL Error: ORA-00933: SQL command not properly ended. Can anyone tell what I'm doing wrong here? My guess is that the UPDATE... SET... FROM... syntax doesn't work in Oracle, but I'm not sure how else to select the diminfo array.


texts: Formula to convert WGS84 to BT68 and to Borneo Rectified Screw Orthomorphic

texts:
I am doing research about converting the coordinate system from Wgs84 to Rectify Skew Orthomorphic Borneo (BRSO) map projection system which is very useful for Sabah and Sarawak but I have two problems:

When I convert the WGS84 to BRSO, I only can convert until the part BT68..and don't know the formula convert BT68 to BRSO.
When I convert the BRSO to WGS84, I only from BRSO to BT68 and can't continue to WGS84. Cause don't know the formula.

I will attach some concept of the Convertion.

Do you have an idea or formula that can let me know?


texts:
In R, trying to export choropleth maps with density and frequency histograms as legends; have had success exporting as an image but not as a pdf.

Exporting as an image (.png) works well; the map, including the placement of the histogram within the frame, looks the same in the exported image as it does within the Plot window in R. However, when exporting to a PDF, the histogram changes size and placement and often overlaps with the map (which renders the histogram unreadable). Any ideas as to why the two exported maps look different? And how to export to a PDF so that the exported map looks like the map in R?

Thanks!


texts: QGIS 2.18 "The program can't start because qgis_app.dll is missing from your computer"

texts: I installed QGIS 2.18 after i had uninstalled the version 2.16. It installed quite well but it is not starting at all. I went into the program directory and click on the exe file and got the error "The program can't start because qgis_app.dll is missing from your computer. Try reinstalling the program to fix this problem". I have installed severally and the same error keeps coming on. Any help?


texts: Publishing image service with JSON in ArcGIS Server creates inaccessible service

texts:
I used the following JSON to publish but it created inaccessible layer that I could not modify or delete.

{
   "serviceName":"Suitability_1574658353.68_proj",
   "type":"ImageServer",
   "description":"User uploaded image.",
   "capabilities":"Image,Metadata,Mensuration",
   "outputType":"imageService",
   "configuredState":"STARTED",
   "maxWaitTime":6000,
   "maxStartupTime":300,
   "maxIdleTime":1800,
   "maxUsageTime":600000,
   "outputDir":"C:/arcgisserver/directories/arcgisoutput",
   "supportedImageReturnTypes":"URL",
   "virtualOutputDir":"/rest/directories/arcgisoutput",
   "properties":{
      "defaultCompressionTolerance":"0.01",
      "maxBufferCount":"100",
      "maxImageHeight":"2048",
      "path":"D:/data/User/1574658353.68/Suitability_1574658353.68_proj.tif",
      "supportsOwnershipBasedAccessControl":"false",
      "description":"User uploaded file.",
      "defaultCompressionQuality":"75",
      "esriImageServiceSourceType":"esriImageServiceSourceTypeDataset",
      "hasValidSR":"true",
      "isCached":"false",
      "virtualOutputDir":"/rest/directories/arcgisoutput",
      "availableMensurationCapabilities":"Basic",
      "dataSourceIsReadOnly":"true",
      "exportTilesAllowed":"false",
      "cacheOnDemand":"false",
      "maxSampleCount":"1000",
      "defaultResamplingMethod":"1",
      "minScale":"-1",
      "useLocalCacheDir":"true",
      "maxScale":"-1",
      "allowFunction":"true",
      "availableCompressions":"None,JPEG,LZ77,LERC",
      "supportedImageReturnTypes":"URL",
      "clientCachingAllowed":"true",
      "allowedMensurationCapabilities":"Basic",
      "maxExportTilesCount":"100000",
      "returnJPGPNGAsJPG":"false",
      "ignoreCache":"false",
      "colormapToRGB":"false",
      "cacheControlMaxAge":"43200",
      "allowedTemplates":"None",
      "virtualCacheDir":"/rest/directories/arcgiscache",
      "allowedCompressions":"None,JPEG,LZ77,LERC",
      "availableMosaicMethods":""
   }
}

The service is accessible in the client side but I cannot delete it in arcgis/admin or server manager.
When I open the published service in ArcGIS Server Manager, I get a blank page. When I open the service in arcgis/admin, I get the following error message:

 Error
     Could not find resource or operation
    'Suitability_1574658353.68_proj.ImageServer' on the system.
 Code
    404

Am I missing something in my JSON?

I am working on ArcGIS 10.5 Server.


texts: SAGA Tool clip raster by mask layer for QGIS standalone script

texts:
In my PyQGIS standalone script I want to use the SAGA Tool "Clip raster by mask layer". I have tried to following.

def clipRaster(self):
    raster = self.getRasterLayer()
    vector = self.getVectorLayer()
    outDir = os.path.join(QgsProject().instance().homePath(), "clip.tiff")
    param = {"input": raster,
             "polygons": vector,
             "output": outDir,
             }
    clip = processing.run('saga:cliprasterwithpolygon', param)
    rlayer = QgsRasterLayer(clip['output'], 'clip')
    QgsProject().instance().addMapLayer(rlayer)

Unfortunately, I get the following error message:

  _core.QgsProcessingException: Unable to execute algorithm Could not load source layer for INPUT: no value specified for parameter
  Traceback (most recent call last):
    File "C:/Users/Jan/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gebeude_betroffenheit\Gebeude_Betroffenheit.py", line 292, in run
      self.clipRaster()
    File "C:/Users/Jan/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gebeude_betroffenheit\Gebeude_Betroffenheit.py", line 237, in clipRaster
      clip = processing.run('saga:cliprasterwithpolygon', param)
    File "C:/PROGRA~1/QGIS3~1.4/apps/qgis-ltr/./python/plugins\processing\tools\general.py", line 105, in run
      return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)
    File "C:/PROGRA~1/QGIS3~1.4/apps/qgis-ltr/./python/plugins\processing\core\Processing.py", line 139, in runAlgorithm
      raise QgsProcessingException(msg)
  _core.QgsProcessingException: Unable to execute algorithm
  Could not load source layer for INPUT: no value specified for Parameter

Hmm it indicates that there is something wrong with the raster layer but the same layer works perfectly fine for another function. Thus, I believe there is something wrong with the "param" variable...

Does anyone see the problem in my code?

I'm using QGIS 3.4


texts: Buffer zone intersection proportion using ArcMap

texts:
I have created a buffer zone around a shapefile in ArcGIS 10.5 and erased the middle zone (so it is a donut).  I have then found the intersection of the buffer zones with another shapefile.
How do I combine the two shapefiles so that I can calculate the proportion of intersection in the buffer zone?


texts: I have been trying to export from MXD format to DWG format without much success. I used the Export to CAD conversion tool in GIS 9.3 but it only converts the lines and polygon.. etc to DWG format and NOT the colors and texts that are also included in the original MXD file. Any idea of how I might be able to convert the WHOLE MXD to CAD with all the features included?


texts: Creating grid constrained within polygon in QGIS?

texts:
In QGIS I have created an irregularly shaped polygon.

I can create a grid based on the maximum extents of the polygon via Vector>Research Tools>Vector Grid.

However, I need the grid to only be displayed inside the polygon's boundaries.

How can I create a grid within a polygon in QGIS?


texts:
I have a thickness raster and sediment core data (collected within the raster area in excel format).

Is there any option to create a 3D view of a thickness raster incorporating with core length?


texts:
Is ArcGIS Runtime SDK  for.net 10.2.7 compatible with 10.5 ArcGIS servers?
We are in ArcGIS 10.3.1 release and planning to upgrade our ArcGIS Servers to 10.5. Are there any known issues in upgrading the GIS Server to 10.5 and leave the runtime sdk for .net to 10.2.7?


texts: Adding Raster by raster calculator gives no values

texts:
I`m trying to add several raster files to one (like a merge). I tried using the raster calculator (in ArcGIS 10.2.2 and in QGIS 2.8.1 and QGIS 2.10). Anything I do leads to rasterfiles which have only NULL-Values.

Every raster has the same extent, same projection type and pixelsize.
All rasters are in floating point and have NULL-Values.
I tried many things but mainly I just tried to add them
like:

Raster1 + Raster 2 + Raster 3 and so on.

I also tried the melt function in QGIS and the GRIDsum function in SAGA. It must be a problem with my data but I don´t have an idea what could be wrong.
Anyone an idea what I could try?

Edit: Also I should mention, that there is a NULL value for every pixel in at least on of the rasters used.


texts: Is the PostGIS Shapefile Import Manager able to upload to phpmyadmin or only pgadmin III?

texts:
After trying to import a shapefile into pgadmin III with no success I was wondering how to successfully upload it, but also if it is possible to upload to phpmyadmin instead. In any case, how exactly do I change the encoding so that they are compatible in pgadmin. No matter what I don't want to change the shapefile as it was more likely my error in uploading and configuring the local server that caused this.

Connection succeeded.
Connecting:  host=localhost port=5432 user=postgres dbname=AdminBoundaries

==============================
Importing with configuration: adminboundaries, public, geom, H:\AdminBoundaries, mode=c, dump=1, simple=0, geography=0, index=1, shape=1, srid=0
Shapefile type: Polygon
PostGIS type: MULTIPOLYGON[2]
Failed SQL begins: "SET CLIENT_ENCODING TO UTF8;
SET STANDARD_CONFORMING_STRINGS TO ON;
BEGIN;
CREATE TABLE "public"."adminboundaries" (gid serial,
"ID_0" int4,
"ISO" varchar(3),
"NAME_0" varchar(75),
"ID_1" int4,
"NAME_1" varchar(75),
"VARNAME_1" varchar(150),
"NL_NAME_1" v"
Failed in pgui_exec(): ERROR:  function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist
LINE 59: SELECT AddGeometryColumn('public','adminboundaries','geom','...
                ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Shapefile import failed.

==============================
Importing with configuration: adminboundaries, public, geom, H:\AdminBoundaries, mode=c, dump=1, simple=0, geography=0, index=1, shape=1, srid=0
Shapefile type: Polygon
PostGIS type: MULTIPOLYGON[2]
Failed SQL begins: "SET CLIENT_ENCODING TO UTF8;
SET STANDARD_CONFORMING_STRINGS TO ON;
BEGIN;
CREATE TABLE "public"."adminboundaries" (gid serial,
"ID_0" int4,
"ISO" varchar(3),
"NAME_0" varchar(75),
"ID_1" int4,
"NAME_1" varchar(75),
"VARNAME_1" varchar(150),
"NL_NAME_1" v"
Failed in pgui_exec(): ERROR:  function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist
LINE 59: SELECT AddGeometryColumn('public','adminboundaries','geom','...
                ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Shapefile import failed.


texts: How to overlay lat/lon points on a Google layer in OpenLayers 2?

texts:
I'm stuck adding a vector point in lat/lon on top of a Google layer in OpenLayers. The point is moving when I pan the map. This doesn't happen if I replace the Google layer with a layer in WGS84. How can I fix this?

map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());

var gmap = new OpenLayers.Layer.Google(
            "Google Streets",
            {numZoomLevels: 20}
           );
var pointLayer = new OpenLayers.Layer.Vector("Point Layer");

map.addLayers([gmap,pointLayer]);
map.setCenter(new OpenLayers.LonLat(16.373056, 48.208333), 5);

var point = new OpenLayers.Geometry.Point(16.373056, 48.208333);
var pointFeature = new OpenLayers.Feature.Vector(point,null,null);
pointLayer.addFeatures([pointFeature]);

I've tried to follow http://docs.openlayers.org/library/spherical_mercator.html but without success.


texts: Creating categories in table based on value ranges?

texts: I am quite new to Arcgis and I am wondering how I can categorize values in a table based on their distance values. For example, I have a table with INPUT_FID and distance values (ignore everything else). I created a new field and I want to categorize each INPUT_FID based on their distances in that new field (A if distance is less than 200, B if distance is more than 200).


texts: Importing geophysical information to QGIS 2.10 Pisa

texts:
I am using QGIS 2.10 Pisa to georeference geophysical survey information.

When I import data I have black pixels around meaningful part of the image which I remove by setting the transparency to zero.  When I do this the black pixels in my geophysical image disappear as well.

Does anyone have a solution for this?


texts: QGIS layers panel doesn't show symbology

texts:
In the layers panel, the symbology next to the layer name doesn't show.  Reinstalling QGIS has not fixed the problem.

These are PostGIS point layers that draw on the map perfectly fine. The symbology used to show in the layers panel, but then disappeared recently. They disappeared before updating QGIS to 3.4.11. I was hoping the update would fix it.

The crazy thing is sometimes the symbology will momentarily appear in the layer panel, but then it disappears if you toggle a layer on or off. It's behaving like there isn't enough room to draw the symbology next to the layer name.


texts: What are the benefits of hexagonal sampling polygons?

texts: I am always on the lookout for useful methods to sample or partition study areas (usually in the form of raster datasets) into smaller units.  Recently, I read an ESRI blog post about a new tool for creating sampling hexagons.  Although the hexagons are an eye catcher, my first thought is that they are more complicated and contain more vertices than, for example, a fishnet grid which could accomplish the same goals.  What are the benefits of working with hexagonal grids over rectangular grids for study area sampling or partitioning raster datasets?


texts:
I'm trying to run the Arrows plugin on QGIS 2.10 (Win 8.1), but I'm getting an error message:

  Traceback (most recent call last):   File
  "C:/.../.qgis2/python/plugins\arrows\arrows.py", line 79, in run_set
      self.draw_arrows()   File "C:/U.../.qgis2/python/plugins\arrows\arrows.py", line 128, in
  draw_arrows
      width = attributes[self.conf["arrow_width_field"]] * float(unicode(self.conf["arrow_width_factor"])) TypeError: unsupported
  operand type(s) for *: 'QPyNullVariant' and 'float'

Can anyone help me out with this? What is going wrong? How can I fix it?


texts: MapServer Query Raster for Pixel Value at Point

texts:
I am working with a MapServer and a map file that is displaying a color-relief image.

LAYER
    NAME            "sum"
    DATA            "sum.vrt"
    TYPE            RASTER
    STATUS          ON
    DEBUG           0
    MASK            "masklayer"
    SIZEUNITS       PIXELS
    TOLERANCE       0
    TOLERANCEUNITS  PIXELS
END

Note: I had it working with a PNG raster instead of the VRT with the TIF file also.

I need to be able to identify the pixel value at a point

I did a WMS request GetCapabilities. It is saying that my sum layer is not queryable.

I tried to do a WMS call with the GetFeatureInfo and I made the bbox from the lat/lng of the point. I thought that would work but since the layers are not queryable, the request will fail.

What can be done to get the value at a point? Could it be done on the front end with open layers?


texts: Calculating volume of several DEMs to obtain elevation and volume changes using ArcGIS Desktop?

texts:
I am trying to calculate the volume of several DEMs in order to obtain elevation and volume changes. I have pixels of 1x1 each one associated to an elevation. I used several methods but non of them gave me the same results.

First method: I multiply the total sum of the dem elevation, obtained in the statistics of it, by the area of one pixel. I subtract two consecutive DEMs in order to obtain the total volume change.

Second method: I use the Volume and Area Calculator of the 3D Analysis Tool. I subtract two consecutive DEMs in order to obtain the total volume change.

Third method: I use the Cut/Fill tool in order to obtain the gain/losses of volume between to consecutive DEMs. Total gain minus total losses will give me the total change.

Forth method. I subtract to consecutive DEMs in the raster calculator and I obtained the volume of this new raster using the pixel method (first one) and using the Volume Calculator (second one).

None of these methods gave me the same results.


texts:
I'm following the answer on Filter out "incomplete" Sentinel-2 images in Earth Engine to make daily mosaics of Sentinel 2 images.

However, I was expecting that the resulting imageCollection (daily) would have less images than the original filtered collection (s2), as these are mosaicked together by date and orbit, but the number of images in each collection is the same.

//ee.Geometry.Rectangle(minLng, minLat, maxLng, maxLat) ie xmin, ymin, xmax, ymax
var aoi = ee.Geometry.Rectangle(-7.50,47.00,6.50,54.00); // region of all sites in Europe

var s2 = ee.ImageCollection('COPERNICUS/S2_SR')
  .filterBounds(aoi)
  .filterDate('2019-01-01', '2019-01-05') // // %Y-%m-%d
  .map(function (image) {
    return image
      .set('date', image.date().format('yyyy-MM-dd'));
  });

print(s2.size());
print(s2.first(), 'first S2 image');

var daily = ee.ImageCollection(
    ee.Join.saveAll('images').apply({
      primary: s2,
      secondary: s2,
      condition: ee.Filter.and(
        ee.Filter.equals({
          leftField: 'date',
          rightField: 'date'
        }),
        ee.Filter.equals({
          leftField: 'SPACECRAFT_NAME',
          rightField: 'SPACECRAFT_NAME'
        }),
        ee.Filter.equals({
          leftField: 'SENSING_ORBIT_NUMBER',
          rightField: 'SENSING_ORBIT_NUMBER'
        })
      )
    })
  )
  .map(function (image) {
    return ee.ImageCollection(ee.List(image.get('images')))
      .mosaic()
      .set('system:time_start', ee.Date(image.get('date')).millis());
  });

// print(daily);
print(daily.size());

var listOfImages = daily.toList(daily.size());
// print(listOfImages);
var img1 = ee.Image(listOfImages.get(1)); // second image
var img2 = ee.Image(listOfImages.get(100));
var img3 = ee.Image(listOfImages.get(200));

print(daily.first(), "first image in daily");
print(img2, "second image in daily");

Map.centerObject(aoi, 6);

Map.addLayer(daily.first(), {bands: 'B4,B3,B2', min: 300, max: 3000});
Map.addLayer(img1, {bands: 'B4,B3,B2', min: 300, max: 3000});
Map.addLayer(img2, {bands: 'B4,B3,B2', min: 300, max: 3000});
Map.addLayer(img3, {bands: 'B4,B3,B2', min: 300, max: 3000});

Map.addLayer(aoi, {}, 'aoi', true, 0.4);

When I display the first, and second image, for example, they appear the same, but with slightly different start times in the new field "time_start". Images 101 and 201 are different - I was expecting to get a smaller number of such images in the collection to process further.

Is this possible?

I can see now that the join adds a property images to each image in the collection with the matching images. Then the mosaic part mosaics each image with those matches in images, therefore producing multiple identical mosaics for each group of matches.

Either I could identify the unique lists of matches from each list in images, or alternatively, I could get a list of unique dates, spacecraft names and orbits from the imageCollection s2, and then filter by these, and mosaic.

Any suggestions as to which is best and some pointers towards the code?


texts: Python method for finding a substring within a string

texts:
I converted a KML to a feature class and no longer have access to the symbology set in the original KML.  I'm trying to re-create this by creating a new field that stores identifying information useful in creating the layer symbology.

There are three different 'keywords' in the original attribute table that would be useful in a control structure that determines the appropriate symbology type.  I need to search the string for these keywords, but I'm having trouble.

The sample code below is just to get the control structure working -- I know I need to use an update cursor to change / add field addtributes.

Here is my code:

# Import ESRI Python module
import arcpy

# Declare variables used in this script
#featureClass = r'C:\arbitraryLocationOnDisk'
oldField = 'FolderPath'
newField = 'HabitatType' # Restricted by domain: HabitatType
                            #  1. Critical Habitat
                            #  2. Corridors and Key Habitat Areas
                            #  3. Global IBA's

rows = arcpy.SearchCursor(featureClass)
    for row in rows:
        fieldValue = row.getValue(oldField)

        if fieldValue.find('Global'):
            print 'Global IBA'
        elif fieldValue.find('Corridors'):
            print 'Corridors and Key Habbitat Areas'
        elif fieldValue.find('Critical'):
            print 'Critical Habitat'
        else:
            print 'Unrecognized habitat type: ' + fieldValue
        del fieldValue
except:
    arcpy.GetMessages()
finally:
    del rows

The problem I'm experiencing is that after every single row, I'm getting 'Global IBA' despite the fact that not every row contains the substring 'Global'.


texts:
I would like to implement a web editing environment where edits are posted to a version of a database (delta tables) not too default.

The idea behind this is so that any edits made through a web app would be looked over and posted to default by a GIS admin.

I have tried to publish a version of the data, but I get a "Feature service requires a registered database" error (code: 00090).


texts: QGIS: Script is being executed successfully in Python console (within QGIS) but not in a standalone python script

texts:
I have the following code which I have no problem executing within QGIS (2.8.6) via the python console. What the script does is it adds the two raster layers in my directory via the Raster Calculator:

from osgeo import gdal
from osgeo import ogr

from gdalconst import *
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from qgis.core import *
from qgis.analysis import *
from qgis.gui import *
import sys
import glob
import re
import os, fnmatch
import numpy as np
import numpy.ma as ma
import math
import subprocess

qgisprefix = '/usr'

# configure paths for QGIS
os.environ['PATH'] = qgisprefix+'/bin'
os.environ['LD_LIBRARY_PATH'] = qgisprefix+'/lib'
sys.path.insert(0, qgisprefix+'/share/qgis/python')
sys.path.insert(1, qgisprefix+'/share/qgis/python/plugins')

# disable QGIS debug messages
os.environ['QGIS_DEBUG'] = '-1'

# configure QGIS paths
QgsApplication.setPrefixPath(qgisprefix, True)

# initalise QGIS (load providers)
QgsApplication.initQgis()

#Load all the rasters
outputFolder = "/home/usr/Desktop/Output/"
extent = QgsRectangle(264885.85754, 5073773.01243, 614325.85754, 5295173.01243)
numCols = 11648
numRows = 7380

os.chdir("/home/usr/Desktop/")
entries = []

for fname in glob.glob("*.tif"):
    fileInfo = QFileInfo(fname)
    baseName = fileInfo.baseName()
    rasterLayer = QgsRasterLayer(fname, baseName)
    QgsMapLayerRegistry.instance().addMapLayer(rasterLayer)
    mc = iface.mapCanvas()
    Layers = mc.layers()
    for each_layer in Layers:
        layerR = QgsRasterCalculatorEntry()
        layerR.ref = each_layer.name() + '@1'
        layerR.raster = each_layer
        layerR.bandNumber = 1
        entries.append(layerR)

expression = '('+entries[1].ref+'+'+entries[0].ref+')' #re-write that to include all rasters
calc = QgsRasterCalculator(expression, "/home/usr/Desktop/Output/final.tif",'GTiff',extent,numCols,numRows,entries)
calc.processCalculation()

When I try to execute the same code outside QGIS in a standalone script, I get no errors but there is nothing in my Output folder. What should I adapt in order to be able to run the script outside of QGIS?


texts:
I've recently ported a stand-alone 9.3 application to 10. Every thing works fine on my development machine but when the application got deployed (Citrix) I get an error at the following line:

IGxCatalog gxCatalog = new GxCatalog();

ESRI claims it can't cast GxCatalog to IGxCatalog?

I'm at a loss. Since this only happens when running in the Citrix environment I'm assuming its a problem with the install, but what could it be?


texts: Representing coordinates on non-earth globes in semantic data

texts: There are standards to represent geospatial data in the context of linked data, such as GeoSPARQL. However, I could not find a way to represent the coordinates that are not on Earth - such as, for example, coordinates of Moon objects. I.e., I need somehow to express the fact that the coordinate is not on Earth and provide a reference to what the coordinate refers to. Is there any standard that deals with that?


texts: Using ArcObjects ITextSymbol.GetTextSize in Python to define two input variables that get populated by method

texts:
I am using Python 2.6 and ArcObjects in ArcGIS 10.0 to build and draw, among other things, graphic text on the current display.  At one point I need to use the ITextSymbol.GetTextSize method.  In a function called BuildSignGraphic() have the following:
def BuildSignGraphic(pFeature, annoFC):
    .
    .
    pTextSymbol.GetTextSize(pDisplay.hDC, pDisplay.DisplayTransformation, txt, dblX, dblY)
    .
    .

When I run my code I get a name error:
NameError: global name 'dblX' is not defined
In VB.NET, the dblX variable would be explicitly declared, but Python doesn't do this.
Because the dblX and dblY variables are input and get populated by the method, how do I go about defining these two variables so that Python can recognize them?
This is an uncommon syntax for a method in ArcObjects, but I think it does occur elsewhere in ArcObjects.


texts:
Is there any way to do a strip map index on ArcGIS Pro?

This is for a pipeline route, Grid index doesnt work very well for this.


texts: Converting .csv file to file.shp using Python gives IndexError?

texts:
I have a file.csv like the following:

37.0925854357,14.3860984446,0.0000079572,0.0000939491,0.0000028935
37.0978554286,14.5199850398,0.0000041594,0.0000821038,0.0000047924
37.1029267200,14.6538928343,0.0000024414,0.0000677266,0.0000050637
37.1077992514,14.7878210195,0.0000094944,0.0000632959,0.0000020797

where the first two columns represent longitude and latitude.
The file.csv can be seen as an array of data having dimensions (nxm), where n is the number of rows and m the number of columns.In my case n = 1107 and m = 367. How can I convert it to a file.shp without defining all the fields?
To convert this file I used the following commands

import shapefile, csv

output_shp = shapefile.Writer(shapefile.POINT)
output_shp.autoBalance = 1
counter = 1
with open('path/to/file.csv', 'rb') as csvfile:
    reader = csv.reader(csvfile, delimiter=',')
    for row in reader:
        lon= row[0]
        lat= row[1]
        output_shp.point(float(lon),float(lat))
        output_shp.record(lon, lat)
        counter = counter + 1
# save the Shapefile
output_shp.save('path/to/output/file.shp')

I got this error:

File "/usr/lib/python2.7/dist-packages/shapefile.py",line 986, in record
if self.fields [0] [0] .startswith ("Deletion"): fieldCount - = 1
IndexError: list index out of range

How can I correct the code?


texts: Is there a simple table structure update procedure for a manipulated PostGIS layer under QGIS

texts: I have an intensive data exploring session using Postgresql/PostGIS as a backend and try to explore the results using QGIS. Within QGIS I have a defined a "complex" style to show the results. Sometimes it is nessesary to add data fields, for filter options or calculations for example. Unfortunatly are the adoptions not present in the current layer, loaded in QGIS.  Is there a simple way to refresh the table structure/content without removing, adding and restyling the existing vector layer?


texts: How to prepare oneself to show a polyline based on latitude and longitude information in a csv/json file with heatmap information too?

texts:
I am quite new to working with JavaScript as well as geo location systems.
I am looking for an open source JavaScript library to show - on the web - something very like the running trackers show you -
()
But with a slight twist. It is a citizen science project in early stages, and I wish to be able to show the ployline, colored (something like a heat-map, traffic congestion) based on a variable.
The data is gathered and pushed into a csv/json file - I am open to the format of file. It contains information like time, latitude, longitude, variable1, variable2 and so on.
The idea is that polyline is based on the latitude and longitude info and the color gradients are based on the variables.

I do not know yet how to integrate time into it too...but that is a question for another time.

I am quite frankly overwhelmed by the information and libraries and APIs I have found because I don't have a clue about the general terminologies (tiles, vector tiles, overlays, layers, tracking, routing, polyline) too when it comes to designing web applications like this.

I found the following libraries/apis -

Openlayers
TomTom
Mapbox GitHub,
Mapbox
Here
Leaflet
Maptiler
OpenStreetMap
Polymaps

I am not really interested in using Google Maps APIs. I want an open source and a relatively simple library.

JavaScript is a must as its a web application and i wish to make an automated system that dynamically updates when information is added to the data file.

I quite frankly don't know what is the need of subscribing to various APIs and getting their keys. Since I am already getting the lat and log info, I thought I could just include js libraries that plot that easily given the lat and long.

If you could point me out to a few resources for beginners that would explain those terminologies and let me understand the nuances of designing geo position information systems, it'd be great since I'd like to solve things on my own but I don't know the ABC of GIS.


texts:
I read your amazing solution in this topic Is it possible to connect to ArcSDE using QGIS?.
Unfortunately I'm not so expert in open-source products (we use only Esri suite) and I need to ask you some things.
- How can I create a .ovr file with my SDE connection?
- How can I add it to QGIS?


texts:
I'd like to know how deal with the ArcGIS Package information?
I have ArcGIS 9.3.1 and would like to know how to work with map packages, and layer packages.
Also how do I access it?


texts:
Does anyone know if there exists in QGIS any tool similar to "Tabulate Area" of ArcGIS to be able to calculate what percentage of values of a raster for each polygon?

So far I am using pktools, pkextract but the time it takes to process is huge, not acceptable for very large surfaces.


texts: QGIS 3.4.4 - PyQt 5 - Browsing button doesn't react with QFileDialog.getSaveFileName()

texts:
I'm trying to work through the tutorial : http://www.qgistutorials.com/en/docs/building_a_python_plugin.html to build a plugin in QGIS 3.4.4. and to implement it with PyQt5 (instead of PyQt4 library in the tutorial).

after many trials, research and errors I managed to get to step 24 of the tutorial but the problem is that once I've put the push button with Qt Creator, I've added some code in "__init__" :

def __init__(self, iface):
    [...]
    #for the ... button to be triggered
    self.dlg.lineEdit.clear()
    self.dlg.pushButton.clicked.connect(self.select_output_file)

Then, I've added the function "select_output_file" in order to select a file to put in my dialog window :

def select_output_file(self):
    #Called when the user presses the ... button
    filename,_ = QFileDialog.getSaveFileName(self.dlg, "Select output file ","", '*.txt')
    self.dlg.lineEdit.setText(filename)

I've added an underscore ,_ as QFileDialog.getSaveFileName() returns a tuple compared to the PyQt4 version.

After many searches and trials I can't figure out how to make this button work.


texts:
I have a vector layer of polygons (40K) and an elevation raster that I imported into PostGIS. I would like to get the average elevation value for each polygon. First, I imported my raster with my console:
raster2pgsql -s 2154 -C -I -M "K:\DATA\MNT\altitude.tif" -F -t 100x100 public.altitude_raster| psql -d db -U postgres -p 5432

My research led me to the St_SummaryStats clause which calculates a set of statistics (min, max, etc.) including my dear average.
SELECT  id, (stats).*
from (SELECT id, (ST_SummaryStats(a.rast, 1, true)) as stats
    FROM altitude_raster AS a, delete as b
    WHERE ST_Intersects(b.geom,a.rast)) as foo
order by 1

Although the query works, I am looking at some significant differences with the QGIS "Area statistics" tool. Sometimes I am several hundred meters above sea level of difference.

I also tested the following query which brings me much closer results than on QGIS, but with the appearance of inexplicable null values.

Was I wrong somewhere?


texts:
I just installed mapserver and mapcache on a Debian server. I struggled to put those two to work. Now when I call this url (by the way I don't know if it's the good one) //myserver/cgi-bin/mapserv/service/wms?map=/opt/basemaps/osm-google.map&mode=browse&template=openlayers, I get the map but it is just a single image ! no tiles. If the map appears this means my mapcache works fine ?
Is there anything i missed.

./mapserv -v
MapServer version 6.5-dev OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


texts: What is the format of these data files? CNT, LAB, PAL, etc

texts:
I was given data which is arranged in folders as shown in the following picture:

I am using ArcGIS 10.1. I believe feature datasets in ArcGIS only exist in geodatabases. But the datasets are arranged in folders. Can someone tell me the name of the format of the data? I want to use arcpy to merge datasets from every grid-sheet. I can merge .shp, .dbf files. But I do not know how to merge for example 2885/09/HYDRO_AR with 2885/10/HYDRO_AR in the given datasets. Because HYDRO_AR contains many files.


texts: How to find duplicate nodes in feature class using ArcObjects?

texts:
I am unable to find duplicate nodes in a Road network through my program.

I have a polyline feature class as Road, and i want to find duplicates nodes in it.
How can I generate a report of duplicate nodes from this Road?


texts: ArcGIS Dissolve leaving feature snippets in dissolved polyons. Repair doesn't fix

texts:
I'm trying to dissolve some low-level polygons, but the result I'm getting has lots of little pieces of lines left floating around in the output polygons. I've tried doing "repair geometry" on both the input featureclass (before dissolving) and on the output featureclass (after dissolve) and neither fixes the problem.

Any thoughts?

[Edit: Also: dissolve running without errors, oddly.]


texts: How to store a triggering action and events and call them when needed using python in qgis

texts:
Can anyone explain in detail how to store the triggering action or an event that take place in the mapcanvas in a variable and call the same when needed in python?

Say for example,say i have pushbutton named 'areapushbutton' and if a user click that button in gui, it should store that action in a variable called mapselection and now plugin would call the select feature by freehand tool inside qgis and user should be able to select some features in mapcanvas  such that it it should also store this event in a variable selectionevent which i could later use like,

if action = mapselection and event = selectionevent:
    call this method()

What i needed is i want to know **how triggering action as well as the event should be defined or initialised and stored in a variable?

How to call select feature by freehand tool using python?

afterwhich it should automatically navigates the user to mapcanvas and allow to select And where those should added in our main py file?**

I dont have any idea of how to accomplish this.


texts: How to create new raster from only the extreme scores of another raster? (Correcting errors in ASTER elevation data)

texts:
I'm fairly new to working with rasters. I found out that in my area the ASTER digital elevation data has a "bump" artifact in it, where there's a large (non existant in real life) bump in the elevation. I downloaded the SRTM elevation data, and although lower resolution doesn't seem to have the bump.

I thought about subtracting the STRM from ASTER data to see the difference between the two, and the result seems to have caught the bump pretty well.

Above is the result of ASTER - SRTM (difference result). The line features are footpaths in the area.

Now i'm struggling with how to correct the original aster data. I thought about subtracting this "difference result" from the original aster data, but this effectively just converts it to the STRM data. So then I though I'd only select the most extreme scores from the "difference result" so it would only correct areas where the two data sets are off.

My problems:
I don't know how to only select the extreme scores. (how do you calculate means and standard deviations of a raster?)

I don't know if this is a good way to do this. Any input would be helpful to solve this problem. I've found some journal articles that use machine learning to classify "bumps" etc. But that's too complicated for my purposes. I just want to more or less have it semi-accurate, don't need it to be perfect.

Extra thought:
What if I could make a "mask" from the extreme scores of the "difference result" and then just default to SRTM in those areas?


texts:
I use QGIS 2.14 (Windows, 64bit) and try to do some raster calculations with EUNIS habitat data, filter for specific habitat types, files are about 3 GB.

RAM: 8 GB (7,85 GB usable)
Virtual RAM: 8043 MB (automatic)

But there is always the following error: Raster calculator: Insufficient memory available for operation.

Any suggestions?


texts: Collapsing folder structure into single folder using ArcGIS ModelBuilder?

texts:
I have a single folder, let's call it Folder1, which contains multiple folders; FolderA, FolderB, FolderC.....FolderZ.

Folders A-Z each contain multiple file geodatabases. Folders A-Z do not contain any other file type or any other folders.

I need to copy all of the file geodatabases which are in folders A - Z into a single folder elsewhere on my local drive.

I am trying to do this in ModelBuilder as I have very little experience of python.

I thought that I would be able to easily achieve this by using a model (attached image "MainModel")and a submodel ("SubModel")

My main model has a folder variable set as the input parameter (this would be Folder1). This feeds into an Iterate Workspaces iterator. I have set this to only look for folders (here I want it to return FolderA, FolderB, FolderC....FolderZ).

I use the output workspace from here to feed into my submodel as a parameter.

The submodel has a folder parameter as the input (this is the "Workspace" from MainModel, in theory this should be FolderA, FolderB etc....). This then feeds into an iterate workspaces iterator and looks for FileGDB's. The "Worksapce" output then feeds into the copy tool which copies the geodatabase into a predefined folder on my local drive.

I can run the SubModel on its own and it works fine, i.e. I can point it to Folder A and it will copy all of the file geodatabases from FolderA into another folder. The problem arises when I try and work from the MainModel.

In MainModel, I can connect the "Workspace" output into the SubModel and it let's me select the "Folder" variable for this. However, the model doesn't fill with colour, and if I open the tool parameter window I see the error (attached "Error840" file).

I've tried changing the variables in each model to be folders or workspaces or a combination, and I've tried setting the iterators to look only for folders or only for GDB's or I've even left the "Workspace type" field blank. But nothing seems to work.

The only thing I've managed to do where I've had partial success is using a single model (attached "AlternateModel"). This uses the recursive option in the iterator properties and has Folder1 as the input Folder variable parameter.

This copies all the geodatabases as required from all the folder (A-Z), however, it also copies all the folders (A-Z).

Is there something simple which I am missing?


texts: Spatial extent not showing in geoentwork metadata record

texts:
I have a problem displaying spatial extent in Geonetwork when I open some metadata record (as you can see from the image example).
It must be emphasised that i have changed the base map from osm to a wms layer from geoserver in config file (data/ressources/map/config viewr.
Moreover i have deleted the line code of osm and other basemap  because geoentwork it's deployed on offline (No internet.


texts: Creating custom raster pyramid using ArcPy

texts:
I have an ArcPy script that runs the Point Density tool several times for the same extent, using the same number of neighborhood cells, but with cell size increasing at an multiple of 2 with each pass. The purpose of my point density rasters are purely data visualization, and I plan on publishing my point density visualization using ArcGIS Server 10.2.

The idea is to make the point density visualization more specific as you zoom in the map, e.g switching to point density raster of ever smaller cell sizes as you zoom deeper in, and the point density rasters become less generalized. This imposes a scale limit for each of my point density raster, much the same way as pyramid levels in a raster pyramid.

Is there a way I can build a custom raster pyramid and input my own point density rasters as the pyramid levels?

At the moment I have 7 scales for my rasters, meaning I would need 7 layers in my map service when really only one would be needed if I could generate my own pyramid.

I have tried to Google for Build pyramid tools and .ovr file management for arcpy, but so far I haven't found any solutions yet.


texts:
I got CSV data on analysed buildings containing object ID, materials etc. And I have vector file with spatial location of all buildings in the city containing as well object ID and some other attributes.

But issues is that in CSV table some object IDs are the same as for example some buildings have additional storage/shred but with different materials therefore different values. Example:

So when I join table to the vector layer, the join only recognises the value of one row even though in the vector layer there are same object IDs. Example:

I tried to give and new ID with row number but the problem is in vector layer I have more buildings then in CSV file so again the values are not connecting with corresponding buildings. Any other solutions?


texts:
I'm trying to import contours from SRTM HGT files.

First try (nice):

gdal_contour -f PostgreSQL -a elevation -i 10 srtm/S01W069.hgt "PG:host=volcano-db user=postgres password=guesswhat dbname=contour"

Second try (error):

gdal_contour -f PostgreSQL -a elevation -i 10 srtm/S03W071.hgt "PG:host=volcano-db user=postgres password=guesswhat dbname=contour"

ERROR 1: Layer contour already exists, CreateLayer failed.
Use the layer creation option OVERWRITE=YES to replace it.

I can't find any append option in my gdal_contour and I'm afraid that override will erase my previous data.


texts: Getting vector and raster metadata from PostGIS database?

texts:
im using php/postgres/postgis in a webapp, im wondering if its possible to get metadata from the db about all shp/geotiff table like (name, projection, type(ship/tiff), date, desc, owner etc ...) i already using geometry_columns table to get some of this data but is not enough for me.

i use this query :

SELECT f_table_catalog, f_table_schema, f_table_name, f_geometry_column,
   coord_dimension, srid, type
FROM geometry_columns;

Is that data need to be put in the file (shp/tiff) by the file owner (in production time) or is there a table that contain all this stuff ?


texts: Interpreting results from Join Attributes by Location (Summary) in QGIS

texts:
I have 2 layers

Map of Chicago by ZIP code
Vector data of grocery stores (obtained by taking the point data of grocery stores, converting it to a heat map, and then using Raster Pixels to Point to get the vector data).

When I use the join attributes by location (summary) process, with the Chicago map as the input layer and the vector data as the join layer, can I make meaningful interpretations of the values produced, e.g. is VALUE_mean from the resulting attribute table the average number of Grocery Stores per zipcode?
What are the units of the result?


texts: Converting multipart polygon to singlepart in ArcObjects with C#?

texts:
I have a multipart feature and I need to convert it to a singlepart feature.

Couldn't find any code sample.

I wonder if i could get some help from you?

I'm working with ArcGIS 10 and c#.


texts: Use command line to call an FME workbench from a python tool in ArcGIS

texts:
I have a Python script that I run in ArcGIS Desktop 10.2. I also have an FME workbench I use in part of the same process. I currently have to run half of the script, switch to FME then run the other half. I would like my script to call the FMW.

At present I'm trying:

cmd = '"C:\\Program Files\\FME201864bit\\fme.exe" "W:\\Entity\\ABZ\\Operations & Geosciences\\GSR\\GIS Data\\_Common-Data\\_Resources\\Tools\\MigMapCountourFiller.fmw" --SourceDataset_ESRISHAPE "\\\\main.glb.corp.local\\Data\\EP\\EMEA\\GB\\Group\\Data\\GIS\\Explo\\NewVentures\\Opportunities\\Winterton2018\\Migration\\2018-02-14_CarbMigFiles\\contours_l_1m.shp" --DestDataset_ESRISHAPE "\\\\main.glb.corp.local\\Data\\EP\\EMEA\\GB\\Group\\Data\\GIS\\Explo\\NewVentures\\Opportunities\\Winterton2018\\Migration\\2018-02-14_CarbMigFiles"'
os.system(cmd)

this is returning:

'C:\Program' is not recognised as an internal or external command, operable grogram or batch file. The system cannot find the path specialised.

I can see that the problem is the space between program and files but I dont understand why its ignoring my quotes.

I see there are multiple ways of accessing command line from python and that there is also FMEobjects but I haven't managed to get them to work. Am I trying the right thing but getting it wrong or should I be using a completely different method.


texts: If I selected (highlight) a feature or points would I be able to color that feature as as it is being highlighted?

texts:
The points on purple and lightgreen area I want to maintain them reds. The points outside that I want to color them yellow not just the highlighted ones.
How can I do that?


texts: How can I export or query all hospitals from Open Street Map?

texts: I'd like to extract all the hospital locations in the US from Open Street Map as a reference for my geocoding project. I know how to get all the OSM data for a small area with the QGIS plugin but not sure how to query a larger area?


texts:
I would like to pin (fix) the opened attribute table to the QGIS window or display the table on top. The attribute table is opening as another window (and it is possible to open the same attribute table as new window many times- it is unusable).  I cannot work with the map content and at the same time see the attribute table
Is there any solution?


texts:
I am trying to view 12-bit tiffs in ArcMap. The problem is ArcMap is forcing the 12 bit images into a 16 bit container. I can set the min/max values to 0-4095 in order to see the 12-bit range. I can do this for each image but that would take forever. Just seeing if there was an easier way to change this. I have found that I can create a layer file with the appropriate min/max symbology, and using ApplySymbologyFromLayer, apply that symbology to every image in the TOC.  However, this is still very time consuming on top of the time required to load my many images.  I have tried running this tool as batch, and through the python window with arcpy.mapping module.

Is there a way to set this type of symbology as default symbology prior to loading rasters into ArcMap?


texts: Structure of featureCollections vs. imageCollections in Google Earth Engine

texts:
I'm trying to learn about the basic structure of elements within Google Earth Engine, but I'm not finding the info online. GEE FeatureCollections and ImageCollections both contain a list of features. The features in each have their own properties. FeatureCollections also have properties for the entire collection, which ImageCollections don't appear to have. FeatureCollections also contain an element called "Columns", which, as best as I can tell, is simply a list of properties that are shared by each feature in the collection. Again, ImageCollections don't appear to have this.

If my summary of the structures of FeatureCollections and ImageCollections is accurate, why the difference in structures?

Example code:

// create a haphazard boundaries to subset landsat images so that collections are reasonably small
var bound = ee.Geometry.Polygon(
        [[[-98.93884992893464, 38.815418613614746],
          [-98.93884992893464, 38.20505462910476],
          [-97.81824446018464, 38.20505462910476],
          [-97.81824446018464, 38.815418613614746]]], null, false);

// load in a bunch of landsat data
var l4_coll = ee.ImageCollection('LANDSAT/LT4_L1T_TOA');
var l5_coll = ee.ImageCollection('LANDSAT/LT5_L1T_TOA');
var l7_coll = ee.ImageCollection('LANDSAT/LE7_L1T_TOA');
var l8_coll = ee.ImageCollection('LANDSAT/LC8_L1T_TOA');

// merge all the landsat data into a giant dataset
var merged_collection = ee.ImageCollection(
  l4_coll.merge(l5_coll).merge(l7_coll).merge(l8_coll)
  );

// filter all the Landsat data using the boundary polygon
var B_coll  = merged_collection.filterBounds(bound);
print(B_coll);

// load a featureCollection of political boundaries
var countries = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017');
print(countries);

which returns:


texts: Where can I find complete set of mapnik/mapbox fonts?

texts:
I think there is something I am missing here.  Many of Mapbox Products are dependent on font types I am not finding available in the resources.

For example, mapbox-studio-outdoors.tm2, relies on 'Arial Unicode MS Regular'. The mapnik fonts located at C:\mapnik-v2.2.0\lib\mapnik\fonts only contains 'Deja Vu-sans' by default.

From Mapbox github I can find a list of additional fontsets including opensans, crimson, source-sans-pro and more... But no 'Arial...' anything?

Where should I be looking for adding additional fonts?


texts: Does dissolving features improve geoprocessing efficiency?

texts:
I have a large set of line data (>140,000 features). Is there a processing advantage, in either time required or (more importantly) memory used:

to running Dissolve on the data before running Buffer?
to running Dissolve on the inputs to two Identity operations?

I would generally just wait until all the geoprocessing is finished and then do one Dissolve at the end. However, I'm debugging somebody else's very old script, and I am unclear on whether he was repeatedly dissolving everything for a reason (back in Arc 9.3), or just didn't think about the alternatives. (The same script repeatedly projects data between geoprocessing tools, so the logic is already questionable.)


texts:
I have problem with opening big .tif image(121gb) with ArcGIS Pro. Whereas it opens in QGIS without any problems.
ArcGIS Pro:

QGIS:


texts: Planetary-scale computing architectures for electronic trading: where is the data?

texts: In his intriguing TED Talk, How algorithms shape our world, Kevin Slavin shows this map from "Planetary-scale computing architectures for electronic trading" ... does anyone know if this data is available online?


texts: Removing first character from layers using ArcPy?

texts:
How to remove the "w" from these file geodatabase classes using ArcPy?

Tried this code snippet but does not work:

import arcpy
from arcpy import env
env.workspace = "C:\shared\NCWD\Testing\Castic_FGDB.gdb"
in_data = "wValve"
out_data = "Valve"
arcpy.Delete_management(out_data)


texts: What are some great examples of information dashboards integrated with core GIS capabilties via the web?

texts:
I am tasked with designing a GIS information dashboard (think energy consumption, capacity, or any other measurable value across a campus).  I would like to get a sense for what has been done well and what has not been done well.

For an example see the San Diego Energy Dashboard. Though this information dashboard is limited as it does not display much information on the same "page" (i.e., the map).

I am looking for dashboards with a focus on displaying a lot of information on one page with the option to drill down for more detail into other pages as needed. For non-GIS examples see Information Dashboard at Patternry.com

What are some other great examples of information dashboards integrated with core GIS capabilties via the web?


texts: OpenLayers 3 / LayerSwitcher: how to link each layer with its legend?

texts:
I can manage my layers by the LayerSwitcher panel. The legend is created by HTML, and I post it on the site by:

Document.getElementById ("legend") style.display = "block";

What I want: When I check or I uncheck the layer, its legend will appear or disappear. How can I do that?

 var layerSwitcher = new ol.control.LayerSwitcher({
    tipLabel: 'Légende' // Optional label for button

 });

  map.addControl(layerSwitcher);


texts: Google Maps API - .seticon size based on zoom level

texts:
I did look up this question on here but the answer used 'new google.maps.MarkerImage(' which has been deprecated, and I can't get anything else to work. I think it has to do with my array of markers, or my for loop to interact with the array of markers. I can change one marker by using: markerSantaCruz.setIcon(markerIconStar); where my for loop is below.
I also don't know if this is the best way to do what I'm trying to accomplish - and that is, just resize the icon image based on the zoom level. I was hoping to just change the scaledSize of the image, but I don't know if I need to recreate all of the markers or not.
Here is a link to the new documentation I was trying to use:
https://developers.google.com/maps/documentation/javascript/markers#convertingtoicon
Here is the original thread I was trying to replicate, first answer:
https://stackoverflow.com/questions/39066384/resizing-custom-image-marker-with-zoom-google-maps-api-v3
Here is my code:
var features = [
                  {
                    position: new google.maps.LatLng(-33.91720, 151.22630),
                    type: 'info'    //type is irrelevant right now
                  }, {
                    position: new google.maps.LatLng(-33.91530, 151.22820),
                    type: 'info'
                  }, {
                    position: new google.maps.LatLng(-33.91747, 151.22912),
                    type: 'info'
                  }
                ];

        var markers = [];
            for (var i = 0; i < 3; i++) {
                markers = new google.maps.Marker({
                position: features[i].position,
                icon: {
                url: 'https://i.imgur.com/OXFEl0T.png',
                scaledSize: new google.maps.Size(100, 100),
            },
                map: map
          });
        };

google.maps.event.addListener(map, 'zoom_changed', function() {

    var markerIconStar = { url: 'https://i.imgur.com/OXFEl0T.png', scaledSize: size2};
    var zoom = map.getZoom();
    var relativePixelSize = Math.round(zoom/22*50); //pixel size dynamically changes on zoom level

    size2 = new google.maps.Size(relativePixelSize, relativePixelSize);

        for (var i = 0; i < 3; i++) {
            markers[i].setIcon(
                var image = new google.maps.icon({
                  url: 'https://i.imgur.com/OXFEl0T.png',
                  size: size2,
                  origin: null,
                  anchor: null,
                  scaledSize: size2
            });
        };
        );
    });


texts: How can I catch a return Value from "Calculate Value" to start another Tool in ArcGis Model builder?

texts:
I have troubles with If/else statements in ArcGis Modelbulider. I have imported TauDEM Toolbox to work with D-infinity algorythm. Since D-Infinity only works with .tif raster files
I wanted to check first if the input raster is an .tif raster. After checking I want to start either D-infinity if the return value is true. If it's not, I want to convert it.
For that I tried to use the "Calculate Value" Tool with that code

check_if_Tiff("%DGM%")

def check_if_Tiff(DGM):
    import arcpy
    desc = arcpy.Describe(DGM)
    type = desc.format
    if type == "TIFF":
        return "true"
    else:
        return "false"

so far so good but I dont know how to catch the return values to use them in another tool.

I have previously read this documentation https://blogs.esri.com/esri/arcgis/2011/06/06/modelbuilderifthenelse1/ but I can't completely follow it. Do I have to do this with a python script or is there a way
like I am trying?


texts: Eliminating gaps and overlaps in layer of SpatiaLite table

texts:
I'm try to snap all polygons in a table to remove gaps and overlaps.

I can remove gaps but get new overlaps.

I have no idea what doing wrong.  I am new  in SpatiaLite.

I tried the following:

1 - generated the set of neighboring polygons

CREATE VIEW toques as
       SELECT "s"."cd_geocodi" as "geocodi",
              ST_UNARYUNION(ST_COLLECT(i.geom_sb)) as geom_sb
         FROM "T_SetBog" AS "s", "T_SetBog" as "i"
        WHERE "s"."cd_geocodi" != "i"."cd_geocodi" AND
              (ST_TOUCHES(s.geom_sb, i.geom_sb) = 1 or
              ST_OVERLAPS(s.geom_sb, i.geom_sb) = 1)
     GROUP BY "s"."cd_geocodi"

2 - fix the polygons to match the edges of neighboring (epsg: 4674)

CREATE VIEW setsnap as
       SELECT "s"."cd_geocodi" as "geocodi",
              ST_SNAP(s.geom_sb, i.geom_sb, 0.000001) as geom_sb
         FROM "T_SetBog" AS "s", "toques" as "i"
        WHERE "s"."cd_geocodi" = "i"."geocodi"

3 - fixes in the table

UPDATE "T_SetBog" SET geom_sb =
                 (SELECT geom_sb FROM "setsnap"
                   WHERE cd_geocodi = geocodi)


texts: Spatial search performance on a collection of Points in a PostGis database

texts:
Let's assume you have a huge PostGis spatial table (using Postgresql 9.2, postgis 1.5) :

  BIGTABLE ( p Point, someData varchar )

which contains millions of records.
Each record has been created with a Point and each point has an associated varchar data (let's call it the useful information).

Now, let's say there is another spatial table from which you also can get a Point field :

  SOMESEARCHPOINTS ( ... , p Point , ...)

For a given set of points from the SOMESEARCHPOINTS table (which are retrieved from a subquery on this table), I want to find the corresponding "someData" varchar using a JOIN.

SELECT * FROM SOMESEARCHPOINTS sp
LEFT JOIN BIGTABLE b ON ( XXXXXXXXXXX )

The XXXXXXXXXXX being the join condition.

The question is : without modifying the current schema (meaning without changing the geometry type), is it possible to have an efficient XXXXXXXXXXX join condtion ? If not, what is the proper way to do that ?


texts:
I have to create NDVI's for multiple raster images, and so want to find out the most efficient way to do it.

The code below works, but I wondered if there was a more efficient way to do it?

# Strip out the red and near infrared bands
arcpy.CompositeBands_management(input_raster + r"\Band_3", "raster_red")
arcpy.CompositeBands_management(input_raster + r"\Band_4", "raster_nearir")

# Create the ndvi numerator and denominators
arcpy.Minus_3d("raster_nearir", "raster_red", "numerator")

arcpy.Plus_3d("raster_nearir", "raster_red", "denominator")

# Set local variables
top = arcpy.sa.Raster("numerator")
bottom = arcpy.sa.Raster("denominator")

# Execute Divide
raster_ndvi = top / bottom

# Save the output
raster_ndvi.save("ndvi_result")```


texts: Dividing polygons into *n* number of groups of equal counts with ArcPy?

texts:
One of my tasks for work is to divide parcels into groups. These groups will be used by agents to talk to property owners. The goal is to make the agent's job easy by grouping parcels that are near each other together, as well as divide the parcels into equal numbers so that the work is distributed evenly. The number of agents can fluctuate from a couple to 10+.

Currently I perform this task manually, but would like to automate the process if at all possible. I've explored various ArcGIS tools, but none seem to suit my need. I tried a script (in python) that makes use of near_analysis and selecting of polygons, but it's rather random and takes forever to accomplish a semi-correct result that then takes me longer to fix than if I just did everything manually from the start.

Is there a reliable method to automate this task?

Results example (hopefully without the division we see in yellow):


texts: Inland shipping GPS data, flag upstream/downstream movement

texts:
In the context of greening the inland shipping industry I am analyzing GPS data on moving ships. For these ships I would like to separate the data for upstream/downstream movement (up/down river). This turns out to be less than straightforward.

I was wondering if someone might have a good idea of doing so.

The best I was able to come up with so far:

Make a list of GPS markers (manually) that tracks each (main) river and compare each ships location/motion with the markers: should work but marking the rivers/large open water sections might turn out to be impractical.
Look at the overall change in GPS location and see if the ship has moved towards/away from the source of the river: would be inaccurate for small ship trips and/or bendy rivers.

The first approach seemed promising to me but I wonder if one could somehow make use of existing maps and somehow use these?

Edit: The current plan is to extract waypoints for the typical ship-routes from a waterway map. These waypoints will have an id, the GPS lon/lat and the local upstream angle. To find out whether a ship is moving upstream we simply have to find the nearest waypoints and compare its angle of movement with that of the local upstream angle as given by the waypoint. I will let you know if we succeed and if so how.


texts: Automated islands within polygons in QGIS

texts:
I have a polygon layer containing  polygons vectorized from a raster image. After changing one polygon several smaller polygons are now contained within the first. I could now add a ring for every small polygon by hand using the snapping and tracing but this is very time consuming.

Is there a way to add all this rings automatically?

I use QGIS 2.14.3 with GRASS tools enables.

Edit: I added two examples of what I have now and what I want to get.


texts: Creating precise shapes using list of coordinates?

texts:
I am using st_concavehull to create boundaries/shapes. This works, however, the shape is not precisely tracing the coordinates. It is more puffy, as if trying to even out or "clean up" the actual shape.

How can I create a more cleaner/neater boundary? I've tried numbers from -1 to 1 and nothing seems to produce the actual shape I'm expecting; they all have curved edges and "cover" the coordinates instead of tracing them.

Example/My Code:

st_concavehull(
                    st_collect(array[
                        st_transform(st_setsrid(st_makepoint(-97.5660461, 30.4894905), 4326),4269),
st_transform(st_setsrid(st_makepoint(-97.5657216, 30.4902173), 4326),4269),
st_transform(st_setsrid(st_makepoint(-97.5608779, 30.4896142), 4326),4269),
st_transform(st_setsrid(st_makepoint(-97.5605001, 30.491422), 4326),4269),
st_transform(st_setsrid(st_makepoint(-97.5588115, 30.4911697), 4326),4269),
st_transform(st_setsrid(st_makepoint(-97.5588262, 30.4910204), 4326),4269),
st_transform(st_setsrid(st_makepoint(-97.5585742, 30.4909966), 4326),4269),
st_transform(st_setsrid(st_makepoint(-97.5578045, 30.4909263), 4326),4269),
st_transform(st_setsrid(st_makepoint(-97.5574653, 30.4908877), 4326),4269),
st_transform(st_setsrid(st_makepoint(-97.5571534, 30.4908375), 4326),4269),
st_transform(st_setsrid(st_makepoint(-97.5560964, 30.4907427), 4326),4269),
...

                    ]), -0.15)  as polygon
            ) concavehull
        ) );


texts:
I have a bunch of 1 bit rasters (700+) of scanned maps that I need to convert to 8-bit rasters.  It's the only way Geosoft will recognize the spatial coordinates of the TIF as they don't deal in 1bit Rasters.  The way I have done this in the past is to use the Copy Raster tool and check off the "Convert 1bit to 8bit" option.  It has worked well up to this point.

The result I'm getting today is a raster with one value (or no value, depending on how you look at it).  The symbology shows 16 as a high and 16 as a low, or sometimes it's 0 and 0.  I haven't figured out why the different results, but they are both undesirable.

These raster's are not georeferenced yet.

Does someone else know of a way to do this conversion?  Or do they know what checking off this option in the Copy Raster tool does compared to the "Pixel Type" combo box which has a choice for "8_BIT_UNSIGNED"?  Any insight would be appreciated.

Edit:
Here is an example of the Tif I'm converting, with it's symbology and the symbology of the converted Tif.

As you can see, there is definition in the original.


texts: Calculating GSD (ground sample distance) from zoom level and vice versa?

texts: I am an application programmer, a beginner in the GIS domain. I have an image with its ground sample distance parameter. I need to associate the zoom level with GSD. I am using MapBox.


texts: How to create parameter windows for custom geoprocessing tools?

texts:
I would like to create a geoprocessing tool with a custom GUI for its input data. To put it in other words: imagine that your client works mainly with arcmap documents and he already has an arcpy script which deals with the geoprocessing. Unfortunately he doesn't like building blocks which take parameters for the script (drop-down list, onelineinput etc.) and would like to have a custom input method like let's say a scrollbar (f.e. for selecting time interval instead of typing it manually or selecting from a list).

Is it achievable in ArcMap to have custom input GUI elements? I'm pretty sure it's not, but my colleague swears on everything that he's seen something like that.

Before I completely cross out that idea I wanted to have a confirmation from people who have spent more time working with ArcGIS. To my understanding the only solution is to create a standalone application using Runtime SDK or ArcObjects/ArcEngine.


texts: How to clip data when using data driven pages in ArcMap 10?

texts:
I am working on a map book using data driven pages of the Silvies Valley in Northeastern Oregon. The basemap is a high resolution aerial image (raster) of Oregon with a shapefile overlay of USGS geologic map units. I neglected to clip the dataframe before I set up the data driven pages.

Now I would like to add contours to the map. I am using the contour tool in the raster surface toolbox,...the process has been running for about 8 hours now. I understand this is because the raster is so big.

My problem is, as far as I understand, if I turn off data driven pages in order to clip the dataframe, I will lose the data driven pages settings. This is not that big of a deal for me, but I would rather not do the work again.

My question is, how do I clip the data to the dataframe, while I have data driven pages set up?

Thanks in advance for the help,
JL


texts: How can I extract contours from a raster with Python?

texts:
I currently run gdal_contour as a Python subprocess to extract contours from a raster file, but would like to achieve the same function with a combination of Rasterio, Shapely and Fiona.

However, once I've used Rasterio to read the raster, I'm not sure how to extract the contours.

Can anyone point me in the right direction?


texts:
I am using RADAR data to create a map of biomass estimates.

I want to mask out all land susceptible to flooding because water-logged soils affect the backscatter ...and will have an impact on biomass estimate. For part of this process I just want to mask out flood-prone areas around waterbodies.

This will be a very basic operation (because I am doing it over a very large area) and I am happy if it means that I mask out regions that don't get flooded.

I have:

a DEM for the region in question
a binary raster of water bodies/non-water-bodies area

My suggested approach is to mask out all cells in the radar raster that lie within x-metres of height of the waterbodies.

I am using QGIS but have not been able to identify a simple solution to do this. Can anyone help?

.....One of my thoughts had been to identify the drainage basins of the water bodies and mask out all cells within the basin that lie within x m of the water body ....this is problematic for rivers...which have a full range of heights/drainage basins.


texts:
I had my GeoSever server working properly and then I removed anonymous access but now I can't access even the login page anymore ...

Now it looks like:

http://host:port/geoserver/web/wicket/bookmarkable/org.geoserver.web.GeoServerLoginPage?Error=false

What should I do?


texts: Bathymetric-topographic DEM color relief?

texts:
I am using QGIS 2.12 on a Macbook Pro running OS X 10.10.5.

I have an interesting DEM for the California coast (which I downloaded from Santa Barbara, CA 1/3 arc-second MHW DEM.

I've been playing with color ramps for this. How can I get the colors to change smoothly yet still break from blues to greens exactly at sea level (elevation zero)?

The only way I have succeeded in getting a precise break at the shoreline (sea level) is to have discrete color changes. But that does not look good at all in areas away from the shoreline.


texts: How to create segments/lines by inputting coordinates

texts: I have a set of coordinates and I wisht to recreate them in GIS. Basically, I am following from a paper based sketch map of maritime delimitation.


texts: Calculating area of polygon within Buffers in ArcGIS for Desktop?

texts:
I've created 2km buffers around 108 points and clipped habitat maps to these buffers, as per instructions given. I now need to calculate the area of each polygon of each habitat type within each buffer and I've very lost on how to do this.

When I clipped the habitat map to the buffers the attribute table produced gave the area of each individual polygon (all >2000 of them) but there's no field in the table to say which buffer the polygons belong to and I cannot think of a way to add a field like this in.

I've tried summary statistics to get the area but this gives total area from all buffers when I need the areas for the habitats within each buffer.

My supervisor told me to add an additional field to each layer file and the ‘calculate geometry’ function to calculate the area for each habitat type within each buffer. However, I can't add the names of the habitats as fields to the table as the names are too long. When I shortened the names and tried this, it calculated an area for all the habitats, not just the habitat in the field heading.

The other suggestion was to use the Tabulate Areas function of the Spatial Analyst extension in Arcview to calculate the area of each buffer occupied by the habitats it overlapped with - however, I don't have this extension so I can't do this.


texts: Map tiles and max/min latitude and longitude

texts:
I'm trying to build a map based on a center point lat/long, the map will always be a fixed size say 1024 by 1024. The user can chance the center point and zoom.

If I populate the map with map tiles from map quest for example, is there someway I can know the max/min latitudes of the map currently being displayed?

I want to know this so I can accurately project things onto the map.

Thanks


texts: Split a polygon based on density of points in ArcGIS 10.1

texts:
I have two layers:

Polygon layer representing administrative boundaries
Polygon layer representing topography (i.e. a map)

In some of the administrative areas, the buildings (shown in the map) are grouped in one area while the rest of the area is something else. I would like to split the administrative area into two, one containing all the buildings and another containing no buildings. See diagram.

I created a union between my two layers and then dissolved to create a third layer which identified the "building/not building" for each administrative area, this is close to what I want except that it doesn't create a single cut, but creates a complex shape that wraps around each building and go along roads etc.

I have a few thousand polygons like this so I would like to be able to cut them automatically.


texts:
In ArcGIS 10.3 Desktop, how do you replace field values with Null using the Field Calculator without selecting the rows first?

I'm able to select the rows that I want and calculate using the Field Calculator, e.g. field_value = Null. However, if I try to use replace() I get errors.

field_value = replace([field_value],0,Null)

Error:

  Invalid use of Null:'replace'


texts: How to find the concave hull for a cloud of points in 3D space?

texts:
The existing algorithm for convex hull is not able to capture the feature for a set of 3D points. Moreover, I found few mathematic tools have this function to obtain the concave hull and their responding points.

Given the data of spheres:

x1 y1 z1 radii_1

x2 y2 z2 radii_2

...

xn yn zn radii_n

Any idea?

Update 1:

I found a 2D algorithm, it works fine depending on the threshold value. However, I need the 3D algorithm.


texts:
I have a form HTML, e.g. like this:

<form id="form" method="post" action="#">
        <input class="sidebar__input" type="text" name="lat" id="latitude" />
        <input class="sidebar__input" type="text" name="lng" id="longitude"/>

        <input type="submit" id="button" value="Submit" onclick="onLoadConfigPress(document.getElementById('button').value)" />
</form>

Now, I want to pass latitude and longitude value to the center option in Map object:

var map=mapboxgl.Map({
   container: 'map',
   style: 'mapbox://styles/mapbox/streets-v9',
   center: [longit, latit],  <------ **HERE**
   ...

when I click on Submit button in HTML form.
What API Mapbox I must to use to pass latitude and longitude value to the center option? How to do?


texts: I am trying to create 3D maps. I have raw 3D point cloud data but unable to convert it to any GIS data format such as GeoJSON. How should I store 3D information in GeoJSON format?


texts: Looking for .Net alternative to Mapxtreme

texts:
I'm pretty new to the GIS area.
I was involved in a project that used MapXtreme server and MapXtreme SDK to query the tabs (as in SearchNearest , SearchInRadius etc...)
I'm looking for an open source alternative that I can integrate in .Net web app that will use OpenLayers + Tile Cache and I'll be able to query Tab (or Shape) files after the user pin the map.

Thank you in advance