texts: Migrating from 3.8.1 to 4.0.3: problem with config-summary.xml

texts:
I have a question about a migration process to GN 4.0.3, coming from a 3.8.1.
I installed a WAR archive in my Tomcat 8.5 and linked to new GeoNetwork to my data directory and PostgreSQL/PostGIS database.
I seems that the link work fine, as I can login and I verified that data directory are working.
Unfortunately, none of my previously loaded metadata are showed and this alert is shewed by the browser:
ERROR: The config-summary.xml file does not declare a summary type of: 'manager'
Take in consideration that config-summary.xml is not present in 4.0.3
I installed correctly elastic search.
There are some other steps to do in order to get the system works? A migration scripts exists for old 3.8.1 data?


texts: Limit the editing extent of a feature class by area in ArcMap

texts:
Using ArcMap (Advanced), if I have a dataframe set to British National Grid and I add a feature class to the map document that is also set to BNG, and I try to draw outside the extent of BNG I will get an error about the data being outside the spatial reference extent.  Great!

What I would like to do, is limit the user to a small area within the spatial reference extent.  i.e limit their editing to say a 5km by 5km area.  So that if the user tries to edit or add new data to the feature class, he will see an error telling them they are outside the feature class extent (even if within the spatial reference extent).

I have tried changing the dataframe options so that the dataframe is clipped to the extent I want the user to stay within, however, this won't limit the user from adding data outside the extent, it will just make the data "invisible" until the clipping option is turned off.

I have also tried setting the Feature Extent in the Feature Class Properties, but as soon as you then draw outside this extent it just increases the Feature Extent.  Is there no way to lock this?

I know that a possible way to do this would be to create a custom coordinate system for just the area I want to limit the user to, however, this is not an option as they are all working from a master map document which they copy and then add their specific feature class (the one I want to limit).


texts: Improve the processing time of model using zonal statistics and raster calculations

texts:
I've built a model in arcgis 10.5 ModelBuilder to represent a process that I need to run for thousands of polygons and input raster combinations. The problem is that to this model, for one polygon, takes approximately 8min 57 seconds to complete. When I work out how many iterations I will need, that is around 24 days of running time! Way too long. The input raster sizes are approximately 0.008 decimal degrees cell size covering the entire globe.

Here is the model currently:

For each of the zonal statistics and raster calculator outputs I tried to change the output from writing to a geodatabase to "in_memory". But the model crashes after the first zonal statistic on the first polygon with a message about "out of memory".

Here is what the model is doing:

