texts: Creating random plots with coordinates within polygon using R

texts:
I am trying to create random plots in a polygon shapefile and then to plot it with index no as 1,2,3,... along with a legend comprising XY coordinates corresponding to each index no.

Code example:

data(meuse.grid)
gridded(meuse.grid) = ~x+y
image(meuse.grid)
plot(meuse.grid, main="Inventory Region")
plots <- points(spsample(meuse.grid, n=10, type='regular'), col='red', pch=20, cex=2)

How do I assign an index for each point created and then plot it with the XY coordinates?


texts: Sentinel 2A L1C product convertion from TOA reflectance to BOA reflectance

texts:
How can I convert the TOA reflectance values of L1C Sentinel2A products to BOA (Bottom Of Atmosphere) reflectance values?

Is there an equation?


texts: loading a vizjson with odyssey.js in cartoDb

texts:
I'm trying to write a map story using odyssey.js from cartoDb. My webapp is built using django and has markdown-deux installed. I've created a visualisation in cartoDb.

I've used the share link to get the vizjson link but when I add it to the markdown in the post it is not showing.

It should be noted that I've had to do some shuffling to get the css and django to play nicely but the basemap is working fine.


texts: Check if field value for selected features is null using ModelBuilder

texts:
My feature class contains two fields: an identifying field U_ID, and a descriptive text field DESC. This field currently has <Null> for all features. I would like to select all the features with the same ID and populate this field with sequential values (using code I have previously used here), only if there are <Null> values in DESC.

My model receives the feature class as input into a Feature Selection Iterator, grouping by U_ID. I then want to check for null values in the DESC field for those Selected Features. If a <Null> is found in DESC for any of the Selected Features, return true and populate the field with values. If there are values for all the features, the condition is false.

This is what the model looks like:

For example: the iterator selects U_ID = AA01. There are ten features in the feature class with that ID, so Selected Features contains those 10 features. The Calculate Value tool contains the following:

checkIfNull("%DESC%")

def checkIfNull(f):
  return "true" if not f else "false"

Seeing as DESC is <Null> for those ten features (or even just one of the features), the precondition is true, and Calculate Field DESC should be executed. However, the precondition returns false and the model ends. Changing the code to

return "true" if f is None else "false"

yields the same result. I don't think I'm accessing the values in DESC correctly, because my test for <Null> seems to be right, judging by the answers to other questions here.


texts: Why are layers (or levels) fundamental means of organizing geographic data in almost all GIS?

texts:
Layer (or levels) are a fundamental means of organizing geographic data in almost all GIS, why?

I am trying to understand the Layers in GIS been doing some research but am not getting the absolute answer of my question.


texts: Projecting polygon using ArcGIS API for JavaScript?

texts:
I have polygon data as:

  POLYGON ((1645481.0939999996 6124506.9885, 1645470.0473999996
  6124473.5406, 1645475.7094 6124440.1391,1645481.0939999996 6124506.9885))

  in wkid=2193

I want to project this polygon using geometry service with new spatial reference wkid= 3857.

I was able to project point using similar data on new spatial reference wkid=3857, but that is not happening with polygon.

Which method should I use to project polygon using geometry service?

 function addGraphic() {

   var wkt = new Wkt.Wkt();
   wkt.read("POLYGON ((1645481.0939999996 6124506.9885, 1645470.0473999996   6124473.5406, 1645475.7094 6124440.1391,1645481.0939999996 6124506.9885))");
  var polygon = wkt.toObject();

  //set the spatialreference
  polygon.SpatialReference = new esri.SpatialReference({wkid: 2193});
  var outSR = new esri.SpatialReference({ wkid: 3857 });
  var gsvc = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");

   var projPoly;
   gsvc.project([polygon], outSR, function (outGeom) {

   projPoly = outGeom[0];

   var symbol = new esri.symbol.SimpleFillSymbol().setStyle(esri.symbol.SimpleFillSymbol.STYLE_SOLID);
   var polygonGraphic = new esri.Graphic(projPoly, symbol);
   map.graphics.add(polygonGraphic);

  });
 }


texts: Change NMEA output messages from u-blox8-M8 via UDX message?

texts:
I have RealTerm terminal emulator connected to my receiver via RS-232 serial, and it is outputing variety of NMEA strings via it's default configuration. Currently, it looks like it is outputing GPGSV,GNGSA,GNGLL,GNRMC,GNVTG,GNGGA, and GLGSV NMEA messages. Here is the data that is output from the receiver on power up.

    $GNTXT,01,01,02,u-blox AG - www.u-blox.com*4E
    $GNTXT,01,01,02,HW UBX-M80xx 00080000*43
    $GNTXT,01,01,02,ROM CORE 2.01 (75331) Oct 29 2013 13:28:17*4A
    $GNTXT,01,01,02,PROTVER 15.00*01
    $GNTXT,01,01,02,GNSS OTP:  GPS GLO, SEL:  GPS GLO*67
    $GNTXT,01,01,02,ANTSUPERV=AC SD PDoS SR*3E
    $GNTXT,01,01,02,ANTSTATUS=DONTKNOW*2D
    $GNTXT,01,01,02,LLC FFFFFFFF-FFFFFFED-FFFFFFFF-FFFFFFFF-FFFFFFF9*4E
    $GNTXT,01,01,02,RF0 dev ok*04

I am trying to change the NMEA output message from the receiver to the "ZDA" message type. Ideally, this is the only message that I would like for the receiver to output. I have tried to get the receiver to output the ZDA message by sending a UBX-CFG-MSG (0x06 0x01).  Here is the message in hex.

    0xB5 0x62 0x06 0x01 0x02 0xF0 0x08 0x01 0x10

When this message is sent, there is no response from the receiver (no ACK/NAK), and no change to the message output. Is the UBX-CFG config message the proper way to do this, or can I/should I use the PUBX message. The PUBX message method is not clearly described in the documentation.

What is the proper way to change the NMEA output(s), and why does the receiver not respond (at all) to the request ?


texts: Choosing map projection by territory like ArcMap (but without ArcMap)

texts:
When I worked with ArcMap, I had no problem with choosing projection

  ArcMap has a large number of predefined projections organized by world, continent, and country. You can navigate quickly to appropriate projections for any part of the world.

My current employer did not buy ArcMap, but I still need to choose an appropriate projection for my tasks. For example, I have got a list of coordinates in degrees (WGS84). I need to define (for example)

some distances in meters
areas in square meters
midpoints
centroids

So, I need to select appropriate projection, transform original coordinated to this projection, make calculation, and sometimes transform result back to WGS84.

For this purposes I need mechanism to select the appropriate projection. What is it?


texts: Accessing Command line options passed to QGIS exe

texts: I am using QGIS 2.8, I am passing the raster image along with the qgis-bin.exe from the command prompt. Is there a way to access the name of the raster being passed along the exe in my plugin?


texts:
I need to get features by following URL:
http://services.land.vic.gov.au/catalogue/publicproxy/guest/dv_geoserver/wfs?service=WFS&request=GetFeature&typeName=datavic:CROWNLAND_PLMGEN&

I tried:
    http://services.land.vic.gov.au/catalogue/publicproxy/guest/dv_geoserver/wfs?service=WFS&request=GetFeature&typeName=datavic:CROWNLAND_PLMGEN&FILTER=

    SHAPE

    -37.2315356,142.8193248 -37.2302536,142.8195475 -37.2300784,142.8179702 -37.2313604,142.8177474 -37.2314496,142.8185509 -37.2315356,142.8193248

Which gives Java error java.lang.NullPointerException. Can someone help with this one?

It works if I use point:

<Filter xmlns="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><Intersects><PropertyName>SHAPE</PropertyName><gml:Point srsName="urn:ogc:def:crs:EPSG::4283"><gml:coordinates>-37.2976946,143.7812069</gml:coordinates></gml:Point></Intersects></Filter>


texts: Why is WKT shape empty/not plotting in some tools but not in others?


texts: Changing layer name of output vector from processing script in QGIS?

texts:
I define an input csv file and an output like so in my processing script:

##Input_CSV_File=file
##Output_Shapefile=output vector

The output shapefile is added to the map automatically when the script is done, but the name of the layer in QGIS  is always "Output Shapefile".  I want to name the layer based on something in the file.  Is there a way to change the name the layer is added with after the script is done?


texts: How to display a geotiff-image with OpenLayers at the "right place"?

texts:
I'm just starting with OpenLayers.
I have a georeferenced geotiff and the associated world file.
Now I want to display this image as an Overlay and google-maps as baselayer with OpenLayers.
Would be nice if anybody has some hints?
How to get started in the right way?
thanks, southente


texts: Image Age Information of XYZ Base Map in QGIS

texts: Is there a way to find the age of the imagery of a base map via pyqgis? Any help on this would be much appreciated.Thanks.


texts: Using ColorPicker in ArcGIS JavaScript API 4.12?

texts:
I can only find ColorPicker in ArcGIS JavaScript API 3.X, but I'm working on a project using 4.12.

I'm trying to implement ColorPicker to my map to let users to choose colors for Sketch objects.

I've included both 4.12 and 3.29 APIs in my code as well as required "esri/dijit/ColorPicker", then the website just turned into a blank white page. Obviously it doesn't work this way.

So, is there any other way to implement ColotPicker in a API v4.12 project?


texts: QGIS qgis2threejs color points and set radius expression

texts:
I use Terrain from Google Maps, then I have an import list from csv with earthquake location, depth and magnitude.
As I'm not familiar with this tool I managed as much as I could with trying options but all my points of the earthquake are the same radius and same color.
I saw expression but I don't know how to use it to set point radius size by earthquake magnitude and point color by depth.
Can you advise on this?
Also is there a way to create something like a grid that shows depths and latitude and longitude in this view?


texts: Installing grass extension through shell script

texts:
I wanted to install an GRASS extension through a shell script but, upon execution it says:

  You don't have permission to install extension to . Try to run g. extension with administration rights (su or sudo)
  sudo : : command not found

That been said I tried to execute this line of code:

add_on="$(g.extension extension=i.segment.uspo operation=add)"
 sudo "$add_on"

I know that I've done something wrong, but I don't know what.

Grass Version: Grass 7.0

Linux dist: Ubuntu 16.04 LTS


texts:
I want to load .adf files into R. The data is from this page:
http://www.fao.org/geonetwork/srv/en/metadata.show?id=14057

I tried the following code that I found after some research in the internet.
The problem is, that in the class RasterLayer I get negativ values that shouldn't be there. I don't know why this happens, so hopefully someone can help me!?

Code:

library(rgdal)
library(RColorBrewer)
dpath<- path...

x <- new("GDALReadOnlyDataset", dpath)
getDriver(x)
getDriverLongName(getDriver(x))
xx<-asSGDF_GROD(x)
r <- raster(xx)

The output for 'r' is:

  r
  class       : RasterLayer
  dimensions  : 2160, 4320, 9331200  (nrow, ncol, ncell)
  resolution  : 0.08333333, 0.08333333  (x, y)
  extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
  coord. ref. : +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs
  data source : in memory
  names       : band1
  values      : -997, 16  (min, max)

The '16' in the values refers to the 16 classes of length of growing period. But I wonder where those '-997' come from. Maybe something wrong with the coord. ref?

Here is also a data summary of 'xx':

Data summary:
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's
   -997       3       5      -9       8      16 7123158

