texts: fromWKT - how to pull all info from source data?

texts:
I have a CSV storing addresses, reference numbers, etc... and also a WKT string of boundary coordinates for each property:

The script (ammended from another user's post in 2012) sccessfully converts the CSV to a shapefile, with the spatial refeence set to EPSG- 27700:

# convert well known text to geometry, and compile shapes into a single feature class...
# 11/15/2012
import arcpy

File = "C:\\Users\\Team\\Documents\\Theo Laptop Folder\\Tasks\\Quick tasks\\WKTtest\\WKT_to_QGISmakealayerCSV2.csv"

# dimension the WKT string field and poly ID field...
# the field holding the WKT string...
field1 = "WKT"
# the field holding the unique ID...
field2 = "Our_ref"

# set up the empty list...
featureList = []

# set the spatial reference to a known EPSG code...
sr = arcpy.SpatialReference(27700)
# iterate on table row...
cursor = arcpy.SearchCursor(File)
row = cursor.next()
while row:
print (row.getValue(field2))

WKT = row.getValue(field1)
# this is the part that converts the WKT string to geometry using the defined spatial reference...
temp = arcpy.FromWKT(WKT, sr)
# append the current geometry to the list...
featureList.append(temp)

row = cursor.next()

# copy all geometries in the list to a feature class...
arcpy.CopyFeatures_management(featureList, "C:\\Users\\Team\\Documents\\Theo Laptop Folder\\Tasks\\Quick tasks\\WKTtest\\WKTShapes.shp")

# clean up...
del row, temp, WKT, File, field1, featureList, cursor

This is in python 2.7 language fyi. (I'd love this in 3.6 if possible...)

Now when I drag the newly created shapefile into Arc it all looks great, but the fields from the CSV aren't carried across...

How can I ammend the code to include all the original string fields from the CSV?

I know a workaround that involves Joining the source csv to the output shapefile, but I'm sure there's a more elegant solution.


texts: Detection of avalanche debris based on their distinctive shape

texts:
I want to detect avalanche debris of a known avalanche using Sentinel-2 optical imagery. I've calculated the Normalized Difference Snow Index and from there I've extracted all the values above 0.4 which gives me a raster file that contains all the snow for the scene. There, I can easily recognise the avalanche debris that lie below the snow line based on their distinctive elongated tongue shape.

Basically what I want to end up with is a file that contains nothing but the avalanche debris without manually selecting them. Is it possible for ArcGIS to identify and extract these elongated tongue shapes?

I'm rather new to ArcGIS so I have no idea if this is super trivial or practically impossible.


texts: code to draw a line taking length and angle as input from user in arcmap

texts: I want to make a command tool in arcmap. The purpose is to ask user to provide length and angle as input from a point(already selected by user) and then draw a line.


texts: Geopandas KeyError: "['__idx1' '__idx2'] not found in axis" during overlay operation

texts:
I'm trying to get the intersection area between two geodataframes using the overlay method.

gpd_df1 = gpd.read_file("shapefile1.shp") ## US census tract shape file
gpd_df1 = process(gpd_df1) ## merge with another file Census data
gpd_df2 = gpd.read_file("shapefile2.shp") ## city shape file
gpd_df2 = gpd_df2.explode() ### This has multipolygons
gpd_df2 = gpd_df2.to_crs({"proj": "cea"})
gpd_df1 = gpd_df1.to_crs({"proj": "cea"})
intersection = gpd.overlay(gpd_df2, gpd_df1, how="intersection")

I'm getting the following error at the last line of code:

KeyError: "['__idx1' '__idx2'] not found in axis"

I can run a simple toy example of overlay method.

What I'm trying to achieve?
I need to find the percentage area of every polygon of geodataframe1 that overlaps with every polygon of the geodataframe2(kind of cartesian product).

I'm extremely new to spatial dataprocessing.
What I'm doing wrong here? Is there any other approach using geopandas?


texts: psycopg2.ProgrammingError: function does not exist

texts:
I am using Python code cur.callproc('function_a',[parameter1, parameter2]) for executing one function and this code is correct when I use a user having full DB permissions.

But when I use a private user, the psycopg2 returns an error in PostGIS functions st_distance(), st_transform(), st_setsrid().

Error message:
psycopg2.ProgrammingError: function st_setsrid(public.geometry, integer) does not exist
LINE 9: ...geocodigo = num1 ORDER BY st_distance(st_transform(st_setsrid...

                                                             ^
In SQL code: ... ORDER BY st_distance(st_transform(st_setsrid(a.geom,4674),4326),b.geom);

I tried many permissions for the private user but until now, just user with full permissions was accepted by Python code. What are the correct permissions for private user in PostgreSQL, or is there any other solution?


texts: Firefox zooms to user's location even if locator button isn't clicked when useTracking is true

texts:
When I am in Firefox and go to Esri's example at LocatorWidget and add useTracking: true to the geoLocate definition e.g.

  geoLocate = new LocateButton({
    map: map,
    useTracking: true
  }, "LocateButton");
  geoLocate.startup();

and click on the locator widget I zoom to my location as expected.  But if I move the map in any way, Firefox zooms me back to the user location, even if I have toggled the locator widget to not track.  IE and Chrome do not behave this way.


texts: Which of EGM96 geoid or WGS84 ellipsoid fits the earth better?

texts:
ImageCredit

Question

If we separately add up |H| and |h| over the earth surface, which of the sums come out smaller?

Background

There is a phrase in the tag description of "ellipsoid" that says "... the geoid, the truer figure of the Earth ..." I am not sure "true" here means less absolute error but I am interested in this question nevertheless.

The following passage seems to suggest that the geoid may not approximate the earth surface particularly well in the land areas:
"The dominance of the low-harmonic degrees in the geoid power spectrum indicate that the dominant shape of the geoid is controlled by structures deep within the mantle."


texts: What is spatial resolution of TROPOMI data in GEE?

texts:
In the description of TROPOMI NO2/HCHO data, the spatial resolution is 0.01 arc degree [see following(1)], however the Image Properties says the spatial resolution is 3.5×7.5 km² [see following(2)]. Also, I print the properties of this data and the spatial resolution is 3.5×7.5 km² [see following(3)].
My question is what the spatial resolution of TROPOMI NO2/HCHO data?

The Sentinel-5 Precursor mission instrument collects data useful for assessing air quality. The TROPOMI instrument is a multispectral sensor that records reflectance of wavelengths important for measuring atmospheric concentrations of ozone, methane, formaldehyde, aerosol, carbon monoxide, nitrogen oxide, and sulphur dioxide, as well as cloud characteristics at a spatial resolution of 0.01 arc degrees.

SPATIAL_RESOLUTION STRING: Spatial resolution at nadir. For most products this is 3.5x7km2, except for L2__O3__PR, which uses 28x21km2, and L2__CO____ and L2__CH4___, which both use 7x7km2. This attribute originates from the CCI standard.

PRODUCT_ID:  S5P_OFFL_L2__NO2____20191231T011147_20191231T025317_11473_01_010302_20200101T180133
PRODUCT_QUALITY: NOMINAL
SENSOR: TROPOMI
SPATIAL_RESOLUTION: 7x3.5km2
STATUS_CTMFCT: Nominal
STATUS_MET_2D: Nominal


texts: Conditional Raster Calculation in Python QGIS

texts:
I would like to perform this raster calculation where when ras@1 >0 gives me 1 as pixel value of the output raster, while when ras@1 <0 the values are given by the other formula ras@1/(1-2.71828^(ras@2)), but it doesn't work because it gives me in any case the result of the other formula, even when ras@1 is higher than zero.
Can someone give me some suggestion?
import qgis
import gdal
from qgis.analysis import QgsRasterCalculator, QgsRasterCalculatorEntry
from qgis.core import QgsRasterLayer

inputpath = '/Users/macbook/Desktop/TESI/PROGETTO/sigm/sigmath90.tif'
inputpath2 = '/Users/macbook/Desktop/TESI/PROGETTO/lambdamin/lambminth90.tif'
outputpath = '/Users/macbook/Desktop/TESI/PROGETTO/alfamax/alphamaxth90.tif'

entries = []
inputrasterfile = QgsRasterLayer(inputpath)
ras = QgsRasterCalculatorEntry()
ras.ref = 'ras@1'
ras.raster = inputrasterfile
ras.bandNumber = 1
entries.append( ras )

inputrasterfile2 = QgsRasterLayer(inputpath2)
ras2 = QgsRasterCalculatorEntry()
ras2.ref = 'ras@2'
ras2.raster = inputrasterfile2
ras2.bandNumber = 1
entries.append( ras2 )

alpha_max='(ras@1 < 1)* ras@1 / (1-2.71828^(ras@2)) + (ras@1 >>1)*1'

new_path = outputpath

alfamax= QgsRasterCalculator(alpha_max, new_path, 'GTiff', inputrasterfile.extent(), inputrasterfile.width(), inputrasterfile.height(), entries )
alfamax.processCalculation()
iface.addRasterLayer(new_path)


texts: Integrating R into ArcGIS Desktop (ArcMap)?

texts:
Does anyone have any insight into using R with ArcGIS Desktop?

I do not have any R experience, I mainly use SAS to do my data handling before I move into Arc. I currently run a geocoding and enriching process about eight times a year on data that's anywhere from 2 to 5 million records. Right now, I take the raw files for those and process in SAS and then move into ArcGIS Desktop to do the geocoding and enriching, and then export back out to dbf or text just to import back into SAS to finalize the output.

What I am seeking to understand is whether I can/should replace SAS in my processing method, with something like R which I can integrate into ArcGIS. To optimize my processing, I'd prefer to have everything in one application, instead of the various importing/exporting.

In my mind, I'm hoping to learn R and create a script to do my preprocessing and then have a Python script to run inside of ArcGIS that calls the R script, and then it will do the geocoding/enriching process as well.

Can someone tell me if this loose idea is possible with desktop ArcGIS?


texts: Nested conditional statement in ArcGIS on multiple rasters

texts:
I have a list of rasters in ArcGIS and I want to create a conditional (Con) nested statement based on all the rasters of the list. I want this to be reiterate through many lists (the number of rasters in the lists can change). So far, I found a non-elegant way which build a string and then pass the string to the exec function, but I read the use of exec is higly discouraged. Any clever way to do it?

listRst = arcpy.ListRasters("*", "TIF")

initString = "outCon = "
for rst in listRst:
    rstString = " Con(( Raster(\"" + rst + "\") > 0) & ( Raster(\"" + rst + "\") < 367), 1,"
    initString = initString + rstString
conString = initString + " 0" + ")"*len(listRst)

exec (conString)
outCon.Save("ConTest.tif")


texts:
I'm currently working on a project in QGIS 3.10 . So far, I had somewhat ignored matters pertaining to projections, because things seemed to be going fine. However, I am now beginning to experience some issues. I am not entirely sure how to resolve them, because I suspect I don't fully understand projections in QGIS yet.
The project's CRS is set to EPSG 3857. I have a map with six layers. They are as follows:

The CRS of these layers are:

Output: EPSG 4326
Mean coordinates: EPSG 4326
randstadstedeninfo: EPSG 4326
studstedeninfo: EPSG 4326
GADM36_NLD1: EPSG 4326
Esri Gray (light): EPSG 3857

At the moment, the map looks like this:

Apart from the “Output” (the green oval), it looks like I want it to look. I'm not really sure why it looks the way it does though.
How can I change the CRS of these layers in such a way that the Output (the vertical oval green polygon) becomes a nice circle?
When I change the CRS of the Output to EPSG 3857, it (again) goes somewhere else entirely. I'd like the depiction of layers 2 through 6 to remain the same, and change layer 1 in such a way that it fits neatly within the rest of them (as a circle).


texts: Getting feature ids in a layer shown in map canvas extent with PyQGIS in QGIS3?

texts: I am looking for a programmatic way to get all feature ids in a layer shown in the current map canvas extent.


texts: error using the QGIS "terrain profile" plug in

texts:
I have searched the home page for the "terrain profile" tool but have not found why I am getting error when trying to utilize it.

Any ideas?

I have a polyline and 4 dems ready to run the tool.
Would like to export the profile as an image and excel file.


texts: How do I find Sentinel-2 dataset ID on Google Earth Engine?

texts:
I'm new at Google Earth Engine and Javascript.

I'm trying to use Sentinel-2 data in the API following this tutorial of Landsat data .

According to this, it is possible to load/add a Sentinel-2 granule by naming the image like this:

COPERNICUS/S2/20151128T002653_20151128T102149_T56MNN

So, in my case, I've tried to load an existing Sentinel-2 granule, writing this:

var s2 = ee.ImageCollection('COPERNICUS/S2/20160412T015159_20150828T110656_T30SVG');
Map.centerObject(s2, 8);

The result of this script is:

  s2 image: Layer error: ImageCollection.load: ImageCollection asset 'COPERNICUS/S2/20160412T015159_20150828T110656_T30SVG' not found.

However, if I look Sentinel-2 images in the same area of the granule with the following code:

Map.addLayer(ee.ImageCollection('COPERNICUS/S2'));
Map.setCenter(-2.44, 37.77, 12);

I can visualize the Sentinel-2 image.

How can I know the ID of the visualized image?


texts:
Is there any GIS function which gives back the polygons of the intersections by storing the number of the overlapping surfaces to an attribute?

Or do you have a script for this purpose?

A sample pic with transparency:


texts: Beginner wanting to build a map for offline use (MyMaps, OSM or QGis?)

texts:
I recently managed to get GPS coordinates from a polyline embedded on a Google map I found. I would like to build my own offline map for travel purposes. I'm looking at OSM or QGis, even though I'm completely new to those apps. Like many amateurs, I've been solely using Google My Maps to plot routes around different points of interest.

So this is also advice topic as much as it's a question.

I now have GPS coordinates in txt format and I would like to use them to plot the path on the map. If any pros here can help me, what would be the most efficient solution for someone of my skill level in mapping (utter newb).

convert the GPS coordinates to KMZ if possible, load in Google My Maps?
import in QGis to get points and convert them to a single line
same as above only in Open Street Maps (with CartoDB I guess? I might be wrong).

Please be patient for a newb, school me in the right direction so I don't spend hours digging thru various solutions in this overwhelming topic.


texts: Concatenating fields in field calculator of QGIS?

texts: Is there a way to concatenate fields in field calculator of QGIS? (e.g. hectares + ' ha')


texts: Euclidean distance raster fails with ArcPy script

texts:
I am working on a script tool to create watersheds.
Part of my process requires a distance raster from various features that I use in an equation to perform local modifications to my DEM.

I have been unable to get arcpy.sa.EucDistance() to do anything when working with the in_memory workspace.

If I set the output to an FGDB it appears to work.

What am I missing to get this to work in_memory?

# convert vector points to raster points
# this output is successful
# I can do arcpy.CopyRaster_management(pp_ras, out_FGDB) and see
# that in_memory\pp__ras looks like i expect.

arcpy.FeatureToRaster_conversion(pourpoints, "OBJECTID",r"in_memory\pp__ras", dem)
pp_ras = r"in_memory\pp__ras"

# when I get to this part running in IDLE, the script just terminates with no
# pessages. If I print results from every step, the last one printed is me
# setting teh pp_ras variable
# when I run from the script tool i'm building this into, the progressor gets
# to "saving raster" and just  sits forever and I have to kill ArcMap/Catalog

euc_dist_in = arcpy.sa.EucDistance(r"in_memory\pp__ras", "", "", "", "")
euc_dist_in.save (r"in_memory\dist")
euc_dist = r"in_memory\dist"


texts:
QGIS didn't load empty tables with geometry columns from Postgresql, showing this error message: "invalid PostgreSQL layer", but when these tables have data it shows it without any problem.

Is it possible to load an empty PostGIS table on QGIS as layers?

The image below shows the same tables in different databases one is with data which is "gui_tool" and the other "test_tool" has no data.


texts: Geocoding results not displayed in ArcGIS Desktop?

texts:
I have an Excel worksheet with USA zip codes, which need to be geocoded and displayed in ArcGIS Desktop 10.5.

First, I downloaded the "USA Zip Code Areas" layer from ArcGIS online and created a new address locator using the "US Address - ZIP 5-digit" style. Next, I imported the Excel worksheet into ArcGIS and geocoded the addresses.

The ArcGIS system completed the geocoding process but did not display any results on the map. A new layer of points gets added to the Table of Contents, which contains the expected data rows, but the points are not displayed on the map.

I have previously used ArcGIS Desktop 10.1 for the same problem with success.

EDIT 1: One difference between the two ArcGIS versions seems to be that the locator could be saved within the file geodatabase in 10.1 whereas it needs to be saved in a file folder (but outside the file geodatabase) in 10.5.

EDIT 2: The attribute table of the geocoded layer of points contains columns such as "Distance", "X", "Y", "DisplayX", and "DisplayY". All such columns have "0" as values for all rows. To further test, I added two new fields (i.e., Longitude and Latitude) and used the "Calculate Geometry" option, which resulted in NULL values for all rows. [As a comparison, I recall that ArcGIS 10.1 did not provide similar columns at least by default and also produced usable Longitude and Latitude values when "Calculate Geometry" was used.]

EDIT 3: I obtain the same results when saving the geocode result as a shapefile in a file folder or as a layer in a file geodatabase. When I search for a zip code using the Geocoding toolbar, the system seems to highlight (i.e., a green circle flashes in and out) the correct spot on the map! But the map does not display any symbol related to the geocoded point layer.

EDIT 4: An expert from ESRI has informed me that a patch/fix was released with ArcGIS Desktop 10.5.1 to address the problem described above. I haven't yet verified if 10.5.1 indeed solves the problem.

EDIT 5: It seems installing ArcGIS 10.5.1 would resolve the problem. I reviewed: ArcGIS 10.5.1 Fixed Issues and found the following entry:

BUG-000103072
Unable to return point output when geocoding with Zip 5, City State, State, and Zip+4 Range locators based on polygon reference data.


texts: How does GeoMedia know what feature classes are in a database?

texts:
I've got a set of tables that have been migrated over from one GeoMedia database (Oracle) to another (Oracle); in different schema's of course.

I can't see the relevant Feature Classes when I look at the destination database (I can only see the pre-existing ones).

How does GeoMedia know which Feature Classes are available in the database? Can I just add the relevant Feature Classes to some fixed table name or is it more involved than that?


texts:
I'm trying to convert a coordinate to WGS84 degrees to NAD27 UTM on windows (vista 32 home basic), from python.

I tried installing pyproj with no luck even after researching for a while; so decided it would be easier to install the proj windows executables straight from the source (osgeo.org) - specifically the link for proj446_win32_bin.zip under 'Binaries' - then just invoke them from python and read the return value in to python.  Speed is not important in this application.

(maybe cs2cs.exe is not the quickest way?  If there's a different recommendation I'm all ears!)

I see in the docs where it says the files in proj-datumgrid-1.5.zip should be added to the nad dir before configuring and installing, but, since this was a download of precompiled binaries there was no install procedure (unless I missed something?)

Also I'm not sure what to do with this line in the FAQ, since these were existing binaries:

  On Windows the extra nadshift target must be used. For instance nmake
  /f makefile.vc nadshift in the proj/src directory.

Anyway, trying the 'trivial' datum shift example in the proj FAQ:

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Tom>set PATH=%PATH%;C:\proj\bin

C:\Users\Tom>cs2cs +proj=latlong +datum=NAD27 +to +proj=latlong +datum=NAD83<enter>
-117 30<enter>
*       * 0.000
<enter again, for good measure>
0dE     0dN 0.000
^Z

Trying it with the -v switch as recommended in the proj FAQ:

C:\Users\Tom>cs2cs -v +proj=latlong +datum=NAD27 +to +proj=latlong +datum=NAD83<enter>
# ---- From Coordinate System ----
#Lat/long (Geodetic)
#
# +proj=latlong +datum=NAD27 +ellps=clrk66 +nadgrids=conus,ntv1_can.dat
# ---- To Coordinate System ----
#Lat/long (Geodetic)
#
# +proj=latlong +datum=NAD83 +ellps=GRS80 +towgs84=0,0,0
-117 30<enter>
*       * 0.000
<enter again>
0dE     0dN 0.000
^Z

Also trying with PROJ_DEBUG env var also as recommended in the FAQ:

C:\Users\Tom>set PROJ_DEBUG=1

C:\Users\Tom>cs2cs -v +proj=latlong +datum=NAD27 +to +proj=latlong +datum=NAD83
pj_open_lib(proj_def.dat): call fopen(C:/PROJ/NAD/proj_def.dat) - failed
pj_open_lib(proj_def.dat): call fopen(C:/PROJ/NAD/proj_def.dat) - failed
# ---- From Coordinate System ----
#Lat/long (Geodetic)
#
# +proj=latlong +datum=NAD27 +ellps=clrk66 +nadgrids=conus,ntv1_can.dat
# ---- To Coordinate System ----
#Lat/long (Geodetic)
#
# +proj=latlong +datum=NAD83 +ellps=GRS80 +towgs84=0,0,0
-117 30
pj_open_lib(conus): call fopen(C:/PROJ/NAD/conus) - failed
*       * 0.000

0dE     0dN 0.000
^Z

That one was a bit more informative.  Looking in C:/proj/nad, I see conus.lla but not 'conus', and I do not see proj_def.dat.

Any ideas?


texts: Use turf.count with turf.buffer dynamically

texts:
I have this code where I'm trying to create a buffer dynamically from a draggable marker and then count how many points fall insed this buffer. As of now I can drag the buffer around without any problem and the first position of the buffer return the points count. But when I drag the marker the count does not update and also the buffer ends in a layer above the points. Here is the code:

 //add marker that is draggable
 var marker = L.marker(new L.LatLng(39.702475, -104.875398), {
     draggable: true
 });

 //add marker popup
 marker.bindPopup('This marker is draggable!');
 marker.addTo(map);

 //remove old buffers (used when marker is dragged)
 function removeBuff() {
     map.removeLayer(buff);
 };

 //create buffer (used when the marker is dragged)
 function updateBuffer() {
     //Make the marker a feature
     var pointMarker = marker.toGeoJSON();
     //buffer the marker geoJSON feature
     buffered = turf.buffer(pointMarker, 1, 'miles');
     //add buffer to the map. Note: no "var" before "buff" makes it a global variable and usable within the removeBuff() function.
     buff = L.geoJson(buffered);
     buff.addTo(map);
     console.log(buffered);
 };

 marker.on('drag', function () {
     removeBuff(), updateBuffer()
 });
 updateBuffer();

 //geojson call for points
 var data = L.geoJson(traffacc, {
     pointToLayer: function (feature, latlgn) {
         var popupContect = "<b>Accident Year:</b>" + feature.properties.year_STR;
         return L.circleMarker(latlgn, Style(feature)).bindPopup(popupContect);
     },
 }).addTo(map);

var pt = data.toGeoJSON();

 var countPt = turf.count(buffered, pt, 'description');

 console.log(countPt);

var resultFeatures = pt.features.concat(countPt.features);
var result = {
"type": "FeatureCollection",
"features": resultFeatures
};

As you can imagine this code is a patchwork of other people's code. Any ideas of how I can achieve the second part?


texts: Imported Shapefile layer doesn't show up in GRASS v.net dialog

texts: I am using the GRASS interface in QGIS 2.4. I have successfully imported my shapefiles into GRASS using v.in.ogr, but when I try to then use a GRASS tool, like v.net Network maintenance, the select boxes for choosing the imported vector layers are empty. Any suggestions? I can see the imported layers in the folder of my Windows Explorer.


texts: Converting 4-band TIF to PNG while keeping all 4 bands?

texts:
I have a number of aerial photos containing both RGB and a near-infrared band. The images are in TIF-format, however I need to convert them to PNG without losing any of the bands. I have tried converting/exporting data in ArcMap, however this fails, unless I choose to "use renderer" in the "Export Data" dialogue, resulting in only 3 bands being saved.

I have also tried the GDAL-translate alghorhitm in QGIS, however this didn't seem to work either.

Do I have any other options?


texts: How to print number from a dropdown list in Google Earth Engine

texts:
I want to print the number that corresponds to the list of classes I defined in the variable pixelClass, but when I click on my button, it only prints the label name, not the number. How can I make it to print only the number?
My code:
var pixelClass = {
  'All' : 0,
  'Soil' : 2,
  'Water' : 3,
  'Dead Grass' : 5,
  'Marsh' : 6,
  'Scrub' : 7,
  'Grass' : 8,
  'Forested Upland' : 9,
  'Forested Wetland' : 10,
  'Developed' : 11,
  };

var classSelector = ui.Select({
  items: Object.keys(pixelClass),
  value: null,
  style: {width: '35%', stretch: 'horizontal',padding:'0px 0px 0px 10px'}
});

var Button = ui.Button({
  label: 'Print Value',
  style: {width: '45%', stretch: 'horizontal',padding:'0px 0px 0px 10px'},
  onClick: function getValue(){
    return print(classSelector.getValue())
  }
})

var panel = ui.Panel({
  layout: ui.Panel.Layout.flow('vertical'),
  style: {width: '350px'}   });
panel.add(classSelector)
panel.add(Button)
ui.root.insert(0, panel);

Link:
https://code.earthengine.google.com/91c0a53623b8ea0a901d2f7751884e3c


texts: Openlayers heat map not displaying properly in html

texts:
I was wondering if you could help me with something I am trying??

Created a heatmap from a sql point table using sld in GeoServer.

Displays fine as a preview:-

It looks tiled when I publish it to the web mapped:-

Here is my HTML Code:-

<meta charset="utf-8">
<script src="http://www.openlayers.org/api/2.11/OpenLayers.js"></script>
<script>

    var map, layer;

    function init(){
        var epsg900913 = new OpenLayers.Projection("EPSG:900913");
        var epsg4326 = new OpenLayers.Projection("EPSG:4326");
        var cent=new OpenLayers.LonLat(143.841243,-37.833563).transform(epsg4326,epsg900913);

                                            var osm = new OpenLayers.Layer.OSM("Open Street Map");

                                            awms = new OpenLayers.Layer.WMS("GPS Boundary", "http://172.16.3.68:8080/geoserver/GPS/wms",
            {
                version: "2.5.2" ,
                layers: "GPS:LGA_POLYGON_GPS",
                transparent: true,
                tiled: true
            },
            {
                visibility: true,
                sphericalMercator: true,
                displayOutsideMaxExtent: true // Will not appear with certain zooms without this option
            }
        );

                                            bwms = new OpenLayers.Layer.WMS("House Points", "http://172.16.3.68:8080/geoserver/GPS/wms",
            {
                version: "2.5.2" ,
                layers: "GPS:House Points",
                transparent: true,
                tiled: true
            },
            {
                visibility: true,
                sphericalMercator: true,
                displayOutsideMaxExtent: true // Will not appear with certain zooms without this option
            }
        );

        cwms = new OpenLayers.Layer.WMS("Animals Heatmap", "http://172.16.3.68:8080/geoserver/GPS/wms",
            {
                version: "2.5.2" ,
                layers: "GPS:Animals",
                format: 'image/png',
                transparent: true,
                singleTile: true,
                ratio: 1
            },
            {
                visibility: false,
                sphericalMercator: true,
                displayOutsideMaxExtent: true // Will not appear with certain zooms without this option
            }
        );

        map = new OpenLayers.Map("map",{
            layers:[osm,awms,bwms,cwms],
            center: cent,
            zoom: 10
        });

                                            var switcherControl = new OpenLayers.Control.LayerSwitcher();
                                            map.addControl(switcherControl);
                                            switcherControl.maximizeControl();

//Variable Scale Bar
                                               var scaleline = new OpenLayers.Control.ScaleLine({
                div: document.getElementById("scaleline-id")
            });
            map.addControl(scaleline);

                                            map.addControl(new OpenLayers.Control.MousePosition({element: $('location')}));

                                            }

</script>


texts: Finding WMS URL for addWMSTTiles call in R

texts:
Continuing from a previously asked question here (Adding weather radar data to leaflet from website), I am having trouble finding the proper URL to use to get data from a WMS to add to a leaflet map. I believe this service is free to use by the public.
My code is below:
library(leaflet)
url="https://nowcoast.noaa.gov/arcgis/services/nowcoast/analysis_meteohydro_sfc_qpe_time/MapServer/WMSServer?request=GetCapabilities&service=WMS"
leaflet() %>%
  addTiles() %>%
  setView(lat=42,lng = -78,zoom=6) %>%
  addWMSTiles(url,layers = 9)

The links to the data on the site is here:
All Data Available, use control F and this ("analysis_meteohydro_sfc_qpe_time") string to get to the exact data I am looking for.
The service name is "analysis_meteohydro_sfc_qpe_time"
The image layer ID number is 9
The layer description is, "24-Hr Quantitative Precipitation Accumulation (inches)"
The WMS instruction guide for getting data is here: WMS Data Request


texts: Is a user legally allowed to make changes to available plugins according to his needs? e.g. changing UI, code etc but not the licenses and other info.


texts:
I am using QGIS 3 raster calculator.

I write the operation I want and, when I click on the three dots to select the output layer (as usual), the program doesn't allow me to give a name and create a new output file. It asks me to enter a result file instead.

Why is that, and how is it done?


texts: How work with PostGIS in Symfony 4 and Doctrine 2

texts:
I am looking to work with PostGIS in Symfony/Doctrine.
My search returns this old post: https://stackoverflow.com/questions/11713508/how-do-i-use-doctrine2-to-work-with-geospatial-queries-using-postgis
The best result is: https://github.com/jsor/doctrine-postgis
But I don't know in which file I must register it ?

Other result is:
https://symfony.com/doc/master/cloud/services/postgresql.html
but as we can see in the path, it is for cloud (PaaS) Symfony

Could someone clarify?


texts:
I've seen this question asked before, but the answers I'm trying aren't working.

I'm looking to query all OSM Ways that are within a bounding box. OSM data was imported with default spherical mercator. I'm querying using LAT/LON hence the transform

SELECT *
FROM planet_osm_ways
WHERE ST_Transform(
  ST_MakeEnvelope(37.808264, 37.804339, -122.275244, -122.271189,
  4326),3857
);

When I run this I get the following error:

  ERROR:  argument of WHERE must be type boolean, not type geometry LINE
  3: WHERE ST_Transform(ST_MakeEnvelope(37.808264, 37.804339, -12...


texts: Analysing and mapping intersection of layers with one layer with overlapping Polygons

texts:
I have one layer (a_layer) with approx 400 overlapping polygons and no more data as the fid. I want to analyse how many countys (b_layer) are coverd by each polygon of tha a_layer.

I was thinking to do that with the report builder of QGIS.

How to do that with python scripts and/or modeler in QGIS?

How to fit this in report builder?


texts: Adding raw input to SQL string in ArcPy?

texts:
I have this py script for selecting one point.

# Within selected features, select only those points of a chosen value
arcpy.SelectLayerByAttribute_management("Stations", "NEW_SELECTION", ' "OID" = 465 ')

That works but every time I want to select a new station then I have to change the station number in the SQL statement.

How can I select a new station as a raw input instead of editing the script every time?


texts: How to remove array of features in Openlayers 4, not using clear()

texts:
removeFeature() function works great but not so much when trying to remove a lot of features/markers from the source as it only removes single feature. There was a function removeFeatures([]) in OL2 that does this but removed in OL4.

Is there a work around to achieve this?

features.forEach(function(feature, ind, array){
      if(feature.id == selectedFeature)
      {
        // slow removing process as it removes a single feature from the source...
        tFeature.removeFeature(feature);
      }
    });

Was hoping to do something like this instead of removing a feature as it iterates through the source.

var removeF = [];
features.forEach(function(feature, ind, array){
 if(feature.id == selectedFeature)
 {
   // push every features that needs to be removed..
    removeF.push(feature);
 }
});
// Remove it in one go..
tFeature.removeFeatures(removeF );


texts: extract value for a given coordinate from HDF5 file

texts:
I have an HDF5 file of radiation data for the Indian Ocean region. I plotted the data in Python using the following code

import h5py as h5

import matplotlib.pyplot as plt

f = h5.File("D:\Nikka\Geo Data\Downwelling Surface shortwave Flux\New folder\HDF5_LSASAF_MSG_DSSF_MSG-Disk_201710290130.h5", "r", driver='core')
data=f['DSSF'][:]

print(type(data))

print(data.shape)

plt.imshow(data)

plt.show()

f.close()

The plot has columns and lines on the X and Y axis.
I'm new to this and I don't even know how to get the projection information out of an HDF file.

I want to extract the value of radiation for a given coordinate from the whole data first. When I'm done for one data, I want to get the radiation value from the data downloaded for the whole year for the same coordinate.


texts: OGR shapefile output fails - Error 1 in psSHP->sHooks.fSeek()

texts:
When trying to use ogr2ogr to convert to ESRI Shapefile format, I get the following error consistently across different files:

ERROR 1: Error in psSHP->sHooks.FSeek() while writing object to .shp file.

The error shows both from command line (calling the program both through OSGeo4W shell and directly) and QGIS Save As... dialog, irrespectively of the input format (tried OpenFileGDB, GeoJSON and SpatiaLite) or the CRS. I have plenty of disk space and write access to the target folder.

I have come across some bug reports concerning this but they seemed to deal with files larger than 2 GB which is not my case (around 1 MB in GeoJSON). This bug seemed to agree with the case but was closed without conclusion. I also tried a related solution from here but to no avail (QGIS starts normally).

I am using an OSGeo4W Express Desktop Install (default setup) with QGIS 2.16.2 and GDAL 2.1.1 on Windows 7 Enterprise 64bit. I have tried to reinstall the whole bundle multiple times, deleting the leftover folder.

Any ideas how to solve it?


texts: Unable to use PyQGIS since python is unable to import qgis libraries

texts: I am using Ubuntu 18.04. I have installed QGIS 3.4.4 Madeira on my laptop. I am learning PyQGIS. I have found these lines of code that I have executed in my terminal but I get a traceback saying that python is unable to use the QGIS libraries. Can you help me with this.


texts: Merging/unifying polygons from same layer when boundaries are touching using ArcGIS Desktop

texts:
I have a big layer full of polygons. The ones that are separated, are individualized. However, I want to join the ones that have their boundaries touching each other (look at the image).
For example, if at the beginning I have 20.500 polygons, I want to have 10.000.
With the Merge option in ArcGIS, the polygons get merged with only one polygon, which isn't good for working.
I don't mind if the attribute table gets wrong, as I will create a new one.


texts: How would I save a .sd (service definition) file from an MXD purely with Python? I can create an .sd by stepping through the process and saving as a service definition. However, I'm looking to fully automate my process.


texts: How can I convert a UNIX timestamp to a datetime format within the GeoEvent extension?

texts:
I assume that this can only be done with the use of a Field Calculator processor. However, there is little documentation about how to insert functions and about date- and time transformation in particular.

At the moment, the data comes in like this:

"lastUpdated":148043564

It is a double datatype.
With the use of a fieldmapper I extracted this field into a custom definition. The new field is of a double datatype too (too prevent problems). This works well, however, I would like to add a new field to the incoming stream of data. This new field must have a 'human-readable' datetime value, like e.g. YYYY/MM/DD HH/MM/SS. What function do I need to fill in to achieve this and how? I'm assuming that my new field has to be of a date character.


texts: Transferring attributes to neighbors in point layer using QGIS

texts:
My goal is to create a wind map for an area about 300 km² in QGIS.
For this i have the data of only one weather station. The idea is to estimate the wind speed by the roughness lenght and the elevation. With a DEM i extract a homogeneous point layer with the elevation as attributes (the roughness i got from a land cover layer).
Now i want to transfer the wind speed, starting from the point from which i got the wind data, to the eight surrounding points (as shown in the second picture). With this given attribute every point shall perform an internal calculation (logarithmic profile calculation) and pass the result (their wind speed) to the next points until all points in the layer contain the value. If a point gets more than one different value from the surrounding points, it should do the calculation with the mean value (the structure, which is shown in the second picture, is just an example; in this case there are no overlays) . Unfortunately, I don't know how to transfer the attribute to the neighbors. How can I do that?
The logarithmic profile calculation is :

v=wind speed, h=height and z=roughness
or an approach in QGIS:
case
when "VALUE_2" > 0 then round("Windgeschw" * (log(2.7183, ((10 + "VALUE" - "VALUE_2")/"Rauhigkeit"))/log(2.7183, (10/"Rauhigkeit"))), 1)
else ''
end

where
"VALUE" is height at the point
"VALUE_2" is the given height from point 1
"Rauhigkeit" is roughness
"Windgeschw" is the given wind speed from point1
After that the result should be given to the next points.


texts: QGIS Print Composer producing angled graticule lines that look like rectangles instead of squares?

texts: I just tried to create an extremely simple map made of one layer loaded as WMS layer from Croatia's geoportal (http://geoportal.dgu.hr/wms). I successfully loaded the necessary layer and created everything in Print Composer but I have a problem with the graticule - the grid lines are angled and look like rectangles instead of squares?


texts: How to display clickable features from Geoserver over Google Maps v3 Base?

texts:
Please forgive what I am sure is a very noob question, but I need to do some research into the best way to achieve this and I am a beginner to GIS.

My employer has a Geoserver instance set up which can serve up files in all manner of formats. Is it possible to plot one of these onto Google Maps v3 in such a way as to make the feature's properties available to an information pop-up?

My development server is not on the same domain as the Geoserver, but the Geoserver serves up files publicly.

I have tried using GeoJSON but this seems to rely on the Geoserver and web server being on the same domain, otherwise cross site scripting protection prevents the connection - this works fine as long as I download the GeoJSON into a text file and store it on the web server but the source database will be regularly updated so the mapping needs to be dynamic.

I've tried using a KML layer, but nothing displays at all when I use this method replacing the KML file URL with my own Geoserver's KML file url.

I think this must not be a weird question as having a map with features that pop up info when you click them seems to be a fairly common thing, so can someone advise me where to start?

e.g. What is the best format to use to serve up dynamically updated data from Geoserver? Is it possible to display this kind of info on Google Maps? I believe that this needs to be a web feature service in order to plot vector objects rather than image-based maps - how would you handle this kind of request?


texts: Incorrect distances/area using Python and Shapely

texts:
I have a PostGIS table holding cadastral (property) data stored in SRID 3857 (Web Mercator). In Python I want to calculate the length of polygon lines and the area in metres and sq metres respectively.

I'm extracting the geometry using geoalchemy into a shapely object. However, the length and area calculations are grossly incorrect.

EPSG:3857 says unit of measurement is metre.

Official records says the shape should be rectangle approx 15.24m x 45.72m with an area of 665.6sqm. When I load this feature in QGIS and verify using the ruler (old official records with their paper origins can be slightly out), I get similar measurements.

I have a feeling I need to transform from EPSG:3857 to euclidean plane but I have no idea how to do it.

Anyway my code below produces area of 1049.54sqm with ring lines of 55.73m, 18.95m, 55.70m & 18.72m.

Python:

# Get feature from database
property = db.session.query(UrbanProperty).filter(UrbanProperty.rid == item_id).first()
# Use geoalchemy2.shape.to_shape to get shapely object
property_shape = to_shape(property.shape)

# Print area
print("Area: {}".format(property_shape.area))

# Get ring lines
ring = property_shape.exterior.coords
last_point = None
lines = []
i = 0
for this_point in ring:
    if last_point is not None:
        i += 1
        line = LineString([last_point, this_point])
        print("Line {}: {}".format(i, line.length))
    last_point = this_point

Output:

Area: 1049.5458170682496 #should be ~700sqm
Line 1: 55.73504821619876 #should be ~46m
Line 2: 18.950509980859465 #should be ~15m
Line 3: 55.70698981912214 #should be ~46m
Line 4: 18.72151526076074 #should be ~15m

EPSG:3857 WKT Polygon:

POLYGON((16827043.551375 -4003534.72,
16827019.718375 -4003484.337625,
16827002.651875 -4003492.575125,
16827026.6795 -4003542.833875,
16827043.551375 -4003534.72))


texts: Changing fill color of drawn rectangle using ArcPy?

texts:
I have a map template with header bar with a text element on top of it. I'm producing multiple maps and I want the header bar (drawn rectangle) to change color based on the type of map.

The drawn rectangle at the top of the map is not associated with any layers, but it has a element tag, so I should be able to call it out in Python and define what fill color I want it to be.

Does anyone know if this is possible?

For use in ArcMap 10.5. After some research, this is the closest I can materialize. The last line would be something like "elm.change color to something"

for elm in arcpy.mapping.ListLayoutElements(mxd, "MAPSURROUND_ELEMENT"):
    if elm.name == "Box":
        elm.???


texts: Geometry contains non-closed polygon: GeoServer output from PostGIS

texts:
I have imported a shp file using PostGIS shapefile loader plugin for pgAdmin3. The geometry type of the table created is MultiPolygon. I have cross checked the same using the following query.

SELECT COUNT(*) FROM data WHERE GeometryType(the_geom)<>'MULTIPOLYGON';

The output is 0 here. But when I uploaded this table in GeoServer, in layer preview the output is showing

  ERROR: geometry contains non-closed rings.

I again went back to PostGIS and used the following query:

SELECT COUNT(*) FROM data WHERE isClosed(the_geom) = FALSE;

Surprisingly the output is 0 again. Can anybody please explain me what is going wrong here? And how can I overcome this error? Thanks in advance.

N.B.: I am using PostgreSQl 8.4.8, PostGIS 1.5.2 and GeoServer 2.1.1


texts: Seeking recommendations for driverless GPS loggers?

texts:
There are a bunch GPS loggers out there, but a good portion need software to download the data onto a computer. Some of the software is Windows-only, but others are Mac-compatible (what I need). However I'd rather not deal with such software in the first place.

I ran across what I think are called "driverless" loggers: when you plug them into the computer they simply show up as a (FAT) drive where you can then simply read the text file (usually in NMEA format).

I've run across the following units

AMOD AGL3080
Columbus V-900/990 (uses removable SD cards)
Sony GPS-CS1/3 (discontinued, AFAICT)

Has anyone used these types of devices?

How well do they work (especially with Mac OS 10.7+)?

Any advice on particular devices (either to buy or avoid)?

I'm not really interesting in full-blown GPS units (Garmin, TomTom) as I don't need the mapping functionality (and extra bulk). I also don't want to have a phone app, because (a) I don't have a smartphone, and (b) even if I did, I wouldn't want to run down its battery. A small logger that saves the position every 1-10s that's light enough to carry is what I'm looking for. The Garmin GPS watches also need special software, so in that regard I'd rather not use them.

The main purpose of this will be to keep a log of where I've taken photographs. I'm not necessarily looking to tag the actual JPEG/raw files (especially the latter), but rather using Lightroom (which uses GPX, I know) to correlate photo and location, and then add the tag to the EXIF files on final export if desired (or just keep the information in the database for future reference).


texts: JavaScript library to read data from a WFS server?

texts: Is there a JavaScript library available to read data from a WFS server?


texts: Arcpy zoom to selected features not working

texts:
I'm writing a python script to automatically take some snapshots of my ArcMap in 10.2, but I can't get the zoom to selected features tool to work properly.

I have a layer called carereport, which I then make a feature layer of by providing a gid value. If I right-click on this new layer and click 'Zoom to layer', the tool works fine. But when I run the following arcpy script, it stays very zoomed out. It's as if some other features are selected, but I can't see where.

mxd = arcpy.mapping.MapDocument(r"CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]

arcpy.MakeFeatureLayer_management("carereport", "Siteslyr", """gid = 2739""")

addLayer = arcpy.mapping.Layer(r"Siteslyr")
arcpy.mapping.AddLayer(df, addLayer, "AUTO_ARRANGE")

arcpy.RefreshActiveView()
arcpy.RefreshTOC()

lyr = arcpy.mapping.ListLayers(mxd, "Siteslyr", df)[0]
df.zoomToSelectedFeatures()

df.scale *= 1.1
arcpy.RefreshActiveView()
arcpy.mapping.ExportToJPEG(mxd, r"C:\caredev.jpg", df,
                           df_export_width=1600,
                           df_export_height=1200,
                           world_file=True)
del mxd, df


texts: How to add shape file directly to the print composer/Layout view in QGIS?

texts: We can easily add the map from map canvas to print composer but is there any possible way to add vector layer directly to the print composer in QGIS either by PyQGIS script or by using some plugin or by any default feature.


texts: Select features from a raster based on their colour to create a new layer

texts:
I have a map of the UK imported as a raster. It was originally a JPEG and has areas that are coloured red and purple. I have a data set imported from a CSV file showing UK locations as dots. I want to select the dots that are within the coloured areas of the raster map.

I thought that in order to do this, I would need to create a new layer only containing the parts of the map that are red and purple and then use this to clip the other layer. I don't know how to just select these areas of the map without just doing it visually using a polygon (this would take ages, as there is so much detail!). Is there a way to select features by their colour?


texts: Combining legend and layer list using ArcGIS API for JavaScript?

texts:
I'm building a web app using ESRI's ArcGIS API for Javascript 4.8. I have a legend and a layer list widget on the page. The legend displays the symbology used but lacks ability to toggle display of the feature. The layer list allows toggling display of the feature but lacks the symbology (e.g., what does that red circle represent?)

Is there a widget that combines the visibility toggle and symbology so I have one widget on the page?

Or do I need to create custom widget for this?

Any other options before I start down the path of building a custom widget?


texts: QGIS 3: Get all Attributes and Objects / Features in View

texts:
I use attribute tables to store informations about a object/feature on a layer.
I have multiple Layers => multiple attribute tables.

Now I want to have a report about all displayed objects/features (and attributes) with all attribute fields in current view (like layouts and atlas).

In layouts / atlas i can display a legend, but this only get the layersname etc.
I do not mean the label of a feature in (map)view.

How can I do this?

My goal is to get a list of all displayed features/objects with her corresponding attributes.

Regards

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


texts: geotools / jts crs transformation result not at correct position

texts:
I copied the example from geotools, which shows how to transform a shapefile into a different projection. (http://docs.geotools.org/latest/userguide/tutorial/geometry/geometrycrs.html)
But when transforming from Gauss Krueger 4 into Pseudo Mercator (3857) the shapes are not at the correct position, they are displaced several meters.

What can I do to fix this?

The sample code contains :

 CoordinateReferenceSystem dataCRS = schema.getCoordinateReferenceSystem();
            CoordinateReferenceSystem worldCRS = map.getCoordinateReferenceSystem();
            boolean lenient = true; // allow for some error due to different datums
            MathTransform transform = CRS.findMathTransform(dataCRS, worldCRS, lenient);

... and then ...

Geometry geometry2 = JTS.transform(geometry, transform);

additional information:

The sample data of the source as the following CRS

PROJCS["PD_83_3_degree_Gauss_Kruger_zone_4",
  GEOGCS["GCS_PD/83",
    DATUM["D_Potsdam_Datum_83",
      SPHEROID["Bessel_1841", 6377397.155, 299.1528128]],
    PRIMEM["Greenwich", 0.0],
    UNIT["degree", 0.017453292519943295],
    AXIS["Longitude", EAST],
    AXIS["Latitude", NORTH]],
  PROJECTION["Transverse_Mercator"],
  PARAMETER["central_meridian", 12.0],
  PARAMETER["latitude_of_origin", 0.0],
  PARAMETER["scale_factor", 1.0],
  PARAMETER["false_easting", 4500000.0],
  PARAMETER["false_northing", 0.0],
  UNIT["m", 1.0],
  AXIS["x", EAST],
  AXIS["y", NORTH]]

and the target has the following CRS:

PROJCS["WGS 84 / Pseudo-Mercator",
  GEOGCS["WGS 84",
    DATUM["World Geodetic System 1984",
      SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
      AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
    UNIT["degree", 0.017453292519943295],
    AXIS["Geodetic latitude", NORTH],
    AXIS["Geodetic longitude", EAST],
    AUTHORITY["EPSG","4326"]],
  PROJECTION["Popular Visualisation Pseudo Mercator"],
  PARAMETER["semi_minor", 6378137.0],
  PARAMETER["latitude_of_origin", 0.0],
  PARAMETER["central_meridian", 0.0],
  PARAMETER["scale_factor", 1.0],
  PARAMETER["false_easting", 0.0],
  PARAMETER["false_northing", 0.0],
  UNIT["m", 1.0],
  AXIS["Easting", EAST],
  AXIS["Northing", NORTH],
  AUTHORITY["EPSG","3857"]]

Any idea?
D3


texts: Printing automated temporal selection of point features in QGIS?

texts:
I have a point layer with around 1.3 million features where one of the columns in the attributes table contains dates in the format YYYY-MM-DD.

Starting from an arbitrary date, say 2001-01-01, I would like to generate a series of maps which show all point features that have a date that is BEFORE that exogenously given starting date above and BEFORE every following month from then. In this example, I want to generate a map with all features before 2001-01-01, another one with all features before 2001-02-01, 2001-03-01 etc. Because I will have to generate many of such maps, I would like to automate this process.

To my knowledge, the atlas function will not do the job because it will iterate over each feature in the coverage layer. Also, I was not able to use the QGIS modeler with which I was hoping to make a selection by expression and then call the print composer.

I need to end up with the files map20010101.png, map20010201.png etc. saved to a folder for subsequent use. If that works via the print composer or not is not of importance.

Is there any functionality I was missing?

Software: QGIS 2.8.1, OS: MAX OSX

I have the same information in both, a string field and a date field. Making a selection works on the string field using the query builder, e.g. "date"<='2001-02-05', but not on the date field. The same applies to the Time Manager: The Time Manager works when I am using the string field, but not with the date field. However, that is not the problem for me. The problem is that the Time Manager makes "wrong selections" for my purposes, i.e. it selects observations that lie in intervals, e.g. "date">'2001-01-01' AND "date"='2001-01-31', but not "date"<='2001-01-01'.


texts: How to get the sum of column in two different Layer attributes in QGIS

texts:
How do I add the values of a column and then insert it in different table column? e.g. I have a
layer1 with attributes as follow:

and layer2 with attributes:

I am trying to sum the MIN with the same ids at layer1 then insert the result in layer2.


texts:
I have been working on finding shortest path between two buildings. For that purpose i have created kml files of various streets, converted them into shape files and then merged all of them together.
Now, when i try to use road graph plugin, it says that the plugin is not configured. I think that perhaps similar to arcGIS i might be required to prepare network dataset before using the plugin.
Can anyone help me with this problem?


texts: Using ArcMap to name line segments associated to point file

texts:
I have two shapefiles, one is line segments(fiber network) and the other is points(tower locations, for example). At this time we have to manually populate the line segments from each site back to a end point(data center, for example) which leaves us with a line segment naming convention like this, S01, S01 S02, S01 S02 S03 and so on for each site that is associated with that segment.
Is there a way to do this automatically without the use of Attribute Assistant Add-In?


texts: Geodatabase topology and geometric network on the same data

texts:
I know that I can't have a topology and geometric network on the same data in the same dataset in ArcSDE. But is there any solution how to do this? I need geometric network for generating diagrams via schematics extension. And on the same data I want build topology to avoid topology errors.
Is it possible to make two replicas of the GDB on the first replica work with geometric network and schematics and on the second replica build topology and after that synchronize the both replicas together?


texts: I'm generating a Google Street View URL that works in Chrome but not Internet Explorer. What's wrong?

texts:
I've made a small add-in in ArcGIS that allows a user to open their current GIS view in Google Maps and also to select a location to open in Street View. The map view works in both IE11 and Chrome. The street view works in Chrome, however when opened in IE it gets redirected.

For example, the generated URL might be:
https://www.google.com/maps?cbll=-36.0851437761,146.917419491&cbp=12,90,0,0,5&layer=c
Which when opened in IE gets redirected to:
www.google.com/maps/@/data=!3m3!1e1!3m1!2e0
Which then gets redirected to:
www.google.com/maps/@37.0625,-95.677068,7z

The only solution I can think of (but am unable to currently test - I don't have administrator privileges) is that maybe Google Maps needs to be added to the list of trusted sites in the privacy settings. Can anyone confirm or deny?


texts: Grid doesn't show up in printer composer

texts:
I am trying to get a coordinate grid on my map with the printer composer.
I have tried every example and followed it exactly but for some reason the grid doesn't show up at all. I am working with Qgis 2.12.3

The CSR of the map and the grid are exactly the same
Ive hit the green plus for a new grid and clicked draw grid
Ive changed the interval to 1000 map units (1km by 1km)

Ive looked around everywhere to see what I am missing??
Anyone have any idea why the grid is not showing?


texts:
I was wondering if anyone has successfully been able to perform an image pan sharpening within QGIS?  I have utilized OpenEV to do this, but the results have been very pixelated.

Any info would be great.


texts:
I'm trying to make a space plot with ggplot() as indicated here, but I'm having trouble using the nb2lines() function.
.shp files are here
Error in if (!is.na(projargs) && !nzchar(projargs)) projargs <- NA_character_ : missing value where TRUE/FALSE is required

while using plot() if it works for me, how could I fix it?
ec = st_read("nxparroquias.shp") %>%
  sf::st_transform('+init=epsg:4326')

peta_nb <- poly2nb(ec)
plot(ec, col="white", border="grey")
plot(peta_nb, coordinates(as_Spatial(ec.sp2)), col="red", add=TRUE)

What I got
nc_sp2 <- as(ec, 'Spatial')
neighbors <- poly2nb(nc_sp)
neighbors_sf <- as(nb2lines(neighbors, coords = coordinates(nc_sp2)), 'sf')
neighbors_sf <- st_set_crs(neighbors_sf, st_crs(ec))

nc_sp <- as(ec, 'Spatial')
neighbors <- poly2nb(nc_sp)
neighbors_sf <- as(nb2lines(neighbors, coords = coordinates(nc_sp2)), 'sf')

#Error in if (!is.na(projargs) && !nzchar(projargs)) projargs <- NA_character_ : missing value where TRUE/FALSE is required

#neighbors_sf <- st_set_crs(neighbors_sf, st_crs(ec))

#ggplot(nc_sp) +
#  geom_sf(fill = 'salmon', color = 'white') +
#  geom_sf(data = neighbors_sf) +
#  theme_minimal() +
#  ylab("Latitude") +
#  xlab("Longitude")


texts: Getting line geometry out of two points using QGIS?

texts:
I have one input point layer and out of that, I want to create an output LINE vector layer.

For each feature in my output line vector layer, I define a geometry which takes 2 point geometries. Figuratively speaking, imagine a line which connects both points -> this should be the line feature I want to add to my output layer!

I have tried it like this:

newEdge = QgsFeature(outFields)
geom = QgsGeometry.fromPolyline([geomFrom.asPoint(),geomTo.asPoint()]) # The error happens here!
newEdge.setGeometry(geom)

This had worked for me in QGIS2.x, but with QGIS3, I get the following error:

  Traceback (most recent call last):
  File "", line 194, in processAlgorithm
  TypeError: index 0 has type 'QgsPointXY' but 'QgsPoint' is expected

Any suggestions?


texts: Using variable to calculate field with ArcPy as script in toolbox?

texts:
stringvariable = "banana"
arcpy.CalculateField_management("c:\point.shp", "SUBDIRECT", "stringvariable", "PYTHON")

I get an error saying stringvariable is not defined what's the deal? I check stringvariable by printing it to screen and it contains what it should. I am trying to use a string variable to calculate a field with arcpy. I am stumped. Also it works like this when run as a script through idle or outside of arcmap, but now I am trying to add this script to a toolbox and I am getting this error.


texts: Why is there an offset between reprojection results of ArcGIS and QGIS from PSAD56 to WGS84?

texts:
I did a comparison of file system PSAD 56 to WGS 84 with arcgis and qgis and the difference is 8 m, why is the difference?

This is a points file (shape) and it is in UTM Zone 19S.


texts:
I have points containing data on temperature from 1951-2000. All data have X,Y coordinates.
I have raster files in the same period.
Two data sets have different data processing hence different values at any given point X,Y

My questions are:

Is there a way through ArcGIS 10.0 where I can conduct correlation at every point x,y (point vs raster)?
Is there a way where I can get the RMSE?
Is there a way where I can generate time-series graphs at X,Y?


texts: Is anyone using QGIS as an educational tool?

texts:
Here at the Cranedale Centre we are interested in knowing if any schools, collages and universities are using QGIS in their classrooms for education.

We are using it for teaching both GCSE and A Level Geography and Biology specifications (ages 15-18 in the UK) and would greatly value connecting with any other similar users.


texts: Interpolation of multibeam bathymetry using ArcGIS Desktop?

texts:
I'm trying to make a 3D map with multi-beam bathymetry (65536 features, xyz), but it seems that the interpolation methods are too rigid. I need to smooth the data so it looks more natural and realistic.

Which parameters do I have to vary so I can get this?


texts: Expression for placement of label 'offset from point' by azimuth field using QGIS?

texts:
I need help making an expression for labelling points, such that the label is placed in one of the 8 quadrants (above point excluded), based on the azimuth field of the point.

For example, if the azimuth is from 338-23 degrees, place in quadrant 1, if the azimuth is from 24-69 degrees, place in quadrant 2, and so on.


texts: Arcpy SearchCursor (arcpy.da) - Assign cursor value to variable

texts:
I am trying to use arcpy.da.SearchCursor to get the values of two field for each reach record in the DISTRICT feature class. I need to assign these values from the table to a two variables varRegion and varDistrict for use a bit further on.

I can retrieve the "REGION" field (0) below but not the "DISTRICT" field (1).

I get the following error:

 print("REGION: {1}".format(row[1]))
 IndexError: tuple index out of range

This is the code I have written:

import arcpy

fc = 'C://Data//STATE.gdb//DISTRICT'

with arcpy.da.SearchCursor(fc,['REGION_NAME', 'DISTRICT_NAME']) as cursor:
    for row in cursor:
        varRegion = ('{0}'.format(row[0]))
        varDistrict = ('{1}'.format(row[1])) # This does not work
        print varRegion # I need the variable for a calculation further on
        print varDistrict

I'm using ArcGIS 10.3.1


texts: Mapbox GL JS - Is there a way to specify a different zoom level for mobile devices?

texts:
With Mapbox GL JS, is there a way to specify a different zoom level for mobile devices? I found two examples, both from the older mapbox.js (links below), but I can't seem to translate them to GL JS and get them to work for me.
https://stackoverflow.com/questions/24087638/how-can-i-resize-my-map-according-to-the-device-width/24091293
https://stackoverflow.com/questions/23910594/leaflet-responsive-design-creating-different-zoom-levels-for-different-screen
For reference, this is the issue that I'm having. On desktop, the zoom level shows the appropriate features:

But then on mobile, it looks like this:

I would like to try to get it to show at smaller zoom level when loaded on mobile devices.


texts: QGIS "disable" database [PostGIS] connections

texts:
Is it possible to "disable" a PostGIS connection within QGIS?

I am in an environment with several test-databases on different testing VMs which are not necessarily booted up all the time.

QGIS tries to connect to all the databases on startup. For every offline database that results in a error-message-window popping up.

I want to avoid deleting the connections in order to mitigate that problem.


texts: Earth Engine - Why can't I add an imageCollection to a ui.Select()?

texts:
When I create an ImageCollection, I would like to select the images from a select box, and then load them onto the map when selected.

var myImageCollection  = ee.ImageCollection("LANDSAT/LC08/C01/T1_RT");

var myImages = myImageCollection.limit(10)
var myImage = myImages.first()

Map.centerObject(myImage,9)
Map.addLayer(myImage)

var selector = ui.Select(myImages())

Following this, I would add a selector.onChange() to change the images that are viewed on the map.

However when I run this part of the code, I get the following error.

The argument provided to ui.List.reset() must be an array.


texts: Populating a new field in a table using data from another table

texts:
Looking for information on copying the values in a field from on attribute table and pasting them in another table. Both have the same amount of entries and matching ID fields. Should be pretty straightforward but cannot seem to get it to work. On ArcGIS 10.2 with advanced license.

very similar question to what was asked a couple years ago here but original data is in another table than the destination: Adding new field in ArcMap from data of existing field?

thanks!


texts: Can't fetch addons in GRASS GIS 7.0.4 on Ubuntu 14.04

texts:
I'm setting up a new install of GRASS 7.0.4 (from Ubuntugis) on Ubuntu 14.04 and having trouble installing addons. Specifically, when I try to "fetch and install extensions from GRASS Addons," I receive the following error:

  Exception in thread Thread-3:
  Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 810, in
  __bootstrap_inner
      self.run()
    File "/usr/lib/grass70/gui/wxpython/core/gthread.py", line
  94, in run
      ret = vars()['callable'](*args, **kwds)
    File
  "/usr/lib/grass70/gui/wxpython/modules/extensions.py", line
  332, in Load
      mainNode = self.mainNodes[self._expandPrefix(prefix)]
  KeyError: u't'

Reinstalling GRASS has not helped.


texts: Converting multipatch layer into polygon layer using ArcGIS Desktop?

texts:
I have a shapefile which reads its geometry type as "multipatch". I tried to perform the clip function using this layer and it does not work.

How can I convert this multipatch layer into a polygon shapefile?

I am using ArcGIS 10.3.


texts: Why do colours merged onto a shapefile in base R display incorrectly?

texts:
I have a shapefile:

https://www.dropbox.com/sh/x1p9ctssdp6xz4r/AADZzy10j8VPigtWkcNxAZata?dl=0

which I read in like this:

Somalia = readOGR(dsn = "Somalia",
                  layer = "Somalia")

I then add a 'Count' column onto it so that each polygon is numbered:

Somalia$Count = 1:nrow(Somalia@data)

plot(Somalia)

text(gCentroid(Somalia, byid = TRUE),
     labels = Somalia$Count, cex = 0.5)

I then create a colour palette I would like to use:

a = colorRampPalette(c("#EBF5FB", "#2a6d76"))
a(74)
plot(rep(1,74), col = a(74), pch = 15, cex = 3)

which looks like this:

I make it into a data frame:

b = a(74)
b = as.data.frame(b)
b[,2] = 1:74
colnames(b) = c("colour", "Count")

I check the class of the colour column as follows:

class(b$colour)

which returns: "factor"

I then merge the data frame onto the shapefile:

Somalia = merge(Somalia, b, by = "Count", all.x = TRUE)

and check the class of the colour column:

class(Somalia$colour)

which also returns: "factor"

However, when I then plot the shapefile:

plot(Somalia, col = Somalia$colour)

The colours are represented like this:

Does anyone know why this is and if there is a way around it?


texts: Getting legend label on multiple lines in QGIS?

texts: This question was posted in 2011, and someone has said that QGIS now allows multiple lines for legend entries, but no one mentioned how to do this. I am running wein 2.8.1 and I cannot figure out how to get my legend entry on multiple lines other than manually using text.


texts: Adding Record to Related Table using JavaScript API

texts:
I looked and didn't find this question so hopefully it isn't a repeat.

I am new to the JavaScript API and just started creating a web application where the user will enter maintenance records for a street light. The street lights are shown as points on the map, and the maintenance table is a related table that in joined to the street light based on the street ID. When the user clicks the street light, a pop up currently appears with information of the street light. I also have a button (that currently does nothing) and that the user will hopefully be able to select to bring up a window to enter a new maintenance record for that street light. However, I am not sure how to precede with this. Doing some looking, I have seen there is a EDITOR widget, but that seems to be for adding features that have geometries. However, my records will not have geometries.

Thanks for any help, and please ask any questions if my question was not clear enough.


texts: Toggle doesn't work in OpenLayers 3 (using bind to)?

texts:
My code says the error "undefined input"? I don't know what is wrong with my code:

<!doctype html>

    <title>Map Examples</title>
    <link rel="stylesheet" href="../assets/ol3/css/ol.css" type="text/css" />
    <link rel="stylesheet" href="../assets/css/samples.css" type="text/css" />

    <input type="checkbox" id="visible" checked> Toggle Layer Visibility


texts: Installing latest version of QGIS on Ubuntu 18.04

texts:
I'n not an experienced user of Linux. But I just wanted to install the latest version of GRASS GIS and QGIS on Ubuntu 18.04. There are many different ways to do this I guess. There are the ppa's, there are the normal qgis-repositories for ubuntu and than there is also ubuntugis. It's all a little bit overwhelming and in the process of installing QGIS I think I messed some things up.

When I run sudo nano /etc/apt/sources.list I added these two repositories:

deb http://qgis.org/ubuntu bionic main
deb-src http://qgis.org/ubuntu bionic main

Then I do all the steps provided here:

https://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu

But when I run sudo apt install qgis I get:

The following packages have unmet dependencies:
 qgis : Depends: gdal-abi-2-2-3 but it is not installable
        Depends: libqgis-analysis3.10.2 but it is not going to be installed
        Depends: libqgis-app3.10.2 but it is not going to be installed
        Depends: libqgis-core3.10.2 but it is not going to be installed
        Depends: libqgis-gui3.10.2 but it is not going to be installed
        Depends: python3-qgis (= 1:3.10.2+28bionic) but it is not going to be installed
        Depends: qgis-providers (= 1:3.10.2+28bionic) but it is not going to be installed
        Recommends: qgis-plugin-grass but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I don't know if this has anything to do with the one time I tried to add the ppa. When I run ls /etc/apt/sources.list.d/, I get:

...
ubuntugis-ubuntu-ppa-bionic.list
ubuntugis-ubuntu-ppa-bionic.list.save
ubuntugis-ubuntu-ubuntugis-unstable-bionic.list
ubuntugis-ubuntu-ubuntugis-unstable-bionic.list.save

I just wanted to have the newest version of QGIS and GRASS (due to Python3) and now I don't know how to get back. Does anyone have a pointer?


texts: Creating raster grid of world with pixel values equaling surface area that grid cell contains?

texts:
How do I create a raster grid of the world with pixel values equaling the surface area that the grid cell contains?

For example, if you wanted to create a textbook example of how a projection visually distorts the area at the poles by having pixel values being hectares of land contained by that pixel, how would you do it?

Note that I do not need actual land area in the pixel - I just need the surface area of the featureless surface that the same raster grid could be applied to. I am using raster grid-cells as observations for OLS regressions, and this information will be useful for me to derive other data.


texts: Would anyone have a suggestion on how to generate discrete Lat/Lon taking into account Apartment or Unit #?  I know that geocoding is primarily based on street address.  However, is there a way to build a geocoder or use a service that would take into account secondary address information?  It is a requirement for a project I'm working on.


texts: I'm working on a project for a GIS course, I chose to find the best locations for the placement of an observatory. To accomplish this I planned to use cloud cover (or percentage of clear nights), proximity to existing roads (probably a TIGER file), Some measure of light pollution (I have found a few good rasters for this), I was also considering adding elevation to this project too, but I think I can find a good DEM to use. I am having trouble locating any data for cloud cover. I am thoroughly inexperienced with meteorological data and some of the filetypes I've found I have no idea what to do with, I found one other question on here about it but none of the answers really got me anywhere. If anyone can point me in the right direction that would be great.


texts: I use QGIS 3.10.5 and GARMIN GPSMAP 64S connected with USB cable to do live tracking. The GPS Information panel shows that I am connected but nothing happens on the screen.


texts: Running Calculate Statistics on .asc raster file gives ERROR 000840?

texts:
I have a series of .asc files that are output from a modeling exercise (see image below). I need to scroll through each .asc raster, and calculate the mean pixel value within a certain outline. I can do this manually by using the "Calculate Statistics" tool in the Data Management toolbox and then clicking through to the Layer Properties of each .asc file. I have been successful at doing this but it is time consuming (see second image below).

I would prefer to create a script in Python to automate this process. However, when I try to run Calculate Statistics on these same files through Python, I get the following error:

      CalculateStatistics_management(r"colby_cbp_run1\control_BP.asc", "1", "1", "", "OVERWRITE", path_to_area_of_interest)

      Runtime error  Traceback (most recent call last):   File "", line 1, in    File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\management.py", line 14811, in CalculateStatistics     raise e ExecuteError: ERROR 000840: The value is not a Mosaic Dataset. ERROR 000840: The value is not a Mosaic Layer. ERROR 000840: The value is not a Raster Dataset.

What is happening here? Is there an error in the syntax of the above command, or do I need to convert the .asc files to another format to perform this calculation using Python? Why is the tool working one way and not the other?


texts: Geoserver 2.11 Beta : SpatiaLite as data source proper installation

texts:
I am configuring Spatialite as data source in Geoserver 2.11 Beta (Windows 10 Pro) but I am only having SpatiaLite (JNDI) extension properly installed, the other SpatiaLite Data Source does not appear in my Vector Data Sources at all. I followed this manual.

Do I am  missing something here?


texts: QGIS: Distance matrix between points, constrained by a polygon

texts:
I am looking for a way to calculate a distance matrix between points, but not 'as the crow flies'. I want the distance to be calculated around a polygon layer.

Example 1: I have several fishing lodge points and I want to know the distance between them that a boat would drive. Boats cannot drive over land.

Example 2: I have fish survey points and I am interested in larval dispersion between protected areas. Fish larvae cannot go over land.

What is this analysis called?
How do I do it?


texts: Is it normal for ESRI World Locator to return half of a postal code?

texts:
I am using the ESRI World Locator to find address candidates for a location in Canada.  I should preface that I live in the United States and have a rudimentary at best understanding of international postal codes. The problem I'm seeing is that the candidate's "Match_addr" looks like this:
"Match_addr": "168 Garrison Rd, Fort Erie, Ontario, L2A"

I am expecting the postal code in these candidates to have 6 characters (7 if you include the space), but these only have three. Granted, there is a PostalExt field in the outfields that has the other three characters of the code.
Is this a bug?  If not, can I reliably interrogate the PostalExt outfield for the full code?


texts: QGIS 3.8.2: Gdalwmscache folder being created on save

texts:
I have a 'home' project which includes all my standard layers I use frequently, including Vector, Raster and WMS layers.

When I save this project I get a folder written to my Desktop called 'Gdalwmscache' which contains a large number of sub-folders/ files.
Is there a way of either suppressing the creation of this folder, or changing its default write location as it clutters up my desktop?

It deletes easily enough after close and doesn't appear to effect the load time when I restart the project.


texts: OGR - Weird GeomType -2147483645 on polygon shapefile

texts:
I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:

datasource = ogr.Open("c:\\temp\\data.shp")
layer = datasource.GetLayer(0)
print(layer.GetGeomType())

The print returns:

    -2147483645

I wonder what Geom Type is this. Is it an error in the data or is it a real Geom Type?

Edit: After using ogrinfo as elrobis suggested I have this output:

  INFO: Open of C:\\ArcGIS data\\Mun_region.shp'
        using driverESRI Shapefile' successful.

  Layer name: Mun_region Geometry: 3D Polygon Feature Count: 2 Layer SRS
  WKT: (unknown) OGR_GEOMETRY: String (0.0) OGRFeature(Mun_region):0
  OGR_GEOMETRY (String) = MULTIPOLYGON

  OGRFeature(Mun_region):1   OGR_GEOMETRY (String) = POLYGON


texts:
I'd like to extract, given a city name, all suburbs and relative polygon geometries. For instance:
https://nominatim.articque.com/details.php?place_id=230259366

So, I run the code:
place = 'Torino, Italia'
tags = {'place':'suburb'}
gdf = ox.geometries_from_place(place, tags)

When reading gdf content, some suburbs have been stored as polygons (what I wanted), but some others have been stored as points. The one in the previous picture, for instance, belongs to the latter group.

unique_id                    node/6173683209
osmid                             6173683209
element_type                            node
geometry        POINT (7.6801517 45.0549503)
name                            San Salvario
place                                 suburb
reg_name                                 NaN
wikidata                                 NaN
wikipedia                                NaN
name:pms                                 NaN
nodes                                    NaN
ways                                     NaN
description                              NaN
type                                     NaN
Name: 14, dtype: object

While others, as already mentioned, are polygons, just like this one.

unique_id                                        relation/9169020
osmid                                                     9169020
element_type                                             relation
geometry        POLYGON ((7.6628873 45.068484, 7.663573 45.069...
name                                                       Centro
place                                                      suburb
reg_name                                                      NaN
wikidata                                                      NaN
wikipedia                                                     NaN
name:pms                                                      NaN
nodes           [[[13929743, 1669480276, 538902963], [53890296...
ways            [160600494, 572748521, 134148111, 111863124, 1...
description     Confini dell'ex Quartiere 1 della divisione a 23.
type                                                 multipolygon
Name: 41, dtype: object

How can I get all suburbs as Polygons?


texts: How to use UndoRedo control (undoRedo features) in OpenLayers 2.13?

texts:
I am using UndoRedo control in OpenLayers2.13, but this control do not work always and sometime an error :

event.feature.layer is null in onDelete function. Why does this error occur?

UPDATE

Definition undoRedo variable in JS:

 undoRedo=new UndoRedo(vectors);

call UndoRedo functions:

 <p:commandButton value="undo" onclick="undoRedo.undo()"/>
 <p:commandButton value="redo" onclick="undoRedo.redo()"/>

Please help me.


texts: QGIS Processing Modeler not showing algorithms anymore

texts:
I use QGIS 3.4 on Linux Mint 18.1 and have happily created models once I came to know about this awesome feature.
But some days ago the algorithms disappeared.
If I right click in processing modeler I can only enable/disable visibility of Navigation.
In ~/.local/share/QGIS I tried

grep -inr 'algorithms' .

To find a true/false toggle, but without luck. Am badly missing algorithms.


texts: QGIS 3.2.2 OpenLayers plugin isn't listed to install

texts:
I've just installed QGIS 3.2.2 and after installation, tried to use the Plug in Manager to install the OpenLayers plugin.  But it's not in the list to install.

Any ideas?


texts: Merging features in layer AND calculating geometry for newly merged features in ArcGIS Desktop?

texts:
First, I'm working in ArcMap 10.3.1

I have many layers which are made up of multiple features (polygons). I want all those polygons to be merged into one. First I tried dissolving the layers, but when I went into the attribute table they were still made up of multiple features.

I have now found a workflow using merging, but I was hoping there might be a simpler solution. Here's what I've been doing:

This is what it looks like when I start.

I have 7 features selected, which are all part of one layer. After I select the features I start an editing session, and merge the features.

When I do that, I get this.
There is only one feature now, which includes all 7 of the original features. However, the acreage hasn't been updated. It just took the acreage from the first original feature. Then I calculate geometry for the acreage, and it updates it correctly.

This is the output I want, but I have a lot of layers to do this for, and it seems like there might be a better way to do this.

Maybe something involving the dissolve tool?

Or if this is the best way, is there any way that I can automate the process?

I'm new to GIS and have never tried doing that before.


texts: What tool could I use to merge separate line vectors?

texts:
I started with a line vector file consisting of several creeks. The problem with that file was that most of the creeks within the file were broken illogically into segments, even those that should have been contiguous. (I.e. Whoever initially created the vector file and attempted to digitize the creeks did not get it right the first time, even though the visual appearance served the purposes of the map at that time.)

To solve this, I found I could use singleparts to multiparts QGIS tool to make the separate stream segments whole (avoiding using the word join or merge because I didn't want to confuse with these tools as the segments I was putting together were all within the same line vector). The result, however, is that each newly whole stream became a separate line vector shapefile. Now I need to figure out within QGIS (or other tools accessible through QGIS?) how I can "merge" the separate creek line vector shapefiles into one shapefile that I can make appear in layers list in such a way as to name all the creeks separately rather than simply "blue line = creeks"). I'm used to ArcGIS and am learning QGIS bit by bit. I don't know whether I need to figure out how to put in spatial reference such as coordinates (but this being a stream, I would have to figure out how to put coordinates for a stream - headwater, for instance?) or determine if QGIS uses ObjectIDs (no indication thus far.)

Hope this makes sense.


texts: Adding multiple Photos to ArcGIS Online?

texts:
I'm trying to add almost 400 geotagged photos to ArcGIS Online (AGOL) for a work project but with no avail.

I've tried converting the geotagged photos to points in ArcMap and bringing this in to AGOL, which only displays the URL and doesn't have the photo.

Currently uploading them to Flickr to add as a KML link, but I don't want them to be public.

The AGOL story map is only suitable for up to 50 photos and uploading 400 at a time to AGOL is futile.

Any better suggestions?


texts: gdalinfo and other applications not running through Anaconda Prompt

texts:
I am using GDAL 2.0.3(installed through wheel) in Anaconda 4.2.0 with Python 3.5 installed.

I am able to import GDAL in my code. But whenever I am trying to run gdalinfo and other applications(such as gdalwarp,gdal_translate etc.) through Anaconda prompt, it gives an error:

  gdalinfo is not recognised as an internal or external command

Whenever I change the path to the folder (where these applications are stored i.e. Anaconda3/Lib/site-packages/osgeo) and run gdalinfo, then it runs perfectly.

I need to set the environment variable through Environment variable settings but not able to correctly put together the syntax in the prompt.


texts:
I have a date field called ExprDate and I want to set a definition query to select all records from today's date plus the next 7 days.

This is what I have:

ExprDate >= CURRENT_DATE +7

The expression is returning values, but not for the current date and next 7 days only. Any thoughts?

I am working on a file geodatabase on 10.2.


texts: How to assign value to field of layer based on spatial query with another layer?

texts:
I want to assign a value to a field of a polygon layer based on the value of a field on another polygon layer, using a spatial query.

My first polygon layer contains buildings and the second contains administrative boundaries. I want to assign the administrative area code based on which administrative area polygon the building is completly contained in.

So, on my building layer I've a field named "AreaCode" that I want to update with the Area code value from the Administrative Boundaries layer.

I want to do it using the program interface if possible and not by coding a script or macro.
Otherwise, does exist an external tool/plugin for ArcGIS that can do this?


texts: Print two different maps object in one layout template in Arcgis javascript api

texts:
I'm trying to publish a print service that accepts two maps objects, sent by javascript and print them, I found PrintTask() wedjit, something like printTask.map=map, my goal is to try to send two map, somthing like

          printTask.map1=map1;
          printTask.map2=map2;

And the result to be as in the picture

Is it possible to do that?! and How to achieve this?


texts: Select polygons that do not intersect any other polygon using QGIS, GRASS, SAGA or R

texts: I would like to select the polygons of the layer below that do not intersect with any other polygon (within the same layer). How can I do this using QGIS, GRASS, SAGA or R?


texts: How to completely remove QGIS for clean reinstall Windows 10

texts:
My initial install was Dufour 2.0 and have update to 2.18 and then recently to 3.4.  20 worked fine, but then 2.18 had some periodic crashes that were intermittent.  Now at 3.4 QGIS "hangs p" and I have to kill in the task manager.  I tried to uninstall everything for a clean start but somehow there are tidbits that remain and I now can't get any to work properly.  I've a 64 bit machine and have tried both 32 and 64 reinstall to no avail.

I purchased Ashampo uninstaller and tried that but still no complete uninstall.

Any idea?  I'm considering a complete wipe and reset but that is a huge headache and if there is an alternative I'll try it.


texts: Reverse viewshed analysis in QGIS (finding a point with the largest view of an area)

texts: Planning a drone survey which will be terrain following at 10m above the surface. I am trying to plan where I will be controlling the drone from where I can have line of site to the drone. I have made some guesses and ran those points through the Visibility analysis pluggin which was helpful, but I was wondering if there was a way for it to tell me the best place, rather than me guess at where the best places are, make points there, and test and compare results.


texts: Randomly distribute values with raster attribute using ArcGIS for Desktop?

texts:
I have a 30-meter raster that represents 10 land areas of different sizes.   Each of these areas is composed of a variety of surface materials.. e.g. grass, cement, pavement, dirt, trees etc in different proportions.  I know the proportions which these surface materials occur within each area, but I don't know the exact spatial location of the materials.. so,  what I would like to do is create another raster layer that randomly distributes the surface material within each of the 10 land areas.

I am using ArcGIS 10.3 for Desktop.


texts: Georeferencing vector layer with control points using QGIS?

texts:
I have a non-georeferenced vector layer that I need to be georeferenced. With raster layers the task is easy and straightforward, but I have no idea what should I do with my vector layer. I have a few control points with known coordinates which should provide some basis to transformation. So, let's say I know points with id-s of 1, 2 and 3 should have the coordinates of x1,y1 ; x2,y2 ; x3,y3. There might be some rotation and scale transformation in addition to simple shifting.

Any ideas?


texts: Getting vector feature information (distance and extent ) on OpenLayers 2?

texts:
I have basic WMS layer and vector layer in OpenLayers. Using EditingToolbar I can draw some  features as shown below

Then I want to get some information (like distance and extent) of drawn features in any format. At the movement I stuck on above point.
Can you give me some tips or sample code or some links?


texts: Convert old ArcGIS 9 VBA tool to new Python script tool for ArcGIS 10

texts: I have an ArcGIS .mxd file with an imbedded VBA script that is executed from a tool bar button. I would like to convert this VBA script tool to a python script tool for use in ArcGIS 10. Is that possible?


texts: Grass algorithms do not appear in Sextante toolbar of QGIS

texts:
I was having problems with some sextante algorithms in my QGIS 1.8, something related with wrong "os" name, I found a post in which reccomend to install the 1.9 master version.

I clean uninstalled the QGIS and then I installed the 1.9 version. When I activate the sextante toolbar, the Grass, TauDEM and even the QGIS algorithms doesn't appear in it. I have tried activating them in the configuration of sextante, reinstalling the plugin but the tools still missing.

Any ideas of what is happening?


texts: Creating inset shadow for river polygon in ArcGIS Desktop?

texts:
I'm trying to accomplish what the image of the two ponds shows as "inset" shading. They called this Bevel effect, which I think was down in Adobe Illustrator. I'm using ArcMap 10.3 without 3D Analyst.

I want to shade a river polygon so it ultimately appears as if it's at a lower elevation then the ground. The closest I've come to that is creating a buffer around it using the Buffer wizard (see image with shaded rivers).

I've also used the move tool through the Layer Properties menu --> Representations. However, this only makes the polygon appear to pop up.


texts:
I am trying to put the north arrow on the graphic output of the map using PyQGIS (QGIS 3.4). I tried adding it as an image with the attached code but I have the background of the image and it does not fit. Would there be any other way?

north = QgsLayoutItemPicture(layout)
north.setPicturePath("C:/Users/Pc/Desktop/logo.png")
layout.addLayoutItem(north)
north.attemptResize(QgsLayoutSize(23, 23,gsUnitTypes.LayoutMillimeters))
north.attemptMove(QgsLayoutPoint(3,234,QgsUnitTypes.LayoutMillimeters))


texts: FME SherbandGeneralizer - estimate time for "Optimizing Memory usage"

texts:
I have a workspace with a pointcloud of 240.000.000 points as input, goal is generalized countour lines, that do not intersect each other.
The workspace mainly consists of (cp. screenshot)

PointCloudSimplifier
SurfaceModeller (Output Countours)
LineCombiner / LengthCalculator / Tester to eliminate very small contour 'islands'
SherbandGeneralizer (input of remaining 82190 Features)

Testing with a small subset of the input data (~10.000.000 points) was very promising.
Except for the SherbandGenralizer the whole thing takes place in an acceptable time, but the latter produces an Optimizing memory usage. Please wait.... Right now, I'm waiting for two weeks.
The FME Process consumes somewhat around 16%CPU and very few working memory. Working memory load ist around ~11 of 16Gb.

I have an i7-6700 with 16Gb RAM, 64bit FME 2018.1.1.1 on Win10.
From the documentation we can only learn that the algorithm is time-intensive, and especially using constraints as in this case is highly-time-intensive, but this is not quantified. My thought was that the processing time would be in some way comparible with that of the PointCloudSimplifier (very processing-intensive according to the docs), but obviously it is not.
Question is: Is it somehow predictable how long I would have to wait for optimizing the memory usage? Taken memory load into account, I wonder why there is the need for optimization, should I try it over with more RAM (64Gb max possible), or should I give FME 2020 a try?


texts: Where can I get information on QGIS beta versions?

texts:
While searching for information on some QGIS functionality on the web, I noticed several times, people using version 1.9, however this version is probably some beta (or so I thought) but I can't seem to find a download/site of it anywhere.

Then, on some other site someone wrote that there is a development version of 1.7.4. Wiki site lists only official versions, but I want to know, is there a site where some beta previews are available?

Google search yields nothing useful under 'qgis beta', 'qgis 1.9'


texts:
I have a layer which contains a unique ID (UID) for each feature and another column of Scores.

For example:

UID, Score
A12,1
A13,1
A14,4
A12,2
A13,3
A14,5

I would like to use an SQL statement to group the data by their UID value and return the highest score.

For example, using the table above, A12 would equal 2, A13 = 3 and A14 = 5.

There appears to be several locations where I could complete this SQL statement?

Which is the correct Query Builder to use and how do you complete this query in SQL?


texts: turfjs cannot detect all self intersections

texts:
I am working with OpenLayers/Turfjs to detect self intersection in users manually drawn polygons on a web map. The function that detects the self intersection is a property of the condition of the draw control.

 var selfIintersectFeature = function (e) {
    var OLDrawEndFeature = e.target.getFeaturesAtPixel(e.pixel)[0];
    if (OLDrawEndFeature.getGeometry().getType() !== 'Point') {
        if (OLDrawEndFeature.getGeometry().getCoordinates().length > 3) {
            var intTestCoords = OLDrawEndFeature.getGeometry().getCoordinates();
            var intTestLinearRing = new ol.geom.LinearRing(intTestCoords, 'XY');
            var intTestPolygon = new ol.geom.Polygon([]);
            intTestPolygon.appendLinearRing(intTestLinearRing);
            var intTestPolygonList = [intTestPolygon]
            var intMultiPolygonGeometry = new ol.geom.MultiPolygon(intTestPolygonList)
            var intTestFeature = new ol.Feature(intMultiPolygonGeometry);
            var geoJsonFeature = JSON.parse(formatGEOJSON.writeFeature(intTestFeature));
            var kinks = turf.kinks(geoJsonFeature);
            console.log(kinks);
            if (kinks.features.length > 0) {
                $('#self-intersect-modal').modal();
                return false
            }
        }
    }
    return true

The kinks function of Turf detects the self-intersections only when The polygon has more than 4 vertices and the vertex of the polygon causing the self intersection is defined with a higher value on the X-Axis in comparison to the first vertex that started the polygon drawing (is located at its left/west).

The problem is that turf does not detect a self-intersection when a polygon has 4 vertices and the vertex causing the polygon to self-intersect has a lower x value than the first vertex that initiated the polygon linear ring (is located at its right/east).

How could I detect when vertex that causes a self intersection is located both at east and west of the first drawing vertex of the polygon in a polygon with 4 vertices?

I tried JSTS and got the same problem, I am working on legacy code and only can use ES5 Javascript with no package support.


texts: How can I alter the value field in a raster?

texts:
I'm using ArcGIS. I have a raster with angles in the value field. But the value field is type long integer. I would like to change it to float. Is that possible?
Some more details:
I've started with a DEM, and created two arrays with from it using numpy. The first array is the DEM source of data, and the second is the target array where I store de processed cells. I'm generating a topographic exposure raster.

My issue is that the value field from the original DEM is a long integer, therefore not suitable to storage decimal values. So, my question is how to change that value field type to float. This is done in python.

The way I solved this is by multiplying the angles (final data to store) by 1000000, so the value field store all the numbers that I need. I find this a cheesy trick. Is there a better/more 'elegant' solution?


texts:
I have two layers: one is a polygon and another one is a line (Road).
How can I find in how much road in falls inside each polygon?


texts: Displaying .gdb content(Feature classes) in winidows forms

texts:
I am having a .gdb file(World.gdb). I want to display or i want to see the content of this gdb file in winForms programmatically(C#). How can i do it?
I dont want to view via ArcCatalog.

Please help soon.

Regards,
Arun


texts: Autodesk Infrastructure Map Server - WFS 1.1.0 GetFeature Request error