For each country, calculated the total population (population raster)
weight average the PM_raster based on the polygons total populations (=(pm_raster * (Population_raster/total_pop))
Run zonal statistics to sum the weighted PM_weighted%n% and that is the average PM weighted on the countries population.

So my questions are:

Can I make this model run quicker by using "in_memory"? Why did it crash at the first use of it in the model?
Is there a quicker way to get these results away from using this model?


texts: Does ArcGIS support curves in geopackage?

texts:
When I export a featureclass to a geopackage (with spatial type 'geopackage') in ArcGIS 10.4, true curves are densified to lines consisting of many short straight segments.

Is this a shortcoming of the export method, or of the capabilities of geopackage? I couldn't find anything about support of curves by geopackage.


texts: Below is a screen shot of my Layers Panel showing two Graduated Category layers. One set of category features (Change in Small Firms (2015-2010)) are accompanied by counts, while the other (Change in Small Firm Counts (2015-2000)) is not. The counts for the first show up in the Composer output, but not in the second. I'd like both legends to be similar, but I can't figure out how to add or remove the counts.


texts: Invalid Data Source when importing geojson to QGIS

texts:
Im trying to import geojson, I add data, select protocol and use the uri https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_50m_admin_0_countries.geojson QGIS says "Invalid Data Source: https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_50m_admin_0_countries.geojson is not a valid or recognized data source"

I've followed the tutorial here http://webgeodatavore.com/add-geojson-content-in-qgis-short-recipes.html but I cant get the data to come in, any ideas? I'm using QGIS version 2.18.13


texts: I've been tasked with creating webservices of individual layers in Portal for ArcGIS.  The data itself is stored in SQL Server in SRID 4326 (WGS84 unprojected). I'm wondering if it's a better idea to decide on a projection and project the data before I publish the services? The services will be used in an application (not an ESRI app) and they are pretty much for display purposes.


texts: Generating Multiple Lines from point feature to closest point features

texts:
I am doing a transportation analysis on buildings in ArcGIS 10.2.

I need to find nearest point features to multiple feature classes and then generate lines to those closest point features.

I was reading another question post here about using the "generate near table" and "XY to line" tools to do this.  It worked fairly well, but I could not specify the tools to find and generate lines to each of the nearest features in multiple shapefiles/feature datasets.

ex: I have a point file for one building I need to generate a line to the closest bus stop, to the closest drinking fountain, to the closest bicycle lock rack.

There is a seperate dataset for each transportation feature (bike rack, water fountain, bus stop, etc...)

Can anybody help?

Here is the link to a similar problem:

Connect point to closest feature in ArcGIS 10.2


texts: Harvesting from SQL Server to GeoNetwork?

texts:
I am using a Geonetwork Harvester, configured to pull from a ArcSDE, V3.2.0. of Geonetwork. The server I'm trying to harvest from is a sql server and am getting a "No instance running on server" error, even though I can connect to the SQL Server through ArcCatalog. Here's the error message:

  0 Unknown Host - YK54-vweb02t\sql1  NO INSTANCE RUNNING ON SERVER.
  2016-10-12 14:29:31,533 WARN  [Geonetwork] - Raised exception while
  harvesting from : Geonetwork (ArcSDEHarvester) 2016-10-12 14:29:31,533
  WARN  [Geonetwork] -  (C) Class   : ExceptionInInitializerError
  2016-10-12 14:29:31,533 WARN  [Geonetwork] -  (C) Message : null
  2016-10-12 14:29:35,760 WARN  [geonetwork.resources] - Resource not
  found images/harvesting/[], default resource returned:
  /images/harvesting/[] 2016-10-12 14:29:39,496 WARN
  [geonetwork.resources] - Resource not found images/harvesting/[],
  default resource returned: /images/harvesting/[] 2016-10-12
  14:31:02,818 WARN  [geonetwork.resources] - Resource not found
  images/harvesting/[], default resource returned: /images/harvesting/[]
  2016-10-12 14:31:06,104 WARN  [geonetwork.resources] - Resource not
  found images/harvesting/[], default resource returned:
  /images/harvesting/[] 2016-10-12 14:31:08,755 WARN
  [geonetwork.resources] - Resource not found images/harvesting/[],
  default resource returned: /images/harvesting/[]

I'm fairly new to developing and don't quite know where to look.

Any ideas?


texts: Converting multiple polygons to a single density raster

texts: I have 20 polygon shapefiles that overlap each other. I want to get a kernel density type raster from the polygons, but I am not sure if ArcMap (10.4.1) offers a tool to do that.


texts: GDAL polygonize in python creating blank polygon?

texts:
I am having trouble using the Polygonize function in python.  The cookbook example for this can be found here.

The relevant portion of my code is:

sourceRaster = gdal.Open('myraster.tif')
band = sourceRaster.GetRasterBand(1)
bandArray = band.ReadAsArray()
outShapefile = "polygonized"
driver = ogr.GetDriverByName("ESRI Shapefile")
if os.path.exists(outShapefile+".shp"):
    driver.DeleteDataSource(outShapefile+".shp")
outDatasource = driver.CreateDataSource(outShapefile+ ".shp")
outLayer = outDatasource.CreateLayer("polygonized", srs=None)
gdal.Polygonize( band, None, outLayer, -1, [], callback=None )
outDatasource.Destroy()
sourceRaster = None

I know that the band has relevant information, here is a snippet of bandArray:

array([[ 4.,  4.,  3.,  3.,  3.,  2.,  2.,  2.,  2.,  3.,  3.,  3.,  3.,
         3.,  3.,  3.,  3.,  4.,  4.,  4.,  4.,  4.,  4.,  4.,  4.,  4.,
         4.,  4.,  4.,  4.],

When I open the attribute table in QGIS, it is empty:

Edit:

The conversion works just fine in QGIS using Raster -> Conversion -> Polygonize tool

Screenshot of raster to be polygonized:

And screenshot of resultant conversion from QGIS tool:

I am using the Enthought distro on Windows 7, GDAL version 1.10.0-3

The problem is that I cannot polygonize a raster in python using GDAL and the cookbook example, I can polygonize this same raster with no problem in the QGIS GUI


texts: QGIS Connection with MSSQL: does not work

texts:
With QGIS 3.14 I try to get access to a table in MSSQL with points of the GEOGRAPHY type. The table has a PK with clustered index, and a spatial index. There is a filled geometry_columns metadata table.
But I can not establish a connection.
See picture where I get stuck. If I click on 'List databases' the database in question appears. But If I click 'Test connection' I very briefly see the message 'Testing connection: .....' above, and nothing happens, no error message either. The 'OK' button remains grey so I can not proceed.


texts:
I have a vector layer in QGIS. I have added a bunch of rule for this layer. This is the QDockWidget for layer in QGIS main window.

So each of interstate, divided, secondary is different rule added using
QgsRuleBasedRendererV2.

All the rule have the check box where I can manually toggle the visibility of the layer. Is there any way I can toggle this using python?

I tried to use layer tree

root = QgsProject.instance().layerTreeRoot()
for child in root.children():
    print type(child), child.layerName(), child.children()

but child.children is returning empty list instead of those rules.

Type of Road Network is qgis._core.QgsLayerTreeLayer.


texts: Calculating edge length of polygon within overlapping polygon using ArcGIS Desktop?

texts:
I have a layer of wetland polygons and a layer of lakes. I basically want to find the total length of lake shoreline contained within each wetland and add these values as an attribute of the wetlands.

This image shows what I'm looking for in red:

The result would be the summed length of the red polylines as an attribute i.e.

WetlandID   ShorelineLength
55555       3.23mi
34888       7.11mi


texts: Percentage buffer around multiline in QGIS?

texts:
I need to create plugin to QGIS that will draw buffers about width equal 1/2 length each line.
Example (my amateur sketch in MS Paint):

So, around each lines  be created square
I searched good solution but I found only plugin Buffer by percentage (it works only with polygon) and a few threads about buffer around point but it's not enough for me.
Maybe you have an idea how it could be solved?
I don't need all code, I just don't know what I should do now.


texts: Creating 3D polygon roof from LiDAR data using FME?

texts:
I have LiDAR data of a building and would like to construct a 3D Model using FME 2016.

The LiDAR data shows that the structure has sloped roofs with various other elements on the roof surface (e.g. ventilation shafts).

Is there any way I can create a 3D surface polygon model from this data which would capture the sloped surfaces?

Below is a visualization of the LiDAR data.


texts: How can I replicate focalmean with focal statistics

texts:
I am trying to get rid of some small gaps of no data in my rasters. I would previously have used focalmean but it is no longer available. I've tried what I expected to work but I'm getting errors.

What I have is:

MYNEWRAST = Con(IsNull("rasterrast"),FocalStatistics("rasterrast",NbrRectangle(50,50),"MEAN","NODATA"),"rasterrast")

and this is giving me a pretty unhelpful error message:

Runtime error  Traceback (most recent call last):   File "<string>", line 1, in <module>   File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Functions.py", line 5142, in FocalStatistics     ignore_nodata)   File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Utils.py", line 47, in swapper     result = wrapper(*args, **kwargs)   File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Functions.py", line 5136, in Wrapper     ignore_nodata)   File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\geoprocessing\_base.py", line 498, in <lambda>     return lambda *args: val(*gp_fixargs(args, True)) ExecuteError: ERROR 999999: Error executing function. General function failure [FocalSt_rast6] Failed to execute (FocalStatistics).

Has anyone had something similar working, and did they do it differently?


texts: Importing shapefile into PyCHARM with QgsVectorLayer "Layer is not valid"

texts:
I'm using PyCharm with QGIS3 and Python3. I tried this code to import a shape file and the other to connect to PostGIS vector layer. The codes goes right on the python console of QGIS, but in the PcCharm environment it says me "the layer is not valid". I don't understand why. It seems I can't read the address.

First code:

from qgis.core import *

local_path = '/home/nicola/Scrivania/layers/ate_argillla.shp'
#vlayer = QgsVectorLayer(os.path.abspath(local_path), 'insediativo_50000', 'ogr')
vlayer = QgsVectorLayer('/home/nicola/Scrivania/layers/ate_argillla.shp', 'argille', 'ogr')

if not vlayer.isValid():
    print("Il layer non è valido")
else:
    print("Il layer è valido")
print(vlayer)

Second code:

from qgis.core import *

uri = QgsDataSourceUri()
uri.setConnection("localhost", "5432", "ptcp", "postgres", "aaa")
uri.setDataSource("public", "franelineari", "geom")
vlayer1 = QgsVectorLayer(uri.uri(False), "alvei fluviali", "postgres")
if vlayer1.isValid():
    print("il layer è valido")
else:
    print("layer is not valid")


texts: If/Then Field Calculator Return Calculations

texts:
After collecting GPS location for road culverts I would like to calculate the $ values for each culvert based on their diameter and length in ArcMap. Existing number fields in the attribute table are Culvert Diameter, Length and the Value field I would like to populate. Unfortunately I have no programming experience so I'm hoping for your help. I adjusted a basic if/then formula I found in this forum and added a multiplication function in the return line. Unfortunately this doesn't work...

    def CulvertValue(Diameter):
      if Diameter > 0 and Diameter < 14:
        return (Length*50)
      elif Diameter > 14 and Diameter < 20:
        return (Length*100)
      else:
        return "N/A"

And the result

    CulvertValue(!Diameter!)

So let's say the culvert is under 14 inches in diameter and 20 feet long, knowing that a culvert with this diameter costs $50 per foot, the result would be 1,000. I would obviously have to add more elif lines to cover the different price categories. Any thoughts how this could be realized with a Python script?


texts:
I'm trying to figure out how to get rid of these black lines in my images by creating a mask using the VV pixels. How can I get rid of these lines?

// Load Sentinel-1 C-band SAR Ground Range collection (log scale, VV, ascending)
var collection = ee.ImageCollection('COPERNICUS/S1_GRD')
.filter(ee.Filter.eq('instrumentMode', 'IW'))
.filter(ee.Filter.eq('orbitProperties_pass', 'ASCENDING'))
.filterMetadata('resolution_meters', 'equals' , 10)
.filterBounds(roi)
.select('VV');

//Filter by date
var april_May2015 = collection.filterDate('2015-04-01', '2015-05-30').mosaic();

//print(before, 'Sentinel-1 Collection');
// Display map
//Map.centerObject(roi, 7);
//Map.addLayer(before, {min:-15, max:0}, 'Before flood', 0);

//Apply filter to reduce speckle
var SMOOTHING_RADIUS = 50;
var april_May2015_filtered = april_May2015.focal_mean(SMOOTHING_RADIUS, 'circle',
'meters');

// remove stripes
//function stripeMaskVV(april_May2015_filtered) {
// VH backscatter of stripes is often less than -30dB
//  var mask = ee.Image(0).where(april_May2015_filtered.select('VV').lte(-40), 1).not();
//  return april_May2015_filtered.updateMask(mask);
//}

function stripeMaskVV(april_May2015_filtered) {
  var img = april_May2015_filtered.gt(-40); // make a mask image
  april_May2015_filtered = april_May2015_filtered.updateMask(img);
  return(april_May2015_filtered);
}

//Clip the images to our area of interest
var april_May2015_filtered_clip = april_May2015_filtered.clip(roi);

//Display filtered images
Map.addLayer(april_May2015_filtered_clip, {min:-15,max:0}, 'April May 2015',0);

// Export the image, specifying scale and region.
Export.image.toDrive({
image: april_May2015_filtered_clip,
description: 'april_May2015',
scale: 10,
region: roi,
fileFormat: 'GeoTIFF',
});


texts: GEE - method (keyboard?) to traverse imported CSV data points

texts:
I've recently imported a csv, and used this code to view the points:
print(table);
Map.addLayer(table.draw({color: 'ff0000', pointRadius: 5}), {}, 'Sites');

That worked, however, I plan to draw polygons around these points and use those polygons as training and validation data for a random forest classification model.  There are 198 points, which means that I'll draw 198 polygons.  In order to approach this rationally, I'm hoping that I can hop from point to point quickly (keyboard shortcut), keeping a set zoom set, each time centering my map screen to the latest point.  This way, I won't have to zoom out, manually find a point, and then zoom back in to draw the polygon.  I'm new to GIS, but if I was in ArcGIS, I'd pull up an attribute table for the points, and use that table to hop from point to point.  I can't click on/select the data points, so I'm guessing that I'll have to convert this csv data into a different type feature class to be selectable on the map.
Is there a way to use an attribute table to hop around, and if not, keyboard?
If no, other thoughts?
Additionally, do I have to convert the points to a special feature class first?
If yes, how would I do that?
I'm completely new to this!


texts: Need an alternative to modify overviews in a GDAL Virtual Raster (VRT)

texts:
I have built a VRT mosaic and overviews with these lines of code:

out_vrt = os.path.join('/out/dir/', 'out.vrt')
ds = gdal.BuildVRT(out_vrt, my_raster_list)
ds = None
ds = gdal.Open(out_vrt)
factors = [128, 256, 512]
gdal.SetConfigOption('COMPRESS_OVERVIEW', 'DEFLATE')
ds.BuildOverviews("AVERAGE", factors)

This creates the out.vrt raster referencing 187 GeoTIFF rasters in my_raster_list. These rasters already have overviews for levels [2, 4, 8, 16, 32, 64].

The code then creates the output.vrt.ovr file containing overviews for levels [128, 256, 512].

As there is no SUM algorithm for building overviews, and I need to build overviews which represent the sum of pixel values in the resampled pixels, I successfully used the AVERAGE algorithm to build overviews for the GeoTIFF rasters and then used .ReadAsArray() and .WriteArray() methods to manipulate the overview pixels to calculate the sum from the average values and the number of original pixels within the resampled pixels.

Basically, this is done with these lines:

band = ds.GetRasterBand(1)
ovr_num = band.GetOverviewCount()
factors = [128, 256, 512]

for level in range(ovr_num):
    b_ovr = band.GetOverview(level)
    arr = b_ovr.ReadAsArray()
    arr *= (factors[level])**2
    b_ovr.WriteArray(arr)

    b_ovr = None
    del b_ovr

However, I cannot do this with the VRT overviews as

Writing through VRTSourcedRasterBand is not supported

The question is: how can I overcome this problem?

I know I can write the overviews directly in the GeoTIFF rasters, but I am not quite sure if this is the right way to go, because:

I am afraid overviews for large factors will look "nasty" in the final mosaic when created for single rasters instead of considering the whole 187
If one of the 187 rasters needs to be updated, I would have to build overviews up to 512 level, and this would take a lot of time. Rather, I would just update it until level 64 and for lower scale I would bet I won't notice much difference if I don't update the VRT overview levels.


texts: How to SelectLayerByAttribute Xcoordinate and Ycoordinate

texts:
I am having trouble selecting by attribute when I am trying to select by the Xcoordinate and Ycoordinate. For example

 arcpy.SelectLayerByAttribute_management("Manhole_ly","NEW_SELECTION",'"Xcoordinate" = 2817018.499512')

This will not select but I have no trouble selecting when using the following.

arcpy.SelectLayerByAttribute_management("Manhole_ly","NEW_SELECTION",'"OBJECTID" = 447')

Is there something special that has to be done on the X and Y coordinate fields?


texts: Why does opening SDE Workspace Factory ask for credentials again? ArcObjects C#

texts:
I'm trying to open SDE Workspace Factory using IWorkspaceFactory.Open
I give the complete Property set in the code to open.
ESRI.ArcGIS.esriSystem.IPropertySet propertySet = new ESRI.ArcGIS.esriSystem.PropertySetClass();
propertySet.SetProperty("SERVER", "myServer");
propertySet.SetProperty("INSTANCE", "myinstance");
propertySet.SetProperty("AUTHENTICATION_MODE", "DBMS");
propertySet.SetProperty("DATABASE", "myDatabase");
propertySet.SetProperty("USER", "sde");
propertySet.SetProperty("PASSWORD", "sdePassword");
propertySet.SetProperty("VERSION", "sde.DEFAUALT");

IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactory();
IWorkspace workspace = workspaceFactory.Open(propertySet,0);

But When the workspaceFactory.Open is called, a dialogue box is opened to ask for credentials again.

Why does this happen?
Also, Can someone tell me what does the second parameter of IWorkspaceFactory.Open "hWnd" represent? I couldnt find a proper explanation in the documentation.


texts:
I extract highways from OSM every day from a cron job and keep a postgis database up-to-date. Due to a database change, the syncing has stopped in December 2017. I am trying to re-sync with a sequence number from earlier than December 03 2018 (when the syncing failed), but, I get a

org.openstreetmap.osmosis.core.OsmosisRuntimeException: The replication state doesn't contain a timestamp property.

Error. How can I rectify the issue and make the database current? Below is the failure:

-------------------Fri Sep 14 14:18:42 EDT 2018----------------------

Sep 14, 2018 2:18:42 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.45
Sep 14, 2018 2:18:42 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Sep 14, 2018 2:18:42 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Sep 14, 2018 2:18:42 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Sep 14, 2018 2:18:43 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-replication-interval failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: The replication state doesn't contain a timestamp property.
    at org.openstreetmap.osmosis.replication.common.ReplicationState.loadProperty(ReplicationState.java:65)
    at org.openstreetmap.osmosis.replication.common.ReplicationState.load(ReplicationState.java:78)
    at org.openstreetmap.osmosis.replication.common.ReplicationState.<init>(ReplicationState.java:59)
    at org.openstreetmap.osmosis.replication.common.ServerStateReader.getServerState(ServerStateReader.java:108)
    at org.openstreetmap.osmosis.replication.common.ServerStateReader.getServerState(ServerStateReader.java:50)
    at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.runImpl(BaseReplicationDownloader.java:290)
    at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.run(BaseReplicationDownloader.java:383)
    at java.lang.Thread.run(Unknown Source)

Sep 14, 2018 2:18:43 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
    at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)
    at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
    at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)


texts: How to get attributes from line-polygon where points are snapped on, into the point-layer?

texts:
I have a SQL Server spatial table with point-objects, the points are set by snapping onto a line SQL Server spatial table. so the points are georeferenced on the line.
How can I get the attributes from the line-table where the points are snapped on, 'joined' on the points?

I can temporarily make shape-files from the spatial tables, that's no problem.

I'm using QGis 2.x but I could use ArcMap 9.x too.


texts: Processing Script Editor shows spaces as tabs

texts:
I'm using the processing script editor in QGIS 3.2 (Bonn). The display is messed up. Spaces are shown as tabs and there is a random tab in between a name and the () to run a command. As a consequence, nothing runs correctly.

Below is an short, nonsense example.  Does anyone know more about this?


texts: Can you move a gdb from one folder to another and keep the files?

texts:
I've copied a .gdb folder from a main folder to another and all the files that were created using ArcMap weren't there in the copied folder.

Why weren't these weren't moved as well?

Shouldn't they be there in that folder?


texts: replace raster cell values with values in a .csv

texts: I'm looking for a simple way to replace the value field in GRID format with values that I have in a csv.  It would be much like doing a join, where the GRID and the csv have a FEATUREID and then getting a field value from the joined table to replace or to be displayed in the symbology, or to put it another way, these new values will be represented in the histogram for this raster? I am using arcMap to display the raster and would like the histogram to be based on a column other than the VALUE column.


texts: Why is my ArcGIS Runtime SDK for .NET 10.2.4 failing?

texts:
I'm trying to install ArcGIS_Runtime_SDK_DotNet_1024.exe. The installation appears to complete but then starts rolling back. The log file is not much help or I don't know how to read what it's saying.

ArcGIS 10.3 (desktop products only) is installed. OS is 64-bit Windows 8.1.

Any idea why this is failing or how I can troubleshoot further?

Installation Log File:

******************************

Processor type is : 64
The operating system is : Windows8.1
The minimum operating system requirement has been met
Microsoft MSXML 6 installed on the machine: XML DOM Document 6.0
ArcGIS 10.1 for Server: NOT Installed

******************************
Input file : C:\tmp\ArcGISRuntimeSDKNET\SetupFiles\Setup.ini
Installer file : C:\tmp\ArcGISRuntimeSDKNET\SetupFiles\setup.msi
MSXML : NULL
Operating system: 64
Product Code : {28CC81FD-D0BB-4C59-9F3F-EC8594E6FD00}
Product Name : ArcGIS Runtime SDK 10.2.4 for the Microsoft .NET Framework
Microsoft Sql CLR Types x86: NULL
Microsoft Sql CLR Types x64: NULL
Microsoft Windows Installer : NULL
Windows Operating System : Windows8.1

******************************
Input file : C:\tmp\ArcGISRuntimeSDKNET\SetupFiles\Setup.ini
Installer file : C:\tmp\ArcGISRuntimeSDKNET\SetupFiles\setup.msi
MSXML : NULL
Operating system: 64
Product Code : {28CC81FD-D0BB-4C59-9F3F-EC8594E6FD00}
Product Name : ArcGIS Runtime SDK 10.2.4 for the Microsoft .NET Framework
Microsoft Sql CLR Types x86: NULL
Microsoft Sql CLR Types x64: NULL
Microsoft Windows Installer : NULL
Windows Operating System : Windows8.1

Product was installed unsuccessfully


texts:
I have an OpenLayers map with the following css:

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

However the map does not fill the whole screen, and it stays like this (take a look at the bottom):

Guess it is due to a ratio issue but don't know how to solve it.

  Any idea of how to force the map to fill the whole screen?


texts: Convert a list into ee.FeatureCollection in Google Earth Engine

texts:
Starting with this, I have

// load
var landCover = ee.ImageCollection('MODIS/006/MCD12Q1');
var country = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017');
// filter

// filter on image for 2017 and clip with country shape
var modis2017 = ee.Image(landCover.filterDate('2016-01-01', '2016-12-01')
                .select('LC_Prop1')
                .first()); //.clip(sel);
// ----------------------------- SENEGAL ----------------------------------------
var sel = country.filter(ee.Filter.eq('country_na', 'Senegal'));
print(sel);

// get the results in an array
var values = ee.List(modis2017.get('LC_Prop1_class_values'));
var array = values.map(function(ind){
  var cstImage = ee.Image.constant(ind);
  var equals = modis2017.eq(cstImage);
  return equals.reduceRegion(ee.Reducer.sum(), sel.geometry(), 500).values();
});

print(array);

But I'm unable to export those results to a CSV. I don't understand how can I convert a list into ee.FeatureCollection manageable by

// Export the FeatureCollection.
Export.table.toDrive({
  collection: array,
  description: 'senegal_landcover',
  fileFormat: 'CSV'
});


texts:
I´m currently conducting a suitability analysis with the weighted overlay function.
One relevant criteria is the proximity to highways. If the wind turbine is located up to 300 m away from the highway, the cell gets 10 points (out of 10). If it is farther away,the cell shouldn´t get a score, because the criteria is not relevant. So I ran the "euclidean distance" function with a maximum distance of 300 m. All cells farther away than 300 m are declared as "nodata". Then I ran the "weighted overlay" function with 3 more criteria (all have the same weights). The problem is that the study area is bigger than the 300 m buffer around the highways, but after I ran the "weighted overlay" function, only the area within the 300 m buffer was weighted. The rest of the study area was declared as "nodata".
The goal is that, when conducting the weighted overlay function, a cell farther away than 300m is not influenced by the criteria "proximity to highway".

example:
There are 4 criteria with equal importance. C4 is the "proximity to highways" criteria.
A cell within the 300 m radius should be calculated like this:
c1: 8 points (25%), c2: 6 points (25%), c3 4 points (25%) and C4: 10 points (25%)
--> weight: (8+6+4+10)/4 = 7 points
A cell outside of the 300m radius should be calculated like this:
c1: 8 points (25%), c2: 6 points (25%), c3 4 points (25%) and C4: no input (25%)
--> weight: (8+6+4)/3 = 6 points

Is this possible? I don´t want to give the "nodata" cells a scale value.

Thanks for you help!


texts:
When I validate the proj4 parameters it says they are valid but when I press OK I get the above error message. My parameters are:
+proj=tmerc +lat_0=0 +lon_0=-117 +k=1 +x_0=-64830 +y_0=-5264340 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs +type=crs


texts: Can you change the default CRS in Photo2Shape?

texts:
I'm running Photo2Shape to create a shapefile that I then process through Points2One in order to create a line to make a buffer layer.  When I run Photo2Shape it outputs a shapefile in wgs84 which makes every layer after that the same CRS.  My project default set to EPSG:102003.

Is there a way to set the default to another system so I can use meters to create a buffer layer later on?  Neither Points2One nor Photo2Shape have the option.  I know you can use 'save as' to save the shapefile in another coordinate system but this isn't efficient when I need to do this several hundred times.


texts: When making WFS requests via POST, which parameters are elements, which are attributes?

texts:
I'm trying to construct WFS 1.1.0 requests by POST, which means sending an XML document. I'm having a lot of trouble working out the exact format of this document. Most of the documentation is geared around GET requests, passing parameters by URL.

Somewhat by trial and error I have worked out that for GetFeature, for instance:

propertyName is an element under <wfs:query> (as <wfs:propertyName>)
typeNameis an attribute of <wfs:query>
maxFeatures is an attribute of the top level <wfs:GetFeature> element

But I have no idea where to put BBOX, for instance.

Is there a clear source of documentation for the POST format?


texts: What bin value does QGIS Histogram uses?

texts:
I have some single-band rasters (NDVI) on QGIS, for which I can obtain their distribution histogram by going to Right-click > Properties > Histogram Tab > Compute Histogram. This is an example of what I get:

This is the same procedure (and also works) for multi-band images (RGB etc). However, I wonder what is the default bin size that QGIS used to calculate and render this histogram? I obtained this histogram without modifying any setting on the Prefs/Actions tab.
In the case of RGB images surely the bin size should be >=1, as pixels can only be in the discrete interval of [0,255] and it wouldn't make sense to have a lower bin size (say, 0.5 pixel value).
However, in the case of NDVI and similar indexes non-integer bin sizes are viable, even more given that the NDVI lies between [-1,1]. So, I wonder how QGIS determines this bin size, as I need to know what value was used to properly compare with other histograms I produce manually.
I am using QGIS 2.14.12-Essen


texts: Finding the arcs traversed in Shortest Path (Network Analyst) - ArcGIS

texts: I used Shortest Path from Network Analyst in ArcGIS to calculate the shortest distances between multiple points. The result I get is the length of the paths, but what I need is the actual route in terms of arcs taken to get from source to destination point. I have read that Shortest Path uses Djikstra's algorithm to calculate these paths, is there any way I could also get the breakdown of these paths that tells me exactly which arcs were traversed to reach from Incident Points to Facility Points?


texts:
I am attempting to write a style function within an OpenLayers 3 application that will change the fill color of a circle based on an attribute from a GeoJSON piece of data. I have looked over stack exchange and this site as well as the documentation and I still can't crack it. This is what I have:

var wellsLayer = new ol.layer.Vector({
  source: new ol.source.GeoJSON({
    projection: 'EPSG:3857',
    url: 'data/WELLS.geojson'
  }),
  customStyleFunction,

});

This is my best attempt so far:

var customStyleFunction = function(feature, resolution) {

  var fontSize = '18';
  if(feature.get('WELL_CLASS')= 'EXISTING') {
    fontSize = '10';
  } else if(feature.get('WELL_CLASS')= 'PROPOSED') {
    fontSize = '14';
  } else if(feature.get('WELL_CLASS')= 'INJECTION') {
    fontSize = '16';
  }

  return [new ol.style.Style({
    image: new ol.style.Circle({

      fill: new ol.style.Fill({
        color: '9999CC'
      }),
      stroke: new ol.style.Stroke({
        color: '#ddd',
        width: fontSize
      })
    })
  })];
};

I want to call feature.get and grab a field called "WELL_CLASS" which has some values in it. I won't bother detailing everything I have tried but I attempted the hyperlink syntax as well as what is on the ol3 docs with no luck.

It also bears mentioning that I am not very good at JavaScript.

I believe the mistake may be with my function code. I say this because if I define a static style such as below the layer draws without issue, but if I attempt to use the function nothing appears.

 var staticwell = new ol.style.Style({
  image: new ol.style.Circle({
    fill:new ol.style.Fill({color: 'red'}),
    stroke: new ol.style.Stroke({color: 'black', width: 1}),
    radius: 5
  }),
});


texts: How to get depth between two spline raster layer in ArcGIS for Desktop?

texts:
I have spline raster layers of same area and I need to know the distance between layers by every pixel.
I have prepared a sample drawing to define my problems.

Does anybody have an idea regarding my problem?


texts: Running Batch Build Pyramids from subfolders

texts:
I have a question that someone might help me. I have set up 10 folders for each office. I have set up a sub-folders that holds the landsat 8. I worked on landsat 8 in ERDAS and since I am done doing that.

Now I need to run about 100 Imagine files to run batch Build Pyramids for ArcGIS 10.1 but I want something much quicker.

I want to use Model Builder to run Build Pyramids for all of the 10 office landsat 8 sub folders ?

For example   Folder =    Office name

          subfolder = landsat8

                      name of landsat.img


texts: Getting Field by name from feature using GDAL?

texts:
I have recently started using GDAL in C#, I want to get a value from a field of a feature using the name of that field. In the docs here it says that the operator [char*] is supported, however it's not in the .net package.

Here is my code

 Feature feature = layer.GetNextFeature();
 var field = feature['myField']; // not recognized :(

Is there a way to get a value by field name from the feature ?


texts: How to toggle group visibility in QGIS using Python?

texts:
I've tried this, but it doesn't work out.

root = QgsProject.instance().layerTreeRoot()
group1 = root.insertGroup(0, "PGB")

legend = i.legendInterface()
legend.isGroupVisible(group1)
legend.setGroupVisible(group1, False)


texts:
I am using ArcGIS Pro 1.4 on a laptop with the following specs:

Windows 10 Home 64-bit
Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory:16 GB @ 1200 MHz
NVIDIA GeForce GTX 1060, 6144 MB (Just updated the driver)

The Shapefile I am trying to display is linked here: TM_WORLD_BORDERS_SIMPL-0.3.zip

When I open in Desktop 10.4 it dispalys fine but in Pro I cannot see the layer.  I can access the attribute table and the information function works just fine.

ArcGIS Pro 1.4

ArcGIS Desktop 10.4

Has anyone else experienced anything like this?


texts: Calculating coordinates when only bearing of two points and distance between them is known?

texts: I have bearing of two points 115 33' 09" and distance between these two points is 1464.36m. Is it possible to get the unknown coordinates from this data?


texts: Creating IDW of up to 20,000 points in ArcGIS Desktop?

texts: I am create IDW interpolation of 60-70 points in ArcGIS. It takes 2 minutes. But when I create IDW of 20000 points in ArcGIS, it takes at least 4 hours and 30 minutes. I want to ask why takes much time for 20000 points for IDW interpolation.


texts: Inserting CRS definition using insert expression in print composer in QGIS

texts:
I'm still new in using QGIS

QGIS version: 2.16.2 64x

I don't know what will i enter in the "insert expression" so that the CRS definition will be the one to show in the label box

i tried the example below:
layer_property('i input the name of the layer','crs_definition')
but nothing showed after i click ok


texts: Join attributes from polygon layer using spatial relationship - Joining polygon layer has overlaps in QGIS?

texts:
I'm trying to to join two polygon layers. My joining polygon layer may have one or more polygons touching the target polygon. And the joining polygon layer may have overlapping polygons as well.
I would like my target polygon layer to get attribute data from all the polygons that touch it.
I've been trying using Join attributes by location on QGIS.  However I only get data from one of the polygons.
The Target dataset is around 140 polygons where the joining is around 900+ (not all necessarily touching the target set)
I've tried too illustrate my point below.

Another issue is that both target and joining polygons touch boundaries several times and with different polygons as illustrated above.


texts: How can I convert a large csv of irregular lat/lons to regular raster GRID?

texts:
I have a large csv containing ~5 million rows containing Lat, Lon, and Depth bathymetry values. I want to generate a raster GRID (for use in Arc) from this, but the trouble is the lat/lons are irregularly spaced. I've figured out the basics for reading in the data, creating a spatial object, and writing a raster assuming the points are regular:

pts = read.csv("data.csv", header=T)
coordinates(pts) = ~Lon+Lat
proj4string(pts) = CRS("+init=epsg:4326")
gridded(pts) = TRUE #### FAILS
ras = raster(pts)
writeRaster(ras, "output.grd", "raster)

Currently it crashes on the gridded line with error:

suggested tolerance minimum: 0.0025975
Error in points2grid(points, tolerance, round) :
  dimension 1 : coordinate intervals are not constant

Is there some way to fit a regular grid over these points, and then sample averages from the points within each cell?

I'm still learning R.

I'm open to python scripting with tools from ArcToolbox as well. Although I was under the impression that R would be faster. I have access to 3D Analyst, Geostatistical Analyst, Network Analyst, Spatial Analyst, and Tracking Analyst.


texts: Converting PBF to GeoJSON using python3-gdal module

texts:
How can I use the module python3-gdal to convert .pbf into .geojson using Python?
I've been exploring ogr in python3-gdal module but I can't figure out how to make it work.
I do a request, the response brings a pbf and I would like to do something like:
from osgeo import ogr
import requests
response = requests.get(".../geoserver/gwc/service/tms/1.0.0/myworkspace:mylayer@EPSG%3A900913@pbf/17/129151/49004.pbf")
my_json = ogr.convert_this_to_pbf(response.content)

How could I do this?


texts: How to fix the geocode error: UnicodeEncodeError ascii codec can't encode character ufeff and xfc

texts:
I'm struggling with geocoding on QGIS3 on a Mac 10.14.1.

When I try to import a CSV file from Excel via MMQGIS->Geocode->Geocode CSV with Google/Open Street Map, I get the error:

My guess is that Microsoft Excel is not saving the file correctly in UTF-8, even though I'm saying that it should save it like this. I have found a workaround, that takes a bit time unfortunately.

I'm uploading the CSV file to google spreadsheet and export it as a csv file.

However, now I'm getting another error and I don't find a workaround for this...

Do you have an idea how I can fix this problem?

I fear that the problem might be something with German Umlauts like
üäö, but I really need this for joining tables etc...

Here is a simple excel table for you to test my issue.

Google Spreadsheets


texts: Sorting rows in the attribute table alphabetically in QGIS

texts:
Clicking the upper slot in the attribute table the column will sort by alphabetically, from the smallest value to largest value

or from the largest to the smallest

Is there a way to also sort out the rows names alphabetically?


texts:
I have two layers that I want to remove using PyQGis as part of a larger script. The first layer I can removed using:

QgsMapLayerRegistry.instance().removeMapLayer( shp.id() )

However, it seems that the second layer (the Joined layer) cannot be removed in the same way as I get the following error:

QgsMapLayerRegistry.instance().removeMapLayer( result.id() )

Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: JoinAttributes instance has no attribute 'id'

Does anyone happen to know a way to remove the Joined layer with PyQGIS?


texts: Openlayers - custom property for layer object

texts:
I'm fairly new to OpenLayers, and have written a little function to switch the legend image for WMS layers on and off if the layer is visible or not. This is all much neater if I can define my own custom property for the WMS layer object, e.g legendurl: 'http//....'

While this works, I'm wondering if it is ok/advisable to create custom properties on the fly in this way?


texts: i need some third party WMS Getcapabilities URLs. From where i can get those URLs. I want to test those URLs in my Geoserver.


texts:
Is there any possibility to construct SLD style which displays label with rectangular background?

Background has to have sizes which automatically fit to sizes of text content. I would prefer not to use any vendor parameters because SLD has to be used in more than one application.

This is an example of desired label generated in QGIS (unfortunately QGIS doesn't export label specification from this label configuration):


texts:
When loading JS script to display OpenLayers in a webpage, I am getting 404 on both stylesheet and script.

Any alternative sources for code?  Can't find it on OpenLayers Github, which is now version 5.4


texts: Is there an analog to ArcGIS' "Neighborhood Toolset > Point Statistics" for QGIS?

texts:
Is it possible to create a raster with QGIS in which the raster cell value is assigned by summing the number of vector points that are within a certain radial distance of the cell?

After much web searching, I can't seem to find it if it exists.

As far as I can tell, ArcGIS has this exact function (correct me if I'm wrong- I've never used it) in its Neighborhood Toolset called "Point Statistics."

Its help will probably explain it far better than I can:


texts: arcgis10: export eventlayer (from querylayer) to ArcSDE

texts:
I am not using arcmap but I am creating a arcgis desktop console app.
I am pulling an external SQL table in as a querylayer. This table has lat & long so I created an eventlayer (or IXYEventSource xyEventSource). Now I want to export it to SDE as a featureclass but now I am stuck which route to take. Eventually, I want to put this exe in windows scheduler.
Any ideas on how to export to SDE? Thanks,

saim


texts:
I have a point: pnt = GEOSGeometry('POINT({0} {1})'.format(lon, lat)), and tried pnt.transform(900913), and it gives error:

GEOSException: Calling transform() with no SRID set is not supported

Then I tried transform() with my points in the database:

qs = T.objects.all().transform(900913)

and it works fine:

>>print qs[0].geom
>>POINT (-10887469.2136471699923277 3564159.8204717375338078)

Here's my model T:

class T(models.Model):
    name = models.CharField(max_length=200)
    geom = models.PointField(srid=4326, blank=True, null=True, default=None)
    objects = models.GeoManager()

Any idea?


texts: QGIS returns "Invalid Layer" message when trying to add PostGIS view?

texts:
I'm new to Postgis and QGIS. I created a view defined as

CREATE OR REPLACE VIEW pupr.vstudentmuni AS
 SELECT m.id AS munid, m.name AS muname, m.geom, s.code,
    (s.name::text || ' '::text) || s.lastname::text AS fullname
   FROM pupr.municipio m, pupr.student_location l, pupr.student s
  WHERE st_within(l.geom, m.geom) AND s.code = l.code;

in PostgreSQL. Trying to add this view to QGIS returns the following error...

"Invalid layer"..."sql= is an invalid layer and cannot be loaded."

Not sure what the problem is. The table is mentioned in the geommetry_columns table in PostGIS, but I can see a message entry in QGIS that says "No key field for given view". I'm using PostgreSQL 9.2 and QGIS 1.8.0.


texts: Showing OpenLayers 3 popup for a specific layer

texts:
I am trying to get the information through a WMS stream for a single layer, but when I click on any point on the map my popup appears empty.

map.on('singleclick', function(evt) {
// Hide existing popup and reset it's offset
popup.hide();
popup.setOffset([0, 0]);
// Attempt to find a marker from the planningAppsLayer
var feature = map.forEachFeatureAtPixel(evt.pixel, function(feature, layer) {
    return feature;
});
if (feature) {
    var coord = feature.getGeometry().getCoordinates();
    var props = feature.getProperties();
    var info = "
" + props.casereference + "
";
        info += "
" + props.locationtext + "
";
        info += "
Status: " + props.status + " " + props.statusdesc + "
";
    // Offset the popup so it points at the middle of the marker not the tip
    popup.setOffset([0, -22]);
    popup.show(coord, info);
} else {
    var url = districtLayer
                .getSource()
                .getGetFeatureInfoUrl(
                    evt.coordinate,
                    map.getView().getResolution(),
                    map.getView().getProjection(),
                    {
                        'INFO_FORMAT': 'text/javascript',
                        'format_options': 'callback:parseResponse',
                        'propertyName': 'NAME,AREA_CODE,DESCRIPTIO'
                    }
                );
    reqwest({
         url: url,
         type: 'jsonp',
         jsonpCallbackName: 'parseResponse'
    }).then(function (data) {
        var feature = data.features[0];
        var props = feature.properties;
        var info = "
" + props.NAME + "

" + props.DESCRIPTIO + "
";
        popup.show(evt.coordinate, info);
    });
  }
});

How could I get information for a specific layer ?


texts: why must Qgis 2.0.1 Desktop access the internet when I start it?

texts: and how do I stop it? I'm on dialup internet most of the time and I don't allow unnecessary internet traffic. This seems unnecessary. I can't see any good reason that Q must access the internet, but I can't find any way to turn it off in my settings. Maybe I overlooked it. It tries to run cmd.exe and if I block it from doing so Q won't start up. If I allow it, it hogs my already slow internet connection for a few minutes.


texts: When clipping an input vector layer with many polygons, polygons which overlap the boundary of the clip layer are not included in clipped layer

texts:
This seems like a simple issue, but searching all the questions and answers here I cannot find the solution. I have a vector file made up of many polygons (it is a layer of vegetation types). I want to clip this layer based on my study area (which is a single polygon). The steps I have followed:

Vector: Geoprocessing Tools: Clip: Vegetation type (input layer) + Study area (Clip layer)

Issue is, the resultant Clipped layer around the boundaries does not include the polygons that overlap the study area and vegetation type boundary (i.e. it has not split these polygons at the clip boundary and included them in the Clipped layer - which is what I want to happen). All the polygons that are fully enclosed in within the clip boundary are included in the Clipped layer as expected.

Is there something I am missing here?

Image description: Green = vegetation type (Input layer), Red dash Line = study area (Clip layer) and Orange = Clipped layer (the result layer). My need is to have all the polygons on the right side of the red dash line in image as orange.


texts: ArcGIS Collector on Android failing to upload multiple features with attachments

texts:
I have a data capture map in ArcGIS Collector working correctly on a Samsung Galaxy Note 8 (Android 4.1.2) and a Samsung Galaxy Tab 4 (Android 4.4.2). I also have the same map working in the ArcGIS app on a Nokia Lumia 1020 (Windows Phone 8.1 Update 1).

The Tab 4 is having problems syncing. I enabled offline editing as we have an ArcGIS Server 10.2.2, and I had performed several tests with the devices with a few features at the time. The Tab 4 is currently in an East African country, where the internet (Wifi, 3G) is not always great.

I at first thought it was the unstable internet connection which caused the sync to fail, as even though the tablet had an internet connection, it would still not sync. My colleague was also unable to download a new web map I set up for him, even though he could see the online list of maps in the app.

I came across this thread on Geonet, where it seems to indicate that the size of the upload, it if it includes attachments, can cause problems.This seems to defeat the purpose of using Collector for offline editing. The workflow was: Capture features during the day -> Sync the tablet at night when connected to Wifi. The number of features would be at least 20, all with at least one attachment. After reading the Esri thread though, that complicates the issue.

I'd like to know if anyone has a workaround for this. Normally we would have set up an ArcGIS Mobile device for completely disconnected editing and synced it when they returned, but we were hoping to move forward with Collector so we could check daily progress. I would also like to know how widespread the problem is (batch upload of features with attachments failing).


texts:
I am attempting to load a CAD .dwg file into a postgreSQL database using ogr2ogr.

this is the command

ogr2ogr -f PostgreSQL "PG:host=localhost user=postgres password=*** dbname=jaffe" C:\Users\blah\Desktop\SAMCO.dwg -s_srs EPSG:4326 -lco GEOMETRY_NAME=geom

get this error

FAILURE:
Unable to open datasource `C:\Users\blah\Desktop\SAMCO.dwg' with the following drivers.

what am I doing wrong?

EDIT

I realized the CAD file has no SRID number associated with it, could that cause the problem?


texts: SVG Icon Animation not working on ArcGIS JavaScript

texts:
I am working on Angular 11 project having ArcGIS JavaScript version 4.17.
When placing points on map using GraphicsLayer am using custom SVG Icons, the ones with animation are not showing perfectly on the map. they are showed as a static picture, even though they are showed perfectly animated on the Developer tools-> source portal.
Note that I had tried SimpleMarkerSymbol.path and PictureMarkerSymbol.url but the same problem exists.
Code:
symbol = {
      type: 'picture-marker',
      url:`./assets/icons/svg/abnormal.svg`,
      width: '45px',
      height: '45px'
    };
const pointGraphic = new Graphic({
      geometry: point,
      symbol: symbol
    });
     this.graphicsLayer.add(pointGraphic);


texts: How can I do more flexible matching in conditional expressions than provided by LIKE?

texts:
With LIKE '%' works but I have had no luck with character ranges, i.e. [0-9] to match a digit.

Oh for a regular expression ;)


texts: Does Esri Geodatabase contain style information?

texts:
I've downloaded the C++ API SDK for reading/writing Geodatabases from:

http://appsforms.esri.com/products/download/

I don't know much about this file format and how it relates to ArcGIS's internal data format, but I'm trying to understand if it contains styling/color information for the features/layers. Looking through the .html documentation that's included with the API SDK download, I don't see anything about layers, styles, or colors. And this .pdf:

http://www.microimages.com/documentation/TechGuides/80FileGDB.pdf

Says "No style information is stored in file Geodatabases."

If that is correct, then why? I thought Geodatabase was Esri's preferred transfer format now? It's surprising that it wouldn't contain even basic style info. Is the idea that styling information is something you use ArcGIS to "lay on top of" the geometry contained in Geodatabases? But if you want to export data for another user, isn't Geodatabase the preferred way? But then you can't give them your styling info?


texts: How to calculate the slope with isolines/raster?

texts:
I'm trying to calculate the slope (in %) in ArcGis 9.3, but don't remember how it works.

I already did it some time ago, but this time it doesn't work... I used a shapefile with Isolines (see picture)..  This is how i did it the first time :

Spatial Analyst Tools -> Interpolation -> From Topo to Raster

I use my Shapefile and under "Field" i select "Altitude", and under "Outpull cell size"  i chose 5.
  All the other settings i don't change.
With my Output Raster : Spatial Analyst Tools -> Surface -> Slope (i select "Percent")
With this Output Raster : Spatial Analyst Tools -> Reclass -> Reclassify

My question: is this the right way to calculated the slope?

The problem is that i can't do it this way this time. When i try to do the first step "From Topo to Raster", i have an ERROR message (ERROR 010067).

I hope you guys can help me and tell me what i'm doing wrong!


texts:
How can I add GML files to a GeoServer 2.2.2 instance?

How can I edit them "on the fly" and save the results back to the server using OpenLayers?

I'm adding a vector layer. in which we want to use gml. we want to add  feature like point ,line etc. to gml. when we do editing on line that features will be saved on this layer.
i want to insert that feature using openlayers on line like in wfs layer we do using transanction.
similar type i want to do using gml ....


texts: I am trying to import data from a point that lies on a certain polygon feature (or raster). As an output I would like the polygon feature to have the point data as a new field in the attribute table. How can this be done in QGIS?


texts:
Set extent to view:

var view = new ol.View({
            projection: 'EPSG:3857',
            center: center,
            zoom: 11,
            minZoom: 11,
            extent : [
                LeftPointX,
                LeftPointY,
                RightPointX,
                RightPointY
            ],
            maxZoom: 16
        });

When I zoom map on left corner areas and trying to drag map, the position when I focused is lost. Map goes to another coordinate. When I remove view.extent It works normaly.

Examples here:

http://jsfiddle.net/umid/x4m4g1wg/2/


texts:
I'm developing an application using GeoExt 3(Openlayers 3.15.0 and Extjs 6.0.2). I want to use Google map as base layer using ol3 google maps.

I add ol3 google maps to my project as follow:
index.html:

<script src="http://dev5.mapgears.com/ol3-google-maps/dist/ol3gm.js"></script>
<link rel="stylesheet" type="text/css" href="http://dev5.mapgears.com/ol3-google-maps/css/ol3gm.css">

<script src="https://maps.googleapis.com/maps/api/js?key=MyKey"
        type="text/javascript"></script>

Now I add google map as follow:

var googleLayer = new olgm.layer.Google();
var map = new ol.Map({
    layers: [googleLayer],
    view: view
});

For activating google map, I use follow code:

var olGM = new olgm.OLGoogleMaps({map: map}); // map is the ol.Map instance
olGM.activate();

Occur an error as follow:

  ol3gm.js:47 Uncaught TypeError: Cannot read property 'removeChild' of
  null

When I set time out as follow, It don't occur any error:

setTimeout(function(){
    var olGM = new olgm.OLGoogleMaps({map: map});
    olGM.activate();
}, 2000);

But in this state The map is blurred. See the result:

But the ol3 google maps sample result at here is as follow:

Why my result is blurred? Where is the problem?

update:
All things in Firefox is OK, This result is in Google Chrom 50.0.2661.102


texts: Running an external QGIS Python Plugin with a Processing Script

texts:
I am working on a python script in the processing environment of QGIS 2.18. My goal is to run few tools one after another in an automated chain.

One of these tools is the external Plugin 'Join multiple lines'. By clicking the Plugin Icon it dissolves selected lines without opening a GUI. My problem is, that I don't know how to execute the Plugin via the console. Unfortunately, suggestions like in this post did not help me.

After installing the plugin, I can import the module via the console with the following line:

from joinmultiplelines import joinmultiplelines as j

I also can access the class 'joinmultiplelines' of the plugin, where the initGui, run and other methods are included:

help(j.joinmultiplelines)

Now apparently, I can not just execute the run-method of the plugin like this:

j.joinmultiplelines.run()
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: unbound method run() must be called with joinmultiplelines instance as first argument (got nothing instead)

The error with the unbound method I tried to overcome by creating a class instance, without success:

classInstance = j.joinmultiplelines()
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: __init__() takes exactly 2 arguments (1 given)

I feel like getting closer when I added selected features as argument:

layer = iface.activeLayer()
selFeats = layer.selectedFeatures()
classInstance = j.joinmultiplelines(selFeats)
classInstance.run()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "Path/to/python/plugins\joinmultiplelines\joinmultiplelines.py", line 155, in run
cl = self.iface.mapCanvas().currentLayer()
AttributeError: 'list' object has no attribute 'mapCanvas'

Can somebody help me with the arguments I have to use in order to run the plugin from the console, or am I underestimating the skills needed to solve it?


texts:
I would like to batch process Sentinel-1 images in Python.

Previously I have used SNAP (Sentinel-1 Toolbox) to apply Calibration, Multilooks, Speckle Filters, Terrain Correction and then export as a GeoTiff, using 'Batch Processing'. This is reasonably good, but quite clunky, and can take a long time if there are a large amount of images.

To speed the process up, I have started using the sentinelsat API to batch download Sentinel-1, as opposed to individually downloading imagery from the Sci-hub. Therefore, it would be helpful if i was able to batch process these images without having to load them all into SNAP .

My question is: Is there a pythonic way to read the manifest.safe files from the zipped Sentinel-1 folders and apply pre-processing parameters (I.e. Calibration, Multilooking, Terrain Correction etc etc) and exporting as a Geotiff using Open Sourced Python libraries?


texts: Check in all tables in database if two fields are not null, with ArcPy?

texts:
I would like to check two fields in each tables which name start with X_ into a database !

I've started to write something like :

arcpy.env.workspace = "C:/myWorkspace.sde"
tables = arcpy.ListTables("X_*")
for table in tables:
    print(table)

But now I'm stuck for searching into the tables if there is Field_A and Field_B only filled with NULL values


texts: QGIS: Custom formatting coordinate grid to reduce number of decimals

texts:
I am making a coordinate grid system of a map I have made, but now I would like to reduce the number of decimals of the seconds (of the latitude and longitude).
So instead of 36°54'0.000"E -> 36°54'0"E

I think this is done using the custom function: "round", but I do not know which formula I should use.


texts:
I'm trying to import a shapefile into a PostGIS database using the graphical importer. I just installed PostgreSQL, and PostGIS.

The error:

Shapefile type: Polygon

PostGIS type: POLYGON[2]

We have a Multipolygon with 2 parts, can't use -S switch!

Shapefile import failed

After testing that my database worked, I chose the shapefile that I wanted to upload, and then received a message that it had failed to import.

Are there any good tutorials or instructions about how to do this?


texts: How to Dissolve Polygons Inside a Feature Class Based on Attribute Conditions

texts:
I have a large shapefile (saleArea.shp) which includes hundreds of small adjacent polygons. I would like to dissolve the polygons based on some conditions from tValues field into 5 bigger groups like

1-  "tValues" <= 0.151560
2-  "tValues" >= 0.151561 AND "tValues" <= 0.254022
3-  "tValues" >= 0.254023 AND "tValues" <= 0.379095
4-  "tValues" >= 0.379096 AND "tValues" <= 0.540042
5-  "tValues" >= 0.540043 AND "tValues" <= 0.846651

I did this manually by using Select By Attribute for each of the groups then export them as a new shapefile. After that, I used the Dissolve tool on each of the layers and eventually merged all the dissolved layers - which  was tedious work (Besides I have more than 50 shapefiles and I must repeat this for all!). Can you please let me now how to do this is by Arcpy?

Update

I tried to do this as PolyGeo commented by using the Python parser

if ("tValues" <= 0.151560):
        return 1
elif ("tValues" >= 0.151561 AND "tValues" <= 0.254022):
        return 2
elif ("tValues" >= 0.254023 AND "tValues" <= 0.379095):
        return 3
elif ("tValues" >= 0.379096 AND "tValues" <= 0.540042):
        return 4
elif ("tValues" >= 0.540043 AND "tValues" <= 0.846651):
        return 5

but I am getting this error


texts: osmar returning objects with no features- mapping with R

texts:
> src <- osmsource_api()
> bb <- center_bbox(51.3528, -0.4468, 7000, 7000)
> wb <- get_osm(bb, source = src)
> wb
osmar object
0 nodes, 0 ways, 0 relations

Trying to pull data from OSM API using osmar package- could anyone shine some light on why this captures nothing?

osmar pdf


texts: Iterate over polygons to convert WFS features

texts:
So my first question on stackexchance.

With ogr2ogr its possible to convert WFS features to SQlite with the following:

ogr2ogr -f "SQLite" OUTPUT.sqlite WFS:"INPUT_WFS_url"

It works. But there is a limit on the number ogr features to extract from the wfs. My idea is then to iterate over features in a shapefile containing polygons (index), and add the result to the output SQLite.

So the idea is to use -clipsrc, and use each feature from the index polygon as input. (it works whit a single polygon, but I don't know how to iterate). I have also tried to do it whit python without the right result.

Any ideas or hints?


texts: Problem with insert WFS-T for multi polygon layer

texts:
I am trying to do an  insert WFS-T into PostGis Data store multi-polygon layer with post request:

   <Transaction xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Insert><polygon xmlns="http://spatial_editing"><geometry><MultiPolygon xmlns="http://www.opengis.net/gml"><polygonMember><Polygon><exterior><LinearRing><posList>8312679.700069487 1823481.746771165 8289442.843470794 1774562.048668652 8353038.451004061 1796575.912814783 8312679.700069487 1823481.746771165</posList></LinearRing></exterior></Polygon></polygonMember></MultiPolygon></geometry></polygon></Insert></Transaction>

After this there is a new entry in the Datastore table, but the_geom is
empty. It looks like this SRID=4326;MULTIPOLYGON ((EMPTY)).


texts: ogr2ogr cannot import .osm.pbf file to PostGIS

texts:
I'm trying to import a multipolygon layer from "colorado-latest.osm.pbf" into PostGIS. GDAL 2.4.2 has been installed in a Ubuntu system. However, whenever I'm trying to import the osm.pbf file, I get this error:

ogr2ogr -where "building LIKE'%'" -f "PostgreSQL" PG:"host=XXXXXX.us-west-2.rds.amazonaws.com port=5432 user='postgres' password='XXXXXX' dbname='postgres'" colorado_latest.osm.pbf multipolygons

FAILURE:
Unable to open datasource `colorado_latest.osm.pbf' with the following drivers.
  -> PCIDSK
  -> netCDF
  -> JP2OpenJPEG
  -> PDF
  -> MBTiles
  -> EEDA
  -> ESRI Shapefile
  -> Map.....
.........

The ogrinfo query also yield the same error:

ogrinfo -ro -geom=NO -sql "select * from multipolygons where osm_id = '253750'" colorado_latest.osm.pbf

FAILURE:
Unable to open datasource `colorado_latest.osm.pbf' with the following drivers.
  -> PCIDSK
  -> netCDF
  -> JP2OpenJPEG
  -> PDF
  -> MBTiles
  -> EEDA
  -> ESRI Shapefile
  -> Map.....
.........

I'm using GDAL 2.4.2 which supports osm.pbf. I have SQLite installed. ogrinfo --formats also gives a list of formats which contains OSM. I have checked the /usr/share/gdal/osmconf.ini file. Its the same as default. The PostGIS extensions are available in the database and previously I have imported shapefiles into the same.

What do I need to correct here?


texts: Spatial Join returning max value and unique ID

texts:
Using ArcGIS 10.3 I have a dataset containing polylines of a pipe network, along which I have a polygon layer representing a burst every 50m. The burst layer contains a value (p) and a unique ID (the center-point x_y).

For each pipe in the dataset I want to join the max. p value that it intersects, but also take the unique ID so that I know which burst event is the worst for any of the pipes. A standard spatial join will output the max. p value but not the ID.

So, in the image below the highlighted section of pipe intersects 4 burst events, I can do a spatial join to link the max value of 9 to this pipe, but how do I also record the unique ID of X_Y - in this case 4,2?


texts:
How to add clustering strategy in OpenLayers 3 like OpenLayers 2?

anyone have example?

I want to clustering only the feature with have same class and every clustering I want give a overlay..

Must I overwrite clustersource.js or I can use another method?


texts: Counting number of attributes for shapefiles within folder/sub-folders using ArcPy?

texts:
Currently I am using this code to extract the "Number of fields" and "Feature Count" for the shapefiles listed in the input csv

import csv
import arcpy
from os import path
csvpath = r"D:\QAQC\List2.csv"
output = r'D:\Test\Test_2.csv'
csvdir = path.split(csvpath)[0]

with open(csvpath, "r") as csvfile:
    fcs = [r[0] for r in csv.reader(csvfile)]
    with open(output, 'wb') as f:
        for fc in fcs:
            count = len(arcpy.ListFields(fc))
            fcount = arcpy.GetCount_management(fc)
            csvwriter = csv.writer(f,delimiter=',')
            csvwriter.writerow([fc,count,fcount])

    f.close()

Along with this I would like to extract number of attributes of each shapefile. For eg; if Africa1.shp has 4 fields and 40 features, theoretically there can be 160 attribute values to Africa1.shp (but some features might not have few attributes).

So I want the output like, Africa1.shp 4 40 160

Don't know whether such a function exists in ArcPy

I want the actual number of attribute values. To explain things, i've mentioned 40 * 4 = 160 attributes

Edit:

Based on the answers below and through this Q&A Whats a Python Script/Method to use to get the number of fields with data in an attribute table?, i've almost got what i want. Two issues. 1) I don't want FID & Geometry field to get calculated. For this, ive referred to this one - https://geonet.esri.com/thread/75885 -  and it works.

Only issue is couldn't able to save it to a csv file. If i remove this one piece of code

field_list = [f.name for f in arcpy.ListFields(fc) if f.type not in types and f.name.lower() not in other_geom]

and use count = arcpy.ListFields(fc), i can able to save it as csv. Don't know how to figure this out

2) Count results for fields with no null/blanks values are like, row after row. It's getting listed for all the fields. Instead how to sum the count results ?

Here is the code

import csv
import arcpy
from os import path
csvpath = r"D:\RTXQAQC\Open.csv"
csvdir = path.split(csvpath)[0]
output = r'D:\Test\Test_323.csv'
with open(csvpath, "r") as csvfile:
    fcs = [r[0] for r in csv.reader(csvfile)]
    with open(output, 'wb') as f:
        for fc in fcs:

            types = ['OID','Geometry']
            other_geom = ['shape_area','shape_length']

            field_list = [f.name for f in arcpy.ListFields(fc) if f.type not in types and f.name.lower() not in other_geom]

            # Get list of fields

            count = len(field_list)
            fcount = arcpy.GetCount_management(fc)

            # Set up dictionary for the fields
            countdict = {}
            for field in field_list:
                countdict[field] = 0
            # Loop through Table and see which fields are NULL or Blank
            cur = arcpy.SearchCursor(fc)
            for row in cur:
                for field in field_list:
                    if not row.getValue(field) in [None, " ", ""]:
                        countdict[field] = countdict[field] + 1

            # Print out results - shows field name and number of non NULL/Blank fields
            for f in countdict.keys():

                print (fc,count,fcount,f,countdict[f])

            csvwriter = csv.writer(f,delimiter=',')
            csvwriter.writerow([fc,count,fcount,f,countdict[f]]

And the results are

File - No of Fields(Without FID, Geometry) - Feature count - Field name - Field vaules (excluding null/blank)

D:\\Test\\shp\\sheet41.shp, 14, 87, Y, 87
D:\\Test\\shp\\sheet41.shp, 14, 87, X, 87
D:\\Test\\shp\\sheet41.shp, 14, 87, Sample No, 87
D:\\Test\\shp\\sheet41.shp, 14, 87, Cu_Method, 72
D:\\Test\\shp\\sheet42-6.shp, 7, 333, Sample No., 333
D:\\Test\\shp\\sheet42-6.shp, 7, 333, Comments, 10
D:\\Test\\shp\\sheet42-6.shp, 7, 333, Source, 0
D:\\Test\\shp\\sheet42-6.shp, 7, 333, Shape, 333


texts:
I've set a InspireView service using ArcGIS for INSPIRE 10.4. The INSPIRE theme is Administrative Units.

That service has its metadata. The two layers of the service have their own dataset metadata.

If I test it with the INSPIRE validator, it can't perform a GetMap request. I have done the request by hand and it works perfectly, so I don't understando what is happening.

Anyone can help me?

This is the Capabilities of the service: http://www.araba.eus/arcgis/rest/services/Geograma/AU/MapServer/exts/InspireView/service?REQUEST=GetCapabilities&SERVICE=WMS

This is the validator URL: http://inspire-geoportal.ec.europa.eu/validator2/

This is the error: "The Get Map request "" was not successful ("Could not retrieve an HTTP resource at url: "null" (Invalid layer bounding box)")"


texts: FME - How to merge geometries that they are in a distance of x meters?

texts:
I have a CAD file which I import in FME. I have two different geometries. A polygon and a point geometry. Each point geometry has some attributes which I want to pass to the polygon geometry. Both the points and the polygons have no id. So I can not merge based on the id.
I thought to use a "merge geometry in distance within" transformer.
Is there something like this?
For example: merge all the points and polygons which are in a distance of x into a big point (or polygon).

How do I do this in FME?


texts: Matching raster regional extent with vector region in GRASS?

texts: In Grass GIS, I am able to import bathymetry .tif raster data however the region coordinates are not in lat/lon formar and therefore, do not overlay with my vector points which are in lat/lon format. Is there a way to convert the raster extent so that both layers show in my computational region? I have already tried to create a new location with the correct EPSG code and then import both layers, however it has been unsuccessful.


texts:
I'm trying to make a nice-looking globe in QGIS. I've used the Natural Earth data (10m resolution, bathymetry, land, and land-area render layer). I then used the following projection:

+proj=ortho +lat_0=66.5 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs

to generate an orthographic view looking down on the Earth, clipped the vector layers to the hemisphere arc, and presto! Beautiful-looking globe. The final renders (produced out of the Print Composer -> Export as Image) look fantastic.

Unfortunately, now, two weeks later, I want to make a couple of changes, and using the same project and shapefiles on the same computer on (I am pretty sure) the same install of QGIS, when I try to render I get this error:

forward transform of
(-5956998.189934, 5954291.026034)
PROJ.4:  +proj=ortho +lat_0=66.5 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000
+units=m +no_defs +to  +proj=ortho +lat_0=66.5 +lon_0=0 +x_0=0 +y_0=0
+a=6371000 +b=6371000 +units=m +no_defs
Error: tolerance condition error

What happened? Why can't it render? How can I fix it?


texts: QGIS Raster->Interpolation Error: "wkb access out of bounds"

texts:
I´m rather new to QGIS.

So the issue is this. I downloaded some terrain data from INEGI (Mexico´s Geographic Information Institute) which contained the contour slope.

I had no issue doing it with the original data downloaded from the site, I had the info and followed this simple tutorial to get the Interpolation Raster.

I had proceeded to join 4 maps using Vector->Data Management Tools-> Merge Vector Layers and had no problems after the merge.

Having merged for maps the resulting map came out to be rather large for an interpolation and for my project I needed high resolution. So I need to clip a section of those slope maps to generate a raster of only a part of the map.

So I did that, I created a new ShapeFile layer and created a rectangular polygon that determined the area to be clipped. Then I went ahead and used Vector->Geoprocessing Tools-> Clip.

Having done this successfully I went ahead and used the exact same procedure to Interpolate this new slope and the error message I have been trying to solve for the past 3 hours appeared. "wkb access out of bounds".

This problem is exclusive to the "Triangular Interpolation (TIN)", Interpolation Method. While troubleshooting I tried the "Inverse Distance Weighing (IDW)" method which calculated somewhat successfully but with unsatisfactory results.


texts: Tool to automate un-registering replicas in AGOL?

texts: Testing the waters to see if anybody has a recipe to un-register a batch of replicas from an AGOL feature service. We update/overwrite a set of services a few times a year, and at every overwrite there are between 30 and 50 replicas that prevent overwriting. It's a tedious process to remove them all manually. Looking for a jumping off point.


texts: "Argument list too long" error while converting shapefile to NetCDF

texts:
I'm trying to convert a point shapefile to a NetCDF (.nc) file with QGIS using the tool Rasterize (vector to raster), but I keep getting error. Below is the log from one of my trials.
QGIS version: 3.10.8-A CoruÃ±a
QGIS code revision: d09a4f2388
Qt version: 5.12.3
GDAL version: 2.4.1
GEOS version: 3.7.2-CAPI-1.11.2 b55d2125
PROJ version: Rel. 5.2.0, September 15th, 2018

Processing algorithmâ€¦

Algorithm 'Rasterize (vector to raster)' startingâ€¦

Input parameters:
{ 'BURN' : 0, 'DATA_TYPE' : 5, 'EXTENT' : '-180.0,180.0,-90.0,90.0 [EPSG:4326]', 'EXTRA' : '', 'FIELD' : 'Total', 'HEIGHT' : 0, 'INIT' : None, 'INPUT' : '/Users/aalegria/Desktop/Graphics/Data/Data_Other/Yield Constraint Score (YCS)/data/Wheat_YCS.shp', 'INVERT' : False, 'NODATA' : 0, 'OPTIONS' : '', 'OUTPUT' : '/Users/aalegria/Desktop/Maize_total.nc', 'UNITS' : 1, 'WIDTH' : 0 }

**GDAL command:**

gdal_rasterize -l Wheat_YCS -a Total -tr 0.0 0.0 -a_nodata 0.0 -te -180.0 -90.0 180.0 90.0 -ot Float32 -of GMT "/Users/aalegria/Desktop/Graphics/Data/Data_Other/Yield Constraint Score (YCS)/data/Wheat_YCS.shp" /Users/aalegria/Desktop/Maize_total.nc

**GDAL command output:**

Traceback (most recent call last):
File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/plugins/processing/algs/gdal/GdalUtils.py", line 106, in runGdal
universal_newlines=True,
File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 7] Argument list too long: '/bin/sh'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/plugins/processing/algs/gdal/GdalAlgorithm.py", line 137, in processAlgorithm
GdalUtils.runGdal(commands, feedback)
File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/plugins/processing/algs/gdal/GdalUtils.py", line 118, in runGdal
len(loglines), u'\n'.join(loglines[-10:])))
OSError: [Errno 7] Argument list too long: '/bin/sh'
Tried 5 times without success. Last iteration stopped after reading 1 line(s).
Last line(s):
GDAL execution console output
Execution failed after 0.30 seconds

Loading resulting layers
Algorithm 'Rasterize (vector to raster)' finished


texts: Shortest Path using interpolated OSM points

texts:
I have a set of GPS points which I have snapped to the OSM network. In the below screenshot GPS points are red, snapped points are green.

I want to calculate the shortest path that includes all of these green way points. My solution is to calculate the shortest path between each pair of points and finally concatenate the results.

My problem is that dijkstra_sp will not accept arbitrary points on the OSM network. My snapped points are not necessarily in the ways table because they were calculated using the following logic.

Find the closest way to a given GPS point.
Using interpolation, find the closest point on this way to the GPS point.

The snapped points are not in the ways table because they were derived by interpolation.

So my question is: How do I calculate the shortest path between two points on the OSM network that are not necessarily in the ways table?


texts: Remove / change the white border from the CARTO map

texts:
I published a CARTO map that I need to embed in WordPress.

Can I either remove the white border or change it to a black one?

Here's the map:
https://colossalmedia.carto.com/builder/31f83b6e-9ef6-46dc-bc28-c7a1419eccf2/embed


texts: Arcobjects add-in stops working with no apparent error

texts:
I am developing a simple add-in that will trigger an action after user selects features on the map (the action will essentially make sure a dockable window is open and in that window display information about the selected features).

I have implemented a simple function that loops over selected features using IEnumFeature and collects their OIDs. To make sure the OIDs are present for all features in the selection, I set the IEnumFeatureSetup.AllFields = true.

Now to the problem. After I've selected a number features several times (regardless of what features or how many I select), the SelectionChanged event stops from being fired. It appears as if the add-in has crashed, but no error message is displayed. This happens both in debug and production. If I try to restart the add-in by de-selecting it in the Customise - Extensions menu, I can no longer select it back. ArcMap works fine otherwise. To get the add-in to work again I must restart ArcMap.

The features come from a file geodatabase. They have 5 short text fields each and there is around 1300 of them. The more features I select at once, the less rounds of feature selection it takes for the add-in to crash.

Unlike in ArcGIS crashes with no error number in Visual Studio I get no ArcGIS error or exception!

I am developing in Arcobjects 10.1 SDK with Visual Studio 10 for C# Express using .NET 3.5. I cannot upgrade nor can I use .NET 4.0 due to client constraints. The add-in is being tested in ArcMap 10.1.

private void SelectionChanged_Handler() {

    List<string> locodes = new List<string>();

    try {
        ISelection selection = ArcMap.Document.FocusMap.FeatureSelection;
        IEnumFeature featuresEnum = (IEnumFeature)selection;
        IEnumFeatureSetup featureSetup = (IEnumFeatureSetup)selection;

        featureSetup.AllFields = true;

        IFeature feature;

        while ((feature = featuresEnum.Next()) != null) {

            int locodeFldID = feature.Fields.FindField("locode");
            string locode = feature.get_Value(locodeFldID).ToString();
            locodes.Add(locode);

            // Release feature object
            Marshal.FinalReleaseComObject(feature);
        }

        // Release IEnum reference
        Marshal.FinalReleaseComObject(featuresEnum);

        } catch (Exception e) {
            System.Windows.Forms.MessageBox.Show(e.Message);
        }
    }
}

Why is the add-in crashing (stopping to work) without apparent error. Might this be related to resources not being freed correctly?


texts: How to set map extent in Arcgis javascript using spatialReference 4326

texts:
I am using Arcgis Javascript API for my map and the map is coming from Arcgis online usng map by ID.

Here is code

         var startExtent = new esri.geometry.Extent(52.37615, 13.11937,52.64877,13.65801,
                  new SpatialReference({wkid:4326}) );

                  var createMapOptions = {
                mapOptions: {
                    extent : startExtent
                },
               };
              arcgisUtils.createMap("c997ee65fad94ce4ae3c3d9618212099","map",createMapOptions).then(function(response){
                 map = response.map;
              }}
             })

I want to set map  extent according to Berlin city But it is not working for above extent value and  SpatialReference:4326.

But when I used this extent
            xmin=1231772.125133422&ymin=6464953.10035588&xmax=1843268.35141480187&ymax=7103966.656819923 with  SpatialReference:102100 ,It wokrs for me.

I don't know why it not working with SpatialReference:4326.

Does Somebody know Why my code is not working for SpatialReference:4326 and its extent.

I want set map extent according 4326 as shown in code.


texts:
I'm trying to create a very simple leaflet/folium map using python.
It works without marker clusters (all the relevant locations show up on the map), but when I try using MarkerCluster I get the following error message 'module' object has no attribute 'MarkerCluster' (in response to line 14, marker_cluster = folium.MarkerCluster().add_to(cyclemap)).
  I'm not sure what I'm doing wrong, I've imported the package, I've definitely installed folium correctly.
My text editor also states 'folium.plugins.MarkerCluster imported but unused'.

I'm completely new to python.

import folium
from folium.plugins import MarkerCluster
import pandas as pd
cyclemap = folium.Map(location = [51.5074, -0.1278],
                  tiles='CartoDB positron',
                  zoom_start = 11,
                  width = 800, height = 600)

cycleincidences = pd.read_csv("2016cyclists.csv")

MAX_RECORDS = 50
#using max records for speed as I have almost 5000 data points

marker_cluster = folium.MarkerCluster().add_to(cyclemap)

for each in cycleincidences[0:MAX_RECORDS].iterrows():
 folium.Marker(
    location = [each[1]['X'],each[1]['Y']]
    ).add_to(marker_cluster)

cyclemap.save('cylesmap3.html')


texts: WFS layer only returns a limited number of features regardless of map extent (QGIS)

texts:
After adding a WFS layer to a QGIS project, only a limited number of features are returned even after changing the extent of the map.
I want to return only features within the current extent of the map. How to do that?


texts: Make ArcGIS Desktop 10.5 Developer Console Window Appear?

texts:
Long ago, on an older machine, with an older form of ArcGIS Desktop (10.4), I was able to make the console window appear upon startup for all local ArcGIS Desktop applications (ArcMap, Catalog, etc).
It did not matter:

which language or IDE used
if debugging or no

I could see my logs immediately.
Now on a newer machine, with 10.5, I cannot figure this out. I would like to set Desktop10.5 so that my console window appears upon startup for my desktop applications.
(See the image as the example, in ArcMap10.4, of what I'm trying to accomplish in 10.5 setup.)

I've searched around in:
C:\Program Files (x86)\ArcGIS\Desktop10.5\bin
I'm just not finding what I'm looking for, or any documentation for this.


texts: How to set up multiple Content.ftl files in Geoserver?

texts:
So today I started to play around with the content.ftl file for geoserver to change around the popup style. In playing I have discovered that if I call in my content.ftl file which contains code for a layer that isn't in my openlayers html then the popup doesn't work.

My question is; Can I set up multiple content.ftl files for different openlayers projects which will contain different layers? If so, how?

Example - if I Preview a layer in GeoServer for say planning applications but my content.ftl contains details for styling another of my geoserver layers as well as the planning application style, the popup doesn't appear. Remove the styling for the other layer and the pop up works!

Any help would be great.

Med

I worked it out and here's how.

Instead of having a generic content.ftl file located in the template folder in data_dir, I moved the content.ftl into data_dir/workshop/.....to the layer folder and placed it here. The folder also contained featuretype and layer xml files for reference.

So now each of my layers has its own content.ftl and popup style.


texts: I'm trying to convert Shapefiles from the State of Texas Senate Districts website into a GeoJSON file for use with Google Maps API. I'm using QGIS to facilitate but I can't get the projection/coordinates right. So far I've tried Google Mercator (EPSG:900913) and WGS 84 (EPSG:4326) with no luck. I'm using the OpenLayers to verify results and it keeps placing Texas near the  Gulf of Guinea (0 lat, 0 lng).


texts: Using iterators to simplify model in ModelBuilder?

texts:
I'm relatively new to automating processes with ArcGIS. The overall goal of the model is to first isolate the road network of a user input town/city from a state/provincial road network file and then ensure that none of the segments in the new town/city network are greater than 500m. The logic behind segmenting is as follows:

Check if there are roads in the network over 500m
Create a layer of only roads over 500m
Split roads in the new layer in half
Check new layer to see if there are any segments over 500m
Repeat until there are no segments over 500m

After the loop is complete, all the layers created from the loop are recomposed into a single final output layer.

This is shown in the screenshot, but I haven't been able to figure out how to use iterators to achieve what I want. In place of the iterators I've simply copy and pasted the process several times. Could you help me reduce this segment of the model down into a single loop?


texts:
I have added a WMS layer to the map. Now I want to add styles to the WMS layer using filters.

I have tried with the below code but it is not working

  var poilayer = new OpenLayers.Layer.WMS("poi",
            "http://localhost:8080/geoserver/cite/wms",
            {
                "LAYERS": "AMBALA_sma",
               srs:'EPSG:3857',
               transparent: true,
                format: "image/png"
            },
            {
                isBaseLayer: false,
                buffer: 0,
                visibility: true
            }
         );
  info = new OpenLayers.Control.WMSGetFeatureInfo({
         url: 'http://localhost:8080/geoserver/cite/wms',
         title: 'Identify features by clicking',
         layers: [poilayer],
         vendorParams: {
            propertyName: "P_TYPE,WAQF_ID"
        },
        // hover:true,
         queryVisible: true,

         eventListeners: {
             getfeatureinfo: function(event) {

                      popupwindow = new OpenLayers.Popup.FramedCloud(
                      "chicken",
                      mapPanel.map.getLonLatFromPixel(event.xy),
                      null,
                      event.text,
                      null,
                      true
                      );

   mapPanel.map.addPopup(popupwindow);
        }

   }

});
    mapPanel.map.addLayer(poilayer);
     mapPanel.map.addControl(info);
     info.activate();

    var filter = new OpenLayers.Filter.Comparison({
    property: 'P_TYPE',
    type: OpenLayers.Filter.Comparison.EQUAL_TO,
    value: 'MOSQUE'
});

/* Rule */
var rule = new OpenLayers.Rule({
    filter: filter,
    symbolizer: {fillColor: "green"}
});

/* Style */
var style = new OpenLayers.Style();
style.addRules([rule]);

/* Style map */
styleMap = new OpenLayers.StyleMap(style);
poilayer.styleMap = styleMap;

Please tell me where I am doing mistake.

I am using WMSGetFeatureInfo because I have tried with WFS for 1 week but it was not success. So I am using WMS only.

I have added a dropdown in my page. In that dropdown the values are houses, mosques which are in the shapefile also(column name is 'P_TYPE').  When user selects the houses then houses has to be highlighted in the WMS layer.

GetFeatureInfo is necessary. By using the above code selected features are not highlighting.

Please tell me how to create SLD


texts:
I have a line feature. I need to create a point feature from it. The point should ideally fall at the center of the line.

I used both CenterPointReplacer and CenterOfGravityReplacer but in some situations the point do not fall on the line. It is at some distance from the line which is not desirable. The picture below illustrators undesirable situation.

As you can see in the picture the point is not on the line. Is there transformer or a way to correct this ?


texts: Are there any repositories to find custom map tiles for an OpenLayers implementation?

texts:
I can't seem to find an WMS that looks the way I want.  I've also checked all of the regular OSM places too and haven't quite found anything.
Can anyone recommend any places to find custom map tiles that I could use in my OpenLayers implementation?

Thanks


texts: In ArcMap 10.1 can I move duplicate nodes in the same layer like I can in MapInfo? I want to click on the place where two or more lines converge and move the endpoints of all the lines to the location where I release the mouse. In MapInfo it is Options > Preferences > Map Window > Editing > Move Duplicate Nodes in the Same Layer > OK.


texts: Special relationship between EPSG:4326 and EPSG:4369

texts:
This is a follow-up question to a previous one (Projection between EPSG:4326 and EPSG:4269 using pyproj does nothing).
When using pyproj (python 3.8.8 and pyproj 3.0.1 on windows) to project a point from EPSG:4326 (WGS84 Datum) to EPSG:4269 (NAD83 Datum), I obtain the exact same lat/lon. Howver, when projecting from EPSG:4326 to EPSG:4289 (Amersfoort Datum), there is a slight shift in the lat/lon values :
from pyproj import CRS, Transformer
from shapely.geometry import Point
from shapely.ops import transform

crs_4326 = CRS("EPSG:4326")
crs_4269 = CRS("EPSG:4269")
crs_4289 = CRS("EPSG:4289")

transformer_4326_to_4269 = Transformer.from_crs(crs_from=crs_4326, crs_to=crs_4269).transform
transformer_4326_to_4289 = Transformer.from_crs(crs_from=crs_4326, crs_to=crs_4289).transform
p = Point(-118,33)  # some position in California
p1 = transform(transformer_4326_to_4269, p)
p2 = transform(transformer_4326_to_4289, p)

print(p)  # returns POINT (-118 33)
print(p1) # also returns POINT (-118 33)
print(p2) # returns POINT (-118.0045882781141 32.99426819423652)

Inspecting the EPSG codes on epsg.org, I see that these three datum have three different ellipsoids. Therefore, I expect to get different results for p and p1 since I do observe a difference between p and p2. What is the cause of this behaviour ?


texts: ArcMap layer query creating permanent edits

texts:
I've run into a weird problem that I can't find described anywhere else online:

I loaded a point shapefile into my map document. Then, I set a layer definition query - this resulted in the layer displaying 199 features from the shapefile. I did not save a .lyr file, I was just using the layer in one map document's data frame.

Next: I try to load that same shapefile into a different dataframe in the same map document, but only 199 features show up. I check the layer definition query in the new dataframe and there isn't one. I try to re-load the shapefile, still only 199 features. I closed the map document, Arc, restarted my computer, loaded the shapefile in QGIS, etc. - no matter what, there's only 199 features matching the initial layer query I used.

Ultimately: I have a shapefile at the original file location but it is not the same shapefile - it now only contains the data that matched the layer definition query I set before.

I don't know when this happened specifically, unfortunately. I definitely never opened an editing session on the layer with the query, nor did I use field calculator outside of a session.

Has anyone had an experience where Arc randomly modified the source dataset like this, or know how this may have happened?


texts:
I have been playing around with GRASS GIS to do a simple cost analysis of getting from point A to point B. I have a DEM clipped to the study area, a raster containing the friction costs, as well as the start and end points. All the data has the same projection, and it matches the project location.

However, whenever I attempt to run the process, there is an error with the output raster. If a simple name like 'output' is used, an error is raised that states 'Raster output map  not found', or if 'output@Dawson' is used it raises an error that it is an illegal file name. If one of the raster maps for the drop down box is used, an error is raised that the output already exists.

Does r.walk require an empty raster to write the results, or am doing something wrong?


texts: Convert WKT Polygon to ESRI Geometry String in Standalone Python Script


texts: How to calculate the distance to the Earth center if I know the elevation above the reference geoid?

texts: How could I calculate this? Should I simply add it to 6371km?


texts: Getting histogram results from reduceRegions and opening containers in Google Earth Engine?

texts:
This question is building on Getting List elements from .reduceRegion() results in Google Earth Engine?

My issue is identical, I need to calculate histograms for polygons and extract pixel counts.

As I need to process many polygons and getInfo inteferes with client side operations, how else can I iterate through a list of feature and extract the histogram counts?

The Earth Engine help suggests this maybe possible with "callback" functions, but I am unsure how to make this work, and in any case it is not recommended.

Linked below is my example code and the Earth Engine help page for Client vs. Server issues:

https://code.earthengine.google.com/133215210eb0c09bca4e3fd2ebd52ce1

https://developers.google.com/earth-engine/client_server


texts: How to configure GeoWebCache that it can generate tile files conform Slippy Map format

texts:
The tile files generated by GeoWebCache using gridset 900913 are like: \EPSG_90013_6\02_02\0032_42.png, etc.

How can I configure GeoWebCache that it is generating the files conform slippy map format? That is \6\32\21.png, etc.