And if we look at the data in xx more closely:

  table(xx$band1)

-997      1      2      3      4      5      6      7      8      9     10     11     12
 31711 429643  83011 166674 207228 270161 240958 183342 118608  98795  88473  73743  56022
    13     14     15     16
 30104  45521  52216  31832

There is really just this '-997' thing in it. I think the NAs are ozeans, so is there something wrong with the data loading or do I just don't understand the data?


texts: When draw line in QGIS 3, it is not attached to the shapefile layer, can't select or edit or make invisible

texts: I am trying to draw a line in QGIS3. I create the appropriate Shapefile layer, click on the editing pencil, select add feature and draw the line. However the resulting line does not seem to be drawn in the shapefile layer. I can see the line but can't select it or delete it. When I make all the layers invisible the line remains, as if it's not attached to any layer but just on the canvas. I can't save the shapefile layer, presumably because it thinks nothing has been added because the line is somehow elsewhere. Any ideas?


texts: How to specify GPKG Driver in GDAL/OGR under C++?

texts:
Working under CentOS (Linux), we have run up against the 4GB shapefile (dbf) limitation in our Monte Carlo model. We've decided to switch to GeoPackage to output our point attributes. I cannot find a reference on what GDAL/OGR driver to ask for under C++.

If I specify"GKPG" as a driver name, I get a null value returned from GetGDALDriverManager()->GetDriverByName. I am linking with GDAL 2.3.2.
Using the command:
    $ ogrinfo --formats |grep  GPKG

I get:

GPKG -raster,vector- (rw+vs): GeoPackage.

I assume this means that we linked with GEOPKG (and sqllite3) when we installed the package, but I am checking with IT to try to find out more. Apologies that I don't know how to make my code show with line feeds below:

My stripped down code below:

#include <ogr_feature.h>
#include "ogrsf_frmts.h"
GDALDriver  *Driver;
int main()
{
 const char *Seed_drv = "ESRI Shapefile"; //Results in valid Driver below.
 OGRRegisterAll(); // Register Drivers
 Driver = GetGDALDriverManager()->GetDriverByName(Seed_drv); //Driver:Valid
}

However:...

 const char *Seed_drv = "GPKG"; // Results in NULL myDriver below.
 OGRRegisterAll(); // Register Drivers
 myDriver = GetGDALDriverManager()->GetDriverByName(Seed_drv); // Driver:NULL


texts: Generating Sparklines as Diagrams QGIS 2.10

texts:
The following seems to be an amalgamation of questions Is it possible to represent points as sparklines in ArcGIS for Desktop? and Pie-Chart coordinates in QGIS.

Basically I have 5 sets of observations for n regions (the Australian Bureau of Statistics SA2 geography). Each set of observations is the count of persons aged under 30 and persons aged over 60 - so, basically providing two coordinates that can be plotted against each other to generate a line graph.

I've had some success in importing these as a WKT Linestring into QGIS in order to generate some quite funky line graphs - in the following image each line is an SA2 in a amalgamated geography (HMdA), as you can see there are varying trajectories for different lines, it is this facet that I'm trying to capture:

Doing this got me thinking that it should be possible to render these as Tufte-esq Sparklines around the centroid for each SA2. This would help put the trajectories in spatial context (which, after all is what GIS is about!).

I've been thinking that an .svg rendering might be the way to go (although the link to the tutorial for creating SVG-based sparklines with d3.js on Tufte's website is broken: (http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR). Here the idea would be to render the SVGs and then attach the SA2 centroid coordinates to them for mapping - although I don't know how feasible this would be as there are 3000+ SA2s, and I don't want to render that many SVG files!

QGIS Diagrams would appear to be another possible avenue for exploration - although I cannot seem to find any literature about creating bespoke Diagrams (other than Pie, Bar and Text charts). So, here the (second,sorry!) question would be - has anyone attempted creating different diagram styles in QGIS?

EDIT
If anyone is still reviewing this question...I'm in the process of using THIS little beauty to structure an equal area framework to drop the sparklines into.


texts:
I have to manage a network, made by essentially the streets of a city which has to serve some buildings.

I used GRASS v.clean to clean the network and then v.net.nodes to make nodes and then I save the vector as a csv file to collect coordinates of nodes.

In this process I came upon a problem: saving the vector of nodes in this way I obtained a csv file with "x,y,cat" instead of simply "x,y", so as to have a third empty element for each line like this "20.34,30.34, ,".

How to have only X and Y coordinates without "cat"?


texts: Combine two rasters sets using weighted geometric mean

texts:
My question is:

How can I combine two to four raster layers using weighted geometric mean?

I am using ArcMap 10.3. I want to use the weighted geometric mean since it nicely reflects a situation when a shortage in one element limits the result and cannot be compensated by other elements.
The raster layers all have the same cell size, same extent and come as .tiff files, though converting them wouldn't be a problem.


texts:
I'm trying to write a plugin that among athor things adds a layer from a database.
Here is my code:

        uri = QgsDataSourceUri()
        # set host name, port, database name, username and password
        uri.setConnection("geoerpdev2", "5432", "LAIS_SPACIAL", "postgres", "Passsword")
        # set database schema, table name, geometry column and optionally
        # subset (WHERE clause)

        uri.setDataSource("spacial", "parcels", "geom","cell_code=3030404")
        if uri:
            print (uri)

        vlayer = QgsVectorLayer(uri.uri(), "parcels", "postgres")
        if not vlayer.isValid():
            print (uri)
            print (vlayer)
        QgsProject.instance().addMapLayers([vlayer])

When I change setDataSource as sugested to:

uri.setDataSource("spacial", "parcels", "geom","\"cell_code\"='3030404'")

Still nothing happens.

In the python console this is what is printed:

<qgis._core.QgsDataSourceUri object at 0x000002F5CA5C9EE8>
<qgis._core.QgsVectorLayer object at 0x000002F5CA5E8C18>
dbname='LAIS_SPACIAL' host=geoerpdev2 port=5432 user='postgres' password='Password' table="spacial"."parcels" (geom) sql=cell_code=3030404

This is the info about the layer when I load it manually:

I based my code on this example here.

Can someone detect why nothing is loading?


texts: TOC control on Dockable Win ArcMap add-in?

texts: I want to add a TOC control to a DockableWin in an ArcMap Add-in as changed based on ArcMap TOC layers like image Analysis tool in ArcMap. Can you help me how I can get all layers in my check box or TOC control on DockableWin ?


texts: Where are Block and Lot fields in Esri Local Government Information Model Geodatabase Schema?

texts:
I am looking at the ESRI Local Government Information Model (LGIM) geodatabase schema and I cannot find the Feature Class that holds the parcels' Block and Lot information.
Do you know which Feature Class in LGIM schema holds the Block&Lot information?
Under the "ParcelPublishing" dataset there is a "Block" polygon feature class, but I don't see Block and Lot fields in it.


texts: Map in an iFrame - open hyperlink from infoWindow in the calling page

texts:
I've got a Google Map being served inside an iFrame on a page (eg xxx.com/PageWithMap.html)

The code for the Google map sits on another domain (eg yyy.com/MapCode.html)

So it looks like this on xxx.com/PageWithMap.html:

The markers in the map show an infoWindow which contains a hyperlink to a new page on the first site (eg photo link)

How can I force the hyperlink to change the first page? That is, xxx.com/PageWithMap.html should navigate to xxx.com/photo1.html

I'm finding that xxx.com/photo1.html opens inside the iFrame on xxx.com/PageWithMap.html if I simply click the hyperlink.

Searching on StackOverflow suggests using window.top.location.href or target="_parent" or target="_top" but I can't get it to work. Is there an added complication since the hyperlink is within a Google Map infoWindow?

Let me know if the above description isn't clear - unfortunately I can't share the actual site yet but I may be able to make a mockup if necessary.

Thanks


texts: How to edit line and polygon layers at the same time?

texts:
I have two layers, lines and polygons. Lines are basically the boundaries of the polygons. Is there any way that when I change or reshape the lines the polygons get updated automatically?
I normally change the lines first and since they have to match the associated polygons, I convert them back to polygons again. This way, I need to update the attributes of all the polygons or I have to reshape the polygons according to the change I did to the line layer. When I use topology check I am able to catch the issues and correct them using the correcting topology options. Nevertheless, I was wondering if there is a more efficient way/ approach to do it.


texts: Un-splitting data that crosses antimeridian in ArcMap?

texts:
I'm working with a set of points in ArcMap that crosses the antimeridian (180°). I need to convert the points to a line but doing so creates a line that doubles back and forth across the globe to connect the data, instead of closing the line in closest distance terms.

How can I get arc to unspilt my data around the antimeridian for the both the map view and geoprocessing?


texts: Creating multi-attribute primary key in table in ArcGIS Desktop

texts:
If I have this file geodatabase table with the format of:

ColA | ColB| ColC | ColD | ColE | ColF etc...

I want to declare a combination of columns will be the primary key (ColA | ColB| ColC). When I say primary key, I want to say that the combination of ColA | ColB| ColC defines a unique row within the table.

I was thinking of using Add Attribute Index tool in ArcGIS Desktop on these three columns, but I'm not sure if that is the right approach.


texts: Leaflet map with coordinates included in the URL path

texts:
I am trying to implement the dynamic coordinates in the URL path in the leaflet map as per the Google Maps example.

I found some examples:

https://stackoverflow.com/questions/15919227/get-latitude-longitude-as-per-address-given-for-leaflet

Dynamically set mapview based on the overlay feature of L.geoJson coordinates in Leaflet

from where I tried:

    $.when(counties).done(function(){
    var map = L.map('mapid')
    L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?
    access_token={accessToken}', {
attribution: 'Map data &copy; OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox',
    maxZoom: 21,
    id: 'mapbox.streets',
    accessToken: 'pk.eyJ1Ijoia3J1a2FyaXVzIiwiYSI6ImNqZ2tuaHZqODAxMjYzM28yam40MmpxMmEifQ.3chgJkJajjDBxsF4YHgENA'
}).addTo(map);

but my map dissapeared.

Console says:

Uncaught SyntaxError: Unexpected end of input

Is there a way to make my URL dynamic likewise in the BBox case?

http://bboxfinder.com/#0.000000,0.000000,0.000000,0.000000
https://github.com/aaronr/bboxfinder.com


texts: How to prevent the user from moving the feature?

texts:
I want to prevent the user from moving the feature in ArcMap when editing.
I used OnChangeFeature event but it does not work.

void m_editEvents_OnChangeFeature(IObject obj)
        {
            m_editor.AbortOperation();
        }

The OnChangeFeature event fired after moving the faeture.


texts: How to make interactive OpenStreetMap layers in TileMill?

texts:
If I'm reading the UTFGrid spec right, you can only have 65,501 different interactive features. Or more precisely, every feature needs a unique ID in the range 0-65501.

TileMill uses UTFGrid for its interactivity, so this limit seems to apply. It shows up as non-parseable JSON being generated, JSON handling exceptions etc.

So, what ID can you use for OpenStreetMap features (loaded into a PostGIS database), given that the osm_id column will have values in the hundreds of millions.


texts: Finding distance of consecutive points in a GeoPandas data frame

texts:
I am trying to find the distance between every consecutive points in a GeoPandas dataframe. Let's say we have the following data frame:

import pandas as pd
import geopandas

