texts: Why is query to retrieve WKB on Oracle Spatial returning null?

texts:
I am beginner on GIS, and I have loaded a shapefile to MSSQL, PostGIS and Oracle Spatial (11g)

On both MSSQL and PostGIS I could create a query to return me the WKB from the table (geometry field)

The equivalent query on my Oracle should be this one:

select l.GEOM.Get_WKB() from LINK l

This returns all records as (null). The same thing on other databases return the binary data (represented on hexadecimal)

If I try:

select l.GEOM.Get_WKT() from LINK l

it does not return the text representation.

I know the data is there, since using ADO connection I could retrieve the data from the Geom field (object) and each coordinate from the ORDINATE varray. I have used GeoRaptor to load the shp file to the database.

What is the right way to create a query to retrieve the WKB from Oracle Version 11.2.0.2.0?


texts: Create loop that create new imagecollection based on calculation of previous imagecollection

texts:
I have imagecollection from sentinel which I would like to run few processes on it by using loop. I know what are the steps of the loop that I want and I have written draft that ia full of errores and I would like to get help in writing it correct.

The needd steps are:

apply the next function on each image:

//Apply Frost filter for speckle correction
function Frost(image, frostDamp, ksize)
// Frost is really a simplified version of GammaMap
// Make sure to pass the frost damp factor (frostDamp) as a NEGATIVE number
{
  // ~~(ksize/2) does integer division in JavaScript
  var distance_kernel = ee.Kernel.euclidean(~~(ksize/2));

  // Square kernel, ksize should be odd (typically 3, 5 or 7)
  var weights = ee.List.repeat(ee.List.repeat(1,ksize),ksize);

  var kernel = ee.Kernel.fixed(ksize, ksize, weights, ~~(ksize/2), ~~(ksize/2), false);

  // Get mean and variance
  var mean = image.reduceNeighborhood(ee.Reducer.mean(), kernel);
  var variance = image.reduceNeighborhood(ee.Reducer.variance(), kernel);

  var B = variance.multiply(frostDamp).divide(mean.multiply(mean));

  var W = B.exp().reduceNeighborhood(ee.Reducer.mean(), distance_kernel);

  return image.multiply(W).reduceNeighborhood(ee.Reducer.sum(), kernel).divide(W.reduceNeighborhood(ee.Reducer.sum(), kernel));
}

calculate new imagecollection , for each image ,each pixel will be calculted as folloing:

//here I would like to run calculation for each image in my imagecollection:
var calc=i.expression(
  '3.75-(-0.521*VH)+(0.34*VV)+(3.12*NRPB)', {
    'VH': i.select('VH_sum'),
    'VV': i.select('VV_sum'),
    'NRPB': VH.subtract(VV).divide(VH.add(VV)).rename('NRBP')
});

all of it will create new imagecollection.

I have tried to apply the first function using this:

var FrostDB=clippedSAR.map(function(im){
   return im.Frost(geometry);
});

but got this error:

  im.Frost is not a function

My end goal is to create one loop that can run all the mentioned processes on an imagecollection, and also to get deeper understanding of loops in GEE


texts: Calculating Quarter (Q1, Q2, etc) using Date field in ArcMap Field Calculator?

texts:
I am using ArcMap 10.0 and making a map where I symbolize on annual quarter (i.e. Q1 2013, Q2 2013, and so on by quarter through 2015).

If a date field contains this: 01/15/2013, and I wanted to create a new field called QUARTER, that would contain the quarter in which the date falls, how could I do that?

Right now I'm just definition querying a range of dates, but surely there is a way to just calculate Quarter, right?


texts: Creating lines from 3D polygons in ArcGIS

texts:
I have a task to Create simple lines from 3D polygons (pipelines created in 3D Modeling program) to operate them in ArcGIS.

What tools can be used to perform this?


texts: How can I use QGIS's Saga watershed algorithm's "Borders" to extract from point cloud las?

texts:
How can I get the boundaries of the "Borders" returned by QGIS's SAGA watershed algorithm?

So that I can extract/classify the areas inside borders from point cloud .lases?


texts: I want to publish my map  is created in QGIS 1.7.4 version on to the web.Can u pls suggest me how to publish the map with proper documentaion and screen shots if possible?


texts: Executing tool comes back with an error arcpy.JoinField_management

texts:
I have this script snippet, written by Aaron.

import arcpy
import os

#set workspace
arcpy.env.workspace = "C:\\Users\\Documents\\Wetland\\New_Folder" #in the folder "New_Folder" is a geodatabase which contains all the shapefiles
ws = arcpy.env.workspace

#create a list of features
fcl = arcpy.ListFeatureClasses()

#loop through the list
for fc in fcl:
    basename = fcl.split("_")[0] #split name of features and only take the first word as a basename

    in_data = os.path.join(ws, basename + "_clip_diss.shp") #The table or feature class to which the join table will be joined.
    in_field = "WLType" #The field in the input table on which the join will be based.
    join_table = os.path.join(ws, basename + "_clip_full.shp") #The table to be joined to the input table.
    join_field = "WLType" #The field in the join table that contains the values on which the join will be based.
    fieldList = ["area_ha"]

arcpy.JoinField_management(in_data , in_field , join_table , join_field, fieldList)
#JoinField_management (in_data, in_field, join_table, join_field, {fields})

It does not come back with an error message, but it does not do the join neither. It runs but there is no result. No join.