data=pd.DataFrame()
data['lat']=[42,42.1,43,43.2,43.9]
data['lon']=[-120,-119,-118.2,-118,-117.2]
data_gpd=geopandas.GeoDataFrame(data,geometry=geopandas.points_from_xy(data.lon,data.lat),crs={'init' :'epsg:4326'})
data_gpd=data_gpd.to_crs({'init': 'epsg:6340'})  #converted to a meter based CRS

Now I want to find the distance between consecutive points and add it to the data to have something like this (the values are not actual and are only examples):

data['distance_from_previous']=['nan',12000,13000,25000,11000]


texts:
I am working on Qgis python console. I want to draw a line in the center of two parallel lines..For this purpose firstly i have to store the coordinates of those two lines in a variable so i can apply distance formula to draw line in center of two lines..

Can anybody tell me how to get coordinates of a selected line through python console?


texts: Modifying Raster Layer with Python Console

texts:
Forgive me if this has been asked somewhere else.  I am looking for a way to edit a raster file which has already been loaded into QGIS through the python console (i.e. I would like to edit the raster through the console).  Specifically, I would like to be able to set transparency, scale and move the raster layer.  It seems like GDal is the easiest way to do this, but I haven't had any success.  I can import raster layers just fine using the: gis.utils.iface.addRasterLayer("FILE PATH", "FILE NAME") command, but can't get any further.

If this is something which is easier accomplished with a stand-alone python script that is alright too.  In the end I want the ability to add multiple raster images from a defined location based on a text file which indicates their location, size etc.

Any help would be greatly appreciated.

Thanks!

EDIT: Version 1.8, will be changing to 2.0.1 soon.
EDIT 2: More information added to prompt answers.


texts: Module nziv not found in QGIS 2.10.1-Pisa

texts:
I want to use nviz in QGIS2.10.1-Pisa on windows 7 and I always get the same warning message  : "Module nviz not found", whenever I click on it in the GRASS tools Modules list.
I have tried to uninstall and re-install from a fresh download (Standalone installer) to no avail.
I know there are some similar questions that have already been asked, but as far as I know there are no solutions.
any help?


texts: How to merge geographically similar polygons?

texts:
I'm working with zoning data at the parcel level for a city, e.g., each parcel has a zoning attribute. My goal is to create a contiguous zoning map without intersections from roads and highways. I manually edited a portion of the city to show my intended result.

Here is a portion of my initial map:

And here is a rough manual edit of how I'd like to dissolve the features and remove the gaps where the roads are:

Is there any geoprocessing that can achieve this result without manually editing the features to be contiguous?


texts:
Used a DEM raster and then used the extract-by-mask feature to shrink it to the shp file I'm working with. However, when I try to get unique values, it gives me the following error message:

"The number of unique values reached the default limitation (>65536). Note the number (65536) should be read from the setting."

I ask because when I loaded up my masked raster (DEM_Mask), I am able to see min-max values of 1685.94-3463. I am trying to use query builder in the conditional tool to filter out areas between values of 2000-2500 (Value <=2000 AND Value >=2500), but see no "Value" field in the query builder. I'm not sure what went wrong or if there are other methods that I'm unaware of.


texts: How to correctly use LIKE in the code block of a Reclass expression in ModelBuilder Calculate Field

texts:
I have a Reclass expression that works when i am search for single instance of a data field.

I also wish the Reclass to work with a SQL type LIKE selection with Wildcards. e.g. I need to reclassify any example where the field include the text 'Inland Water' but i do not know what text may precede or follow this text term.

I have tried the following but it does not work. I get a syntax error.

Expression
Reclass(!DescGroup!)

Code Block
def Reclass (DescGroup):
  if (DescGroup == 'Sea') :
    return 'K'
  elif (DescGroup LIKE '%Inland water%') :
    return 'G'

Any thoughts, tips or help would be very useful.

Thanks.


texts: Deleting duplicate polygons with certain attributes using ArcGIS Desktop?

texts:
I have a parcel polygon feature where some of the polygons have been duplicated over time. I could run the Delete Identical tool to remove all duplicates, however, some of the polygons have data in a field that I would like to retain and I don't want the tool to delete that one.

Is there a way to delete the duplicate polygons while retaining the one with a certain attribute field value?


texts:
I have a function to automate downloading NDVI data from https://e4ftl01.cr.usgs.gov/MOLT/

However, I'm hitting an error when downloading the .HDF files. They download fine but they seem to be corrupt, as I can't get any of the subdatasets using gdalUtils

Here is an example of the code, note that to download you will need an earthdata account:

library(gdalUtils)
library(utils)

usrname <- readline("EarthData username")
pwd <- readline("EarthData password")
link <- paste0("https://",usrname,":",pwd,"@e4ftl01.cr.usgs.gov/MOLT/MOD13Q1.005/2010.01.01/MOD13Q1.A2010001.h09v04.005.2010028053958.hdf")

#Now download
download.file(link,destfile=paste0("C:\\Temp_file\\MOD13Q1.A2010001.h09v04.005.2010028053958.hdf"),method='auto',quiet=F,cacheOK=T)

#Test to see if the download worked
gdalinfo("C:\\Temp_file\\MOD13Q1.A2010001.h09v04.005.2010028053958.hdf")

The full error I get from gdalinfo is:

[1]"ERROR 4: `C:\\Temp_file\\MOD13Q1.A2010001.h09v04.005.2010028053958.hdf'
not recognized as a supported file format."
[2] ""
[3] "gdalinfo failed - unable to open
'C:\\Temp_file\\MOD13Q1.A2010001.h09v04.005.2010028053958.hdf'."
 attr(,"status")
 [1] 1

Why I think my mistake is in 'download.file' is that if I download manually the hdf file and try "gdalinfo" again, the file is able to be opened and looks correct.

I'm aware of the 'ModisDownload' function in the rts package. For my purposes it will be much more convenient if I had a function so that I can personalize it to my needs.


texts:
I've added new fields to my base models. I would like it to reflect to my ISO metadata. Where do I start?

What fields can I place in my local_mappings? Can I add custom fields like purpose and abstract?


texts: geoserver and geonetwork to automatically ingest new raster files from a directory

texts:
I have a data processing system regularly creating new raster files.
I would like geoserver 2.8 to detect the newly added file and ingest it, and I need geonetwork 2.10 to create a new entry (showing metadata, webservices pointing to geoserver WMS, WCS, WFS for the new layer) each time.
I can of course create xml files describing the meta-information.

Is there something already ready to use in geoserver/geonetwork?
Or shall I develop some scripts (in this case, can you give me a general structure or point me to resources)?


texts: Cluster features - get value properties of feature - on style function

texts:
I struggle with not very complicated issue, I need get average values on my cluster features. Without cluster it's OK, I get the value but how to get value in cluster set?

with cluster    value:    feature.get('tzewn')[i] - is undefined

without cluster value:    feature.get('tzewn')    - is ok.

My style function:

var s_t_zew = function(feature, resolution) {
    var fGet;
    var size = feature.get('features').length;

    for(var i=0; i<size; i++){
        //function isCluster(feature) { if (!feature || !feature.get('features')) { return false;  }

          fGet += **feature.get('tzewn')[i]**; <--- it's undefined
          console.log('i: '+i+',  '+size+' '+ ',  'fGet);
//}
}
..
fGet = fGet/size;
...
text: fGet.toString(),
...
}

My GeoJSON:

parseResponse({"type":"FeatureCollection","totalFeatures":1314,"features":[{"type":"Feature","id":"v_wezel_tzewn.fid--7639626f_157c2088d0c_7c7e","geometry":{"type":"Point","coordinates":[2572380.517,7010401.8134]},"geometry_name":"geom","properties":{"gis_id":13176,"tzewn":3.5,"bbox":[2572380.517,7010401.8134,2572380.517,7010401.8134]}},
... }

How to get value on cluster features?

feature.get('tzewn')[i] doesn't work - Cannot read property '0' of undefined,

parseFloat(feature.valueOf('tzewn')[i]) doesn't work - get NaN

In OpenLayers 2 this works well:

sumValue += parseFloat(feature.cluster[i].attributes.tzewn)


texts: What is the best way to ortho-rectificate image from the plane?

texts:
I am very new in GIS and I am trying to ortho-rectificate my images. But after putting it on the map I see that results are not precise. We have images taken from the airplane, it's longitude, latitude, elevation, omega, phi, kappa.
What is the best way to calculate rectification for our images? Is there any third party libraries for that? Or at least some tool to compare it with my results?

Thanks in advance!
Serhiy.

UPDATE: what I am trying to do is to find how images are projected to the ground by using latitude, lontitude, elevation and angles (omega, phi kappa). Calculate 4 corners of that image and then georeference each image. After that I think I can make precise mosaic.

UPDATE 2: I spent almost whole day on GRASS but without any luck, it is not so simple and not intuitive.
I read that Direct Georeferencing is what I need. I found a lot of mathematical articles on internet and tried to write my own implementation, but it is not very precise. Is there any simple tool or library that can take coordinatates (x,y,z), angles(omega, phi, kappa), elevation, image height/lenght (in nadir position) or focal lense and calculate 4 coordinates that correspond to corners of the image on the ground?


texts:
I'm looking for a geo-database on noise or sound pollution, ideally covering the area of one full country or more, e.g. measuring noise in dB. I am not interested in under-water noise pollution!

I am not sure whether there are ways of remote-sensing something like this, but if there are, does such a data set exist?


texts: ArcMap Label Expression using feature geometry

texts:
I would like to label the X and Y coordinates without having to create a new field.    I have tried by using

!Shape.CENTROID.X!

but I get an error message "The expression contains and error."

I am using ArcMap 10.6, my data is in a geodatabase and I am using the python parser.

Is this possible?


texts: Is the natural neighbor an exact interpolator in ArcGIS

texts: Is the natural neighbor ( or even nearest neighbor) considered an exact interpolator? I believe splining or kriging could be considered exact... but what about the natural or nearest neighbor?


texts: Error in Google Earth Engine: 'Error generating chart: No properties to chart.'

texts:
I try to apply an expression to the satellite image and then try to chart the mean of the series of images but I'm getting this error: Error generating chart: No properties to chart.

Link to the code:
https://code.earthengine.google.com/0955e329640d6ef0b2a278b3ddce94d2

Code:

var Region = ee.FeatureCollection('users/gaetanopecoraro84/Zone_01');
var alertzone = Region.filterMetadata('CODE_AREA', 'equals', 'Emil-E');
Map.setCenter(14, 45, 7);
Map.addLayer(alertzone, {'color': 'FF0001'});
print (alertzone);

var gpm = ee.ImageCollection("NASA/GPM_L3/IMERG_V06")
.filterDate('2017-10-01', '2018-01-01')
.select('precipitationCal');

var MEAN =
    ui.Chart.image.series(gpm, alertzone, ee.Reducer.mean(), 200);

print(MEAN);


texts: Projecting from State Plane (Oregon) into UTM (zone 10)?

texts:
I have an air photo with the following xy coordinate system name:
NAD_1983_StatePlane_Oregon_North_FIPS_3601_Feet_Intl

and the following in the description field:
Projection:

Lambert_Conformal_Conic false_easting: 26909776.041774
false_northing: 0.000000
central_meridian: -120.500000
standard_parallel_1: 44.333333
standard_parallel_2: 46.000000
latitude_of_origin: 43.666667
Linear Unit: Foot (0.304800)

Geographic Coordinate System:

GCS_North_American_1983
Angular Unit: Degree (0.017453292519943299)
Prime Meridian: Greenwich (0.000000000000000000)
Datum: D_North_American_1983
  Spheroid: GRS_1980
    Semimajor Axis: 6378137.000000000000000000
    Semiminor Axis: 6356752.314140356100000000

I cannot project either the air photo or a shapefile with the same spatial reference into UTM Zone 10 (regardless of whether it's NAD27 or NAD83).  Why not?  How can I overcome this problem?  I get a generic projection error (error 999999; failed to execute).


texts: Printing shapefiles and shape type of feature classes and separating them by comma using ArcPy?

texts:
import arcpy

arcpy.env.workspace = "C:\\ArcGIS\\Data"

FCList = arcpy.ListFeatureClasses("")

for feature in FCList:

    print feature

This yields me a list of all of my .shp files, but I need it to recognize what geometry shape those shapefiles are and print them on the same line separated by a comma


texts: Why do my map labels disappear when publishing as a service on ArcGIS server?

texts:
I am developing a map service, rather basic, with some polygons and labels. Surprisingly, when I deploy this service on the production server, the labels disappear (see here). I have a second local server - for this one, no problem: the labels are well and truly there.

Do you have an idea why my labels vanish that way? Is there some special tuning I should apply on the production server to have them back?

Many thanks for your help.

Precision: It happens with labels with field information. If I use a static text as a labels, the labels are there. The server seems unable to include object fields info within labels.

Additional info: Apparently, this is a well-known problem in ArcGIS server 10.1. See this thread on ArcGIS forum. No solution is known yet...


texts: How do I get a JSON list of all the visualizations in my CartoDB account?

texts: I'd like to integrate all my CartoDB visualizations on a website, is there a way I can make a call and get them back as JSON?


texts: Determine geographic center (in latitude, longitude) of US Census tracts

texts: Does any API exist to return latitude/longitude of US census tracts? Specifically, I'm looking to return the geographical center of each census tract. How would I best go about doing this?


texts: On the fly projection of raster images no longer works in QGIS 3.6.1

texts:
For years I have created QGIS projects from Shapefiles using ESRI County Coordinate prj files. I have always been able to add aerial imagery from an ESRI ARCGIS Online server or local server and the imagery reprojects quite well. However, with the newest QGIS release, version 3.6.1 NOOSA, aerial imagery reprojects into lat, long, even if the  source projection of that imagery is UTM.

Other than uninstalling version 3.6.1 and   going back to an older version of QGIS, is there an elegant, simple and efficient way to handle this problem?


texts:
I have a vector contour data(polyline). I want to add values to each contour lines. Means I want to digitize my contour lines with proper values. Those values are with me in a paper. I'm adding those (z values) in the "id" column in the attribute table after selecting each line separately. it's taking a lot of time since there are around 20000 lines. Actually I created these contours after digitizing my raster map. (raster to vector conversion after scanning those maps)

Is there any way to add values automatically in between lines, if I select two extreme lines (contour is varying by an interval of 1 unit) or is it possible to create a GUI like that, or can I program like that in  QGIS?

I'm new to this.

I'm adding my contour values to the "id" table.

Is there any way to program for this in pyqgis or any other way to do it?


texts: MODIS L1B reprojection and mosaic problem

texts:
I have been using MODIS L1B file to retrieve water vapor content. However, my study area is exactly between the gap between two images,just like this:

I have tries ENVI MCTK extensions, HEG TOOLS, MRTSwath, etc. And I also used MOD03 file for precise reprojection. However, the gap cannot be eliminated.

Does anyone know a solution to this kind of problem?


texts: QGIS print composer export sequence of png images for zoom

texts:
I would like to create a 2 second video zooming out of a map I made in QGIS.

It starts at 1:300 and ends at 1:4500.

At 24 frames a second I need to add 87.5 to the scale and export a png, then add another 87.5 to the scale and export a png and then repeat this 48 times.

How could I automate this?

I can add an image sequence to any non-linear video editor to convert it into other video formats afterwards.


texts: Qgis install can't find Gdal framework (Mac OS X 10.7)

texts: After having installed Mac OS X 10.7 I can't install Quantum Gis as it maintains that I have not installe the GDAL Framework, which I have done (several times). Have anyone experienced the same problem (and solved it)?


texts: QGIS python plugin, segmentation fault, what can I do?

texts: I'm trying to write a python plugin to create an input file for an urban climate model out of three shape files. Unfortunatelly QGIS closes when I try to load the plugin. When I start QGIS from the Terminal (Ubuntu), I get "segmentation fault" when it happens. Thats all. Is there some way to prevent QGIS from crashing or another way to track down the error?


texts: ArcGIS 9.3. How do I increase Picture Marker Symbol performance?

texts:
I have a layer with 400 point features that display a picture marker symbol on the map.  We expect this number to increase a great deal.  Unfortunately it's already noticeably slow.  This is being rendered through a GIS portal written in C#, but it's also not that great when viewing through ArcMap.  I'm pretty sure it's a performance thing with the PictureMarkerSymbol.

Is there a way to boost it's performance?  If not, are there other options for displaying custom icons for map points?


texts: Why does Erase give ERROR 999999 (Error executing function Invalid Topology Negative point valence)?

texts:
I am getting the following error when I try to erase a set of data from a file within a gdb. Any idea on what to do? I have done repair geometry multiple times on the input/erase datasets. I have 16GB RAM and close to a TB of free space. The dataset is approx 1.6m records. Arcmap 10 sp3. BTW how do I see the size of a dataset within a gdb?

  Executing (Erase): Erase
  D:\SCRATCH\Projects\106\data\7_Merge.gdb\mergeall_1
  D:\SCRATCH\Projects\106\data\5b_ReclassVector.gdb\Lidar_d2b
  d:\SCRATCH\Projects\106\data\6_Erase.gdb\srtm_m10m_e "1 Meters" Start
  Time: Sat Oct 15 02:53:38 2011 Reading Features... Processing Tiles...
  ERROR 999999: Error executing function. Invalid Topology [Negative
  point valence.] Failed to execute (Erase).


texts: Is there equivalent to feature datasets supported by PostGIS?

texts:
I am currently planning the migration of a database from ArcSDE/ ArcMap to PostGIS / QGIS.

The data is stored in raster catalogues and feature datasets.

Is there an equivalent to feature datasets supported by PostGIS or do I need to group the layers by adding a prefix corresponding to the current feature dataset?


texts:
Hello and sorry if this is not a relevant question to this SE. Please if it is not, mitigate it to where you see fit. I have recently purchased an item online and I have been provided by the seller with a tracking number applicable to this site: http://track-chinapost.com/startairmail.php . So when I check where my item is, I get Location: 45005000
Any ideas what this could mean?


texts: Troubleshooting MMQGIS Geocode from Street Layer

texts:
I've been having trouble getting MMQGIS to correctly geocode street addresses using a street layer.  Some of the locations end up in entirely the wrong city.  To illustrate the problem, here's what happens when I try to geocode grocery stores in Cambridge, Massachusetts, USA, using TIGER/LINE streets from Middlesex County.
The source data includes Latitude and Longitude columns as well as address information, so I can both import this layer as delimited text and also geocode the addresses.  The results are very different depending on what method is used:

As you can see, an ordinary delimited text import (CambridgeGroceryStores_XY) produces tightly cluster points, all inside the Cambridge city boundaries, as expected.  Only some of the geocoded points (Geocoding_CambridgeGrocery_Tiger) end up in Cambridge, with other points distributed throughout the county.
How can I figure out what is going on here?
Here's the .csv file I am working with: CambridgeGroceryStores_NewColumns.csv (on Dropbox)
The original data only included an Address column, so I used a spreadsheet to generate the Number and Street columns, and then exported as a .csv.
Here are the settings I am using:


texts: Accelerating GeoPandas for selecting points inside polygon

texts:
I have one dataset with about 10 million points (lat, long). I would like to select the points that fall within a map.

I have this map as a shapely object (.shp). To do this, I transformed the localization of each point into a Point object using points_from_xy. So I transformed my DataFrame into a GeoDataFrame.

My map is in the form of a Multipolygon object. So I used geometry.unary_union to convert it into a unified polygon (I'm not sure if it is correct). Then I used the within method in Geopandas to selects the Points inside the map.

import pandas as pd
import geopandas as gpd
from tqdm import tqdm

map = gpd.read_file('foo.shp')

df = pd.read_csv('foo1.csv')
points = gpd.GeoDataFrame(df, geometry=gpd.points_from_xy(df.longitude, df.latitude))

map = map.geometry.unary_union

within_points = [points.geometry[i].within(map) for i in tqdm(range(points.geometry.count()))]
within_points = points[within_points]

My problem is that this process takes TOO long (about 5 days on my core i5 laptop). I would like to know if there is any way to accelerate it?


texts: Symbology with Arcade Expression using ArcGIS Pro

texts:
I am using ArcGIS Pro 2.6.
I have a line feature class, in the attributes of which there is a field "Type", and "Thickness", I need to make a complex Symbology that unites these 2 fields.
It would seem an easy task, but the lines are constantly updated and the values in the "Thickness" field as well.
I need to make sure that the "Thickness" field is graded, such as from 0 - 2, 2.5-4, etc. and at the same time it was merged with the "Type" field as in the picture
Script:
var w = $feature.Thickness
var width_str

// Here we define the width classification ranges
if(w < 0.8){
    width_str = ' up to 0.8'
} else if (w < 2) {
    width_str = ' between 0.8 and 2'}
} else if (w = Null) {
    width_str = ' '}

return $feature.Type + width_str

I have error:

General parsing error

What causes that?


texts: Calculating Accurate % Grade from GPS Coordinates

texts:
I am trying to calculate % Grade from GPS points. I am using the basic equation of

(Rise/Run)×100

The problem is I am getting spikes in my GPS data (example 1 meter rise for 3 meter run), I am guessing because of the fluctuation of the Vertical Accuracy of the GPS.

Has anyone dealt with this scenario or know of a way of weeding out the anomalies?


texts:
I would like the symbols to show the total area of each type of land use.
I tried to do it but I can't separate them.


texts: Create custom projection using either QGIS or ArcGIS Desktop?

texts:
What I have are a series of Geographic Coordinates, Latitude, Longitude, Ellipsoid heights.

What I want are a local system which is translated from NAD83/UTM.

I know the parameters of the shift which works with UTM Zone 9N.

My parameters are:

Origin North: 5984910.533m,
Origin East: 519681.595m

Trans North: 4973.397m,
Trans East: 2068.553m

Rotation: 10°12’53”,
Scale: 1.0003933608

Trans Height: ‐1.907m,
Slope North: 0.00001,
Slope East: 0.00004

This should result in coordinates similar to N = 5000.000m, E = 1500.000m, Elev = 0.000m

Is there any good help for the EPSG notation?

Perhaps I need to steal from the UTM projection and combine with another?

Here is some data in Geographic(WGS84/NAD83) and Local ground

Geographic Coordinates Latitude, Longitude, Ellipsoid Height(meters) (Deg.MMSSsssss)
ie (54.00595628 = 54 degrees 00 minutes 59.5628 seconds)
1   54.00595628 -128.4231334    30.48   MON

6   54.0059556  -128.4154351    14.607  MON

9   54.00451717 -128.4150654    13.147  MON

19  54.00019706 -128.4139788    9.238   MON

20  54.00133493 -128.415171 13.803  MON

Local ground system Northing, Easting, Elevation (meters)

1   5562.562    1570.005    28.547  CONC PILLAR MON

6   5445.703    2233.204    12.713  CONC PILLAR MON

9   4996.025    2222.510    11.250  CONC PILLAR MON

19  3646.242    2186.193    7.329   CONC PILLAR MON

20  4030.357    2033.239    11.848  CONC PILLAR MON


texts:
I have installed ArcGIS Desktop 10.5.1 on a new computer and have a problem that I have never experienced with any previous versions of ArcMap.

Pressing the button of the toolbar for the Editor I can’t access the toolbar. Neither does it open if I go to Customize - Toolbars and cross in the box for it there. All other Toolbars seem to open correctly.

I also can see that the program notices that I have pressed the button by the ArcMap-window ‘flickering’ and I see the Editor-toolbar that should open for less than a second at some occasions.

I have tried to see if it ends up hidden somewhere, but it does not seems like it.

Does anyone know what can be the problem and how to handle it?

I have tried to search for answers both at the ESRI help-page, here in previous asked questions and in other broad search engines, but this doesn’t seem to be a common problem.


texts: How to load specific ArcGIS vector tile layer using OL?

texts:
We have a react application using OpenLayers.
We want to load a grayscale background layer.
I found one at https://www.arcgis.com/home/webmap/viewer.html?useExisting=1&layers=0a24e94a70934c6f8224f77bd1edeed4 and then change the map to 'Modern Antique'.
Next I'm trying to load this layer, but how to select the 'Modern Antique' layers?
So far I've got this:
var newGrayScaleLayer = new VectorTileLayer({
    source: new VectorTileSource({
      format: new MVT(),
      projection: "EPSG:4326",
      url: "https://basemaps.arcgis.com/arcgis/rest/services/OpenStreetMap_GCS_v2/VectorTileServer/tile/{z}/{y}/{x}.pbf"
    }),
  });

But this is not loading the correct layer.
The URL https://basemaps.arcgis.com/v1/arcgis/rest/services/World_Basemap/VectorTileServer/tile/{z}/{y}/{x}.pbf is also working but again not the correct layer.
Looking in ESRI's viewer I see the URL for all layers are the same, but it starts loading some json files first. One of them contains the layer name.
But I don't see how to set it using OpenLayers.
If this is an issue with ArcGis data I can also use a different source, but couldn't find another nice looking grayscale background provider.


texts: Passing a start and end date from my list to a map function to filter an ImageCollection in GoogleEarthEngine

texts:
For my script I have created the list interval where start and end dates are given for specific time intervals. I would like to map through that list to create a new list where I have an ImageCollection for each time interval. I managed to do that using a loop function but I would like to do it the "proper" way by using a map-function.
My problem is that I can't pass access the start/end date separately inside the function by using dates[0]/date[1].
Anyone know how I could solve this problem?
var st_shp = geometry;

var imageIndex = function(image){
  image = image.normalizedDifference(['B8','B4']);
  return(image);
}; // Calculate NDVI

var sentinelCollection = function(dates) {
  var s2 = ee.ImageCollection('COPERNICUS/S2_SR')
  .filterBounds(st_shp)
  .filterDate(dates[0],dates[1])
  .filterMetadata('CLOUDY_PIXEL_PERCENTAGE','less_than',40);
  s2 = s2.map(function(x){return x.clip(st_shp);});
  s2 = s2.map(function(x){return imageIndex(x);});
  return s2;
}; // Create ImageCollection

var interval = ee.List([['2019-03-01', '2019-03-15'],['2019-03-15', '2019-03-29'],['2019-03-29', '2019-04-11']]);

var s2Collection = interval.map(sentinelCollection).flatten();

My think my problem is connected to the question that was raised here: https://stackoverflow.com/questions/47102922/double-loop-with-map-function-in-google-earth-engine


texts: PostGIS: nearest neighbour computation error "No space left on device"

texts:
I have two tables: Table_1 and Table_2.

Table_1 has 926019 rows.
Table_2 has 3089 rows.

I want to update a field of Table_1 with the distance to the closest item from Table_2.
Here is my query:

UPDATE Table_1
SET closest_distance = list.distance
FROM(
    SELECT T1.id AS name, MIN(T1.geom <-> T2.geom) AS distance
    FROM Table_1 AS T1
    CROSS JOIN Table_2 AS T2
    GROUP BY T1.id
    ORDER BY T1.id)
    AS list
WHERE Table_1.id = list.name;

When executing the query, after a long moment, I receive this error message:

Error: could not write the block 24453337 from temporary file : No space left on device

I think the solution is to execute the query by sets of rows (10k rows by 10k rows for example). I just do not know if this is possible on PostGIS, I have searched about it on PostgreSQL and found nothing relevant.

My question is: How can I complete my query ?


texts: Importing Georaster into BlenderGIS causes blender to not respond

texts:
I am trying to load a geotiff of the UK into blender, when I try with smaller files it seems to work.
I am thinking that maybe blender cannot handle the size of this geotiff, is there anyway to stop it from crashing (whilst retaining information)?


texts: Finding polygons within polygon using ArcGIS Desktop?

texts:
I am new to GIS and ArcGIS.

I have a set of polygons, some of which enclose other polygons.  They are lake polygons, and within lake polygons, are smaller island polygons.

If I have a given lake polygon, how can I select or get a list of enclosed island polygons?

Also, some islands may contain lakes within the island. I would like to select those as well.


texts: How to hide unassigned names using gdal.ColorTable() in Python?

texts:
I used the gdal.ColorTable() to assign predefined rgb-values to my one-band geotiff. The colortable is set by colortable.SetColorEntry and has finally 18 entries. The numpyarray consists of integers according to the index in the colortable. My colortablenames are a list with the corresponding names. Up to here it's all fine and correct.

colortable = gdal.ColorTable()
colortable.SetColorEntry(0, r, g, b)
colortable.SetColorEntry(1, r, g, b)
...etc.
driver = gdal.GetDriverByName( 'GTiff' )
ds = driver.Create(destinationfile, x, y, 1, gdal.GDT_Byte)
ds.GetRasterBand(1).WriteArray(numpyarray)
ds.GetRasterBand(1).SetRasterColorTable(colortable)
ds.GetRasterBand(1).SetCategoryNames(colortablename)

My problem is that the resulting geotiff displayed e.g. in QGIS or ArcMap shows the 19 assigned colors and names and in addition from number 19 to 255 black entries (see the red arrow in the picture) which I would like to hide or delete, but I do not know how?


texts: How to retrieve the spatial coordinates of the Massif Central?

texts:
I am new to geostatistics so I am looking for a solution to recover data for the geographic area of the Massif Central. I can easily retrieve all departments when it is the entire departement but the Massif Central also contains portions of departments. As you can see on this map here.

Below the departments by region:

Auvergne-Rhône-Alpes
Allier (all)
Ardèche (portion)
Cantal (all)
Loire (all)
Haute-Loire (all)
Puy-de-Dôme (all)
Rhône (portion)

Bourgogne-Franche-Comté
Saône-et-Loire (portion)
Nièvre (portion)
Yonne (portion)
Côte-d'Or (portion)

Nouvelle-Aquitaine
Corrèze (all)
Creuse (all)
Haute-Vienne (all)

Occitanie
Aude (portion)
Aveyron (all)
Gard (portion)
Hérault (portion)
Lot (all)
Lozère (all)
Tarn (portion)
Tarn-et-Garonne (portion)

These are the portions of departments that I cannot retrieve. Do you have a solution to select these portions? Knowing that you want to keep a spatial format and manipulate the object in order for example to put a different color for the different departments (all or portion).

Below my R code

library(cartography)
library(sf)
library(raster)
library(geosphere)
france_metro = getData('GADM', country='FRA', level=2)
france_metro_sub <- subset(france_metro,
                     NAME_2=="Allier" |
                     NAME_2=="Haute-Loire" |
                     NAME_2=="Ardèche" |
                     NAME_2=="Cantal" |
                     NAME_2=="Loire" |
                     NAME_2=="Rhône" |
                     NAME_2=="Puy-de-Dôme" |
                     NAME_2=="Aveyron" |
                     NAME_2=="Lot" |
                     NAME_2=="Lozère" |
                     NAME_2=="Creuse" |
                     NAME_2=="Haute-Vienne" |
                     NAME_2=="Corrèze")
plot(france_metro_sub)


texts: In many cases, when we download a Sentinel tile, it contains only a portion of the full tile. This information is contained as a metadata in the NODATA_PIXEL_PERCENTAGE. But why these tiles are acquired only partially?


texts: Why is my Mapbox WMTS blurry when loaded into QGIS?

texts:
I have added in a mapbox WMTS layer into QGIS. However, when loaded into QGIS the quality is poor, with everything being blurry. Do you know why it does this and how I can fix this problem?

I have copied a screenshot below.


texts:
I managed to get this working with GeoServer but I'd like to see if it's also possible with MapServer.

I need to generate a dynamic copyright. I have a polygon layer in Oracle Spatial which contains the names of the data providers and the areas they provided. The copyright is updated at each pan and zoom.

With Geoserver, I created a custom function which captures all the polygons returned by the spatial query (performed by geoserver). From those, I get all the provider names (which are stored in an attribute of the polygon layer) into a string, generate a point (ex: bottom-center) and use the string as its label.

The custom function yields a single point with its label. This function is called during every WMS request to this layer.

How could I achieve the same thing with MapServer ?

Is it possible to get the resulting polygons with a mapscript ?

Is it possible to create a point at runtime with a mapscript ?

Should I capture the bbox parameter from the query :

req = mapscript.OWSRequest()
req.loadParams()
bbox = req.getValueByName('BBOX')

...and perform the spatial query myself (using the bbox) ? That way, I could get only the provider names. I could then add the point and define its label using the results of the query.

Maybe I can create a mapFile with a custom spatial query and return a single point with its label in another field. That way a simple map file could be used to achieve the same result. I read that it's not possible to have a layer with invisible features  (opacity : 0) but the labels visible so it's probably not the solution.

Here's a picture of the results in GeoServer. There's a raster layer and on top of it, there's the dynamic copyright layer. This layer contains a single invisible point (opacity : 0) with its label (which is visible). The point is positioned at the bottom-center :


texts: Cropping in a shape of catchment area (not rectangular) in R

texts:
I have daily rainfall values in a NetCDF (.nc) file which is of larger extent covering a catchment area of a river basin. I want to crop it and extract the rainfall values that are within the catchment area. I have a shapefile of the catchment area.
I am working in R and did like this:

crop(raster,e,filename="cropped_pr.nc",snap='near')

raster=source file

e<-extent(reference_raster) #extent of catchment area (rectangular boundary)

It crops the source file in a rectangular shape, as expected in the script, and includes values that are outside the catchment area too. However, the catchment area is not rectangular (polygon).

I want to make the values outside the catchment area as 0. It means I want the values which are within the catchment area only.


texts: Landsat TM, ETM+: what are radiometric calibration coefficient of each sensor to convert DN to radiance

texts:
The Landsat TM Image data that comes with zipped folder contains metadata text file in which all necessary information have been written. In order to further process that data, first DN to radiance conversion required and the method that I read from the landsat handbook Landsat 7 Handbook is as under:

L = ML * Qcal + AL
where ML is band-specific radiance multiplicative factor and AL is additive factor andQcal is quantized pixed value.

and these values can be found in that metadata file. But the attached guide A Straight Forward guide for Processing Radiance and Reflectance_V_24Jul12.pdf to convert the DN to radiance table 1 shows the constant values for different period of landsat TM data.
My question here is what are these postcalibration values are and if MTL file contains the values that are different with the values in that table which values should we take for conversion of DN to reflectance.
Chander et al. 2009 have also mentioned these values in a summarize form.


texts: query features from a bounding box bigger than viewport mapbox gl js

texts:
I made a map for a local game and seem to be stuck.
The map is filtering features, but only from the current viewport.
As the map I would like to use is only 6km square, I would like to query, not load the geojson in the webpage (10MB).
queryrenderedfeatures and querysourcefeqtures only work in viewport
geocoder doesn't search in self added items.


texts: Can't Seem to Replicate the KML Layer in jsFiddle

texts:
I can't see why I am unable to replicate the KML Layer Example:
  http://openlayers.org/dev/examples/sundials.html

in jsFiddle:
  http://jsfiddle.net/JPN4C/

I'm assuming that it's the map protocol or something else near the url, but can't see what that is.


texts: Speed limits with HERE REST API with PDE

texts:
I've looked into stack overflow for questions similar to mine, namely HERE Maps API - get speed limit of all roads in a tile?

So this effectively means that https://developer.here.com/api-explorer/rest/routing/link-information-for-a-location will be deprecated, correct?

I also understand that the PDE is the way to go.

However, I couldn't find a simple example on the API Playground (just a simple REST call) that shows how to perform that functionality, e.g. get speed limits for a road.

Is anyone able to provide some clearance? I've read about the key concepts such as tiles and layers but it is quite overwhelming.


texts: Adding popup message box before tool execution with ArcPy and ArcMap

texts:
I want to add a box message to pop up before execution of a button tool. When I click a button which will do geoprocessing, I want a box to appear on view before processing with message that I am about to do xxx processing.
How do I do it?


texts: Merging pdf pages with vector layers in the backend

texts:
I've setup an openlayers instance on a webpage which can load static images. These images are actually the pages of a PDF you can upload. There is a pagination option on it so users can navigate between pages and draw ( using openlayers draw ) on each page individually.

So far so good. I save each page vector layer as GEOJson and send the data back to the back-end. Keep in mind at this point I have both the original PDF and an array of GEOJson (one json for each page ).

At the moment I'm merging the two in the UI by using

  canvas.toDataURL("image/png", 1.0);

and posting the base64 string for all pages back to the server to be loaded into memory and saved as PDF. But this way has a lot of downsides like, losing original document quality, a lot of OutOfMemoryExeptions, and it's super slow.

How can i merge the PDF file with the corresponding vector layer in the back-end?

This is an example of what I'm talking about :


texts:
Are there any open source projects that offer a reprojection service over REST?  I know there are online converters available, but I want to deploy something on premises.

What I'm looking for is a service that takes coordinate information will return coordinates in another, user specified, projection.

For example, the input would be something like

{
   y:"27.947671",
   x:"-82.457237",
   "coordinate_notation":"decimal degrees",
   "Input_CRS":"EPSG:4326",
   "Ouput_CRS":"EPSG:26917"
}

And the output would be something like:

{
   "Ouput_CRS":"EPSG:26917",
   "y":"3071946.25",
   "x":"347881.54"
}

I think ArcGIS server has this capability.  Does GeoServer?  Are there any one-off projects that do it?


texts:
I'm trying to use the updateCursor in ArcGIS Pro 2.4 to populate a new field in my table and can't get it to work. Situation is like this: I have a table with many fields. One of those fields is "Status1". This field contains text values (for example: "No", "Yes", "ABC123" or nulls). What I need to do is to take everything that is a "No" and put it as "Not Completed" while the rest would be just "Completed" in a new field called "Status2"

My code probably is completely wrong. I have no idea how to access a specific field within a featureclass.

with arcpy.UpdateCursor(FC, fields) as cursor:
    for row in cursor:
        if Status1[0] = 'No':
            Status2[0] = 'Not Completed'
        else:
            Status2[0] = 'Pending'
    cursor.updateRow(row)


texts: CesiumJS:3Dtiles tileset path? (Windows)

texts:
I'm trying to load and display my 3D tiles file with CesiumJS on my Window Station and Chrome web browser.
Cesium server seems to running fine locally. When I type the 'npm start` command via one Windows prompt command, it appears:
 > *C:\LAURENT\GESTION_PROJET\AMOAIGN-2020-MNS_TEXTURES\Cesium-1.72>npm start*
 > >node server.cjs
 > *Cesium development server running locally.  Connect to http://localhost:8080/*

Indeed,  browse to http://localhost:8080/ is displaying well.
But I have a problem in order to read with Cesium my 3Dtiles tileset.
In another Windows prompt command, I type this following command:
*C:\Users\lcelati>python -m http.server*
*Serving HTTP on :: port 8000 (http://[::]:8000/)*

I paste below my Sandcastle JavaScript:
var viewer = new Cesium.Viewer("cesiumContainer", {
});

var tileset = new Cesium.Cesium3DTileset({
  url: 'http://localhost/3D-Tiles/tileset.json'
});

viewer.scene.primitives.add(tileset);

tileset.readyPromise.then(function (tileset) {
  viewer.scene.camera.setView({

    destination: tileset.root.boundingVolume.rectangle,
  });
});

When I run the code, nothing appears with no error message within the console.
According to me, the problem would be come from my tileset path. Could you tell me where I should store my 3Dtiles dataset? Within my Python path? Cesium path?
Should I add some lines within my JavaScript Sandcastle file regarding the Python server?


texts: How to create a universal labeling rule for areas using different projections

texts:
I want to create a universal map style for osm water areas. The data can be in different projections like EPSG:4326 or a metric projection.
To avoid reprojecting them all the time as well as too many labels I need a universal rule to manage this issue. The key is to label only large water areas. Unfortunately this only works in a metric projection.


texts:
I need scripts for the field calculator that:

extracts the first word from a column, i.e. "Jones School" - "Jones", and
A script that will capitalize this new field, "Jones" - "JONES".

This is Arc 10.


texts: ArcGIS 10.1 Python Script tool wont read string variable in SQL statement

texts:
I am working on a simple script tool that selects features from a .shp and creates a new output with only those features. Basically the user specifies(from a drop down list) the county and the preserve and the tool just does a select from a .shp with all the counties and the same for the preserves. I think the problem lies in my syntax, The tool runs without errors but gives me empty outputs. However if I test it without the user input and just put a county name and preserve name in the SQL statement it works which leads me to believe Im not telling the script to use the user input properly.
Here is the select part of my script:

#Variables/Arguments
CNTY = "C:\\CRTOOL\\Data\\FL_Counties.shp"
AP = "C:\\CRTOOL\\Data\\FL_AP.shp"
Select_County = arcpy.GetParameterAsText(0)
Select_AP = arcpy.GetParameterAsText(1)

# Select
arcpy.Select_analysis(CNTY, "C:\\CRTOOL\\Data\\Your_County.shp", "\"NAME\" = '%Select_County%' ")
# Select
arcpy.Select_analysis(AP, "C:\\CRTOOL\\Data\\Your_AP.shp", "\"LONG_NAME\" = '%Select_AP%' ")

Here are tool parameters(I have tried them with and without the ' ' in the filter list:

UPDATE: WORKING SCRIPT

#Local Variables/Arguments
CNTY = "C:\\CRTOOL\\Data\\FL_Counties.shp"
AP = "C:\\CRTOOL\\Data\\FL_AP.shp"
Select_County = arcpy.GetParameterAsText(0)
Select_AP = arcpy.GetParameterAsText(1)
where = '"NAME" = ' + "'%s'" %Select_County
whereB = '"LONG_NAME" = ' + "'%s'" %Select_AP

# Process: Select
arcpy.Select_analysis(CNTY, "C:\\CRTOOL\\Data\\Your_County.shp", where)
# Process: Select
arcpy.Select_analysis(AP, "C:\\CRTOOL\\Data\\Your_AP.shp", whereB )


texts: ArcMap basemap layers take a long time to display

texts:
Over the years I've often used two of the available ArcMap basemap layers (Imagery and USA Topo Maps) as part of my work.  I've noticed that ArcMap consistently takes 10-15 seconds for the screen to refresh each time I pan or zoom to a new mapextent.  This delay only occurs when I have a basemap layer turned on for display.  I find my productivity lagging as I stare at the screen, waiting for it to refresh.

Yet at the same time other programs (QGIS, Google Maps) refresh their basemap imagery almost instantaneously.  I thus conclude that the problem is with Arc, and not my internet connection speed (direct ethernet connection with typical download speeds > 200 Mbps) or computer power (currently a sixth-gen i7 processor with a dedicated GPU and SSD).

I'm using Arc 10.5, but I've noticed this slow basemap refresh problem ever since ESRI has provided the service (9.0?).  I've always had Hardware Acceleration enabled via the Arcmap Options.

If I return the map extent to a previous view, the imagery displays quickly, implying that Arc is correctly caching the imagery.  But the slow basemap refesh problem always occurs if I pan/zoom to a new area.

I'm not using any advanced cartographic features such as representations, and all of my work is on a local machine - no remote connections.

Is this slow basemap refresh typical?  If not, are there any tips to speed it up?


texts: I am using https://pypi.org/project/pyshp/ to read records and geometry. Is there a way to read CRS data without pyproj or fiona?


texts: Attribute Error: "List" object has no attribute getFeatures

texts:
I am developing a plugin that checks for multipart geometry in a layer in qgis 2.6. I am geeting an error list object has no attribute getFeatures. My code snippet is attached below.

def run(self):
    """Run method that performs all the real work"""
    # show the dialog
    self.dlg.show()
    # Clear the QcomboBox before loading layers
    self.dlg.multipartcombo.clear()
    #self.dlg.multipartcombo.clear()
    layer = self.iface.mapCanvas().layers()
    for layer in layer:
        if layer.type() == QgsMapLayer.VectorLayer:
            self.dlg.multipartcombo.addItem( layer.name(), layer )
    # Run the dialog event loop
    result = self.dlg.exec_()
    # See if OK was pressed
    # Find all multipart features in the active layer
    if result:
        layer = self.dlg.multipartcombo.itemData(self.dlg.multipartcombo.currentIndex())
        iter = layer.getFeatures()
        geoms = []
        for feature in iter:
            geom = feature.geometry()
            if geom.isMultipart():
                layer.select(feature.id())
                geoms.append(geom)
                if result  == 1:
                    index = self.dlg.featurecombo.currentIndex()
                    layer = self.dlg.featurecombo.itemData(index)
                    if layer > 0:
                        QMessageBox.information(self.iface.mainWindow(), 'There are %i multipart features in this layer' % len(geoms))
                    else:
                        QMessageBox.information(self.iface.mainWindow(),"Warning!",'Load a layer!')


texts: Cannot convert shapefile data to PostgreSQL/PostGIS using ogr2ogr

texts:
I am a starter to use command-line interface. I was looking for a way to import a shapefile into PostgreSQL using "ogr2ogr". I was able to do this for point shapefile using code:

ogr2ogr -f "POSTGRESQL" PG:"host=localhost user=postgres dbname=postgres password=12345" "C:\Users\itsaa\Desktop\GIS DATA\WGS\sett.shp"

But using the same code for Multipolygon feature gave me an error message

How can I get through this?


texts: Unable to export basemap from QGIS into NEXTGIS

texts:
I've exported most of the map including geotiffs from QGIS into NEXTGIS, but I cannot export the basemap.

  error - Import 'Google Satellite' failed. need more than 1 value to
  unpack.

How do I avoid this error?


texts: Does anyone know how to get the Bing Search Toolbar to work again in ArcGIS 10 Business Analyst after the SP2 install?

texts: I just updated my ArcGIS Business Analyst with the Server Pack 2 upgrade and now the Bing Search Toolbar does not work.  Is anyone else having this problem and if so do you know of a way to fix it?  Note: I would and I am sure anyone else with this problem would prefer a solution that does not require uninstalling SP2.


texts: Problems with GeoServer REST API via Python and text encoding

texts:
I have checked a few other threads talking about GeoServer REST API and encoding, but nothing seemed to work.

I have a dataset already uploaded into GeoServer and now I just want to update some of the layers titles. The code I have so far:

Python (a simplified version)

url = '%sworkspaces/%s/datastores/%s/featuretypes/%s.xml' % (
    self._service_url, workspace, store, name
)
headers = {
    "Content-type": "application/xml; charset=UTF-8",
    "Accept": "application/xml"
}
xml = (u'<featureType>'
       u'<title>Text with special chars, like á.</title>'
       u'</featureType>')
r = requests.session.put(url, data=xml, headers=headers)

The file encoding where this code is located is UTF-8 (so it says my Atom editor at the bottom right). I also have the coding instruction at the top of this file (# -- coding: utf-8 --).

GeoServer

Its global settings also indicate UTF-8 as the encoding used.

Result

The GeoServer UI shows the layer as 'Text with special chars, like �.'. If I navigate to the XML config file stored in the GeoServer data directory I also get 'Text with special chars, like �.'.

If I open this featuretype.xml with Atom I also see it uses the UTF-8 encoding.

I probably haven't but I have the feeling I have tried everything I could I also fiddled with "string".encode('utf-8') in my Python to no avail.

Any ideas anyone?


texts: Moving existing hard drive with PostGIS data directory to a new computer

texts:
I have a new computer that is replacing an old machine that has PostGIS installed.

The old computer has a 2nd hard drive where the PostGIS data directory is stored. I want to move this drive over to the new computer and continue to use it for data storage.

Can I install the 2nd hard drive in the new machine and when installing PostGIS point it to the data directory on this hard drive and everything will work?

Or do I have to back my database up and restore it?

PostGIS on the old and new machines are the same version (2.0 on PostgreSQL 9.1), the operating systems are windows xp (32 bit) vs windows 7 (64 bit).


texts: How to install PostGIS and pgrouting on Windows if Stack Builder fails to connect?

texts:
I know this has probably been covered and that there are plenty of guides out there, but for the life of me I cannot get pgrouting installed. All guides/how-tos are different or assume prior knowledge.
I'm a QGIS newbie and please assume I know nothing!

How do install pgrouting? And what do I need first and how do I install whatever is needed? Can some helpful soul offer a step-by-step guide?

I've been trying to do this for days. I can get Postgres installed but the Stack Builder will not connect. I am thoroughly confused.

I'm using Windows 7 Enterprise 64bit Service Pack 1, QGIS Lisboa.

I'm now having trouble getting PostgreSQL to install.

Loading additional SQL modules...

Executing cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\loadmodules.vbs" "postgres" "****" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" 5432
Script exit code: 2

Script output:
 Installing the adminpack module in the postgres database...
    Executing 'C:\Users\ucesga1\AppData\Local\Temp\rad87BB2.bat'...
psql: could not connect to server: Connection refused (0x0000274D/10061)
    Is the server running on host "localhost" (::1) and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
    Is the server running on host "localhost" (127.0.0.1) and accepting
    TCP/IP connections on port 5432?

Failed to install the 'adminpack' module in the 'postgres' database
loadmodules.vbs ran to completion

Script stderr:
 Program ended with an error exit code

Error running cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\loadmodules.vbs" "postgres" "****" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" 5432 : Program ended with an error exit code


texts: How to fix the problem of 'out of memory' in PostGIS Raster processes?

texts:
I am trying to combine a series of overlapping rasters to find out the most recent data.
I think I may have 10,000 layers.
When I run this query:
CREATE TABLE most_recent AS
(
    SELECT ST_Union(rast, 'FIRST') most_recent_data,  id
    FROM rasters_table
    GROUP BY id
);

I have this error:
ERROR:  out of memory
DETAIL:  Failed on request of size 1081404.
SQL state: 53200

How can I fix it?


texts: How to change the field value of a Shapefile using GDAL/OGR?

texts:
I am trying to change the field value of a shapefile. However it doesn't change the value. What's wrong with my code?

import ogr

driver = ogr.GetDriverByName('ESRI Shapefile')
fn = 'dist.shp'
dataSource = driver.Open(fn, 0)

layer = dataSource.GetLayer()
feature = layer.GetNextFeature()

dist = 233

while feature:
    feature.SetField("dist", dist)
    layer.SetFeature(feature)
    feature = layer.GetNextFeature()

dataSource.Destroy()


texts: KML files no longer showing data for point location - shows placement pin

texts: We do gps-based point soil sampling and have software designed for that. Our software allows us to export a KML file that has all the attributes of the soil samples on it. They pop up and show all attributes on my PC version of Google Earth. A few months ago, it worked the same way on my iPhone app - Touch on a push pin and the attributes pop up. Now, they no longer show up on the iPhone app. Any ideas why not? Same files works good on my PC.


texts: ArcGIS Server: secured service attachment not referencing token

texts:
I have built several applications that use the ArcGIS JS API and secured services via ArcGIS Server.  All of the apps have the same process of generating tokens on the server ( via php request ) and passed to the client where it is appended to the service urls.  Recently we have noticed an issue when we attempt to upload an attachment.  When the addattachment method is called the request is sent to the login page for ArcGIS Server.  It appears that the request is not honoring the token.

Anyone run into this issue before?  I have tried a proxy and esrirequest to modify the request but still doesn't work.  I have also signed into ArcGIS Server and was able to upload an attachment through the GUI form there so the service is working.


texts: Using layer file to apply symbology to shapefile with ArcPy?

texts:
I have code that doesn't work at the moment:

# Import arcpy module
import arcpy

# Script arguments
Input = arcpy.GetParameterAsText(0)
if Input == '#' or not Input:
    Input = "frame" # provide a default value if unspecified

Symbology = arcpy.GetParameterAsText(1)
if Symbology == '#' or not Symbology:
    Symbology = "symbology" # provide a default value if unspecified

### Local variables:
Rearrange = Symbology
line_connection_shp = Rearrange
### Process: Apply Symbology From Layer
arcpy.ApplySymbologyFromLayer_management(Input, Symbology)
Process: Points To Line
arcpy.PointsToLine_management(Rearrange, line_connection_shp, "MMSI", "", "NO_CLOSE")

What this is doing is applying my layer symbology (a .lyr file) to a shapefile.

This results in an error:

ERROR 000732: Input Layer: Dataset C:\temp\test.shp does not exist or is not supported.

It works fine when I apply these tools myself, but creates errors while using it in Python.

This must be an issue with trying to input a shapefile into the ApplyFromSymbology tool, so is there a way to use a shapefile with that tool?


texts: Align text within TEXT_ELEMENT with arcpy

texts:
I'm having a tough time aligning text in my text box using arcpy in ArcGIS 10.3. This is my initial text:

Now I want to insert some more text to each line and align them vertically. Normally, I would insert a tab (or two, if necessary), and basically it works, but in the exported PDF i get an annoying ? for each tab I inserted.

I did it like this:

string.join(['UTM Zone:', '\t', utm_zone], sep='')

I also tried using the unicode sign for tab u'\u0009 with the same result. Formatting tags available in ArcMap does not help here, nor does Using text formatting tags. I guess there is some proper way of using HTML here, but I can't figure it out.


texts: Lealeft. Cannot slide an INPUT RANGE over the map DIV

texts:
I've got a control over the leaflet map div:

    Opacity
    <input type="range" style="width:80px" min="0" max="100" id="opacity_slider" name="opacity" />

I use this input range control to change the opacity of an imageOverview.

The problem is that when I try to drag the opacity, the map starts panning, and the range control do not move. The only way I can change the range value is to click on a specific point in the range and it changes without problem.

On a mobile device the problem is that there is no way to slide or click to change the range value. How can I prevent this behaviour and let the input range work also if over the leaflet map?

This is the code behind the :

$('#opacity_slider').on("change mousemove", function(e) {
     var newval=$(this).val();
     overlay.setOpacity(newval/100);
     L.DomEvent.disableClickPropagation(this);
     e.preventDefault();
 });

The e.preventDefault() and L.DomEvent.disableClickPropagation(this); don't seem to do nothing.


texts:
When I use the nearest statement in mapbasic, not all the "from table" points show up. For example I am looking for the nearest distance neighbor of every point in a table (called Points). I use this code:

Nearest From Table  Points to Points into result Ignore Min 0 units "km" Data Name =Points.Name
Update result Set Distance =ObjectLen(obj, "km")

Not all "from table" points show up. Please see the example. No problem between B and C since they are close to each other. But as you see B shows up for the distance with A. This should not happen.

Can someone please help. Not sure what I'm doing wrong.


texts: How to test for multiple map items in Composer using python?

texts:
I am building a QGIS plugin and I need to check for multiple maps items in Composer that works on all platforms.  Currently I am getting the first map in the composition using the code below, but would rather have something which tests for multiple map items:

composerList = self.iface.activeComposers()
composerView = composerList[0]
composition = composerView.composition()
map = composition.getComposerMapById(0)


texts: Can not resolve the error: Incomplete shapefile definition in 'filename.shp'

texts:
I'm trying to add a feature to draw a map but this error:
"Incomplete shapefile definition in 'eez v11.shp'" keeps popping.
Here is the code I wrote:
fname = 'eez_v11.shp'
shape_feature = ShapelyFeature(Reader(fname).geometries(),
                                ccrs.PlateCarree(), edgecolor='k',facecolor='gray')
ax.add_feature(shape_feature)

Do you know how I can solve this issue?


texts:
i have a problem. I have to implement a map with OpenLayers.

As BaseLayer I use an external WMTS-Service, which has the projection EPSG:25832. I want to have an OverviewMap, but the OverviewMap doesn't show the same Map like the Main one...i suspect the problem happens because of the weird projection the WMTS gives me.

Can someone tell me what I'm doing wrong?


texts: Extract the spectral signature of Landsat 7 and Landsat 8

texts: I have some polygons and I want to extract the spectral signature of the adjacent satellite images. The satellite images that i use are the NDVI from Landsat 7 and 8 and I want to compare the spectral signature of them. I use both ENVI 5.03 and Arcgis 10.2. Is enough to extract the values from the pixels?


texts: Changing/adding keyboard shortcuts in ArcMap?

texts:
How can I change or add keyboard shortcuts in ArcMap?

I have tried Customize --> Customize mode --> Commands --> Keyboard. However, this does not seem to actually work. I can add shortcuts and link them, but nothing happens when I use them even though they seems to be saved (my created shortcut still shows up after restarting Arcmap).

I'm not using English keyboard layout so, for example, I can't use the [Ctrl] + [Shift] + [=] for Zoom to selected features, since I need Shift to even get a =. It would be really useful to be able to change or add alternative shortcuts for the tools I use regularly.

Does anyone know how? Preferably something within Arcmap, but if it comes down to writing an AutoHotkey script that'll work too if you can give me some hints.

There are a few questions relating to shortcuts already, but none that I found is giving me a useful answer. I have also looked at all the lists of shortcuts that's been implemented, both on ArcGIS Resources Online and this very useful pdf. No hints on how to change the shortcuts though.

COMMENT:
If the shortcut includes [ALT GR] it doesn't seem to work properly.


texts: Revise from repository on standalone Win7?

texts:
I'd like to fix the bug in QGIS whereby starting QGIS offline or on a slow connection can kill it, using this revision: http://hub.qgis.org/projects/quantum-gis/repository/revisions/bb623a8c94e49ed478f736a58df49732edd338b4

Problem is, I installed from the standalone installer, not OSGEO4W. What's the best way to go about this, and possible future repository-based installs? Save my files, uninstall QGIS & start again from OSGEO4W?


texts: SQL server 2014: can not create geography for polygon in South Korea

texts:
This is the polygon I'm trying to create:

POLYGON((22.24462 114.1639, 22.25192 114.1639, 22.25192 114.1718, 22.24462 114.1718, 22.24462 114.1639))

The error I get is:

  A .NET Framework error occurred during execution of user-defined routine or aggregate "geography":
  System.FormatException: 24201: Latitude values must be between -90 and 90 degrees.

But clearly the latitude values I've given are between -90 and 90!
What's going on here?


texts: How can I delete from attribute table in a dxf file in ArcGIS?

texts:
I have tried delete one row from an attribute table in a dxf file, but I can't. ArcMap said I need to export that to a geodatabase or something similar.

What exactly should I do?

From step to step, please.


texts: How do I determine elevetion/terrain height value from SRTM data?


texts: Is it possible to perform a hotspot analysis (like the one you can do in ArcGIS - Getis-Ord Gi*) with Geopandas, or with any other Python library?


texts: Patch DEM data gap with raster calculator

texts:
I have DEM data with some gaps that I want to patch with lower resolution DEM. Using raster calculator on ArcMap 10.5, I used this syntax:

Con(IsNull("original.tif"),"lowres.tif","original.tif")

But I always get the same error message (of a syntax error). I don't understand what mistakes I did with this process. I've checked the file names, and I didn't type it manually (I double-clicked it from the selection window).


texts:
How can I create 3D buildings for sloped rooftops?

I have good experience for creating 3D buildings with flat rooftops (I get z from nDSM from stereo pair). Is there a way for convert  flat roofs  to skill-ion roofs (as image below) auto  using CityEngine or other software?


texts: I'm building a custom map for ATV trails in QGIS 3.4.  Is it possible to add a label to a gridline on the map surface in a layout?  I've already labelled the gridline around the frame but would like to add one on the map itself.  Example attached.


texts: Intersection between points and polygons in QGIS

texts:
I have a shapefile of points and a shapefile of polygons. I want to know WHAT points (not how many) fall inside EACH of the polygons of my multipolygon shp.

I thought the "Intersect" function was the best option to deal with this, but actually it seems that it is implemented to intersect only polygons with polygons. In fact if I try to run it I get an empty table.

I was wondering if any other function has been implemented to deal with this issue.


texts: How does the randomColumn() function in Google Earth Engine work

texts:
Does the randomColumn() function assign an arbitrary random value as a collection element property or is it based on some aspect of the collection element?
For instance, I have a script that calls randomColumn() on an NDVI image - does the random value added as an element property have anything to do with NDVI values?
The following is my analysis/script for context.
I made Random Forest Classifier in Google Earth Engine, and I get this:
properties: Object (4 properties)
NDVI: 0.6263543963432312
PRIM_LIV: 101
classification: 101
random: 0.489545211200769

This is code:
var fire_2007= ee.FeatureCollection('users/spatola/FIRE_2007');

//mask_cloud
function fmask(img) {
  var cloudShadowBitMask = 1 << 3;
  var cloudsBitMask = 1 << 5;
  var qa = img.select('pixel_qa');
  var mask = qa.bitwiseAnd(cloudShadowBitMask)
                 .eq(0)
                 .and(qa.bitwiseAnd(cloudsBitMask).eq(0));
  return img.updateMask(mask);
}

function calcNDVI(img) {
  return img.normalizedDifference(['B5', 'B4']).rename('NDVI');
}
// Define function to prepare OLI images.
function prepOli(img) {
  var orig = img;
  img = fmask(img);
  img = calcNDVI(img);
  return ee.Image(img.copyProperties(orig, orig.propertyNames()));
}

//post_2008_2017
var OLI_L8 = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
.filter(ee.Filter.eq('WRS_PATH', 188))
.filter(ee.Filter.eq('WRS_ROW', 32))
.filterBounds(fire_2007)
.filterDate('2013-04-01', '2017-12-31')
.map(prepOli)
.set('system:time_start',2017);

//convert ImageCollection to Image as Bands
var mergeBands = function(image, previous) {
  return ee.Image(previous).addBands(image, ["NDVI"]);
};
var merged= ee.Image(OLI_L8.iterate(mergeBands, ee.Image([])));
//Random forest
//BUILD TRAINING
var bands= ["NDVI"];
var classProperty= 'PRIM_LIV';
var training= merged.select(bands).sampleRegions({
collection: fire_2007,
properties: [classProperty],
scale:30,
tileScale: 16,
});
print(training.first())
//Train
var random= training.randomColumn('random');
var split_train= 0.7;
var split_test= 0.4;
var trainPartition= random.filter(ee.Filter.lt('random',split_train));
var testPartition= random.filter(ee.Filter.gte('random',split_test));
//apply_randomForest
var trainedClassifier = ee.Classifier.smileRandomForest(10).train({
  features: trainPartition,
  classProperty: classProperty,
  inputProperties: bands
});
print(trainedClassifier);

var test = testPartition.classify(trainedClassifier);
print(test.first());

var confusionMatrix = test.errorMatrix(classProperty, 'classification');
print('Confusion Matrix', confusionMatrix);


texts: Normalizing Bands in All Images in Image Collection

texts:
I am trying to normalize the values in each band across images in the imageCollection I have filtered.
I tried running this here
var normalized_collection = l1c_collection
  .filterDate(start_scene1, end_scene1)
  .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 5))
  .map(function(my_image){
    var normalized_image = ee.ImageCollection.fromImages(
       my_image.bandNames().map(function(name){
         name = ee.String(name);
         var band = my_image.select(name);
         return band.expression(
           '(x * slope) + intercept', {
             'x': band,
             'slope': 0.0342,
             'intercept': 0.6494});
       })).toBands().rename(my_image.bandNames());
       return normalized_image;
});

However, the process returned an Error: User memory limit exceeded.
Is there a workaround to this?


texts: Cannot seem to load shapefiles using GDAL?

texts:
I have been searching on GIS for a solution to this essentially I have a shapefile .shp on my desktop also where I am saving this py script. The .shp also has the associated files. But when I try this code snippet I found on here I get back "couldn't load shapefile":

import osgeo
import osgeo.ogr
try:
    shapefile = osgeo.ogr.Open("world.shp")

    if shapefile: # checks to see if shapefile was successfully defined
        numLayers = shapefile.GetLayerCount()
    else: # if it's not successfully defined
        print "Couldn't load shapefile"
except: # Seems redundant, but if an exception is raised in the Open() call,
    # you get a message
    print "Exception raised during shapefile loading"

    # if you want to see the full stacktrace - like you are currently getting,
    # then you can add the following:
    raise

Any ideas on why this would not work? I am using spyder and have gdal installed onto anaconda.


texts: Can PHP be used to set the XY, zoom of a Mapbox.js map?

texts:
All,

Is there a way to set the xy and zoom level of a map using the URL of the site that is calling it?

I'm thinking of a site I'm using now, built on php, which has mapbox maps built in javascript and added to a DIV.

Could there be a way to use something like:

  http: //mysite.com/map.php?x=234.534&y=34323.2343&zoom=5

Does that make sense?

-mb


texts: OGR SetAttributeFilter with multiple fields?

texts:
I am trying to open a layer using OGR in Python and filter the features using SetAttributeFilter() where two fields are greater than zero.

from osgeo import ogr

driver = ogr.GetDriverByName('ESRI Shapefile')
dataset = driver.Open(shpPath, 1)
layer = dataset.GetLayer()
layer.SetAttributeFilter('Field1 > 0 and Field2 > 0')

I have tried several different syntax and either get back 0 or all the records. I've tried:

layer.SetAttributeFilter('"Field1" > 0 and "Field2" > 0')
layer.SetAttributeFilter('(Field1 > 0) and (Field2 > 0)')
layer.SetAttributeFilter('Field1 > 0 AND Field2 > 0')

There are a few online examples that use "or" but not "and".


texts:
To any experts who can provide remote sensing data that can help assess impact and damage of nepal earthquake we really need your help to ensure aid is well targeted.

Existing data so far is here

If you can supplement with for example sentinel-1 SAR data, building damage, population densities etc. This could be very useful

Please add relevant dataset in well labelled formats that are accessible and understandable to non gis experts to the humanitarian data exchange and or other networks you known.

Please explain any uncertainties and document clearly.


texts:
I am trying to print a very large wall map in QGIS, at large scale. I'm getting a memory overflow message. Any ideas of how to get it to work?

I have been able to export at 50dpi but no higher...

And/or what amount of RAM would be necessary?


texts: Seeking City boundary shapefile of Podgorica (Montenegro)?

texts:
I work with QGis 2.18.1 in Austria and need the city boundaries of Podgorica which is located in Montenegro.

Do you know where I can get or download it for free?


texts: Earth Engine - how to access an image added to Map from inside a function

texts:
I have a simple UI that allows the user to select an image from a collection, and loads it to the map.

The user then can select a polygon from a list, and a .reduceRegion() using that geometry is to be done on the chosen image.

However, as the variable myImage is created inside a function called by the select box, it can't be accessed by the next select box to choose the polygon.

What change to I need to make so that the variable is accessible from the next function?

Full script link: https://code.earthengine.google.com/9346c185b24619647e10df0018ce2213

// Create imageSelect
var imageSelect = ui.Select(getImageIds(myCollection),"Select an image")

// Create polySelect
var polySelect = ui.Select(["geometry1","geometry2"])

print(imageSelect);
print(polySelect);

var loadImage = function(){
  var imageID = imageSelect.getValue()
  var myImage = ee.Image(myCollection.filterMetadata("system:id","equals",imageID).first())
  //print(myImage)
  Map.addLayer(myImage.select("B3"))

}

var reduceTheRegion = function(){
  var poly = polySelect.getValue()
  var myFeature = geomCollection.filterMetadata("name","equals",poly)
  Map.addLayer(myFeature,{color:"red"},poly)
  var polyMean = myImage.select("B3").reduceRegion({
                reducer: ee.Reducer.mean(),
                geometry: myFeature.geometry()

  })
  print(polyMean)
}

imageSelect.onChange(loadImage)

polySelect.onChange(reduceTheRegion)