texts:
I try to set qgis-server by OsGeo4w-install from internet on windows.
But the browser show link this [![brower show][1]][1] when I visit http://localhost:8888/cgi-bin/qgis_mapserv.fcgi.exe?MAP=C:/OSGeo4W64/apps/qgis/bin/world.qgs&LAYERS=countries&SERVICE=WMS&REQUEST=GetMap&CRS=EPSG:4326&WIDTH=400&HEIGHT=200.
and the Apache error.log show:
[Tue Mar 16 01:05:52.653976 2021] [cgi:error] [pid 13192:tid 1852] [client ::1:54190] AH01215: proj_create_from_database: Cannot find proj.db\r: C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe
[Tue Mar 16 01:05:52.653976 2021] [cgi:error] [pid 13192:tid 1852] [client ::1:54190] AH01215: proj_get_authorities_from_database: Cannot find proj.db: C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe
[Tue Mar 16 01:05:52.653976 2021] [cgi:error] [pid 13192:tid 1852] [client ::1:54190] AH01215: proj_as_wkt: Cannot find proj.db: C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe
[Tue Mar 16 01:05:52.654975 2021] [cgi:error] [pid 13192:tid 1852] [client ::1:54190] AH01215: proj_create_from_database: Cannot find proj.db: C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe
[Tue Mar 16 01:05:52.654975 2021] [cgi:error] [pid 13192:tid 1852] [client ::1:54190] AH01215: proj_create_from_database: Cannot find proj.db: C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe ```

If it is a GDAL or proj problem, then how do I fix it?

  [1]: https://i.stack.imgur.com/rFN0C.png


texts:
I am using ArcGIS 10.1 desktop on Windows 7 and I want to run few task automatically.

Scenario:  I have plane table from sql server contains lat,lon information. I have added that table in ArcMap and displaying x,y points by right clicking on that table and generating  x,y layer that work fine for me.

Now when DBA inserts few records to that table the table is auto updating but not those points (I need to right click on that table and generating x,y layer)

I want to make this process automatic (through scheduler in windows 7 & I thought that ModelBuilder would be the best way for this and creating the ModelBuilder and referring this link

Is this a correct way or is there any alternate way available for this?


texts: Converting to Parcel Fabric - Extra lines, verticies, and the clean up process

texts:
I am currently taking my first stab at trying to convert our City's parcel layer into a parcel fabric.  From what I understand, our DWG is converted to vector and ArcGIS processes.  It does not come in as a coverage or shape.  A lot of the linework was done years ago, and not much of it has been redrawn within AutoCAD.  I'm trying to clean up 717k objects...

The first step I did was convert the polygons to lines.  Using a series of tools (generalize and lines and curves) I'm slowly cleaning up the line work.  I've zoomed into approximately a 1 sq mi. region, run the tools, fix any errors manually that it cannot fix, such as arcs displayed at jagged lines.  When I have no errors, I continue.

After reading about splitting polylines and checking curves in the staging process, it says that parcel lines must be two point lines or curves representing a single boundary.  I've reduced lines with extra vertices where needed, but after running the tools listed above, I'm left with a lot of multiple 2 vertex lines (end point/end point) which make up a boundary (see photo).

Is this acceptable for the fabric?

Will I generate errors still?


texts: Getting tabular statistics from table using QGIS?

texts:
Are there QGIS tools that will allow users to get tabular statistics from their table?  I kind of expected I would be able to just open the table, select the field I was interested in, right-click on the field header and get something similar to this (screenshot taken from ArcGIS):

More specifically, I am looking for a QGIS alternative to the ArcGIS Frequency and Summary Statistics tools, that offer a host of other stats you can retrieve about the tabular data.

Just after asking, I found this QGIS Tutorial (see section 4.2 ) that describes how to find this functionality... Vector > Analysis Tools > Basic statistics.  I also found Vector > Analysis Tools > List Unique Values right next to it.  This gets me the list of unique values, but I would also like to see an additional column of frequency (count) of each unique item.  Is this similar tool available "out-of-the-box"?


texts: Discrepancies in remotely sensed indices using Sentinel 2 Level 1C imagery

texts:
I am hoping to derive a variety of vegetation indices for grasslands in Peru using Sentinel 2 data for one cloud free image in June 2016. But most of my indices are not in the range of the index. For example,

CRI 1- theoretical range is 0-15, range determined is -0.012 to 0.010
EVI- theoretical range is -1 to 1, range determined is -10755 to 10515
EVI 2- theoretical range is -1 to 1, range determined is -0.84 to 2.016
SAVI- theoretical range is -1 to 1, range determined is -1.31 to 1.31
MSAVI- theoretical range is -1 to 1, range determined is -5.506 to 1.43

Using raster calculator in ArcMap, I have appropriately used Float() and also multiplied all variables to 1.0 to overcome the data type problems. Also, I have checked to see if extreme index values pixels are clouds, or edges etc, but they happen to be within the image itself i.e for example EVI 2 values >1.0 are green vegetation pixels itself.

How do I determine is the indices I have calculated are correct? If not correct, what is the right to calculate each.


texts: Creating traffic intersection polygon from arc endpoints in ArcGIS for Desktop?

texts:
I am trying to make a polygon of the boundaries of traffic intersections using a python script. I want to automatically create intersection polygons made of arcs and lines connecting them. Essentially, what I need to create are lines labeled in red below to finish off the polygon.

How do I make the script "know" which two arc endpoints to connect to make the red lines? If I create a line between each point and its nearest neighbor, it could mess up if one road is wider than the other. Also, how could I make the line extend perpendicularly from the ac endpoint until it hits the other end of the intersection?


texts: Code in python for arcgis to select multilines (path) and vertexes

texts:
I am learning to write Python code for ArcGIS 10.2.

I have some shp poly lines file, need to learn how to write multiple selection of those lines, even if a cursor of mouse pressed not exactly on line but near of it.
By selecting one vertex, on the cross place of lines should be selected all the vertices.

Any ideas of algorithms and methods, or reading materials?

I am not familiar with programming algorithms, but I know Python.


texts: shp2pgsql srid 2262 polygons NOT in geocordinates

texts:
Imported the following shape file:

shp2pgsql -c -s 2262 MCGIS_Towns_Villages public.towns | pgsql -d database

Queried:

SELECT gid, name,st_astext(the_geom) as the_geom FROM towns

The multipolygon I get back is does NOT have points that are in latitude longitude types of numbers.

If I do:

 SELECT gid, name,st_askml(the_geom) as the_geom FROM towns

The data I get back has latitude and longitude type of data.

Why is this?


texts: Geocodes fails when published to ArcGIS Server

texts:
I have a composite address locator that was built using our streets line file and our address points that works great in ArcMap 10.1 sp1. But when published to ArcGIS Server (10.1 sp1) no results are ever returned, whether in a REST environment or within a map service. I've gone through the esri help files and it doesn't appear that I am doing anything wrong. (This is the first time I've ever published one out.) Has anyone else had this problem, and if so, how did you fix it? Is it due to it being a composite? As a side note, I did publish out the individual address locators and those too didn't work.

Thank you in advance


texts: Render all geometries in an array from geometry generator / QGIS expression editor

texts:
I have a line layer and want to add a series of 10 single sided buffers with increasing distance: 1, 2, 3... to 10. With geometry generator, I created this valid expression:
array_foreach(
   generate_series(1,10,1),
   single_sided_buffer(
      $geometry,@element)
)

The output of this is an array of geometries. I can get the geometry with array_get( array,index), but like this it's only possible to render one geometry. However, I would like to display all 10 buffers, thus collect all ten geometries contained in the array. How is this possible with expressions?


texts: Leaflet pass geoJson parameter to onEachFeature method

texts:
I created geoJson object as below:

var geoJson= L.geoJson(groupingLevelType.type, {
                style: style,
                onEachFeature: onEachFeature
                });

    function onEachFeature(feature, layer) {
                layer.on({
                    mouseover: highlightFeature,
                    mouseout: resetHighlight
                });

    function resetHighlight(e) {
                geojson.resetStyle(e.target);
            }

In resetHighlight method I want to reset style of geoJson.How I can pass geoJson as parameter to onEachFeature method.Or there there is any other way separate onEachFeature from creation of geoJson to be able to reset style?


texts: What's the correct syntax to use Processing gdalogr:merge from python?

texts:
I am using gdalogr:mergein Python console in order to merge to rasters (.tif) But I don't really understand the first parameter, where I have to put two variables.
I get the following error:

Unable to execute algorithm
Wrong parameter value: ras1; ras2
None

import processing
from processing.core.Processing import Processing
from qgis.core import *
from qgis.gui import *

ras1 =QgsRasterLayer("H:/pyQGIS/DATA_U6/mdt_483.tif","MDT483")
ras2 = QgsRasterLayer("H:/pyQGIS/DATA_U6/mdt_508.tif", "MDT508")

QgsMapLayerRegistry.instance().addMapLayers([ras1])
QgsMapLayerRegistry.instance().addMapLayers([ras2])

merj = processing.runalg("gdalogr:merge",'ras1; ras2', False, False, 4,"H:/pyQGIS/DATA_U6/mdt_mosaico.tif")
print(repr(merj))


texts: Keeping Google Earth Pro always facing North Up?

texts:
I'm frustrated to press R or N every time I navigate through the Earth. Any way to make the Earth face always towards the north by default?

I'm not talking about the street view tilt. I just want the compass to always face north.

I'm on Windows desktop


texts: Intersecting with then without a buffer in ModelBuilder

texts:
I'm pretty new to ModelBuilder and trying to create a model in which I take a point layer and intersect it with a polygon layer.
Basically, I need the model to first run an intersect with no Search Radius, then run it again with a search radius of 100 m, but only include points that haven't already been picked up in the first intersect run. I've tried using an 'If Field Value Is' function (where Join_Count=0) but no luck.


texts:
I am using the ArcGIS Silverlight API to edit data in an ArcSDE SQL Server geodatabase.

I have been told that any editable feature classes must be registered as versioned in ArcCatalog before they can be edited via the Silverlight API.

Does anyone know why this is the case?  From what I understand, you can not use the Silverlight API to edit versioned data in a feature class, so I'm not clear on why you would have to register the feature classes as versioned.


texts: Shapely polygons crossing the antimeridian

texts:
Sample data

Consider the following WKT Polygon, crossing the international dateline (antimeridian):

  POLYGON((176 49,-65 49,-65 11,176 11,176 49))

And the following points:

POINT(-140 32) # Inside the polygon
POINT(0 32)    # Outside the polygon

The problem

Shapely considers this polygon to span on the other side of the planet - covering Asia and the Atlantic, rather than the US and the Pacific. Therefore, it fails to calculate its centroid and tell whether points are inside or outside it:

from shapely import wkt

polygon_wkt = 'POLYGON((176 49,-65 49,-65 11,176 11,176 49))'
point_in_polygon_wkt = 'POINT(-140 32)'
point_outside_polygon_wkt = 'POINT(0 32)'

polygon = wkt.loads(polygon_wkt)
point_in_polygon = wkt.loads(point_in_polygon_wkt)
point_outside_polygon = wkt.loads(point_outside_polygon_wkt)

print polygon.centroid                         # POINT (55.5 30) - Wrong!
print polygon.contains(point_in_polygon)       # False - Wrong!
print polygon.contains(point_outside_polygon)  # True - Wrong!

What have I tried

Using PostGIS - I get the same erroneous results.
Playing with Shapely arguments - couldn't manage to "wrap" the polygon to the other side of the planet.
Reading The International Date Line wrap around. To be frank, there does not seem to be an answer there (Except for splitting the polygon).

My question

How can I calculate the centroid, bounding box, and inside/outside predicate for a WGS84 polygon optionally crossing the international dateline (longitude 180 / -180)?


texts: Populating turn feature class without having turn tables

texts:
I would like to insert a turn feature class to my network.

I have created the tool but cannot populate it.

When I created it as a standalone shapefile arcgis tells me that it is not part of a network, whereas when i create it in a network dataset it tells me that the first node could not be snapped on the edge.

any ideas?


texts:
I'm trying to get layer from gdb - make buffer, then convert it to raster.
Here is my code:

import os
import processing
from qgis._core import QgsProject, QgsRasterLayer
from qgis.utils import iface
import uuid
gdbPath = 'path_to_my_gdb'
inputs = [
    {
        'layer': 'l1'
    },
    {
        'layer': 'l2'
    }
]

for i in inputs:
    buff = processing.run("native:buffer", {'INPUT':gdbPath+'|layername='+i['layer'] ,'DISTANCE':1000,'SEGMENTS':5,'END_CAP_STYLE':0,'JOIN_STYLE':0,'MITER_LIMIT':2,'DISSOLVE':False,'OUTPUT':'memory:'})
    print(buff['OUTPUT'].source()) #reurns: Polygon?crs=EPSG:2180&field...
    rast = processing.run("gdal:rasterize", {'INPUT':str(buff['OUTPUT'].source()),'FIELD':'OBJECTID','BURN':0,'UNITS':0,'WIDTH':6000,'HEIGHT':6000,'EXTENT':'544467.3539542153,555274.7214882236,210235.32501431665,216789.69148822338 [EPSG:2180]','NODATA':0,'OPTIONS':'','DATA_TYPE':5,'INIT':0,'INVERT':False,'OUTPUT':'/tmp/processing_5faae479f2bf42bbb6a3466fa8ac1332/test/OUTPUT_'+i['layer']+'.tif'})
    iface.addRasterLayer(rast['OUTPUT'],'test')

Buffer is correct, but rasterize doesn't work - i just get 'Seems there is no valid script in the file' and there is no output , anyone can help?


texts: Create Circle and Marker on Click in OpenLayers

texts:
I want to create a marker and buffer around it with a given radius on map click event. Marker is displayed successfully but the polygon doesn't display. I guess there is problem in projection setting. Here are the projection settings for my map.

projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG: 4326")

The event handler is as under.

    {
    radius = 3000;
    var sides = 50;

    if (!markersLayer) {
        markersLayer = new OpenLayers.Layer.Markers("Markers");
        bufferLayer = new OpenLayers.Layer.Vector("Buffer Layer");
        map.addLayer(markersLayer);
        map.addLayer(bufferLayer);
    }
    position = map.getLonLatFromPixel(e.xy);

    //Create Marker
    var size = new OpenLayers.Size(15, 15);
    var offset = new OpenLayers.Pixel( - (size.w / 2), -size.h);
    var icon = new OpenLayers.Icon(iconURL, size, offset);
    var marker = new OpenLayers.Marker(position, icon);
    // Cleanup Markers First
    markersLayer.clearMarkers();
    markersLayer.addMarker(marker);

    //Create Polygon
    var circle = new OpenLayers.Geometry.Polygon.createRegularPolygon(position, radius, sides, 0);
    var circleFeature = new OpenLayers.Feature.Vector(circle);
    var circleFeatures = [];
    circleFeatures.push(circleFeature);
    // Cleanup Features First
    bufferLayer.removeAllFeatures();
    bufferLayer.addFeatures(circleFeatures);
}


texts: Entering stops in published multimodal ArcGIS network service?

texts:
I have created a multimodal network that works fine in Desktop, but my question is more related to publishing a multimodal network dataset as a network service. I have looked for an example of this, but have failed to find one. When the multimodal dataset is published, I have entered x,y coordinates already confirmed and working in Desktop, yet I am receiving an error when I try to return the route saying the stops are not valid.

Do I need to send an attribute with the feature to identify which mode that geometry should snap to?

I am using ArcGIS 10.1 REST API.


texts: Restoring labels to the default position?

texts:
I've been moving point labels around in qgis3, and I wonder if there are some way to back all them to their default position. And beyond: Can I switch between label ubications?
Lest's imagine I want them over the point sometimes and others linked to the point with a line, but away from the point. I already know how to make the line link.


texts: Using "Show" property in Cesium to turn on and off layers doesn't reflect on viewer

texts:
I am visualizing a geoJSON datasource in Cesium.  I have tied it to a checkbox to modify the "show" property in order to turn it on and off after it is added to the viewer (not adding/removing the data source), however it seems like altering the "show" property alone does not actually hide or show the datasource.  This is my function (handleclick is the function tied to the checkbox element):

function handleclick(cb) {
if (cb.checked === true) {
    console.log(cb.id + " is checked")
    for (var i in viewer.dataSources._dataSources) {
        if ("chk_" + viewer.dataSources._dataSources[i]._name == cb.id) {  //match checked box to datasource ID
            viewer.dataSources._dataSources[i].show =  new Cesium.ConstantProperty(true)  //show layer?
        }
    }
} else {
    console.log(cb.id + " is unchecked")
    for (var i in viewer.dataSources._dataSources) {
        if ("chk_" + viewer.dataSources._dataSources[i]._name == cb.id) {
            viewer.dataSources._dataSources[i].show =  new Cesium.ConstantProperty(false)  //hide layer?
        }
    }
}

Do I need to update the viewer somehow after the "show" property (referenced at https://cesiumjs.org/Cesium/Build/Documentation/GeoJsonDataSource.html#show) is changed in order for the data to be hidden?


texts: pyQGIS 3.0 script not running with processing import

texts:
I have problems using version 3 of QGIS with Python 3. I followed different tutorials like this one :
how to use pyqgis processing runalg clipvectorsbypolygon

But it seems to be working only with QGIS 2.XX and not 3.0. Here is what I try to run :

from qgis.core import *
import PyQt5.QtCore

import sys
sys.path.append('C:/QGIS 3.0/apps/qgis/python/plugins')

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

import processing

qgs.exitQgis()

But I get on PyCharm the error message : "Process finished with exit code 1".
I don't understand what is missing in my code. Can you please explain me how to use processing library with independent pyqgis scripts ?


texts:
I have an old script that used to connect to a postGIS DB and basically perform:

$sql="select *
from mobile.regions_ne
where intersects(geom_wgs84,GeomFromEWKT('SRID=4326;POINT (".$lng." ".$lat." 0)'))";

However, since we have moved to ZF2 and no longer connect to any databases (we only parse feeds now), we cannot perform the intersects call.

Our application uses Doctrine, and always creates a sqlite DB. The module is run on linux servers for our live web app, as well as on local machines that run Windows with the Node Webkit version of our app.

How can we easily perform the same code in PHP without using postGIS? If it's not possible, then it looks like we'll need to create an intermediary service that we would use on the production server to parse the feed AND connect to a postGIS server, however we want to avoid this if possible.


texts:
Is there any way to make intersection of two lines tool with extending lines option, so the result would be a point. the hardest part is when the lines have to be extended to intersect.

the tool will intersect int the cases described in the picture below.

this operation is a common CAD operation but i haven't found a tool or a snippet to do it in Arcobjects or Arcgis Engine 10.1.

Any help please.


texts:
So I am trying to control Arcmap with my addin and I tried to add a command. So I did and i got this error:

    Error   6   Cannot register assembly "C:\Users\Administrator\documents\visual
 studio 2010\Projects\ArcMapAddin4\ArcMapAddin4\bin\Debug\ArcMapAddin4.dll".
Could not load file or assembly 'ESRI.ArcGIS.Desktop.AddIns, Version=10.1.0.0,
Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies.
The system cannot find the file specified.  ArcMapAddin4

I changed nothing in the command code, this error just immediately appeared when I added it in visual studio. My question is, what am I doing wrong here and what does this error mean?


texts:
I know it is an overasked question but I do not find anybody able to explain properly how to do that in SAGA 6.3.

The problem is that my shapefile, i.e. the borders of my country, do not overlap with the cities of the above country. I added the shapefile as a polygon and the cities as table then converted to points. Everything is plotted properly but there is a large vertical distance between cities and the country borders.

I had the same problem in QGIS and I solved it making the CSR consistent for the two layers. I am trying to the same here but with no success. Even if I change the CSR to EPSG 4326: WGS 84, they do not overlap.

What am I doing wrong?


texts: Is it possible to read tables from a specific schema with sf::st_read_db()

texts:
How can I specify the schema from where to read a table in the st_read_db() function in the sf package in R?

When I try

require(RPostgreSQL)
require(sf)

drv = dbDriver("PostgreSQL")
con = dbConnect(drv, dbname = DBname_1, user = DBuser,
                host = DBhost, port = DBport, password = DBpassword)

dat = st_read_db(con, table = "schema1.table1",
      query = "SELECT * FROM schema1.table1 LIMIT 20")

dbDisconnect(con)
dbUnloadDriver(drv)

I get the error:

  Error: public.schema1.table1 does not exist.

It seems with this function I can only read tables from the public schema. Is this true or do I overlook something? Is this also maybe due to the early stage of the package?


texts: Category Values parameter for v.net.steiner

texts:
So I need to extract the steiner tree along a line network connecting a set of points. The one part I don't quite get is what to add for the required Category values parameter.

I initially thought that it was the range of category values for the nodes so I entered 1 - 340. However I received the following error when I tried to run the algorithm:

Number of terminals: 0
ERROR: Not enough terminals (< 2)

I'm quite new to using GIS and GRASS in particular. Any help would be great.


texts: How to fix for the GDAL clipper tool in QGIS?

texts:
I would like to clip a DEM with an admin boundary using qgis, in order to calculate a measure of variation.  However, when I use the Raster clipper tools and select mask, I get the error message: "An error has occured while executing Python code: ...".

It seems this has been noticed by others: see http://osgeo-org.1803224.n2.nabble.com/Re-qgis2google-and-clipper-plugins-td6604408.html

Does this imply that the tool is unavailable for use with Wroclaw 1.7.3?

All I am looking for is a measure of variation based on an admin boundary, and was planning to use the ruggedness index.

Is there a fix for the clipper tool I am unaware of, or any other simple way to calculate a measure of topological variation?  It doesn't have to be ruggedness.

Thanks!


texts: Getting a county name using a 5 digit FIPS code

texts: Lets say I have a five digit fips code: '13245'. I have a dictionary to handle know that the 2-digit state part of the code(ex: {'GA':'13', etc...}). But I want to also get the full county name (EX: 13 - GA, 245 - Richmond County). Is there a library, mod, or API that will help me achieve this?


texts: Area of polygon inside field. (share of urban area in each county)

texts:
In QGIS, I need to calculate the share of a given field (outlined) that is covered by the blue areas, see the image for illustration. Fields and blue areas are in two separate layers.
I did the area calculations for each layer in QGIS, so I have the area in square meters for both the fields and the blue areas.

I already tried spatial join with the mmqgis plugin, but i can't get it to work correctly. For example, the largest blue area, clearly lying within the field in the middle, is not assigned to that particular field in the . Maybe I am just using the plugin wrong.

Any suggestions?

EDIT:
It should be mentioned that i used the multipart to singlepart tool on the blue area-dataset, as some of the individual blue areas was "connected" though they looked separate on the map.

Using the intersection tool as proposed, i got a dataset with more rows than the dataset containing the "blue" areas. The image below illustrates a field with two areas, but the dataset has many extra rows, which doesn't seem to correspond to a visible blue field on the map. If i select the rest of the rows, no visible parts of the map lights up.

When i run the intersect tool, it warns me that the two layers doesn't use the same coordinate system. Could this be the problem?


texts:
I downloaded QGIS MacOS installer version 3.2.  I downloaded and installed Python 3.7 as instructed before I started the installation of QGIS.  I was able to install GDAL but when I try to install QGIS I get the error message that says "QGIS requires Python 3.6."

Does this mean I need to install an earlier version of Python?

If so, which version should I install?

I see there are multiple versions of Python 3.6.


texts: How integrated can an IDE get for arcpy scripting?

texts:
I am looking to develop arcpy scripts (ArcGIS 10.1) in an IDE that is more "integrated" than Pythonwin. I would like an experience that is analagous to programming ArcObjects in Visual Studio C#/VB.NET (which I've done a bit when arcpy did not offer enough low level control). When developing ArcObjects with C#, there there were templates ready, classes in seperate windows that I could explore (very good way to remember tools available!), and code completion for everything.  I have not yet found any examples/screen shots/extended discussion of this type of setup. There is this post, but it focuses on effective arcpy debugging (which I definitly also need to learn more about).

Is it possible to setup Visual Studio 2010/SPE/Wing/ any other IDE that will, out of the box, make the arcpy development experience much more like the experience of programming ArcObjects using C#/VB.NET?


texts:
I have looked every pages, links, forums etc. It is a standalone application.

I add all paths that I can find to the PATHS and PYTHONPATH is here:

C:\OSGeo4W64\apps\qgis-dev\python
C:\OSGeo4W64\apps\qgis-dev\python\plugins
C:\OSGeo4W64\apps\qgis-dev\python\qgis

However it doesn't work and gives the same error for 12 days...

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

app = QgsApplication([], True)
path = "C:/OSGeo4W64/apps/qgis-dev"
app.setPrefixPath(path, True)
app.initQgis()

canvas = QgsMapCanvas()
title = "PyQGIS Standalone Application Example"
canvas.setWindowTitle(title)
canvas.setCanvasColor(Qt.white)

layer_info = 'LineString?crs=epsg:4326'
layer = QgsVectorLayer(layer_info, 'MyLine', "memory")
pr = layer.dataProvider()
linstr = QgsFeature()
wkt = "LINESTRING (1 1, 10 15, 40 35)"
geom = QgsGeometry.fromWkt(wkt)
linstr.setGeometry(geom)
pr.addFeatures([linstr])
layer.updateExtents()
QgsProject.instance().addMapLayer(layer)
canvas.setExtent(layer.extent())
canvas.setLayers([layer])
canvas.zoomToFullExtent()
canvas.show()
exitcode = app.exec_()
# QgsApplication.exitQgis()
sys.exit(exitcode)

Here is the error:

Traceback (most recent call last):
  File "C:/Users/Mustafa Uçar/Desktop/sil.py", line 1, in <module>
    from qgis import _core
  File "C:\OSGeo4W64\apps\qgis-dev\python\qgis\__init__.py", line 72, in <module>
    from qgis.core import QgsFeature, QgsGeometry
  File "C:\OSGeo4W64\apps\qgis-dev\python\qgis\core\__init__.py", line 34, in <module>
    from qgis._core import *
ImportError: DLL load failed: Specified module could not found.

System information:

QGIS 2.99 - Python 3.6 - Win10*64


texts:
How do you display a photo map tip in QGIS 3 on Windows?

As a new user I'm not sure if this is my lack of experience or a bug, so I've tried to simplify it as far as I can:

This is the contents of the Layer Display properties.

test

and this is how it appears:

C:\Local\aa.jpg is real file I'm using to try to figure out what the problem is. What am I doing wrong?


texts: The maps on maps.nokia.com are pretty amazing. I assume they're generating their own tiles but, does anyone know about the infrastructure behind site: the tile server used? and their JavaScript Library?


texts: Exporting two different CSVs using ArcPy with ArcMap

texts:
I am using ArcGIS Desktop: ArcMap 10.6 with ArcPy Library (Python 2.7.14).
Is there a way to export a second .csv file, named 'Points2.csv' with different fields, ie csv_fields_1 = ['5', '6', '7' '8'] within the same snippet?


texts: Maximum Solar Zenith Angle for Landsat-8 images

texts:
Heliosynchronous satellites enter a darkness region at high latitude in winter. They are most of the time programmed not the capture an image when the solar zenith angle becomes too large because the quality of the signal is then lower.

My question is : what is the maximum solar zenith angle for the acquisition of Landsat-8 images ? This would help me compute the maximum latitude covered in winter. I would like to compare with Sentinel-2, which I found is 84.5° max SZA.


texts: Displaying a multi-zoom image layer in open

texts:
I am displaying an image on a map in OpenLayers. The problem is: if I zoom out, the image vanishes. If I zoom in, it works as it should. How do I display an image layer in OpenLayers so that when I zoom out, the image is still there? I guarantee this is a duplicate question but I can't seem to find the answer. So, I apologize if this has been answered.

Here is my code:

  var graphic = new OpenLayers.Layer.Image(
                Monocle.currentWidget.name + " Destination " + featurenum,
                "data:image/png;base64," + results,
                new OpenLayers.Bounds(Monocle.Sightline.BBOX(feature,1), Monocle.Sightline.BBOX(feature,2), Monocle.Sightline.BBOX(feature,3),Monocle.Sightline.BBOX(feature,4)),
                new OpenLayers.Size(580, 288),
                { isBaseLayer: false,
                    opacity: 0.3,
                    displayOutsideMaxExtent: true
                });


texts: Viewing map tiles from Maperitive in leaflet or openlayers

texts:
I generated tiles in Maperative. Created following html file:

    <meta charset="utf-8" />
         <link rel="stylesheet" href="leaflet/leaflet.css" />

, but do not see a map - only a form for map with +- buttons. What could be a problem?

I configured both the openlayers and leaflet, but it seems that this programs seek wrong folder/folder/file.png names on coordinates I provide. But I have no idea how to set this names in Maperative, I see many people generate tiles using mapnik, but as I understand, to do this I need to set up a database and something else. Maybe there is an easier method?


texts: How to create a pedestrian routing graph from OSM?

texts:
I am interested in obtaining the foot paths from OSM data. Specifically I consider the area within the city limits of Berlin. I downloaded the corresponding OSM file from Geofabrik and I intend to use osmosis to filter the data. As a first step I would like the ways which are usable by pedestrians. I have started out with this:

osmosis --read-xml file=berlin-latest.osm.bz2  --tag-filter accept-ways highway=footway --used-node --write-xml file="berlin-foot.osm"

However, I am not sure about when the tags footway and pedestrian. Essentially I want to end up with a graph so I can perform routing tasks. Will I need both relations in this case? Also, at least the pedestrian highways seem to sometimes contain "area=yes" tags. Can I filter on the way type as well?

Edit: I would like all the ways which can be used by pedestrians, I don't want to restrict myself to pedestrian-only ways. My current version is this:

INPUT="berlin-latest"

osmosis --read-xml file="${INPUT}.osm.bz2" \
 --tag-filter accept-ways highway=footway,pedestrian,path,track \
 --tag-filter reject-relations --used-node --write-xml file="${INPUT}-foot.osm.bz2"

osmosis --read-xml file="${INPUT}.osm.bz2" \
 --tag-filter accept-ways highway=* \
 --tag-filter accept-ways sidewalk=both,left,right,yes \
 --tag-filter reject-relations --used-node --write-xml file="${INPUT}-sidewalk.osm.bz2"

osmosis --read-xml file="${INPUT}.osm.bz2" \
 --tag-filter accept-ways highway=residential,unclassified,living_street \
 --tag-filter reject-relations --used-node --write-xml file="${INPUT}-residential.osm.bz2"

osmosis --read-xml file="${INPUT}-sidewalk.osm.bz2" \
 --read-xml file="${INPUT}-foot.osm.bz2" \
 --read-xml file="${INPUT}-residential.osm.bz2" \
 --merge --merge --write-xml file="${INPUT}-pedestrian.osm.bz2"

This seems reasonable, although I am still uncertain regarding area tags. Also I might remove the access=private ways. Another problem is that some highways are missing their sidewalk tags, so some more mapping would have to be done...


texts: Extracting values to points using ArcMap

texts:
I'm still a beginner in using ArcGIS. I'm using ArcMap version 10.8.1.
I'm currently working on habitat use analysis for my thesis. My data consists of coordinates (latitude, longitude) obtained from GPS collars from animals. My goal is to draw a distribution graph which will represent where the animal has been in relation to different objects (from now on I will just use forest, because this is one of them). I have a TIF file for my country that has specified distances to forest for each point on the map, so for each location. This file is in MGI 1901 Slovene National Grid coordinate system. When I added my coordinates as a layer I set the coordinate system to 4326 WGS 1984 - because when I set this one, coordinates align with my TIF file, if I try to set the same one as my TIF file, the coordinates and the TIF file do not align.
Firstly I exported the coordinate data and created a shapefile with which I continued to work. Then I used Spatial Analyst Tools - Extraction - Extract Values to Points (as suggested by my mentor). I then created a new file which I exported to excel and from the raster values that I obtained I created a histogram. These raster values are in m, so for example if I have a value 100, this means that the animal was located 100 m from forest for that particular location.
My question is regarding these raster values that I obtained. It seems strange to me that the variation between the different values is so small. The majority of the values are 0, 100 or 200, all round values. This kind of makes sense, since the animal spend the majority of the time in the forest (0 m), or in its near proximity (100 or 200 m), but there are also odd values, which have decimals, for example: 223.607 and 360.555. And these exact same values are then at least doubled for different locations. I find it weird that all these odd values are at least in pairs (or more) and that there aren't any other values with different decimals.
I only know this one way to obtain these values needed to create a histogram, since it was suggested by my mentor, and I am just not sure if the values are supposed to be of so little variety. I am also adding a picture of some of my values.


texts: Getting CURL error when using rasterio on Google App Engine

texts:
I'm attempting to get the pixel value of a raster that stored in an S3 bucket via a script that's using Flask and is hosted on Google's App Engine. If I run the script on my local machine, everything works fine. When I attempt to deploy the script to GAE, it deploys fine, but the web app does not work. I believe it has something to do with the AWS access keys. I have them in my app.yaml as such:
env_variables:
    AWS_ACCESS_KEY_ID: 'my-key-id'
    AWS_SECRET_ACCESS_KEY: 'my-secret-key-id'

I've also tried setting the variables in the actual python script using:
os.environ['AWS_SECRET_ACCESS_KEY'] = secret_access_key
os.environ['AWS_ACCESS_KEY_ID'] = access_key

the error I'm getting is:
Traceback (most recent call last): File "rasterio/_base.pyx", line 216,
in rasterio._base.DatasetBase.__init__ File "rasterio/_shim.pyx", line 67,
in rasterio._shim.open_dataset File "rasterio/_err.pyx", line 205,
in rasterio._err.exc_wrap_pointer rasterio._err.CPLE_HttpResponseError:
CURL error: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none

Can anyone see why this error is being thrown or has anyone used rasterio in GAE before?


texts: Datum and transformation error using ST_Transform in PostGIS, going from NAD83 to NAD27

texts:
I created a function in PostgreSQL to transform input coordinates using UTM Zone 12/13, with Datums NAD83 or NAD27, to the WYLAM projection.  I had to manually create the entry for the proj4text column for WYLAM, because it is missing from SpatialReference.org. The function works just fine when transforming from UTM Zone 13 NAD83 (EPSG: 3743) to WYLAM, for example, but if I try to transform from UTM Zone 13 NAD27 (EPSG: 26713) to WYLAM, the resulting point is about 50m east and 4m north of where it should be. This is what I would expect for a NAD27/NAD83 conflict in my area (Wyoming). I get the same type of error with input coordinates for other UTM zones and for unprojected decimal degrees when using the NAD27 datum and going to WYLAM with NAD83 datum.

I defined the proj4text column as:

+proj=lcc +lat_1=41 +lat_2=45 +lat_0=41 +lon_0=-107.5 +k_0=1 +x_0=500000 +y_0=200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

QGIS seems to perform a conversion from UTM Zone 12N NAD27 to WYLAM (NAD83) just fine, and as far as I can tell, all the parameters it has for the two projections are the same as what I'm using in PostgreSQL.

I reviewed this question, and the associated answers and links, but it's not clear to me that this provides any useful information for my problem.

I have also tried converting from UTM Zone 13N NAD83 to UTM Zone 13N NAD27, and going both directions (NAD83 to NAD27) with unprojected (decimal degrees) data, and wind up with the same error.  It seems like PostGIS is missing the nadgrid/nadcon information needed to transform between datums accurately.

What am I missing?


texts: CARTO popup links redirect back to embed map?

texts:
When I click a link in the pop-up window the link opens a new tab to the same CARTO map instead of redirecting to the url specified.

Here is my code:

Propery Map:

Link

Soils Map:

Link

FEMA Map:

Link

Stormwater Map:

Link

Sanitary Sewer Map:

Link

RPA Map:

Link

Contour/Topo Map:

Link

Zoning Map:

Link


texts: Implementing qgis shortest path feature in map

texts:
I have drawn routes on my map in QGIS tool and I checked in using QGIS shortest path tool. I imported the map with the help of qgis2web plugin but when I open the map it has no option for the routes I created between different places. I checked the code and it has a GeoJSON file with all the coordinates of the places.

I want to add to fields "FROM" & "TO" where user can type place names in these fields and it draws a route similar to Google Maps.


texts:
I have a text file containing exactly this:

POLYGON ((6.2973716 48.98613 1772.1, ... many other Long Lat Altitude values ... ))

And only this. It seems to be just like a WKT geometry of a polygon. But it's only a text file.

I'd like to create an "ESRI Shapefile" from this file, if possible with tools that are available without any installation on Windows.

I've tried GDAL so far but it doesn't seem to handle such files.


texts:
I am trying to convert the Corine Land Cover Map (version CLC18) from .gdb format to .shp. I am working on QGIS. I tried Export>Save Feature as>ESRI Shapefile but it didnt work. The log file with the errors lives here: https://pastebin.com/8QiKw6nj
 Any ideas?

UPDATE:

Also tried using OSGeo4W with C:\>ogr2ogr -f "ESRI Shapefile" F:/n F:\DownloadsFromExplorer\clc2018_clc2018_v2018_20_fgdb/CLC2018_CLC2018_V2018_20.gdb . The error log file: https://pastebin.com/1Vypvr1f


texts: shuntil.rmtree() deleting directory gdb instead of files within directory gdb

texts:
I want to use the shutil.rmtree() to remove files from a scrap geodatabase. Before adding it to a stand alone script I tried it out in an interactive session and got two different results. The first time the code seemed to work fine. I ran it and opened arccatalog and all the files had been removed from the gdb:

clearfile = r"C:\RS_Data\Non_RS_MXDs\CO_002_Scrap.gdb"
shuntil.rmtree(clearfile)

I then tested it on the next gdb and when I opened arccatalog this time the actual gdb had been deleted and the gdb from the previous excution is displayed in the catalog tree as a folder and not a gdb. I'm pretty sure I used the same syntax but here it is just in case:

clearfile = r"C:\RS_Data\Non_RS_MXDs\CO_059_Scrap.gdb"
shutil.rmtree(clearfile)

I don't want the gdb deleted, just the files within as each time I run the script the last bit of code builds a new featureclass from merging other featureclasses in the scrap geodatabase created at the beginning of the script. Therefore the gdb needs to be empty at the beginning of the script or I will get unwanted featureclasses merged into the final output. Also, I don't want to create a new scrap gdb everytime I run the script.


texts: Does EO-01 Hyperion L1GST data show DN values, radiance or reflectance?

texts: I am working on Hyperion hyperspectral imagery and I cannot figure out whether L1GST level shows DN values, radiance or reflectance.


texts: How to efficiently find the closest point over the dateline?

texts:
I have a PostgreSQL 9.1 table with hundreds of thousands of PostGIS POINTs. For each of these I'd like to find the closest point in another table of POINTs. The points in the second table represent a grid over the whole world, so I know there is always going to be a match within 1 degree. This is the query I'm using so far, which makes use of GIST indexes, so it's reasonably fast (about 30 seconds total).

SELECT DISTINCT ON (p.id)
    p.id, ST_AsText(p.pos)
    , ST_AsText(first_value(g.location) OVER (PARTITION BY p.id ORDER BY ST_Distance(p.pos, g.location::geography)))
FROM point p
JOIN grid g ON ST_DWithin(p.pos::geometry, g.location, 1)

The only problem is the dateline. The grid points only have latitude 180, not -180. When using the geometry version of ST_Distance this does not return points on the other side of the dateline. Eg. if p.pos is POINT(-179.88056 -16.68833) the nearest grid point might be POINT(180 -16.25), but the above query doesn't return it. What's the best way to fix this?

I don't really want to have two coordinates for a single grid point (-180 and +180). I tried adding in my own function which checks for this specific case, but then the query doesn't return in 5 minutes, probably because it can no longer use the index. I also tried using the geography version of ST_DWithin and that query also didn't return after 5 minutes.


texts: Can't select/remove automatic legend in layout view

texts:
Every time I start a new map and go into layout view it automatically generates a legend, scale bar, and north arrow.  I can select the scale bar and north arrow and remove them, but for some reason I cannot select the legend.  Normally I just get around it by sending it to the back and covering it up, but eventually it pokes out of the top when I have enough layers selected in the TOC.  I've tried closing and re-opening the tools toolbar and editing toolbar to see if the select tool was just not functioning, but to no avail.  Working in ArcMap 10.5.1.

Any suggestions?


texts:
is there a possibility to extract the area covered by one geometry of a shapefile (polygon)?

I tried with

thepoly.area()

but get "nan" as result.

Ok. I think you are right and there is something wrong with thepoly, so I'll need to post some code.
I have a buildings vector (polygon) layer containing three polygons (which I created for testing). This layer is called "build" in the code. To extract its geometries, I wrote a little function:

def extract_poly_geometry(self, layer):
    feature = QgsFeature()
    geom_list = []
    while layer.dataProvider().nextFeature(feature):
        geom_list.append(feature.geometry())
    return geom_list

In the main part of my program it is called by

theINPolyShapeField = self.extract_poly_geometry(build)

Later I iterate over the polygons and try to run some code for each of them:

for a in range(0, (len(theINPolyShapeField) - 1), 1): # going through buildings
   thepoly = theINPolyShapeField[a] # extract building number a
   QMessageBox.information(None, "DEBUG:", str(thepoly))
   # polyarea = float(thepoly.area())
   QMessageBox.information(None, "DEBUG:", str(thepoly.asPolygon()))

I use the QMessageBoxes for debuging. The first says

  qgis.core.QgsGeometry object at 0xbbe889c

(thanks for the reminder, andytillia), which I assume is correct. The second one however deliveres an empty list, "[]".

I tried to convert to MultyPoint by

QMessageBox.information(None, "DEBUG:", str(thepoly.asMultiPoint()))

to have a look at the points, but this crashes qGIS with segmentation fault…

I checked the type of thepoly on the console by

print(thepoly.wkbType())

which returns "3". According to Quantum GIS API Documentation this means "WKBPolygon". So thepoly is a polygon, is it?

Hm, i tried thepoly.validateGeometry() on the python console. When I tried it for my first geometry, it returned "[]". A call for the second one crashed QGIS with segmentation fault…

The theINPolyShapeField list should not be the problem, as the issue also occures on the console, where I use geom_list directly.

Yes, exactly, I see three polygons (that I drew before). I just created them using the "New shapefile" tool.
I think I selected the right layer as I checked with build.name() and got the right "test_buildings", what is correct.

len(theINPolyShapeField) returnes 3.

Unfortunatelly thepoly.area() does not return anything as QGIS crashes with segmentation fault… Oo

Thanks for the loop. It really looks lot nicer than mine. However I think this is not the problem, as I diden't use the loop on the console and the same issue occures.


texts: Attribute table of GPKG layer does not allow to edit

texts:
I created a GPKG layer whose name is Grid 1. In database, I wrote a trigger,because when attribute table of layer is changed, another table value should be changed also -They have common id's.

However, when I try to edit the attribute table, I can not edit it. Here is my update trigger code:

self.execSql("CREATE TRIGGER 'ibound_trigger1' AFTER UPDATE OF ibound ON 'Grid1' BEGIN UPDATE 'Yas_Veri' SET ibound = NEW.ibound WHERE cell_id = NEW.cell_id; END;")

Grid1: GPKG layer on canvas (triggers Yas_Veri table)

Yas_Veri: Table in my database (triggered from Grid1)

ibound : column name (common for both table)


texts: Joining Points to Lines in ArcGIS for Desktop?

texts: I have a shapefile of line data (roads) and one of point (villages) data. In an ideal situation all the points should be connected to a line. The data that I have doesn't obey this. I need to join all the points to the nearest line using a straight line. What function can I use in ArcGIS to obtain this. I need this data to carry out the Closest Facility solver in Network Analyst in ArcGIS.


texts: Is there up to date OSM SLD file for GeoServer?

texts:
I've tried looking for some but only found old from 2009 which are apparently out of date.
Any help will be welcome.

This is the sld I was looking at:

https://github.com/mitchelljj/openstreetmap-sld


texts: Adding polygons to Leaflet inset map in R

texts:
I've created a map using the Leaflet package in R and added an inset locator map using addMiniMap(). I would like to add polygons features to said inset map.

I've already added the polygons to the main map. Currently, my code looks something like this (simplified), where myPolys is a SpatialDataFrame object.

map <- leaflet(myPolys) %>% addPolygons(params...) %>% addMiniMap(params...)

Looking at the documentation for the R package here I'm not 100% sure that this is even possible. Am I right?


texts: Default How can I use SRTM/elevation data for vector layer Global Mapper

texts:
I want to create a 3D model of section of a city.
So far the buildings, parcels etc. are digitized, however they do not have any Z/elevation data.
How could I add height value to vectors using SRTM or ASTER or LIDAR anything with some decency in terms of accurate height values?
Is there any way that I could just extract or do some divison or something to get those values for each vector layer in part?

I'm pretty much a GIS and Global Mapper newbie, thus I could use some help.


texts: How to show labels exactly around a circle in QGIS?

texts:
I found an interesting way of proportional symbol mapping and labeling, I think this was made by Adobe Illustrator but I couldn't find out if it can be done in QGIS. What I am interested in the most is the way how text (attributes) appear around circles. I literally have no idea of how to make such thematic map labeling like this in QGIS.

This is the picture:


texts: Denied permission to save a project in new version of QGIS 3.10.7

texts: I have just downloaded QGIS 3.10.7 and when I open a project and make any changes and try to save it I get a message saying I "don't have permission to save in this location".  I also can not toggle editing on any layer.  When I use my 3.4.9 version I can save anywhere and toggle editing no problem.


texts: OGR/GDAL threading results in low core utilization

texts:
I'm trying to process some raster data using ogr/gdal and I can't seem to get full utilization of all the cores on my machine.  When I only run the process on a single core, I get 100% utilization of that core.  When I try to split into multicore (in the example below, by chunking the x offsets and putting them in a queue), I get pathetic utilization on each of my 8 cores.  It seems like it only adds up to 100% utilization across each core (e.g. 12.5% on each).

I was concerned that using the same datasource was the bottleneck, but I then I duplicated the underlying raster file for each core... and core utilization is still crap.  This leads me to believe that ogr or gdal is somehow behaving like a bottleneck shared resource but I can't find anything online about that.  Any help would be much appreciated!

This is the "helper" function that runs inside each Worker thread:

def find_pixels_intersect_helper(datasource, bounds_wkt, x_min, x_max):
    bounds = ogr.CreateGeometryFromWkt(bounds_wkt)
    rows_to_write = []
    for x_offset in range(x_min, x_max):
        for y_offset in range(datasource.RasterYSize):
            pxl_bounds_wkt = pix_to_wkt(datasource, x_offset, y_offset)
            pxl_bounds = ogr.CreateGeometryFromWkt(pxl_bounds_wkt)
            if pxl_bounds.Intersect(bounds):
                rows_to_write.append(['%s_%s' % (x_offset, y_offset), pxl_bounds.Centroid().ExportToWkt()])


texts: How to create a valid QgsVectorLayer from a PostgreSQL view?

texts:
I am attempting to create a QgsVectorLayer with the same code as I am using for a PostgreSQL table, which works correctly and the isValid() method on the layer returns true.

uri=QgsDataSourceUri()
uri.setConnection("localhost","5433","xxx","postgres","xxx",QgsDataSourceUri.SslDisable)
uri.setDataSource("xxx","sv_demog","geom","id")
uri.setSrid("4269")
vlayer=QgsVectorLayer(uri.uri(),"xxxx","postgres")
print('sv_demog layer is valid: %s' % (vlayer.isValid()))

The view selects from table where id is the primary key, and has a geometry column.

How do I make this work for a view?

I am using a PostgreSQL 10 database, and QGIS 3 (Update: Same behavior in 2.18).

Ref:
Loading Layers


texts: How to add remote XYZ source to geoserver

texts:
I am new to Geoserver (geoserver.org). I went through tutorials creating new layers. Unfortunately I cannot find a way how to add remote XYZ data source (e.g. t1.openseamap.org/seamark/{z}/{x}/{y}.png). Is it possible?

If not, I understand, that WMS (which should be added as WMS data source) should do the job. It's fine, but I cannot find URL (e.g. OSM one), which would work - probably I am missing parameter part of it - for example I took one from wiki.openstreetmap.org/wiki/WORLD_OSM_WMS, which is http://www.osm-wms.de, but Geoserver says: Error parsing XML.


texts: Geoserver : FAIL context path doesn't start

texts:
I've been manipulating Geoserver for some time without any problem.

Today,when I start Apache Tomcat , Geoserver doesn't start.

I get this error message :

" FAIL - Application at context path /Geoserver could not be started"

I don't know what seems to be the problem.
Please help me with this issue
ᐧ


texts: QGIS 2.18 r.patch fails "Input raster map contains cells with NULL-value (no-data)"

texts:
In QGIS 2.18.16 with GRASS 7.4.0 (Windows 7, 64 bit), I am trying to create a composite raster layer from two nearly identical versions of a 3-band color geotiff that almost (but not quite perfectly) overlap, using the GRASS tool r.patch. Whether or not I select the "use zero for transparency instead of null," the process fails with the error message:

  Input raster map contains cells with NULL-value (no-data). The value
  255 will be used to represent no-data values in the input map. You can
  specify a nodata value with the nodata option. WARNING: The default
  nodata value is present in rasterband and would lead to data loss.
  Please specify a custom nodata value with the nodata parameter. ERROR:
  Raster export aborted.

Can anyone help me out with how to make this work within QGIS? There doesn't appear to be any way to set the nodata parameter within the r.patch dialogue box. Also, what value should I set it to?


texts: postgis calculate distance between point & polygon/circle

texts:
By basic requirement is to find the nearby fences to a particular point(user lat long alt) within a N meters.

I have list of polygon/circle in DB with 900913 srid

ST_Force_3D(st_geomfromtext('polygon((' || p_geometrytext  || '))', 900913))

where p_geometrytext is a series of long lat alt with "," separator.

I have point like this 79.268309 17.057432 0.0
I tried below code

select ST_Distance(
     ST_SetSRID((select "Fence" from "GeoFence" where "FenceId"=13), 4326),
     ST_GeomFromText('POINT(79.268309 17.057432 0.0)', 4326),
     true)

I used 4326 as srid, because 900913 is giving error.

I went throw this doc but unable to use it properly. I am new to postgis, can anybody suggest me, how can i do it? or redirect me to where i can get a solution.

EDIT:
This is my polygon (select st_asewkt((select "Fence" from "GeoFence" where "FenceId"=13)))

"SRID=900913;POLYGON((78.421783447257 17.420097759577 0,78.528900146476 17.423373494038 0,78.528213500968 17.333597145753 0,78.421783447257 17.332941682216 0,78.422470092765 17.332941682216 0,78.421783447257 17.420097759577 0))"


texts: Can an object's timestamp tag be viewed in JOSM?

texts:
I have some data in JOSM that I would like to search and filter using the timestamp: expression. This is reasonably well documented.

The problem I have is that the timestamp reported by the History command for an object:

Differs from the timestamp stored with the data in the .osm file:

I can see that in the case shown the difference is one hour, and is likely due to time zone (or daylight saving) differences, but the search functionality operates on the file timestamp, and the History command doesn't provide the time offset from UTC, making it hard to explore the timestamps in the data prior to writing the search expression.

Ideally I'd like to be able to view the timestamp stored with an object (as opposed to the server reported timestamp obtained from the History command) through the JOSM GUI, but can't see a way to do this.


texts: Generating a single geohash for a bounding box in python

texts:
the following code generates bounding box for the coordinates that are given in the input but currently it generates geohashes for all the 4 coordinates of the polygon. i want to be able to generate a single hash for the bounding box that has been created from the coordinates. The outpus below show pts as 4 coordinates and box as the bounding box while set is the hashes generted from coordintes in pts.
i am using this geohash library  https://github.com/hkwi/python-geohash/wiki/GeohashReference

def bbox_geohashes_shapely(bbox_pts, accuracy=5):
 import geohash
        import shapely
        from shapely.geometry import Point

        unchecked = set()
        inside = set()
        outside = set()
        box=list()
        bbox = shapely.geometry.Polygon(bbox_pts)
        bbox = bbox.bounds
        print(bbox)
        for b in bbox:
            box.append(b)

        print (box,"box")
        print (bbox_pts,"pts")
        for pt in bbox_pts:
            tst_gh = geohash.encode(pt[0], pt[1], accuracy)
            unchecked.add(tst_gh)
        print(unchecked)
a=bbox_geohashes_shapely([(52.001158,7.572327),(52.002215,7.606909),(51.906366,7.692406),(51.901071,7.543488)],6)

output

(51.901071, 7.543488, 52.002215, 7.692406)
([51.901071, 7.543488, 52.002215, 7.692406], 'box')
([(52.001158, 7.572327), (52.002215, 7.606909), (51.906366, 7.692406), (51.901071, 7.543488)], 'pts')
set(['u1jru6', 'u1jrv4', 'u1jrr1', 'u1jr78'])


texts: How to add CloudMade map to ArcGIS Android?

texts:
I want to add a CloudMade map to Esri's Android HelloWorld application. I'm following the documentation, but when I run the app, LogCat throws an EsriService Exception and the app closes. Below is the relevant code. Does anyone have an idea on what I need to change to display a CloudMade basemap? I posted this question on ArcGIS Forum a few days ago, but no response there yet. I'm working with ArcGIS Runtime SDK for Android 10.2.2. Thanks, Patty

public class HelloWorld extends Activity {
MapView mMapView;

 // Called when the activity is first created.
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 mMapView = (MapView)findViewById(R.id.map);
 String[] tileServerURL = {"http://b.tile.cloudmade.com/{KEY}/1/256"};
 OpenStreetMapLayer tileLayer = new OpenStreetMapLayer(tileServerURL, 1, 16, "CloudMade", true);
 tileLayer.setKey("myKey");

 mMapView.addLayer(tileLayer); //when this line is commented out the app runs, but only with an Esri base map


texts: How to install QGIS 2.6 with GRASS functions?

texts:
I install QGIS 2.6 but QGIS-OSGeo4w didn't install GRASS functions. I removed other versions from control panel (feature and program) but, in all of times that I install it, I confront with this error when I open it:

  QGIS couldn't find your GRASS installation. Would you like to specify
  path (GISBASE) to your GRASS installation?

I choose all of folders but all of efforts was unsuccessful.


texts: Average distance between two different layers

texts:
I am a new user of QGIS (version 3.2.3) and I find myself in need to do some calculations. I am trying to find the average distance between two sets of points (i.e. schools and settlements) contained in two different layers within given districts, which comes in polygons.

My ultimate goal is to calculate the average distance traveled to school for each district. I tried to calculate the distance matrix but it didn't yield the results I wanted.

How can I complete this task?


texts: Inserting GeoJSON in PostgreSQL using laravel controller

texts:
Actually.. I have GeoJSON that I send from javascript into controller. My GeoJSON:
{
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "geometry": {
            "type": "Point",
            "coordinates": [101.21719328770531, 3.113987284801912]
        },
        "properties": null
    }, {
        "type": "Feature",
        "geometry": {
            "type": "LineString",
            "coordinates": [
                [101.18330230120145, 3.046205311794175],
                [101.13585492009604, 2.985201536087212],
                [101.19008049850223, 2.9174195630794753]
            ]
        },
        "properties": null
    }]
}

and then I found this single heterogeneous GEOMETRYCOLLECTION from this link
So, My SQL something like this:
SELECT public.ST_SetSRID(public.ST_Collect(public.ST_GeomFromGeoJSON(feat->>'geometry')), 4326) as geom
FROM (
      SELECT json_array_elements('{
                      "type":"FeatureCollection",
                      "features":[{
                                 "type":"Feature",
                                 "geometry":{
                                            "type":"Point",
                                            "coordinates":[101.21719328770531,3.113987284801912]
                                  },
                                 "properties":null
                      },{
                      "type":"Feature",
                             "geometry":{
                                        "type":"LineString",
                                        "coordinates":[[101.18330230120145,3.046205311794175],
                                                       [101.13585492009604,2.985201536087212],
                                                       [101.19008049850223,2.9174195630794753]
                                                      ]
                                        },
                             "properties":null
                      }]
                     }'::json->'features') AS feat
) AS f;

It can run it ... but, how can I insert this into my column geom in my table by using something like this 'geom' => db::raw("from my sql")?


texts:
I gave a demo this afternoon and it couldn't have gone any worse :(

I checked everything was working before I started (apart from the external internet connection)....  My dependency on an external WMS layer of the world coastline causes my app to hang so I would like to serve out my own world coverage rather than rely on any external resource but where do I get the data and the SLD from. I have a shapefile of the world coastline but it doesn't look half as good as the default openlayers basemap.

My base layer is configured like so:

//create the basemap
basemap = new OpenLayers.Layer.WMS(
    "Baselayer", "http://vmap0.tiles.osgeo.org/wms/vmap0?",
    {layers: 'basic'},
    {
        singleTile: true,
        ratio: 1,
        isBaseLayer: true
    }
);

I would like to be totally independent of external resources (http://vmap0.tiles.osgeo.org above) and rather serve this data out myself via geoserver (wms).


texts: Georeferenced images not lining up correctly with one another in QGIS?

texts:
After georeferencing these 3 images onto my basemap (openstreetmap) they do not line up (see how the white lines are mismatching). Why is this the case and how can I solve this problem?

I made sure that when georeferencing I referenced at least 4 points on the basemap. It seems that the images get compressed or expanded, but I do not see why?

I tried alignment tool in QGIS 3.4.2 but this did not work.

I added transparency the georeferenced images so you can see the problem. Along some streets the images lines up perfectly with the underlying Openstreetmap, but then (in the right hand corner the image gets bend direction southeast and the white line does not align with the underlying street.
In the transformation settings I also use WGS 84 – pseudo Mercator (the same CRS as used for the whole project).


texts:
I have a map (ArcMap) that uses a basemap that is supplied with ArcMap.  The data link has been lost and, though I know how to repair a data link, I cannot find the data for the ArcMap basemap.

I have a screenshot here:
https://www.dropbox.com/s/frydzj604zeglxy/arcmap%20screenshot.JPG?dl=0

Does anyone know where ArcMap is hiding these data files....or how I might repair the link without having to rebuild the map from scratch?


texts: Species atlas (how to automate to create on page for each species with QGIS)

texts:
With the use of QGIS, I would like to create an Atlas for a batch of species, with:

a background with the country (from a vector layer or from the OpenLayers plugin).
a vector layer (polygon) to show the watershed or administrative boundaries
a vector layer (polygon) with the distribution for each species (all the species are on the same file) from IUCN data.
a vector layer (point) with all the GBIF occurrences (all the species are on the same file)

All the maps will have the same footprint (the country) and need to have the legend, a title with the name of the specie and some other elements (north arrow, company logo, etc.). For the export format, it can be as a picture or as a PDF file.
I already look at the documentation of the Atlas plugin (now integrate by default on QGIS 2), but this is to made dynamic atlas, for my need, the footprint is all the time the country coverage.

So my questions are:

Is there any plugin, any extension or other which can do it easily?
Few month ago, I already asked advice for a similar example (Generating large number of maps using PyQGIS?), but it was for polygon and not point, and furthermore, there were nothing for the render (no legend, no title, no logo, etc.). So how is it possible for this kind of script to take consideration of the map composer?
Optionally, I would like to incorporate to each map, a list of the watershed or administrative area list where the species occurs.


texts: Is OTSU thresholding for Landsat image possible using QGIS?

texts: I want to run OTSU thresholding to select a threshold value for a MNDWI water index image derived from Landsat image. Is it possible to run OTSU thresholding in QGIS?


texts: leaflet remove a specific type of features from featuregroup

texts: Is there any way in leaflet to delete  a specific type of features from a feature group (mixed content: markers, polygons, polylines)? I know this code that work: map.removeLayer(drawnItems); but it delete all the objects within the drawnItems featuregroup. I only need a specific type of features, for example all the markers to be deleted.


texts:
Is it possible to fill pits in TauDEM up to a certain threshold (i.e. 1m depth)? In ArcGIS 'Fill Sinks', there is a tolerance parameter for this purpose, but there doesn't seem to be a similar parameter in TauDEM.

The purpose would be to retain sinks where they are 'real', but TauDEM blasts through all the pits in an elevation model.


texts: Adding feature to geopackage layer and regenerating primary key using PyQGIS?

texts:
I have an existing geopackage layer in my QGIS project. I want to duplicate a feature on the layer via PyQGIS:

layer = iface.activeLayer()
layer.startEditing()
sourcefeat = next(layer.getFeatures())  # choose the very first feature, for instance
newfeat = QgsFeature()
newfeat.setGeometry(sourcefeat.geometry())
newfeat.setAttributes(sourcefeat.attributes())
layer.addFeature(newfeat)
layer.commitChanges()

I get an OGR error when committing changes: "failed to execute insert : UNIQUE constraint failed: layer.fid"


texts: OpenLayers 3 not recognising proj4 custom projection

texts:
I'm trying to create a proj4 custom projection for use with my openlayers map. However, when after creating the projection with proj4 I am unable to use it with openlayers projections because ol.proj.get("EPSG:42304") returns a null value.

Here is the relevant code:

proj4.defs("EPSG:42304", "+title=Atlas of Canada, LCC +proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
var proj_42304 = ol.proj.get('EPSG:42304');
proj_42304.setExtent("-2687954.60784314","-712631","3560754.60784314","3840000");

The error I am receiving in the console is this:

Uncaught TypeError: Cannot read property 'setExtent' of null

I am using OpenLayers 3.20.1 and Proj4 2.2 for reference. I also have my proj4 script imported after I import the openlayers3 library on my HTML page.

If I change ol.proj.get('EPSG:42304') to ol.proj.get('EPSG:900913') it no longer returns null, which leads me to think it's an error with creating the custom projection.

I am a co-op student and this is my first time working with proj4.


texts: Keeping minimum when converting from shapefile to raster?

texts:
I have a shapefile that I am trying to convert to raster. The shapefile has overlapping polygons. I would like to keep the minumum value of these overlapping polygons when converting to raster.

Right now, when I use the Feature to Raster dataset within the 'To Raster' toolbox, it keeps the maximum of the overlapping polygons. Can I change this so it keeps the minimum?
Or will I have to clean up my shapefile to get rid of the overlapping areas.


texts: How to calculate pixel size on image of map?

texts:
I have to save to .png file with part of map from app.
I've got information about PPI, easting/northing, print resolution, map scale and map coordinate system and using this information I have to calculate a size of pixel (in meters) given information about curvature of the earth. I have to know how many meters on earth is representing by one pixel on my picture.
I was trying to find any pattern for that but without success.
Anybody here know how can I calculate that?


texts: How to auto populate feature attribute values for new polygon (B) from parent layer (A) where B is made over layer A?

texts:
Is there any way in QGIS where we can auto populate new layer feature_attributes from parent layer? We have layer A as . It has attributes including: f_id, class_name, class_type, r_total.

We now make a Polygon (B) over it using Toggle Editing --> Add Feature as  .

The new polygon B has null values in f_id, class_name, class_type, r_total attributes.

How do we auto fill these feature attributes values in Polygon B so that it matches with layer A values. (Auto fill needs to be done as this process has to be carried out for large number of tiles.)


texts: What am I missing to get GRASS 7.6 tools to run in QGIS 3.4.4 Processing (linux)?

texts:
I can't seem to get any GRASS 7.6.0 algorithms to run inside QGIS 3.4.4 Processing toolbox on Arch Linux (kernel 4.20.8).

I have GRASS installed at /opt/grass. Launches fine standalone with tools working and such.

I have gdal and gdal-grass plugin 2.3.2 installed.

ogrinfo --formats | grep -i grass
OGR_GRASS -vector- (ro): GRASS Vectors (5.7+)

I compiled QGIS with the following GRASS cmake options just to be sure even though the first compile without them says it found GRASS 7 in /opt/grass regardless.

-DWITH_GRASS7=ON \
-DGRASS_PREFIX7=/opt/grass \
-DGRASS_INCLUDE_DIR7=/opt/grass/include

And inside QGIS Settings > Options > System (tab) > Current Environment Variables there are some bold variables:

GISBASE = /opt/grass
GRASS_PAGER = cat

The GRASS Plugin works where it can open mapsets and run tools. QGIS Browser can see and load GRASS Datasets but Processing won't launch GRASS algorithms.

I found a 3 year old bug report filed by myself at https://issues.qgis.org/issues/13072 but I'm not sure if it's a regression and needs to be re-opened.


texts:
I have made a lot of relations (e.g. addresses).

I have a lot of tables where I use them, but if I change the address in the addresses table, then the text in all related other attribute tables will not change (instead a () will be added).

How can I have a drop-down only with the addresses from list to choose and how can it automatically change/update?

If I use the id instead of the text I only get the number displayed in property dialog of a feature.

How do I use the relation much better?

Added:

I used menu "Project" -> "Properties" -> "Relations".
Then Layer -> "Property of Layer" -> "Attribute Form" (if so called in englisch) -> Chossed Field -> Type of Element on the right site -> Relations reference.

does this help?

Is there a better place to ask QGIS-questions than here?


texts: Starting and stopping ArcGIS Server map services using Python?

texts: Is it possible to programmatically stop and start ArcGIS Server map services using Python?


texts:
I am a volunteer groundsman at a small golf club.  I had our reticulation GPS located.
I have added the GPS locations to a georeferenced image, all good.
What I want to do now is add new sprinklers to the map. I do not have GPS data for these new sprinklers.

Is there a way to use distances from the other sprinklers to mark them on the map?


texts: towgs Definition for European Datum 1950

texts:
I am new to all things GIS so apologies for a basic questions. I am trying to specify the CRS of a climatic raster layer in R. It is an equal area projection based on Europe Equidistant Conic and the datum is D European 1950. Can anyone help me specifiy the argument in R?

projection(myraster) = CRS("+proj=eqdc +ellps=???+ datum=???")

Many thanks if you can help!


texts: Loading multiple CSV files into PostgreSQL Table

texts:
I have multiple CSV files. Those CSV files are the log files created as a result of running a Windows batch file. The location of these CSV files lies on the server and I want all these CSV files to copy from the server to a particular table (say import_error_table, which I had already created in PostgreSQL).

How to accomplish this using PostgreSQL?

I tried running a Windows batch file which is shown below.

And in the above snapshot, there is an exe file to convert a shapefile to pgsql. I would like to know is there any specific exe for converting CSV to pgsql.

I had run the above code as a batch file. The prep.sql file is created with (0KB size). But also schema was not created in the PostgreSQL.

for %%f in (*.csv) do \\192.158.5.170\working\PostGIS\psql.exe -p -k -s 32643 %%f CSV_Logs.%%~nf > prep_%%~nf.sql
set PGPASSWORD=rpc123
for %%f in (prep_*.sql) do \\192.158.5.170\working\PostGIS\psql -h 192.158.5.170  -p 5432 -d NPCL_test -U postgres -f %%f

The result of which is prep.sql files created but schema was not created in PostgreSQL.


texts:
I would like to download some layers from https://soilgrids.org. One is for example the layer "Sand, 0-5, mean". I get a TIFF format which is missing spatial reference. Am I doing something wrong?

I downloaded some layers a few weeks ago on the old version of the website and these included the spatial reference.


texts:
I changed the color of the polygon symbology with a specified field. Now, I need to categorize the symbology for better data management and to be displayed on a map. But, this not change the legend color.
How can I change the color automatically so that the legend matches the map?
For example, in the figure below, the first element should be white but, is red.
Change colors manually is the only solution I can see. This is very tedious and it would no longer make sense to have changed them by specified field..


texts:
I have a point on a linestring geometry (found by an intersection). What is the best way to get two points along the line in both directions using postgis?

It does not really matter if the points represent a vertex or are just a given distance or fraction away from the intersection point. I just need a short line to calculate the azimuth between those two points.


texts: Openlayers get boundingbox around circle in cluster layer

texts:
I have a cluster layer which contains circles. Each circle contains some number of features. I need to get the smallest bounding box for a circle when it's clicked. If I could get the center and radius of each circle onclick, that would solve my problem too, but I can't seem to find an obvious way to do that.

How can I get a bounding box for an element in a cluster layer, or the center and radius of that element?

Here's my cluster layer.

  var clusterLayer = new ol.layer.Vector({
    id: 'clusterLayer',
    source: clusterSource,
    style: function addClusterStyle(feature) {
      var size = feature.get('features').length;
      var pointRadius = 8 + (size.toString().length * 2);
      var style = styleCache[size];
      if (!style) {
        style = [
          new ol.style.Style({
            image: new ol.style.Circle({
              radius: pointRadius,
              stroke: new ol.style.Stroke({
                color: '#ff0000'
              }),
              fill: new ol.style.Fill({
                color: '#ffb3b3'
              })
            }),
            text: new ol.style.Text({
              text: size.toString(),
              font: 'bold 12px arial,sans-serif',
              fill: new ol.style.Fill({
                color: 'black'
              })
            })
          })
        ];
        styleCache[size] = style;
      }
      map.removeInteraction(draw);
      return style;
    }


texts:
I have a string field that I want to extract only the digits example: (1,500 m2 --> 1500) QGIS

I've tried with regexp_substr( "location", '(\\d*)' ) to remove all after the blank space, but I need also the ones who have a comma to only extract the digits, the first to rows works fine for me, but the two after doesn't (1,500 M2 and 1,456 m2)


texts:
Is there a way to to have a map (Print Composer) open automatically upon project load?

I have a map constructed in Print Composer "General Map".

When a user fires off the project, I would like "General Map" to open by default.


texts: OpenLayers removeControl() strange behaviour

texts:
I have a startEditing() function:

function startEditing(){

       colorPoly = document.getElementById('color_picker_'+shapeId).value;

        var shapeStyle = {
            strokeOpacity: 1,
            strokeWidth: 1,
            fillColor: colorPoly,
            fillOpacity: 0.45,
        }

        var shapeStyle2 = {
            strokeOpacity: 1,
            strokeWidth: 1,
            fillColor: colorPoly,
            fillOpacity: 0.45,
            pointRadius: 5,
        }

        var styleMap = new OpenLayers.StyleMap({
            "default": shapeStyle,
            "temporary": shapeStyle,
            "select": shapeStyle,
            "vertex": shapeStyle2
        }, {extendDefault: false});

            var newShape = new OpenLayers.Layer.Vector( "Editable",{
                styleMap: styleMap
            });

            newShape.events.register("sketchcomplete", newShape, function(){
                map.addLayer(newShape);
                newShape.id = shapeId;
                createdShapes.push(newShape);
                alert(createdShapes.length)
            });

            editingToolBar = new OpenLayers.Control.Panel({
                displayClass: 'customEditingToolbar',
                allowDepress: true
            });

            var draw = new OpenLayers.Control.DrawFeature(
            newShape, OpenLayers.Handler.Polygon,
            {
                title: "Draw Feature",
                displayClass: "olControlDrawFeaturePolygon",
                multi: true
            });

            var edit = new OpenLayers.Control.ModifyFeature(newShape,
            {
                title: "Modify Feature",
                displayClass: "olControlModifyFeature",
                vertexRenderIntent: "vertex"
            });

            editingToolBar.addControls([edit, draw]);
            map.addControl(editingToolBar);
}

and I have a stopEditing() function:

function stopEditing(){
    map.removeControl(editingToolBar);
}

When I call stopEditing(), the EditingToolBar disappears from the map. However, the cursor can still draw new features. map.removeControl(editingToolBar); doesn't stop the control, it just makes the icon disappear. How to disable the editingToolBar controls and bring back the default pan cursor?

More, when I call startEditing() a second time after stopEditing(), the editingToolBar does not appear but the cursor can still draw.


texts: Finding points 100 miles outside county using PostGIS?

texts:
Which way is correct? Use distance or buffer? I am not sure about this.

Here is how I use distance:

cursor.execute(""" SELECT COUNT(tw.user_id)
               FROM tweets tw, ca_census_tract ce
               WHERE ST_Distance(ST_Transform(tw.location,26986),
               ST_Transform(ce.geom,26986))>=160934
               AND ce.name10='Alameda'; """)

cursor.fetchall()

and here is how I use buffer:

cursor.execute(""" SELECT COUNT(tw.user_id)
               FROM tweets tw, ca_census_tract ce
               WHERE ST_within(ST_Transform(tw.location,26986),
               ST_Buffer(ST_Transform(ce.geom,26986), 160934))=false
               AND ce.name10='Alameda'; """)

cursor.fetchall()

The tw.location are points.

There was a small difference in the result and a huge difference in running time. The result from distance was 14818 and the result from buffer was 14899. I don't understand why there was a difference. And, the running time of buffer was much longer. By the way, the total number of the dataset was 100K.


texts: Drawing a polygon over a point in OpenLayers

texts:
I read a geojson with points and their coordinates, but on the map, I want to draw polygons, not points.

this is an example of the polygon that I want:

Yes, it is a boat.

How can I do it?


texts:
I'm using ArcGIS 10 to build some figures for a journal article.  One is a figure of an unstructured finite element mesh of triangles spanning the western Atlantic Ocean.  I exported this mesh from SMS to a polygon shapefile where each triangle is a polygon and added it to my ArcGIS map.  It looks great; however, the islands (such as Haiti and Cuba) are also polygons in the shapefile.  I would like to remove them without manually selecting them all.

Is there a way I can select only the polygons with more than 3 sides in order to delete them?


texts: I stored the styles of my  layers in my pgsql database, and there is a need to change the style of a feature  if a certain field is updated.  I'm wondering if there's a possibility to set the attributes of the layer_styles table with an SQL query


texts: Texas and New York Township, Range, and Section GIS Data

texts:
I have a number of lat/long coordinates that I need to identify township, range, and section for. I am using QGIS to do it.

The coordinates are in different states and I was able to most states' shapefiles here: http://www.geocommunicator.gov/GeoComm/lsis_home/home/, but I can't find Texas and New York data.
Does anyone have a good data source?


texts:
I am trying to display legends of all layers of map service in my legend div, for that I have written and tried some code. But not displaying, please suggest someone where is problem in my code.

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
    <title>Simple Map</title>
    <link rel="stylesheet" href="https://js.arcgis.com/3.17/esri/css/esri.css">
<style>
  html, body, #map {
    height: 100%;
    margin: 0;
    padding: 0;
  }
</style>
<script src="https://js.arcgis.com/3.17/"></script>
<script>
  var map;

  require(["esri/map", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/dijit/Legend", "dojo/_base/array", "dojo/parser", "dojo/domReady!"], function(Map, ArcGISDynamicMapServiceLayer, Legend, arrayUtils, parser) {

    parser.parse();

    map = new Map("map", {
      basemap: "topo",  //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd
      center: [-90.45, 37.75], // longitude, latitude
      zoom: 5
    });
     map.on("layers-add-result", function (evt) {
    var layerInfo = arrayUtils.map(evt.layers, function (layer, index) {
      return {layer:layer.layer, title:layer.layer.name};
    });
    if (layerInfo.length > 0) {
      var legendDijit = new Legend({
        map: map,
        layerInfos: layerInfo
      }, "legendDiv");
      legendDijit.startup();
    }
  });

    var dynamiLayer = new ArcGISDynamicMapServiceLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer");
    map.addLayer(dynamiLayer);
  });
</script>

    Legend Display


texts: Joining Excel with hyperlinks from Excel to ArcGIS Pro or ArcMap

texts: I was trying join a Excel spreadsheet with hyperlinks to the ArcMap and ArcGIS Pro based on the same field. The hyperlink text went through the join, however, the actual hyperlink did not go through.


texts: Extract values from a multi band raster in R


texts: R: read and clean layer with v.clean (using rgrass7)

texts:
I'm trying to execute some rgrass7 processing from R but I can't even get the first process done. I would like to clean a vector line layer. The goal here is not just to clean the topology, that's collateral, but learning how to execute rgrass7 processes with vector data.

Here is the code that throw error:

library(rgrass7)

# PARAMETERS
lpath <- "./Layers/Lines_light/Lines.shp"
l <- readOGR(lpath)

G <- initGRASS(gisBase = "/usr/lib/grass76",
               home = getwd(),
               gisDbase = getwd(),
               location = 'grassdata',
               mapset = "PERMANENT",
               override = TRUE)
G
use_sf()

# clean (here, in input, I tried l, "l", "lpath", lpath...
execGRASS("v.clean",
          input = "lpath",
          output = 'l_clean',
          tool = 'break',
          flags = 'c')

The error:

Error in execGRASS("v.clean", input = "lpath", output = "l_clean", tool = "break",  :
  The command:
v.clean -c input=lpath output=l_clean tool=break
produced an error (1) during execution:
ERROR: El mapa vectorial <lpath> no se ha encontrado

By the way, the tool work just perfect from QGIS in Ubuntu 19.10.


texts: Determining Affine Transformation Parameters?

texts:
I am trying to use the qgsAffine plugin to do the transformation but I have no idea in its usage.

How to find the transformation parameters? I found some posts suggest using the OpenJump
How to use the plug-in? I found my plug-in UI does not match with my found in Google. Why?

Here is my coordinates:

Original x 0.3704 (EPSG:4326) to Target long 114.2031
Original y 0.52804 (EPSG:4326) to Target lat 22.3249


texts: Understanding ArcGIS Online Unable to load ... status: 413 error?

texts:
I am trying to load .shp file to arcgis.com online. I put it to zip file and has .dbf .prj .qpj .shp .shx files in zip. It can be opened in QGIS, CartoDB, but when I trying to import arcgis online.

(My Content -> Add Item -> From My Computer), it gives

  Unable to load

  http://[my_address].maps.arcgis.com/sharing/rest/content/users/[myuser]/addItem

  status: 413

Do you have any idea to solve this problem?


texts: QGIS 3.2 - How do I join road segments together like they're shown in a Road Map/Atlas?

texts:
When I imported any of my Roads Layers ESRI Shapefiles from OS Vector District data into QGIS 3.2 using one of the pre-defined Road Symbol representations,
I get a very poor result showing the road as hundreds of little bits with the cap ends, rather than a continuous flow like an OS Raster Map.

There seems to be NO "open-ended" join for the Road Symbol Properties - only a "rounded end cap" or a "square end cap" is offered!

Can anyone advise me:-

1) Is there a ready-made tutorial that shows this? I saw a You Tube Video showing something like but the presenter did it much too quickly for me to follow how he did it!

2) Is there a ready made "plugin" to do this function, that will also join up road junctions correctly?


texts: script to be able to edit a shapefile to the same borders of another shapefile?

texts:
I want to have a script to be able to edit a shapefile to the same borders of another shapefile that I have. I have city boundary polyline and I want to move the vertices to the same vertex location of another shapefile called parcel.

Is there any script that do the whole process authomatically?


texts: QGIS raster calculator using abs() function

texts:
Is it possible to use the Abs() function in the raster calculator in QGIS?

I've tried it, but it didn't work.


texts: Spatial clustering gridded data with missing values (over water)

texts:
I'm trying to cluster a spatial dataset, and use the cluster labels as an input to a second process.  I've been using the spdep package in R.

I've got gridded data at .5 degree lat/lon resolution.  There are 19 covariates in the example subset of it linked here

The following shows that I can't calculate the minimum spanning tree -- a necessary input into skater -- when the dataset includes areas undefined because they are over water.

How would one get around this?

system('wget https://www.dropbox.com/s/i72na4k0k5gqvvx/example_data?dl=0')
load('example_data')

    1> with(x, plot(lon,lat))
    1> library(spdep)
    1> bh.nb <- cell2nb(length(unique(x$lon)),length(unique(x$lat)),torus=F,type='queen')
    1> lcosts <- nbcosts(nb = bh.nb, data = x,method='euclidean')
    Error in data[id.neigh, , drop = FALSE] : subscript out of bounds

The points are over the western US and Mexico:

If I restrict the data to cut out the missing values, I have no problem:

x = x[x$lon>-117,]
bh.nb <- cell2nb(length(unique(x$lon)),length(unique(x$lat)),torus=F,type='queen')
lcosts <- nbcosts(nb = bh.nb, data = x,method='euclidean')
nb.w <- nb2listw(bh.nb, lcosts, style="B")
mst.bh <- mstree(nb.w,10)
res1 <- skater(mst.bh[,1:2], x, 5)
plot(res1, cbind(x$lon,x$lat), cex.circles=0.035, cex.lab=.7)

and I get this:

How do I get around this?  I want to be able to cluster the land surfaces, including islands and peninsulas.  I suppose that I want islands to be linked to their nearest point of land... but the more I think about islands, the more I'm realizing that's a can of worms.

References as well as fixes to the specific problem with the spdep interface are sought.


texts: MOLUSCE plugin is not available for QGIS 3.4

texts:
I have updated to QGIS 3.4 Madeira version.

However, I can't find MOLUSCE plugin for this new version.

Is it not available for newer versions?


texts: Using ArcObjects to stop items from being deleted from Table of Contents?

texts:
I am using ArcObjects in a C# addin with ArcGIS 10.3.1 for Desktop.

I'm trying to stop a user from removing certain layers from the Table of contents. I have my listeners setup for IActiveViewEvents_ItemDeletedEventHandler but want to know how/what to capture the layer that is removed? Can this be done, or can I only inform the user that they removed something?


texts: QGIS: Accessing layer's CRS from expression and/or PyQGIS

texts:
How can I access the current feature's/layer's CRS from an QGIS expression, or from a custom expression in PyQGIS?

In my expression, I use the following to buffer a (currently lat-long-specified) feature in map units (m).

...buffer(transform($geometry,'EPSG:4326',@project_crs),250,1)...

I'd like to generalize this to work with any layer, whatever its layer CRS is, i.e. without hardcoding the 'EPSG:4326'.  But there doesn't seem to be a @layer_crs variable. Is there some other way to access this using core expression functions and variables?

As an alternative, I'm open to (and might even prefer) a PyQGIS solution that can be put into a custom function. But (I may be wrong), the QgsFeature passed as the feature parameter in an expression custom function does not know its (source) CRS or even its layer.

I've also looked at the optional context parameter to a custom function, but have gotten lost whether I can shovel through the QgsExpressionContext object this provides to find the parent layer and its source CRS.


texts: Pyproj Invalid projection: +init=epsg:25832

texts:
In my Python Pandas project I have a .csv file with geographic coordinates and want to transform it into lat,lon format.
the last weeks I successfully used the following code to make it work.
import pandas as pd
import numpy as np
import pyproj as pp

def key():
    df = pd.read_csv('POI_Untersuchungsgebiet.csv')

    utm2geo = pp.Proj(init='epsg:25832')
    df[['lon', 'lat']] = df.apply(lambda row: utm2geo(row['x'], row['y'], inverse=True), axis=1).apply(pd.Series)
    key_columns = ['fclass', 'lon', 'lat', 'code', 'Kategorie']
    df = df[key_columns]
    return df

Since today I get the following error message

Invalid projection: +init=epsg:25832 (Internal Proj Error: proj_create: SQLite error on SELECT name, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM projected_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name)

Any ideas what the reason could be?