texts:
I installed CartoDB on a digital ocean instance of Ubuntu 12.04. I am able to log in and import data. Table view is fine, but map view does not show tiles with the message "There is a problem with your connection". I assume this means  problems with the Windshaft tile server.

Windshaft installs ok:

git clone git://github.com/CartoDB/Windshaft-cartodb.git
cd Windshaft-cartodb
git checkout master
npm install

but make check fails; nine failing tests with two primary errors:

AssertionError: "2.1.0" == "2.1.1"

and

Uncaught Error: listen EADDRINUSE
    at errnoException (net.js:769:11)
    at HTTPServer.Server._listen2 (net.js:909:14)
    at listen (net.js:936:10)
    at Server.listen (net.js:993:9)
    at dns.js:71:18
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

The only thing I changed in config/environment/test.js was to set Mapnik version to 2.1.1.

I've posted the full output of make check here:
http://pastebin.com/CWSfijR8

Any ideas on what I'm not configuring or installing correctly? Or how else to troubleshoot these errors?

(follow up and update from question originally posted in CartoDB google forum)


texts: Install PROJ 5 on Linux without compiling

texts:
I would like to try PROJ 5 to understand if it solves some issues with version 4. The documentation states the following regarding Linux:

  How to install PROJ on Linux depends on which distribution you are
  using. Below is a few examples for some of the more common Linux
  distributions:

  On Debian and similar systems (e.g. Ubuntu) the APT package manager is
  used:

  sudo apt-get install proj-bin

  [...] On Red Hat based system packages are installed with yum:

  sudo yum install proj

However, only packages for version 4 are available (example from Ubuntu):

$ apt policy proj-bin
proj-bin:
  Installed: 4.9.3-2
  Candidate: 4.9.3-2
  Version table:
 *** 4.9.3-2 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

Is there any other package source out there?


texts: How to add labels parallel to lines, polylines or multilines using Leaflet?

texts: I want to add road name parellel to its line or if the line is curved, then the label should also be curved. How to add these name labels using leaflet? example image


texts: Snap two point layers PostGIS based on a field

texts:
I'd like to know if it's possible to snap point to point automatically in QGIS, only when the two layers have the same attribute value in a field. For example, in the first pic they are far away and they have different attribute values; in the second pic I set the same values, so I need to snap/move these automatically. They are PostGIS layers.

Any suggestions?


texts: Selecting vector features that overlay raster in ArcPy?

texts:
I have two datasets: point feature class and raster (stored in file geodatabase).

The spatial extent of the raster is smaller than the point dataset.

Is there a way I could select (or create new, temporary layer/feature class) only the points that fall into the extent of the raster?

Basically I'd like to have an output similar to Clip or Intersect tools, but they don't seem to accept rasters as inputs.

Is there readily available arcpy tool(s) that could be used to achieve that? Or would it require some custom solution?


texts:
I am programmatically creating web maps via the ArcGIS Online REST API and noticed that the webmap json spec has an id property but I'm not sure where it comes from or how to best set it.

For a given feature layer, how can I obtain the "id" shown below in order to dynamically create the webmap json?

{"operationalLayers":[
  {"id":"Collector_Template_Feature_Service_1452",
  "layerType":"ArcGISFeatureLayer",
  "url":"http://services1.arcgis.com/....",
  "visibility":true,
  "opacity":1,
  "itemId":"73830d6b39e948eaa48286629d2ff7d2" ...


texts: How to add flow arrows to groundwater table map?

texts:
After I had created groundwater table map, I tried using 3D Analyst>Steepest Path to add groundwater flow arrows to the map. However, it didn't work.

Would you please let me know how can I add these flow lines to the groundwater table map?


texts: Joining shape's data to GPS's attribute table using ArcMap?

texts:
I have a GPS shapefile that looks like this

and I have landcover shape that has the type of forests and it looks like this

What I want to do is to add to tha attribute table of the GPS shape the type of forest that the GPS crosses.

Like in this example

For all the GPS points intersecting the green zone of the landcover shape I want to add to the GPS attribute table the type of the forest that the GPS point intersects (in my example "foret fermée de hetre pur").

I can't use join because I don't have a column in common between the GPS file and the land cover file and I can't use merge because the GPS type and the landcover type of geometry doesn't match.

I am using ArcMap.


texts: Creating new project with Map.aptx now has World Hillshade basemap?

texts:
Prior to updating ArcGIS Pro from version 2.1.3 to 2.2.0, I am near certain that using the Map.aptx template to create a new project did that and inserted a map with one layer named Topographic.

However, now (and presumably as a result of updating to 2.2.0) when I use the Map.aptx template to create a new project it inserts a map with two layers:

World Topographic Map
World Hillshade

Can anyone confirm whether this behaviour did change between 2.1.3 and 2.2.0, or whether I have inadvertently altered the contents of my Map.aptx?


texts: Understanding arcpy log files in the scratchWorkspace

texts:
When I run a tool through arcpy, a file simply called 'log' with no extension is created in the scratchWorkspace. This is quite different to the history log files which are XML and I cannot find any documentation on it.

A line of this file typically looks something like:

201402261409   0     0     0Johnsmith C:\temp\tmpeoqn0r\SnapPou_fA551 = SNAPPOUR(C:\temp\tmpeoqn0r\t_t324, C:\Test Data\SampleFlowAcc\FlowAcc.tif,  10000.0)

So it seems the first column is a data/time stamp of the tool execution, then there are 2 numbers, followed by what must be the windows user who executed the tool and the tool command (with output & input locations)

I would like to know what the number columns mean? More often than not, these are both 0's, but sometimes the first column is a 1 and the second column is anything between 1 and 9...

Any ideas?

Here is a bigger example of the file contents:

201402261410   1     7     0Jhonsmith C:\temp\tmpeoqn0r\Watersh_Flow1 = WATERSHED(C:\Test Data\SampleFlowDir\FlowDir_Fill11.tif, C:\temp\tmpeoqn0r\SnapPou_fA641)
201402261410   0     0     0Johnsmith in_memory\f55D3000E_BE6E_4FF6_A15E_3B3ACA024F7E = GRIDSHAPE(C:\temp\tmpeoqn0r\ws_6, WEED)
201402261410   0     0     0Johnsmith C:\temp\tmpeoqn0r\SnapPou_f90E1 = SNAPPOUR(C:\temp\tmpeoqn0r\t_t3211, C:\Test Data\SampleFlowAcc\FlowAcc.tif,  10000.0)
201402261410   0     9     0Johnsmith C:\temp\tmpeoqn0r\Watersh_Flow1 = WATERSHED(C:\Test Data\SampleFlowDir\FlowDir_Fill11.tif, C:\temp\tmpeoqn0r\SnapPou_f90E1)
201402261410   0     0     0Johnsmith in_memory\fAC52111C_9237_4398_897D_1E5D0A460157 = GRIDSHAPE(C:\temp\tmpeoqn0r\ws_7, WEED)
201402261410   0     0     0Johnsmith C:\temp\tmpeoqn0r\SnapPou_f8541 = SNAPPOUR(C:\temp\tmpeoqn0r\t_t3212, C:\Test Data\SampleFlowAcc\FlowAcc.tif,  10000.0)


texts: What simple, effective techniques for obfuscating points are available?

texts:
We are creating a website that will collect location information (points) from users. We are exploring techniques to preserve users' location privacy (e.g., often users will share their home address, which is sensitive). One option that came to mind is to obfuscate or "hash" the points before storing them in the database, eliminating the need to store these sensitive data at all.

Our basic requirements are, I believe:

Given a single obfuscated point, it is not possible to derive the original point within (say) a kilometer or so, even given all the metadata associated with the point (i.e., assume the entire database is compromised).
Given an arbitrarily large set of obfuscated points corresponding to the same original point, it is still not possible to derive the original point. (For example, an easy technique would be to add a random vector to the original point, but if you do this enough times, the obfuscated points will cluster around the original point.)

It would be nice if various statistical properties were preserved, though I don't know which properties are important at this stage. For example, I'd rather that obfuscated points scatter in a "natural" way rather than accumulating into a grid. However, privacy is more important than this.


texts: Select all of the objects (lines) of one shapefile in a larger shapefile

texts:
So I have a small shapefile that was merged with a bunch of other shapefiles into a larger shapefile.

The small shapefile has around 15,000 objects each with an ID. I want to make that selection in the large shapefile.

Is that possible in an easy way? I'm new to ArcMap. I forgot to edit some of the attributes before merging and want to find a way to select the individual sets so I can attribute them appropriately.

Edit: From what I remember (data is loaded at my work desk), the IDs were unique. There's no overlap of IDs in the merged shapefile if that's what you mean. The IDs are distinct to the individual sets that they came from.


texts: arcpy.mapping.AddLayer won't show up in TOC

texts:
UPDATE: I am able to save the progress, and make the added layer actually show up in the TOC, by using mxd.saveACopy rather than mxd.save():

mxd.saveACopy(r"W:\for\RSI\DKL\General_User_Data\gamos\Projects\01_Tenures_Mobile_Map\Highway_intersections_2.mxd")

The downside is this way requires me to create a new .mxd, rather than save to an existing .mxd

I am trying to add a layer file to the TOC in using the arcpy.mapping.AddLayer method in Python, but it won't show up:

arcpy.mapping.AddLayer(df, lyr, "TOP")
arcpy.RefreshActiveView(),arcpy.RefreshTOC()
layers = arcpy.mapping.ListLayers(mxd) #Returns the object list of layers
print"Here are the layers in the TOC:"
print"========================================"
for layer in layers:
    print layer.name

df and lyr are objects, "TOP" is the position it should be inserted.

After I do addLayer, I grab the ListLayers object from the mxd, then print out all the individual layers. It's there - so why can't I see it in the TOC in ArcMap ??

Here is how I grab my mxd and df objects, add the Layer, and (attempt) to save the .mxd:

mxd = arcpy.mapping.MapDocument(r"W:\for\RSI\DKL\General_User_Data\gamos\Projects\01_Tenures_Mobile_Map\Finding_FSR_highway_intersections.mxd")
print (str(mxd) + " extracted OK")

#df = mxd.activeDataFrame
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
print (str(df) + " extracted OK")

arcpy.mapping.AddLayer(df, lyr, "TOP")

arcpy.RefreshActiveView()
arcpy.RefreshTOC()
mxd.save() #this will run inside the script OK, will run from an external script only if the mxd is closed ???


texts: Error on Line 109 of Creating Random Points in Layer Bounds Tool

texts:
I am using the latest version of QGIS 3.6.3 and I am getting the same error regardless of what I do when trying to run the Create Random Points in Layer Bounds tool. Here is the error:

QGIS version: 3.6.3-Noosa
QGIS code revision: 0c5774c068
Qt version: 5.11.2
GDAL version: 2.4.1
GEOS version: 3.7.2-CAPI-1.11.0 b55d2125
PROJ version: 520
Processing algorithm…
Algorithm 'Random points in layer bounds' starting…
Input parameters:
{ 'INPUT' : 'C:/Users/Noah/Desktop/PGWork/CollinCounty/Working/AOI_Dissolve.shp', 'MIN_DISTANCE' : 0, 'OUTPUT' : 'TEMPORARY_OUTPUT', 'POINTS_NUMBER' : 1500 }

Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.6/apps/qgis/./python/plugins\processing\algs\qgis\RandomPointsLayer.py", line 109, in processAlgorithm
sourceIndex = QgsSpatialIndex(source, feedback)
Exception: unknown

Execution failed after 0.05 seconds

Loading resulting layers
Algorithm 'Random points in layer bounds' finished

I have tried dissolving my shape file so that there is only one multipart feature, I have tried setting the project CRS to the CRS of the layer (I am using the NAD_1983_UTM_Zone_14N projection), I have tried saving the points as an actual shapefile instead of a temporary file, and I have tried removing and adding the spatial index through the Remove / Add Spatial Index tool in ArcMap and nothing works. Is there something wrong with the shapefile I am using? This only seems to be a problem with this newer version of QGIS. I remember using this tool before on multipart and multi feature shapefiles before and not having this issue.


texts:
I was exploring this satellite's payload characteristics on ESA's website and I saw that it's azimuth resolution varies a lot. For example azimuth resolution  for IW mode is 22m (https://sentinel.esa.int/web/sentinel/user-guides/sentinel-1-sar/resolutions/level-1-single-look-complex). But this is very weird, and I can't wrap my head around why that is, since Sentinel 1a is a SAR, therefore it's azimuth resolution should be L/2 (L being the length of the antenna) or 6.15m (since it's antenna is 12.3 meters i believe).

Why is its resolution different?

I assume this will have something to do with the doppler shifts but I can't see it in my head.


texts: Adding in multiple layers in OpenLayers 3

texts:
I am trying to add in the following two layers into my OpenLayers 3 map. The issue i'm having is that whichever one is written in last is the only one that is showing. I imagine there is a way to combine some of this?

First Layer:

      var probableLoader = function(extent, resolution, projection) {
    var url = 'http://PCNAME:8080/geoserver/WORKSPACENAME/ows?service=WFS&' +
        'version=1.0.0&request=GetFeature&typename=LAYER_probable&' +
        'outputFormat=text/javascript&format_options=callback:loadFeatures' +
        '&srsname=EPSG:3857&bbox=' + extent.join(',') + ',EPSG:3857';
 $.ajax({
      url: url,
      dataType: 'jsonp'
    });
  };

  var loadFeatures = function(response) {
    var features = probableSource.readFeatures(response);
    probableSource.addFeatures(features);
  };

  var probableSource = new ol.source.ServerVector({
    format: new ol.format.GeoJSON(),
    loader: probableLoader,
    strategy: ol.loadingstrategy.createTile(new ol.tilegrid.XYZ({
      maxZoom: 19
    })),
  });

  var probable = new ol.layer.Vector({
    source: probableSource,
    style: probableStyle,
    name: 'Probable'
  });

Second Layer:

      var committedLoader = function(extent, resolution, projection) {
    var url = 'http://PCNAME:8080/geoserver/WORKSPACENAME/ows?service=WFS&' +
        'version=1.0.0&request=GetFeature&typename=LAYER_committed&' +
        'outputFormat=text/javascript&format_options=callback:loadFeatures' +
        '&srsname=EPSG:3857&bbox=' + extent.join(',') + ',EPSG:3857';
 $.ajax({
      url: url,
      dataType: 'jsonp'
    });
  };

  var loadFeatures = function(response) {
    var features = committedSource.readFeatures(response);
    committedSource.addFeatures(features);
  };

  var committedSource = new ol.source.ServerVector({
    format: new ol.format.GeoJSON(),
    loader: committedLoader,
    strategy: ol.loadingstrategy.createTile(new ol.tilegrid.XYZ({
      maxZoom: 19
    })),
  });

  var committed = new ol.layer.Vector({
    source: committedSource,
    style: committedStyle,
    name: 'Committed'
  });

These are then combined into a map:

      var group = new ol.layer.Group({
   layers: [probable, committed],
   name: 'group'
  });

  var center = ol.proj.transform([-2.547855, 54.00366], 'EPSG:4326', 'EPSG:3857');
  var view = new ol.View({
    center: center,
    zoom: 5
  });

  var map = new ol.Map({
    target: 'map',
    layers: [background, group, vector],
    view: view
  });

Styles for the two layers:

      var committedFill = new ol.style.Fill({
    color: 'rgba(69,89,3,0.4)'
  });

  var committedStroke = new ol.style.Stroke({
    color: 'rgba(0,0,0,0.4)'
  });

  var committedCircle = new ol.style.Circle({
    radius: 4,
    fill: committedFill,
    stroke: committedStroke
  });

  var committedStyle = new ol.style.Style({
    fill: committedFill,
    stroke: committedStroke,
    image: committedCircle
  });

  var probableFill = new ol.style.Fill({
    color: 'rgba(255,153,0,0.4)'
  });

  var probableStroke = new ol.style.Stroke({
    color: 'rgba(0,0,0,0.4)'
  });

  var probableCircle = new ol.style.Circle({
    radius: 4,
    fill: probableFill,
    stroke: probableStroke
  });

  var probableStyle = new ol.style.Style({
    fill: probableFill,
    stroke: probableStroke,
    image: probableCircle
  });


texts: Difference between ArcSDE and ArcGIS Server?

texts: What is the difference between ArcSDE and ArcGIS Server?


texts: How to print a 5 meter wide basemap using QGIS?

texts:
I've tried using the map composer with my map extent window, but what happens is that the basemap stays the same resolution as the one that shows in my screen so it loses a whole lot of detail and the pixels look too "blocky" on a scale this large.

Is there a way to keep the basemap resolution much much higher using QGIS to obtain more detail? Or is there a better way to accomplish the same thing?


texts: I have downloaded NDVI MODIS 500m image i.e. MOD13A1. From the hdf format that i got i converted them into tif format using the HEG tool. The images that i got some are showing pixel values -32767 to 32768; some images are showing from -2000 to 10156. How do i use the scale factor 0.0001 in such case to get NDVI values from -1 to 1 .


texts: Displaying XY coordinates CSV file but not showing correct location on basemap of ArcMap?

texts:
I uploaded a CSV file to ArcMap with longitude and latitude value. The values were obtained from Google Maps and verified in Google Earth.
I used display XY with X(longitude) and Y(latitude) and I used the geographic coordinate system as WGS 1984. The extent of my point feature class created is in decimal degrees (dd).

However, the points do not display in the right location on my base map (imagery from ArcMap). They are showing off the coast of Cyprus while they should be in Lebanon (Cyprus and Lebanon are in the same UTM zone 36N).

I set the data frame's coordinate system the same as my layer (WGS 1984). I tried to project my layer to WGS 1984 auxiliary mercator and another time to UTM Zone 36N using project and define projection tools but they did not give the right output.

How can I fix this?

I have read through similar posted questions and couldn't figure it out.

Here are some sample data points:


texts:
I know the questions have been asked, but I can't make it through!
So, I have uploaded a CSV with my Lat/Long coordinates (in degree decimals). Every points should be located in Quebec, but it all ends up in Africa...

I have tried many type of projection (EPSG CRS tested: 3857, 4326, 32187), making sure the Project and the layer added are with the same CRS. But, it doesn't work. What is wrong...? (I also made sure I have checked the right system to read all the accents in French - ISO-8859-1).

EDIT: I am using QGIS 3.0.1 (Girona), Windows. I have been using a previous version of QGIS without that problem before. I upload the CSV using "Add a delimited layer" and for my layer, clicking on semi-colon (;) works. However, it does not interpret my Lat/long the right way (Lat is Y and Long is X).

Here is a sample of my CSV:

Nom du nichoir  Latitude    Longitude   Notes
LAC001  45.72659349 -73.53560194    BFI: au stationnement à l'entrée
LAC002  45.74512655 -73.51659682    13 rue Charbonneau, Lachenaie
LAC003  45.74473    -73.51572   13, rue Charbonneau, Lachenaie.
LAC004  45.73015563 -73.53572968    BFI, sur la butte à droite avant de passer la pesée
LAC005  45.73009159 -73.53487255    BFI, sur la butte à droite avant de passer la pesée


texts: Labelling features based on 2 attributes QGIS

texts: I'd like to label cities that exceed 10,000 inhabitants. In my attribute table, I have the name of cities in one column, and in another, the amount of inhabitants. Is there a way to write down an expression using two attributes? I've looked around but have only found expressions using one column of the attribute table. This musn't be complicated but my expressions fail every time.


texts: Apply Symbology to Rasters using Arcpy Script

texts: I have an ArcPy script to apply the symbology of one raster layer to all of the raster layers in the table of contents. I have used this script before with feature layers instead of raster layers, and it worked perfectly. Now when I run it, it runs continuously and it does not change the symbology of any of the raster layers in the table of contents. It does not give me any error messages; the window appears, saying that it successfully changed the symbology. Also, it works when I manually apply the symbology of one raster layer to the other layers in the table of contents. The script seems to iterate through the list without actually changing anything.


texts:
I would like to group polygons that (1) are contiguous and (2) when the combined values of field X >= Y.
Specifically I am grouping zipcodes that are connected. a group is when 1 or more zipcodes 'population' field equals 100,000.

Can someone suggest an existing ArcGIS function or python method for doing this?

Many thanks in advance!

---update----

I wrote a python algorithm to group the polygons using their respective neighbors as grouping members until threshold is met. it works nicely.


texts: QGIS SCP doesn't stack all bands for Sentinel 2

texts:
I've been following various tutorials to try and stack and then eventually classify images from Sentinel 2, but after downloading the images and running the band set tool, it simply only stacks 4 bands and it doesn't seem to stack the 4 from the the first 4 in the list either. I haven't downloaded the images using SCP as it doesn't seem to find images I can find directly from Copernicus. I've tried running the band set tool several times, ordering them, specifying the wavelengths to use by pointing to Sentinel 2 and indicating that it needs to create a band set raster (not a virtual one).
Has anyone come across this? I'm a bit stumped as I can't see any references to this happening to anyone else.


texts: Override or add to [GeoExt.ux PrintPreview] rotation

texts:
I'm using suite-sdk (GXP) to build my WMS client. I want add to PrintPreview window capability of changing rotation. I find this feature in Heron script but there is other version of [GeoExt.ux PrintPreview]  link. So I add
printRotationPage: null,
printRotationExtent: null,
printRotationExtentOptions: null,and

if (this.showRotation) {
    this.printRotationPage = new GeoExt.data.PrintPage({
        printProvider: this.printProvider
    });
    this.printRotationExtent = new GeoExt.plugins.PrintExtent(Ext.applyIf({
        pages: [this.printRotationPage],
        layer: this.initialConfig.layer
    }, this.printRotationExtentOptions));
}

so file look like this.

Now when I click print icon on toolbar I get this in console:

TypeError: this.map is null                                                       Layer.js
    resolution = resolution || this.map.getResolution();

from

getViewPortPxFromLonLat(); function from Layer.js file.
 Where I made mistake?


texts: How to derive rasters with the annual maximum precipitation values from a NetCDF layer spanning multiple years?

texts:
I have a NetCDF file of total monthly precipitation (precip.mon.total.v7.nc) spanning from 1901-2013 downloaded from
https://www.esrl.noaa.gov/psd/data/gridded/data.gpcc.html and I need to derive the annual maximum monthly precipitation total for each pixel for each year in this timeseries.

How can I do this using ArcGIS Desktop?


texts: Problem with control ACTIVEX and Arctoolbox (9.3.1) on windows 7 64 bit

texts:
Possible Duplicate:
  Problem with ArcToolbox tools

"one or more activex controls could not be displayed
when ever you try to open any tools from Arctoolbox it display this errors.

then go to start run -->regedit--> HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet Settings\Zones\ and delete the pseudonumeric key(L) or Rectangle shape before zone 0.

restart the arcgis , and it works"

Did anyone have ever tested this command, to resolve the problem in object?
What happens to the others programs and to OS?
Is it secure operation?


texts: Order by column is sorting String like though it is an Integer column

texts:
The question is very easy. The usual sorting of an Integer column is really bad. I need it like 1,2,3...11,12 and so on. But currently it's more like 1,10,11...2,20...

Here a picture

Is there an easy way to change that? I mean without making the 1 going "01" or such tricks would be the best.

It is not a String column

Here it is not working.

Here it's working.

In both cases int.


texts: Unable to load shapefile into ArcGIS online

texts:
I'm trying to upload a shapefile to ArcGIS online.
The shapefile contains the .dbf, .prj, .sbn, .sbx, .shx, and .shp files.  I zipped these together into a zip file.  When I try to upload the zip file into ArcGIS on-line I get this message - 'Unable to import this shapefile'

I have tried using both Chrome and Microsoft Edge.  Any suggestions on how to import a shapefile into ArcGIS online.


texts:
I am trying to intersect a large feature class (118692 elements) with a grid (58000 elements) but I get an error message.

Traceback (most recent call last):
  File "Path/InterJoin.py", line 24, in <module>
    arcpy.Intersect_analysis([grid, fc], outFeatureClass, "ALL", "", "")
  File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\analysis.py", line 289, in Intersect
    raise e
arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
The table was not found.
The table was not found. [BDFORET_Buffer_30_1_Inter_Com_Results_Hexagones]
The table was not found.
The table was not found. [BDFORET_Buffer_30_1_Inter_Com_Results_Hexagones]
Invalid Topology [Topoengine error.]
Failed to execute (Intersect).

I used repair geometry but I still got that error, my computer is I think powerful enough to handle the dataset (32G of RAM).

My code may not be optimized i guess.

import arcpy
import os
import ntpath

arcpy.env.workspace = Path to my workspace
outWorkspace = path to my out workspace
grid = path to my grid

arcpy.env.overwriteOutput = True

fcl = arcpy.ListFeatureClasses()

print fcl

for fc in fcl:
    featureClassName = arcpy.ValidateTableName(fc, outWorkspace)
    outFeatureClass = os.path.join(outWorkspace, featureClassName + "_Inter_Grid")
    os.path.join(outWorkspace, outFeatureClass + "_Dissolve")
    arcpy.Intersect_analysis([grid, fc], outFeatureClass, "ALL", "", "")
    arcpy.Dissolve_management(outFeatureClass, outFeatureClass_Dissolve, "CODE", "", "MULTI_PART",
                              "DISSOLVE_LINES")
    outFeatureClassTest = ntpath.basename(outFeatureClass)
    print outFeatureClassTest

So far I know it is not due to the geometry of my feature classes, but I think I might be a memory problem.


texts: How to project addresses on a British National Grid map in ArcGIS

texts:
I have a couple of maps on which I need to project a list of addresses. The problem is that the two maps are in "The Ordnance Survey National Grid reference system" i.e. "British National Grid".

If I project the long/lat of the addresses, obviously, they are not projected in the right spot. I tried a lot of things but I was not able to solve the problem.

Any suggestion?

I'm open either on transforming the long/lat in something else or transforming the maps.

EDIT: Let's say that I have one map and this map is a shapefile. I wrote that they are not correct because if I have a portion of map of one city (for example London) and I project the long/lat of an address located in London, in ArcGIS the point will be displayed far from the map. In order to project it I used the standard procedure of "display x-y data".

EDIT2: Sorry for the problems, but I'm not really an expert of Gis. I don't know if it is possible to put the URL of the map here, but basically I'm using the  Land Registry's INSPIRE Index Polygons

EDIT3: the original file is in the GML format. I first tranform it in a shapefile then, when I import it in ArcGis, the program automatically recognize it with the Projected Coordinate System: OSGB_1936_British_National_Grid


texts: QgsDxfExport not exporting all features of a layer

texts:
I have a simple script to export a layer to a dxf file:

layer = iface.activeLayer()
dxf = QgsDxfExport()
dxfPath = os.path.realpath("C:/abc/test.dxf")
extent = QgsRectangle()
dxflayers = []

dxflayer = dxf.DxfLayer(layer, -1)
dxflayers.append(dxflayer)
extent.combineExtentWith(layer.extent())
extent = extent.buffered(100) # To include features close to edge of extent

dxf.setDestinationCrs(layer.crs())
dxf.addLayers(dxflayers)
dxf.setExtent(extent)
f = QFile(dxfPath)
f.open(QIODevice.ReadWrite)
dxf.writeToFile(f, "utf-8")
f.close()

# Load new file to Qgis
iface.mainWindow().blockSignals(True)
newLayer = QgsVectorLayer(dxfPath, "DXF", "ogr")
iface.mainWindow().blockSignals(False)
dxfGroup = QgsLayerTreeGroup("New DXF", True)
QgsProject.instance().layerTreeRoot().addChildNode(dxfGroup)
newLayer.setCrs(layer.crs())
allLayers = newLayer.dataProvider().subLayers()
for lay in allLayers:
    geomType = lay.split(
        QgsDataProvider.SUBLAYER_SEPARATOR
    )[3]
    uri = f"{dxfPath}|layername=entities|geometrytype={geomType}"
    layerName = f"DXF - {geomType}"
    iface.mainWindow().blockSignals(True)
    l = QgsVectorLayer(uri, layerName, "ogr")
    iface.mainWindow().blockSignals(False)
    l.setCrs(layer.crs())
    QgsProject.instance().addMapLayer(l, False)
    dxfGroup.addLayer(l)

But since Qgis 3.6 i have a problem that not all features are exported.
I think it's the commit dxf export: don't label invisible features (fixes #19604) that cause this problem.

My layer is a shapefile with a rule based style and only some of the rules are visible on the map,
but i want to export all features when i create the dxf.

How can i change the behavior of the QgsDxfExport() to include all features?

I don't want to change the style on the layer because i don't know if it's saved or not.


texts:
Am trying to dial-down into the definitions and cannot resolve or understand the argument named, "prepared".
The definition of prepared is: "logical; prepare geometry for x, before looping over y? See Details. "
Say there is a point (pt) on the boundary of a polygon (p).
Experimenting and using the following two sf binary predicate functions:
st_within(pt3.sfg, g, prepared = TRUE)       # # Affirmative
st_within(g, pt3.sfg, prepared = TRUE)

st_contains(pt3.sfg, g, prepared = TRUE)
st_contains(g, pt3.sfg, prepared = TRUE)      # Affirmative

Running these lines of code returns:
Sparse geometry binary predicate list of length 1, where the predicate was `within'
 1: 1
Sparse geometry binary predicate list of length 1, where the predicate was `within'
 1: (empty)
Sparse geometry binary predicate list of length 1, where the predicate was `contains'
 1: (empty)
Sparse geometry binary predicate list of length 1, where the predicate was `contains'
 1: 1

So the question is: What is the argument "prepared"?  How would the meaning of this argument be used in a sentence?   And how does TRUE or FALSE influence the prepared argument?


texts: How to run a Python plugin on QGIS startup

texts: I am new to QGIS and Python plugin development. Is there any way to execute a Python plugin when QGIS starts up? I read startup.py file can be used. What method should I try?


texts: correct projection (PROJ.4 string) to rotate map

texts:
I want to project a map as being rotated by x degrees (as opposed to the standard "north is up" orientation).
So far I'm able to get some arbitrary rotation using these projections:
Two Point Equidistant as used in this Gist
+proj=tpeqd +lat_1=35 +lat_2=35 +lon_1=-80 +lon_2=-122  +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs

Azimuthal as described here:
Rotating ~90° using Two-Point Equidistant projection with Proj4
+proj=aeqd +ellps=sphere +lat_0=90 +lon_0=-90

However, I'm having trouble actually converting a value in degrees (like 45°) to a corresponding PROJ.4 string for a specific map. Can anyone point me in the right direction?
EDIT: I'm using Mapnik to render the maps.


texts: QGIS get the X and Y of a raster file by click

texts:
I have a raster file (Geotiff) and try to write a plugin that can change the value of one cell in a raster (== array cell).
I know how to get a QGIS point but how can I get the array index from on click on the canvas?


texts:
I'm looking for a service that provides hourly historical data for 24h and back. I am currently interfacing openweathermap.org but had to find out that not all stations provide this feature.

Are there any other free services that provide this data?


texts: Uninstalled Chrome now arctoolbox won't work

texts:
I have a big problem - I installed google earth for a project and when I went to uninstall chrome that it forced onto my computer now Arctoolbox won't work at all. I can see the toolbox but whenever I click on a tool it tries to open a chrome html and I get an error Navigation to the webpage was canceled.

I've tried to search on the internet, reboot, anything. I don't understand why this is happening and I really need ArcMap back!

also I don't really want to uninstall - I have the educational version and I don't think I can reinstall it again.


texts: Show layer results in canvas for QGIS 3.0.2?

texts:
For both vector and raster layers, previously in QGIS 2 there was an option asking whether you want layers to be shown in the canvas ("show result in canvas"). Now in QGIS 3.0.2 "Girona" this option is missing and as a result, the layer is not shown in canvas even though it is listed in the panel.

Does anyone know what the problem could be? Why can't I see any layers?


texts: How to transform Linestring to Polyline?

texts:
I have GeoJson file with roads data as Linestrings. I want to load it in Cesium Sandcastle and make a custom line styles. In order to do so, lines have to be Polylines, not Linestrings. Is there a way to transform Linestring to Polyline for GeoJson format?

This is the whole code:

//Add terrain
var viewer = new Cesium.Viewer('cesiumContainer');
var cesiumTerrainProviderMeshes = new Cesium.CesiumTerrainProvider({
    url : 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles',
    requestWaterMask : true,
    requestVertexNormals : true
});
viewer.terrainProvider = cesiumTerrainProviderMeshes;
viewer.scene.globe.depthTestAgainstTerrain = true;

//Load with default styling
Sandcastle.addToolbarButton('Default styling', function() {
    Cesium.GeoJsonDataSource.clampToGround = true;
    var dataRoads = Cesium.GeoJsonDataSource.load('../../SampleData/ceste_rab_okvir.geojson');
    viewer.dataSources.add(dataRoads);
    viewer.zoomTo(dataRoads);
});

//Apply custom graphics after load
Sandcastle.addToolbarButton('Custom styling', function() {
    //Seed the random number generator for repeatable results
    Cesium.Math.setRandomNumberSeed(0);

    Cesium.GeoJsonDataSource.clampToGround = true;
    var promise = Cesium.GeoJsonDataSource.load('../../SampleData/ceste_rab_okvir.geojson'); //data loaded from local folder
    promise.then(function(dataSource) {
        viewer.dataSources.add(dataSource);
        viewer.zoomTo(promise);

        //Get the array of entities
        var entities = dataSource.entities.values;

        var colorHash = {};
        for (var i = 0; i < entities.length; i++) {
            //For each entity, create a random color based on the road class
            var entity = entities[i];
            var roadClass = entity.fclass;
            var color = colorHash[roadClass];
            if (!color) {
                color = Cesium.Color.fromRandom({
                    alpha : 1.0
                });
                colorHash[roadClass] = color;
            }

            //Set the polygon material to our random color.
            //THIS IS THE PROBLEM
            entity.polyline.material = color;
        }
    }).otherwise(function(error) {
        //Display any errrors encountered while loading
        window.alert(error);
    });
});

//Reset the scene when switching demos.
Sandcastle.reset = function() {
    viewer.dataSources.removeAll();
};


texts: Passing a number between feature classes in ModelBuilder

texts: I am looking at two non-overlapping polygon feature classes (let's call them Counties and Somewhereland; the latter feature class has only one record). I need to sum a certain field (let's call it INCIDENTS) in Counties and populate a certain field (let's call it VISITS) in Somewhereland with this sum. Is it possible to do all of this in ModelBuilder, and if so, what tools would I need?


texts: Geosoft Oasis Montaj Local Datum Transform - What is the purpose of this parameter?

texts: When defining a coordinate system in Oasis Montaj one of the parameters is "Local Datum Transform".  Is this the coordinate transformation definition to convert the defined coordinate system of a data set to WGS84 geographic coordinates?  It is implied in the help docs but is not specifically stated.  Are all OM data sets converted to WGS84 in the "background" based on this parameter?


texts: Google maps api: get municipality of a point

texts: Is it possible to get the municipality at a given coordinate in Google maps api? I know there are maps with the municipal information, but how to get the municipal of a given point?


texts: I have a contour vector layer with a step 0.2m . I want every 1 metre, to change the line style, a thicker line for example, and the rest of them,symbolize with a dotted style. So, I can do it manually, categorize the layer, and at each metre,change the style, or I can copy the file, paste it and delete all the Real numbers, leave the integers only, and style them as I like and put the layer over the original. My question is if I can do the same job with the "Rule-base" style. If there is a formula which can locate the integer numbers and make them a category, so I can finish my job quicker.


texts: Mapbox Vector Tiles dropping features across tile boundaries

texts:
I'm currently working on a project that involves the creation of vector tiles from geojson files. These vector tiles are then displayed using Mapbox GL JS.

Recently, we've ran into an issue where some features appears to be dropped in some of the tiles and not in others.

You can see the clipping ocurring here:

Compared to on-the-fly geojson slicing:

To generate the tiles, we're using:

https://github.com/mapbox/mapbox-tile-copy

Which generates and syncs them directly to an s3 bucket.

I'm curious if anyone has run into a similar issue and might be able to point me in the right direction.

Here is an example script I've used to reproduce the issue:

var mbTileCopy = require('mapbox-tile-copy');
var file = './6528b73b07ea6ddd2709e279c0f72ca8';
var uri = 's3://test/test_tiles_4/{z}/{x}/{y}.pbf?timeout=10000';

mbTileCopy(file, uri, {
  minzoom: 8,
  maxzoom: 18,
  retry: 3
}, function(err) {
  console.log(err);
});

And a copy of one of the geojson files that it is occurring with:

https://www.dropbox.com/s/4icn8n6cgljgeu3/6528b73b07ea6ddd2709e279c0f72ca8-test?dl=0

I've tried rendering the tiles using a couple different solutions, and it definitely appears to be related to how the tiles are being generated.


texts: I am using opentripplanner for an app development. I want to customize the webapp. It has many different maplayers (its using openlayers). I want to change some mapslayers, but i couldn't find in which java-script file they are creating map and maplayers.


texts: Expecting ArcSDE service in Windows services?

texts:
I've been thrown into learning how ArcSDE and ArcGIS Server work.

I'm trying to start a service using the default esri_sde on port 5151.

I put it in both the ArcSDE and windows service files.

When I go to Administrative tools and services, I don't see an ArcSDE service.

What am I doing wrong?


texts: Is it possible to make and export (to csv) from the result in the identify?  I tried the attributtabel, but I would like the info of more layers at once.


texts: I am wondering what storage method will result in the fastest reading of the map vectors for rendering. SHP? PostGres? SQLite? (They do not change often and I do not need spatial functions for these vectors).


texts: Calculating Percentiles on a vector layer in QGIS

texts: I have a vector layer in QGIS with various numeric fields and I would like to calculate the percentiles, 90-95-99, for each of the fields. I have tried the GRASS v.univariate algorithm but this only does one percentile at a time. Any suggestions?


texts: How do you extract the mean fire frequency (raster) for each point within a given buffer size using R?

texts:
I am trying to extract fire data (mean and max fire frequency) for each point within a given buffer size (250m) around multiple points.

Currently, my point data is in Lat and Long.

For the raster data I am planning on using the MODIS burned area products which were derived from the re-projected monthly Geotiff MODIS outputs available from the University of Maryland.

The rest of my data are rasters (WGS 1984 UTM ZONE 38N).

Given that I have these particular data in this format and I want to extract these statistics about them, what is a good strategy for doing it in R?"


texts: Centering raster from randomly created points?

texts:
I am using ArcMap 10.4.1. I have species data (point file) that I have used to extract raster values from. Each point represents an observation given by an 8 fig. grid ref so I converted the points into a raster using the "point to raster" tool which created a raster with a 100m cell size. The centroid of each cell is perfectly aligned with the point file- excellent.

PROBLEM - I now need to create a "background" sample for a Maxent model using randomly generated points. I have used the "create random points" tool, constrained the extent to that of the shapefile for my area (the UK) and generated my random points. When I then use the "point to raster" tool the cells of the raster produced are not aligned uniformly with the original point file. The projected coordinate system and geographic coordinate system of the random points is the same as that of the genuine points so why is the raster not aligning as before? Any suggestions for a fix?


texts:
My python code :

import arcpy

arcpy.FeatureToLine_management("Closestroute", "Featureline", "0.0001 Meters", "ATTRIBUTES")

#Generate points along lines for every 1 km

arcpy.GeneratePointsAlongLines_management("Featureline", "splitPoints", "DISTANCE", "1000 Meters", "", "NO_END_POINTS")

#Split line at point for every 1 km roads,search radius = 20 meters

arcpy.SplitLineAtPoint_management("Featureline", "splitPoints", "split1kpoints", "20 Meters")

#I added SS field into splitPoints, then I assigned name for each rows.(s1, s2, s3, ...)

cursor=arcpy.da.UpdateCursor("splitPoints","SS")

i = 0

for row in cursor:

row[0] = 's' + str(i)

i += 1

cursor.updateRow(row)

del row

del cursor

My problem is:

I am trying to assign one name for each points. However, when one route are used by more than one start points like blue arrow in the picture below, I obtained more than one segments name for this route. I am trying to get just one segments name for each points for this route. (showed with blue arrow) for both start points.

How I can deal with this problem ?


texts: How to develop configuration interface for custom widget in ArcGIS Flex Application builder?

texts:
I'm trying to know if it's possible to develop a custom configuration interface for custom widgets in ArcGIS Flex Application Builder.

The standard widgets have a nice and shiny configuration interface, with buttons and text-box, but I would like to know if it's possible (and how) to have similar GUI for my custom widgets as well.

I mean, editing XML is note very user friendly and will not fit in what I want to do.

If it's not possible at the moment, is this something planned for this builder?


texts: focal mechanism(beach balls) for many Earthquakes

texts:
Is there a good way to automatically generate focal mechanism (beach balls) for a shapefile with about 30.000 earthquakes and store them ideally in the attribute table.

It would be the best if I could use ArcGIS or QGIS.


texts: What are the differences between spatial databases?

texts: What is the difference between Oracle Spatial, PostGIS, SQLServer2008, SpatiaLite, and MySQL in terms of their spatial support. Are there specific use cases where each shines. What might you want to avoid with any of these databases.


texts:
Forgive me if this is a duplicate, but I am having trouble getting LASTools to run in QGIS 3.6.3 after following the installation instructions and searching on Stack Exchange.

I have installed the LASTools plugin in QGIS and set the path from the Options menu to my LASTools extracted folder. I've tried several locations all with no luck. For information, I have tested the paths in Finder, which seems to navigate fine.

Here is my output when running LASTools:

LAStools command line
/Applications/QGIS3.6.app/Contents/Resources/LAStools/bin/lasclassify -i "/Volumes/My Book/Photos/CNPS los osos map/osos.las"

LAStools console output
/bin/sh: /Applications/QGIS3.6.app/Contents/Resources/LAStools/bin/lasclassify: No such file or directory

Am I missing something?


texts: How "complex" should a JavaScript map become? When does a plugin make more sense?

texts:
Background:

A client is looking to upgrade an ancient ArcIMS site, which is quite complex. It has a table of contents, the ability to change symbology on-the-fly, print the map, use spatial bookmarks, identify the "active" layer, export data, etc. It's almost like an online version of ArcView 3.

They wish to upgrade to ArcGIS Server 10, and are seeking recommendations on which of the ArcGIS Server APIs to use.

I'm most familiar with the ArcGIS Server JavaScript API, so I don't know whether the Flex or Silverlight versions would offer advantages over the JS API.

Is there a point of complexity after which the JS API no longer makes sense, and a plugin would offer easier development and better performance?
Is it easier to develop a complex application (as described above) using Flex or Silverlight?
Are there any online examples of very complex ("ArcView-like") sites built on the JavaScript API?


texts: Examples which use map reduce to process GIS data?

texts: Have anyone have a few examples how to use mapreduce effective with GIS data?


texts: ArcGIS Online: Time-Aware App only takes time-related input?

texts:
I've been trying to use a dataset for the Time-Aware app on AGOL, but instead of using the year of a data point's collection, I'm trying to use the sequential order number (integer 1-10) of each layer. I've set the Time Field to the correct field when enabling time in ArcMap (10.3), but my integer range is between 1 and 10, and I noticed that the Field Format I have selected is "YYYY" (implying that four consecutive integers may be necessary to fulfill the format's requirement?). When I try this, share the whole set of features to AGOL, and attempt to view the layer in the Time Aware app, it does not show. It has only shown for layers for which I set the Time Field to the 4-digit year.

Is there anything else I can try in order to use the order number of each layer as the Time Field, and have the layer show up in the Time Aware app (in sequence)?


texts: How do I select random points within each land-cover class?

texts:
I have a MODIS file and I want to

Select random points within each land cover class
Extract values of rasters to the sample points.
Export attribute table

Could you please tell me what steps I need to follow to this and what tools I need to use? I am new to ARCGIS and would appreciate any help. I have read several papers on this but I am still confused as to how to actually get it done in GIS.

I have the latest version of ARC-GIS
Also have access to ENVI
Have all tools including Spatial Analyst
No idea about how many points would be sufficient.


texts: Setting CopyFeatures_management output to newly created folder in Python script?

texts:
How do I set the output of the copyfeatures_management so that the shapefiles go into the new folder I created?  Currently, they are being placed in my set workspace at the beginning of my code.

outFolder = "path"
outName = "TractBuffer_Intersect_D"

arcpy.CreateFolder_management(outFolder, outName)

fcA = "Distance_Buffer.shp"
fcB = "tracts.shp"

arcpy.MakeFeatureLayer_management(fcB, "layerfcB")

desc = arcpy.Describe(fcA)
shapefieldname = desc.ShapeFieldName
i = 0

cursor = arcpy.SearchCursor(fcA)
for row in cursor:
    i=i+1
    arcpy.SelectLayerByLocation_management("layerfcB", "intersect", row.getValue(shapefieldname))
    arcpy.CopyFeatures_management("layerfcB", "output_path"+str(i)+ ".shp")
del cursor


texts:
Podcasting seems to be exploding these days but I was wondering if anyone has come across a podcast or podcasts explores the stuff that is happening out there in the geospatial world?

I have found one that a really like "The MapScaping Podcast" but I would love to hear if anyone out there that has any other recommendations.


texts: Checking for nodes at pipe ends using ArcGIS Desktop?

texts:
I have two features in ArcGIS Desktop 10.4; pipes and nodes. I want to check if all pipes have nodes at their end.

How can I check that?


texts: Polygon to Raster produces misaligned raster even at same resolution using ArcGIS Desktop?

texts:
In first image is a fishnet polygon. Using 'Polygon to Raster' tool, at SAME CELL SIZE of fishnet. I get image 2 (only few pixel shown to highlight misalignment).

Is it possible to convert to raster such that it aligns with fishnet.


texts: GRASS plugin absent from QGIS 2.6 OSGeo4W install

texts: I've just installed QGIS 2.6 Brighton using the OSGeo4W installation. The GRASS toolbox plugin has not, however installed as it had been with previous versions. Before, I was able to access the GRASS Tools via the tab Vector > GRASS, but it is now absent. Is this a change in the software or due to an error in the installation? If so, how can I rectify this issue?


texts: Using graphical modeler script via command line

texts:
I have made a script through the graphical modeler and I exported it. This is the code that it exported:

[Python code] https://imgur.com/a/ivgWXUh

How do I run this code outside of QGIS? Which libraries are needed?


texts: Preventing ogr2ogr from generating invalid geometries in transformation

texts:
I have the following GeoPackage: https://drive.google.com/open?id=1COcGcbZQIsW6NrzuD-K-Kijpvg4BYQ54

I have checked it with spatialite and it does not have invalid geometries.

It has a dissolved, promoted to single parts and simplified derived layer.

I want to transform it to a custom reference system via ogr2ogr. For that, I have created a batch file named transform.bat with the following lines:

ogr2ogr -skipfailures^
 -ct "+proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=push +v_3 +step +proj=cart +ellps=WGS84 +step +inv +proj=helmert +x=0 +y=0 +z=0 +rx=0 +ry=109110.996 +rz=-215775 +s=0 +convention=coordinate_frame +step +inv +proj=cart +R=6371007 +step +proj=pop +v_3 +step +proj=longlat +R=6371007 +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1"^
 -overwrite^
 output_dts.gpkg input_dts.gpkg^
 -nlt MULTIPOLYGON^
 -clipdst -179.99 -89.99 179.99 89.99^
 -wrapdateline

The transformed reference system is based on an spheric datum, with a Helmert transformation to rotate it around Y and Z geocentric axes.

When I run it, seems to detect invalid geometries:

C:\GA\GIS\Pruebas>transform.bat

C:\GA\GIS\Pruebas>ogr2ogr -skipfailures -ct "+proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=push +v_3 +step +proj=cart +ellps=WGS84 +step +inv +proj=helmert +x=0 +y=0 +z=0 +rx=0 +ry=109110.996 +rz=-215775 +s=0 +convention=coordinate_frame +step +inv +proj=cart +R=6371007 +step +proj=pop +v_3 +step +proj=longlat +R=6371007 +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1" -overwrite output_dts.gpkg input_dts.gpkg -nlt MULTIPOLYGON -clipdst -179.99 -89.99 179.99 89.99 -wrapdateline
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 178.85626517687388 -44.274345298926086 at 178.85626517687388 -44.274345298926086
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 133.29913840320728 72.555284217735704 at 133.29913840320728 72.555284217735704

The transformation is well done, but some geometries were lost:

The problem is with that geometries that crosses the dateline when transformed. The clipping boundary and the promote to multipolygon were my attemps to return the geometries clipped and valid.

If I remove the -nlt, -clipdst and -wrapdateline parameters, the Americas and Antarctica geometries are valid but cross the dateline:

I have found that geometries must have a kind of special shape, in a special place, to turn invalid. This behavior can be reproduced with the following geometry:

POLYGON (( -130 60, -120 50, -125 40, -130 45, -135 40, -145 50, -140 60, -135 55, -130 60 ))

I was able to fix by hand the transformed geometries, by creating new nodes outside the extents and clipping the layer.

But I can't figure how to solve this kind of problems via ogr2ogr.


texts: How to get the distances (shortest path) between all pairs of points in the river network?

texts:
I have 2 vector shapefiles (one line, one point), and I have tried at least 4 ways to try to get the distance matrix at one time (and most concern the directions of each river segment)

quantum navigator
GRASS tool - v.net.allpairs
pgrouting
roadgraph plugin

In the end I think that roadgraph plugin is the one which is the closest to my goal, and it also can set the directions of the river, but I can't modify it to get the distances between all pairs of points(and I want to get this in matrix form).

What/How could I do? Is there any other way to get this distance matrix on qgis？


texts: How to install SAGA 2.1 with QGIS dufour on Windows?

texts:
I need that someone tell me how i can install saga in qgis 2.0 correctly in windows, because if I install QGIS 2.0 and when I try to use SAGA I get this

Missing dependency.This algorithm cannot be run :-(
This algorithm requires SAGA to be run.Unfortunately, it seems that SAGA is not installed in your system, or it is not correctly configured to be used from QGIS


texts: Possible bottleneck in QGIS 1:n relation?

texts:
I've set up a 1:n relation linking two layers of the same geopackage. That are about 200k polygons in parcels and 700k rows in owners (non spatial). Now it works as expected but it is painstakingly slow to an extend that makes my QGIS project useless:
Everytime a polygon is clicked on with the identify tool QGIS loads the 700k attributes (window with progress bar). After that clicking on feature form these attributes are being loaded again.

So I'm looking for input on whether there could be a bottleneck and how to get rid of it: The field in parcels as well as its foreign key field in owners have the same name and are the same type (TEXT). Using an exported csv of owners (90 mb) for that relation acts the same way. I don't want to believe that it's the amount of rows causing the lag. Perhaps there is a setting I missed out on? I am using QGIS 3.8.1 on a Ubuntu 18.4.1 machine btw.

Update: When opening the project in QGIS 3.8 on Windows 10 the 700k attributes are only loaded once but the speed is still unacceptable.


texts:
I would like to teach the QGIS map canvas to follow the current row of an attribute table. I found the method QgsAttributeTableView.currentChanged() as possible starting point, but unfortunately it's not a signal but a protected virtual method inherited from QTableView.

So I tried this in a python plugin, but it didn't produce any messages (I think here is explained why):

    def watchTable(self, attTable):

    @pyqtSlot()
    def currentChanged(attTable, current, previous):
        bar = self.iface.messageBar()
        bar.pushMessage('my plugin',
                        'currentChanged: cur {}, prev {}'.format(current, previous),
                        bar.INFO, 5)

    # would this overwrite something existing?
    attTable.currentChanged = currentChanged

Any ideas?


texts: Perform the sum between two raster, one of which has a value of "nodata" or "null" in QGIS

texts:
I have two raster (raster1 and raster2) from the same area. I would like to make the sum between the two (raster3 = raster1 + raster2) in QGIS, so that the Digital Number (DN) of raster 3 is the sum between them.
However, raster2 has some pixels like "nodata" or "null" without data. When I add them together, the "nodata" pixels do not add up.
For example: raster1 = 2 and raster2 = nodata. When I add these, the result is nodata (2 + nodata = nodata), but I expected it to be = 2, that is, (2 + nodata = 2).
How could I solve this problem?


texts: QGIS equivalent of inline variable substitution in ArcGIS?

texts:
I am working through some analysis in QGIS and need to iterate through a layer of points and buffer each point and then export to a new layer. I want the new layer names to have the values from a field in my attribute table.

I have created a GIS friendly text field with no spaces: "GISNAME". I am using the fixed distance buffer tool and clicking on the iterate over layer button.  Is there a way to make each exported name be Buffer_[value from GISNAME field].shp?

In ArcGIS I would use modelbuilder and set up inline variable substitution to achieve this. I am using QGIS and wanted to know if I can do this here?


texts:
I have a problem with external WMS in GeoNetwork 3.4 and GeoNetwork 3.4.1 (Development Release). I see others questions in this forum (Error when adding WMS layer to GeoNetwork Map) and it doesn't solve my problem.

I can't see the WMS. I uncheck the box and the problem persists.


texts: How do I make KML overlays appear in OpenLayers at all zoom levels?

texts:
I need to overlay KML polygons on basic map in OpenLayers. I need that KML is visible on every zoom level. I did some coding, but my KML is not showing up. What am I doing wrong?

<!DOCTYPE html>

    <title>OpenLayers Tutorial - Basic Map Setup</title>

OpenLayers Testing


texts: Locking layer from being edited in ArcMap

texts:
I'm using data driven pages to create ~40 page map and I did so by creating a grid. I want to move and delete labels based upon the grid pattern so I do need to see it in data view, but a number of times I've accidentally deleted a grid in addition to the annotations I am editing. All my files are in the same geodatabase so they are all open for editing when I turn on edit mode.

Is there a way that I can just mark my grid as something that cannot be edited?


texts: Setting QGIS raster opacity by selected band?

texts:
I have a multiband geotiff. I would like to set the color by the third band (singleband pseudocolor), and the opacity by the first band. Using the properties dialogue in QGIS, I have no trouble doing whatever I want with the color, however when I try to set the opacity to use the first band, or any particular band, the whole thing becomes completely transparent and/or doesn't render. This is in the 'transparency' tab of the layer properties dialogue. When the transparency band is set to 'none', I can add a value to the transparent pixel list, and things seem to work as expected, but with the third band, the one used for color.

Why do I not seem able to use a separate band to set the opacity? In the documentation for this feature (the transparency tab), the instructions say to set the band to 'none', but since there is a list, I should be able to select something else, right?

I'm using QGIS 2.14 on Xubuntu 16.04.


texts: Concatenate five fields where some may be NULL

texts:
I have a trench containing five types of ducts.
I have created fields the trenches: Type1, Type2, Type3, ...

The values in each field are the numbers of each type of duct that the trench contains.

eg. lets say that one trench contains 2 ducts of type one and one duct of type 2, then I would like to label it something like this: 2xType1,Type2

The other types are NULL. How can I write a compact expression to handle this?


texts: ArcObjects 10 - copying fields (table structure) to a new feature class

texts:
I'm creating a new feature class with the attribute table schema (field names, types etc.) copied from another feature class. Then, I'd like to modify this schema slightly (e.g. add an additional field).

What is the best way to achieve this? Should I loop through all input fields and create respective output fields?

Thanks in advance,
Jan


texts: I'm looking for an ArcMap add-in that will create a raster based on rules from RuleQuest Research's Cubist .model files. Ideally, the add-in will give the user the option of matching input raster data to the variable names defined in the .model file. Does anyone know of such a product? I have done ArcGIS.com and Google searches without any luck.


texts: How to convert MODIS (Vegetation Continuous Fields - MOD44B) to (.img and hdr) in ENVI

texts:
Please can anyone help me to convert MODIS (Vegetation Continuous Fields) to (.img and hdr) formats? In ENVI, anytime i try using the MODIS conversion toolkit, a dialog box appears telling me to define BAD range. I did input the following (0-100, 200 and 253) but none of them work.

I was successful when i opened it using the Generic format tool(HDF) but can not reproject it unto geographic coordinate system. Please I need an assistance.

Eric.


texts: Problems with DEM exporting after Elevation Void Fill function use

texts:
I filled nodata values in DEM by Elevation Void Fill function, everything was ok, but when I exported it, the raster looks different (see picture above), how can I solve this problem? I also tried r.fillnulls in grass and Fill nodata in qgis, but Void fill function looks much better.

before exporting

after exporting


texts: Maximize clusters of points from coordinate data

texts:
So I am definitely new to the GIS world, so bear with me if I don't know the best way to articulate my problem.  That said, I am ready to learn, I would definitely welcome any direction that you all could point me in.

The problem:
I have a set of coordinate points (just three attributes: name, lat, long).  I hope to identify the minimum number of regions (circles with a predefined radius) that would be required to encompass XX percent of the sites (Where XX is configurable).

Initial thoughts: My thoughts were to first create clusters (of set size) of all data points, then sort the clusters by the number of points they enclose.  That way I can just count the number of clusters needed (in order of priority) until they represent the desired XX percent of the points.

Thus far I have tried to do some research, but I haven't found any resources where the clustering is done within a set radius. (I have found plenty where the number of clusters is set, and the size is variable - I need the reverse of that.)

I have tried using QGIS, but I am open to any suggestions.  I am new to GIS, but I have a decent knowledge of programming if that could be of any help.


texts: unknown issue with search geometry in Planet API

texts:
I'm trying to download some images from the Planet API using a MultiLineString geometry. I did a test with a simple MultiLine and it worked. Now I tried with a more complex one (and not that much):

and I get this error:

  {
   "field": {},
   "general": [
    {
     "message": "unknown issue with search geometry"
    }
   ]
  }

I have seen a few people working at Planet here, so maybe someone knows about the issue?

Edit

Reducing the number of lines, and simplifying geometries, I got this error:

  "message": "Sorry, your request timed out. The usual cause of this is the default AOI on your account may encompass too large of a geographic area or, has too many vertices. We recommend you pass in a smaller and simpler AOI to your query. Please visit https://www.planet.com/docs/reference/data-api/search-api/ for instructions on how to supply an AOI to your query via the GeometryFilter."

So, does anyone know the maximum area or number of vertices that are allowed?


texts: How to keep specified separation distance between features in printout from ArcMap?

texts: Does anyone have a solution to select features using attribute values and print only the selection keeping a specified separation distance between the features in the printout in ArcMap.


texts: Creating straight sharp buffer corners instead of round ones

texts:
I am trying to create several buffer layers around a simple box shaped polygon based on distance in km. CRS is World Mercator(EPSG:54004) and was reprojected beforehand.  I am getting buffer polygons with rounded corners (green is box, pink is buffer) but need straight / sharp corners:

Changing the number of segments doesn't help. What else can I try?


texts: After georeferencing the Google Earth image with 4 points, it appears as shown in the image below. And sometimes it extends the point connected lines outside of the image. I'd like to frame it with the four points and then use it as a map in QGIS to add features as same as the 2nd attached photo?


texts: WebAppBuilder - Print Service/widget problems

texts:
I have an app running on WebAppbuilder. The layers are all on an Enterprise SDE Database. I cannot get the Print widget to function properly. I followed the instructions here to set up my own print service with all the proper specifications. http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000005q3000000

I also made sure all the services on the map have Web Tier authentication ie "This can be accomplished by configuring the domain account as a member of a user role that has explicit access to each secured service. You can also configure the account as a member of a publisher role that has read access to all services."

I know this is the Print Plus widget, but I was having the exact same issues with the stock Print widget.


texts: How to read a RasterBand as Dataset to use in gdal.Translate as source?

texts: I need to translate each band of netcdf file to other format. How can I get raster.GetRasterBand() not as a band object, but as a dataset ot otherwise to use it in gdal.Translate(dst,src) as src?


texts:
I have more than 2000 TIFF files of an NDVI index. I would like to check if I made it properly and if all of values are between -1 and 1.

How can I save everything to a text file to check max and min values as a summary of all files to not do it one by one?

I was trying to use RasterStack to combine all files in one, but it does not work...

Any other ideas?


texts: How to export polygon-wise average value of NDVI in Earth Engine?

texts: I need the average NDVI value for some sample fields of a specific crop. I have the boundary polygons in a shapefile and imported it in the earth engine as fusion table. I have also calculated the NDVI for the whole tile. Now I want to get average NDVI value for each sample fields.The sample fields are numbered as 1,2,3,...18.  Being a begginer, I am stuck here how to get the values or export the NDVI image for whole tile so that i can use it in other offline softwares. I was wondering could you please help me out in this regard.


texts: How to rasterize vector data correctly in GRASS GIS 6.4.0?

texts: I try to rasterize some vector data in GRASS GIS 6.4.0. Unfortunately, it always just works with one layer. Afterwards, there are just lines generated instead of rectangles. What am I doing wrong?


texts: Toggling selected feature when using Node Tool of QGIS?

texts:
Does anyone know of a way, when using the Node tool in QGIS to edit a polygon, to choose or toggle which feature (within the same layer) is being selected if they share a boundary?

It seems to just select whichever feature is on higher order in the table...

It's not an issue if the feature has a boundary somewhere else that doesn't share a boundary with another object, but when using layers that have complete coverage (no gaps) there are often objects that are completely surrounded by other polygons and difficult or impossible to select/edit without first 'hacking' one of the surrounding objects...

In MapInfo there is a shortcut key (hold Ctrl) and then as you click it will work it's way through all the objects in the layer at that location...


texts: Find the closest Point from a Point which contains the same attribute

texts:
I am trying to create python code to iterate through points on 1 layer and find the closest point on another layer (Road Chainages) based on attribute values. I need to limit the search to < 20m maximum distance between both matching attribute values.

I utilised code from Find the closest segment to a point which contains the same attribute and amended to suit point layers but i get stuck at the nearestNeighbor code. I believe i need to try to implement something similar to whats on this website Finding nearest line to point in QGIS? and somehow include the QgsSpatialIndex.nearestNeighbor (QgsPoint point, int neighbors)

I am using QGIS 2.18, but will look to update code to 3+ once i improve my skills.

#Based on
#https://gis.stackexchange.com/questions/250528/find-the-closest-segment-to-a-point-which-contains-the-same-attribute

from qgis.core import *
from PyQt4.QtCore import QVariant

##in development=group
##points=vector point
##point_attribute_to_match=field points
##Chainages=vector point
##Chainage_attribute_to_match=field Chainages
##Chainage_attribute_to_transfer=field Chainages
##tolerance=number 50

#get source and target objects
sources = processing.getObject(points)
linksLayer = processing.getObject(Chainages)

#add new field
sources.startEditing()
newField = QgsField('Chain', QVariant.Int)
sources.addAttribute(newField)
sources.updateFields()
sourceIndex = sources.fieldNameIndex('Chain')

#variables for progress bar
percentMax = sources.featureCount()
p = 1

for s in sources.getFeatures():

    #get geometry
    if s.geometry():
        sGeometry = s.geometry().asPoint()
        if sGeometry == [0,0]:
            sGeometry = s.geometry().asMultiPoint()[0]

    else:
        progress.setText("no geometry found")

    #get nearest feature and write source attribute out
    sDistMin = 1000
    sourceId = -1
    for c in linksLayer.getFeatures(QgsFeatureRequest().setFilterRect(s.geometry().buffer(tolerance,5).boundingBox())):

       # print c.attribute(Chainage_attribute_to_match)  -  Research why this is failing.

        # Tried sDist = c.QgsSpatialIndex.nearestNeighbor(sGeometry,1)
        # Tried sDist = c.geometry().nearestNeighbor(sGeometry,1)  .
        # Tried sDist = c.nearestNeighbor(sGeometry,1)
        sDist = p.nearestNeighbor(sGeometry.asPoint(),1)

       if sDist < sDistMin and s.attribute(point_attribute_to_match) == c.attribute(Chainage_attribute_to_match):
                    sDistMin = sDist
                    sourceId = p.attribute(Chainage_attribute_to_transfer)

    progress.setText("Marker")
    if sourceId != -1:
        sources.changeAttributeValue(s.id(), sourceIndex, sourceId)
        sourceId = -1

    else:
        progress.setText("no matching source found for: " + point_attribute_to_match)

    #set progress
    progress.setPercentage(p/(float(percentMax))*100)
    p += 1

sources.commitChanges()

In my log i get { 'QgsFeature' object has no attribute 'nearestNeighbor' See log for more details }. see below.

2019-01-18T08:47:13 2   Uncaught error while executing algorithm
            Traceback (most recent call last):
              File "C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing\core\GeoAlgorithm.py", line 203, in execute
                self.processAlgorithm(progress)
              File "C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing\script\ScriptAlgorithm.py", line 381, in processAlgorithm
                exec((script), ns)
              File "<string>", line 50, in <module>
            AttributeError: 'QgsFeature' object has no attribute 'nearestNeighbor'


texts: I have feature class settlement in my geodatabase and i have two attributes for them. Name on latin and name on cyrillic. When I use same feature to another computer (export feature class) i cannot see cyrillic letters in tabel, and can't label it. On both computer I have arcgis version 10.0. Do i need some additional settings on second computer?


texts: Modelbuilder Iteration with Intersect Tool

texts:
I am trying to create a model that will select each feature within a feature class, then perform an intersect between that selection and another layer.  The model setup seems rather straightforward, but I run into a problem with the output file name.  I want the file name to be the same as the input for the selected layer (the one on which I am performing the iteration), so I originally tried %NAME%; however, this function is supposed to cause it to be named after the input file and in this case, there are two inputs since I performing an intersect.

Here is the model I have drafted below for clarity.  I want to select each feature in Main_Lanes separately and intersect it with the Seg1_WZ layer to get an ouput point intersect named after the Main_Lanes selected feature.


texts:
Even though watershed delineation is a quite popular matter here, I have what seems to be a somewhat unusual demand.

I start with a DEM which is constituted of a series of craters, all centered on one point which is the lowest part of the crater.

Here is a picture of my DEM

What I want to to, is to obtain the drainage basin of each crater.

I know how to delineate watersheds using ArcGIS' Hydrology tools, but they are best suited for 'open' hydrological systems (flows try to reach the exterior of the raster).

Here is the result I obtain. How comes some of my drainage basins are obviously wrong? Why is Arcgis so lazy that its scope is limited to the rectangle limited by the four most extreme (N-S-W-E) points?

Therefore, my question is the following: is it possible to automatically delineate the watershed basin and set the center of my craters as the targets where my flows should go?

Thanks in advance for your help!

Damien

[Edit : added Arcgis output for clarity]


texts: Support ArcGIS tileMap variable-zoom file within Mapbox-GL-JS

texts:
I'm trying to consume vector tiles and style file generated by ArcGIS, in Mapbox-GL-JS. With a bit of tweaking, it all works, except that the vector tiles themselves have been generated to varying zoom levels, which are documented in a VectorTilemap file.

Mapbox-GL-JS doesn't natively support any kind of variable zoom depth in vector tiles.

I see that I am not the first person to encounter this issue.

Is there any possible way to use these vector tiles in Mapbox-GL-JS? Any clever workarounds?


texts:
I have 6 layers that contain grid, feature, and tile layers.

 var layers = [{
        name: 'basemap',
        minZoom: 0,
        maxZoom: 19,
          layer: L.layerGroup([
           L.mapbox.tileLayer('wmarci.i6n42nl5'),
           L.mapbox.gridLayer('')])
      },
      {
        name: '1775',
        minZoom: 0,
        maxZoom: 19,
        layer: L.layerGroup([
          L.mapbox.tileLayer('wmarci.kcnpkffi'),
          L.mapbox.gridLayer('wmarci.kcnpkffi'),
          L.mapbox.featureLayer('wmarci.kcnpkffi')])
      },

How would I go about filtering those? i.e. when a checkbox is selected clear the features and vice versa.

<form>

<input type="checkbox" name="battles" value="Battles" id='filter-wars' checked>Wars

<input type="checkbox" name="treaties" value="Treaties" id='filter-treaties' checked>Treaties

      </form>

Can this be done with jquery or do I have to use mapbox.js?


texts:
I need to export to PDF with some parameters, and I went through the help and it only explains the data frame portion. When I need the entire map or layout view. Here is what I need:

1.400 dpi resolution

2.Embed all document fonts

3.The maps are 36x48 if that matters.

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project1.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Entire Map?",)[0] #What is the zero for, frames?
arcpy.mapping.ExportToPDF(mxd, r"C:\Project\Output\Project1.pdf", df)

del mxd


texts:
Can the automatic resizing of the "canvas" be disabled in QGIS 3.10?
I have manually framed an area of interest, set and locked the scale, and set the magnification in order to be able to return to a precisely exact view at any time in the future, to add, say new layers and get prints that will then register perfectly with previous prints.
However, "something" at some point (I haven't noticed when it happens, but perhaps it's when adding a new layer) alters the size of the canvas (typically making it larger). This requires me to re-set everything back the way I had it. (I've cobbled a script to restore it, but I'd prefer to avoid it in the first place.)
Edits: Even more fundamentally, I set a spatial bookmark for the composition I've made, but returning to it does not re-create the original view.
To clarify what I mean by print registration, I print map layers individually, using the same Print Composer definition (made by fixing the Item size of the first layer and then Resizing the Layer to it). I then process these images as a stack in a graphics editor to get a final map.
Changes in size, scale, or center point force returning to QGIS to build a new set of layers--because "it knows maps." Anything of a corrective nature in the graphics editor is pure guesswork (to say nothing of being a blackhole).


texts: Local Map Web API Without internet connection

texts:
I have a single-page HTML5 app that consumes a bunch of different map providers. One of my requirements is that this work with no internet connection and some sort of map provider running on the box itself.

What , if any, providers -- free or commercial can give me something along the lines of an offline google maps or google earth that I can use in a web application?

Thanks!


texts: Why is QGIS not launching on windows 10 64bits

texts: I've got a problem using QGIS all version that QGIS is not launching on windows 10 64bits.Before i was used QGIS on Windows 8.1 pro 64bits, everything's okay.After upgraded to windows 10 from windows 8.1, i have got a above problem.


texts: QGIS 3.4.1 crash without error after opening "options" (18.04. Bionic Beaver)

texts: QGIS 3.4.1 on Ubuntu 18.04. crashes without error after opening "options". I uninstalled all plugins and reinstalled QGIS (purge, autoremove, install...)


texts:
I have a polyline feature class and I need some segments to be generalized. I tried exactly Generalize tool in Advanced Editor toolbar as well as Simplify Line tool, but it isn't what I need.

My goal is to make round segments of rectangular shape, see an example. I need to transform the initial thin line into almost the same but instead of round segments (they're not curves) want to have angles like thick red ones in a picture.  Tried to build a script using lengths of distances between vectors from beginning of line with help of arcpy.da.SearchCursor() and arcpy.positionAlongLine(), but nothing useful came to my mind.
Any thoughts?


texts: gdal java API returning different WKT from gdalinfo

texts:
I am running into an interesting bug where the wkt returned from dataset.getProjection() does not match the wkt returned from gdalinfo.

(simplified) code:

final Dataset dataset = gdal.open("<somefile>.tif")
...
String wkt = dataset.getProjection()

returns:

LOCAL_CS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["unknown",SPHEROID["unretrievable - using WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],AUTHORITY["EPSG","3857"],UNIT["metre",1]]

whereas running gdalinfo on the SAME file returns:

Driver: GTiff/GeoTIFF
Files: testRaster.tif
Size is 718, 720
Coordinate System is:
PROJCS["WGS 84 / Pseudo-Mercator",
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
    AUTHORITY["EPSG","9001"]],
EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],
AUTHORITY["EPSG","3857"]]
Origin = (-15042794.839973239228129,8590031.386050270870328)
Pixel Size = (0.512485836989726,-0.512485836989726)
Metadata:
  AREA_OR_POINT=Area
  COLORSPACE=RGB
  COMPRESSION_RATE_TARGET=4
  VERSION=2
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (-15042794.840, 8590031.386) (135d 7'54.21"W, 60d50'37.46"N)
Lower Left  (-15042794.840, 8589662.396) (135d 7'54.21"W, 60d50'31.65"N)
Upper Right (-15042426.875, 8590031.386) (135d 7'42.31"W, 60d50'37.46"N)
Lower Right (-15042426.875, 8589662.396) (135d 7'42.31"W, 60d50'31.65"N)
Center      (-15042610.858, 8589846.891) (135d 7'48.26"W, 60d50'34.56"N)
Band 1 Block=718x2 Type=Byte, ColorInterp=Red
  NoData Value=0
Band 2 Block=718x2 Type=Byte, ColorInterp=Green
  NoData Value=0
Band 3 Block=718x2 Type=Byte, ColorInterp=Blue
  NoData Value=0
Band 4 Block=718x2 Type=Byte, ColorInterp=Alpha
  NoData Value=0

My question is: Why am i getting the "LOCAL_CS" value from the java api vs the PROJCS value from gdalinfo?


texts: How to increase length of linestring using Jts functions

texts:
lf l get a line string having a legth lesser than expected then l need to project or extend that line further in such a way that it meets minimum length requirement.

For e.g.

l have 2 coordinates A(ax,ay) and B(bx,by) and distance between (A,B) is 0.5 meter and minimum length should be 1 meter then coordinate B should be shifted/extended in such a way that distance between them is 1 meter.
l was trying to achieve this using gauss krueger but doesn't seem to be working. Can you please help?


texts: How to calculate how many polygons I can put inside a polygon?

texts:
I usually use qgis.
I explain my problem with an example:
there is a forest (irregular geometry1 ) and one tree (geomery2).
I want to know the maximum number of trees that the forest can contain. Furthermore i want a shapefile output of the best disposition of these trees inside the forest.


texts: PostGIS data storage suggestion for lines with multi-attribute points - Single huge POINTS table or LINES table with geometry field(s)?

texts:
I am currently working my way through PostgreSQL with PostGIS, trying to figure out the optimal way to handle the storage and manipulation of a very large dataset. I have read this and this question but I am still not very certain as to how to optimally approach my scenario.
Dataset Requirements

My dataset will involve tracks, updating in near real-time. Each track consists of a line with approximately one point per second (I do need to keep all points).
Any single track may span a few hours or more, so, typically, tracks could easily reach up to ~20000-30000 points each.
For each point, I will need additional attributes per position. At the very least, I will need to record altitudes and timestamps, but I may also need to store the velocity (it may be provided by the transmitting system) and another few things may come up as well (such as the signaling of characteristic events along the track).
I may need to record up to 10000-20000 of tracks per day.
Inserts to the database may generally have to take place as often as every few minutes.

As a back-of-the-envelope calculation, this translates to 600 million (30000 points per track * 20000 tracks, as a worst case scenario) points daily, which will have to be inserted into the database.
Usage Requirements

Most of the time, the queries to the database will be spatial, temporal, and based on some other track attributes.
A typical query would involve a day's worth, so approximately 600 million points (assembled in lines, naturally).
A worst case query could involve a year's worth.

Thoughts

I can imagine the simplest case of a POINTS table with [Track_ID, X, Y, Altitude, Timestamp, Event]. As per my previous requirements, we are talking billions to trillions of records going down that route (as half a billion points would probably be reached within a single day).
Alternatively, I can use a TRACKS table, with a geometry field (linestring). I could store time in the M coordinate but I have generally seen discouraging suggestions regarding any usage of the M coordinate. Additionally, I don't really only have four attributes (x, y, z, time), but a minimum of 5 (x, y, z, time,event) and may also need others, such as velocity. I have thought about, maybe, using two geometry fields, one to store linestrings with points as (x, y, z) coordinates and another one to store other numeric values as, again, linestrings with points, but in the form of (timestamp, velocity, event_id) for coordinates. I would somehow encode event_id values to external textual descriptions, as I really cannot store text values in geometry fields.

Should I prefer a POINTS table (and try to optimize that case) or a TRACKS table with geometry fields?  How would I accommodate my additional attributes in the TRACKS table scenario?
Due to limited experience, I am relatively less concerned as to what I should do, I am far more concerned as to what I should avoid doing.


texts: Why in Leaflet does baselayerchange event not fire until the second time the base layer is changed?

texts:
I am attempting to fire an event when the base layer changes in a Leaflet Map.  It seems that the event is only firing on the "second" time the layer changes?  Here is a fiddle to display an alert on baselayerchange, showing this condition.

https://jsfiddle.net/frugardc/x5p2nLrs/112/

Here is the code

// center of the map
var center = [-33.8650, 151.2094];
// Set up the OSM layer
var l1 = L.tileLayer(
  'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
  maxZoom: 18
});
var l2 = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
   attribution: '&copy; OpenStreetMap contributors'
});
// Create the map
var map = L.map('map',{layers: [l1,l2]}).setView(center, 3);

baseLayers = {
  'Map 1': l1,
  'Map 2': l2
};
L.control.layers(baseLayers,{}).addTo(map);

map.on('baselayerchange', function(e) {
  alert('Changed to ' + e.name);
});
// add a marker in the given location
L.marker(center).addTo(map);


texts: Extending line by specified distance in ArcGIS javascript

texts:
I have a web application where I need some functionality to draw two points that is the start of a line, and then extend that line to a given length (that is given by a number in meters).
I know how to create the line as a polyline based on the 2 points, but how can I extend this by the given distance?


texts: Using iterator to merge Excel files into Shapefile with ModelBuilder for ArcGIS Desktop?

texts:
Using ModelBuilder in ArcGIS 10.2 I want to iterate through a folder containing .xls-files, convert them to tables, and merge them into one Shapefile.

I tried the script Excel To Table, with and without the Collect Values tool, the model runs, but it gives no output at all.

What is wrong with my model?


texts:
I'm trying to plot a map of the Pacific with Japan and California in view, but am having some problems.
Here's my script:
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import matplotlib.pyplot as plt

def main():
    fig = plt.figure()
    ax = plt.axes(projection=ccrs.PlateCarree())
    ax.set_extent([-110, -180, 30, 55], crs=ccrs.PlateCarree())

    geodetic = ccrs.Geodetic()
    plate_carree = ccrs.PlateCarree()

    # Japan info
    lat_jap, lon_jap = plate_carree.transform_point(36.204823, 138.252930, geodetic)
    # California info
    lat_cal, lon_cal = plate_carree.transform_point(36.778259, -119.417931, geodetic)

    # Plot map markers for Japan and California
    ax.plot(lon_jap, lat_jap, markersize=10, marker='o')
    ax.plot(lon_cal, lat_cal, markersize=10, marker='o')

    ax.add_feature(cfeature.LAND)
    ax.add_feature(cfeature.OCEAN)
    ax.add_feature(cfeature.COASTLINE)
    ax.add_feature(cfeature.BORDERS, linestyle=':')

    plt.show()

if __name__ == '__main__':
    main()

Which produces:

I'm getting close, but when I decrease the x2 argument passed to set_extent beyond -180, the map seems to flip and plot the extent in the opposite direction. Why does this happen?
I am also trying to plot markers on Japan and California, and try to convert between the lat/lon coordinates in degrees to points on the plate carree system, but that also doesn't seem to work.
As a final touch, I want to draw a great circle line between the two points.


texts: PostGIS Address model/schema industry standard?

texts:
Is there an industry standard or best practices for a database of Addresses? I've searched for examples of Address models, and all I've found are very barbaric models that have something like address lines 1-3, postal code, and maybe latitude and longitude float fields. This wouldn't facilitate searching by city.

I've been thinking about the model that Google Maps uses, and initially I thought they used nested tables, so for example a route would belong to a locality, which would belong to a state, which would belong to a country. But then there are countries that don't use localities, for example they might use counties, and Google Maps presents their address components in the API side-by-side instead of nested, so I'm inclined to believe that Google Maps uses a "thing-and-data" model. Is this kind of model the industry standard for storing addresses?

I wasn't able to find any examples of recreating the Google Maps model, but I only found a list of all the types of "thing"'s they currently have thus far: https://developers.google.com/maps/documentation/geocoding/intro?csw=1#Types

If this type of model is recommended by the GIS industry, what is it called and where can I find examples of its implementation in code? If it's not the industry standard, what is the recommended model?


texts: ArcPy ERROR 000800 AlterField_management

texts:
I made some adjustments to existing code, and now there seems to be a glitch down the line in an area where no adjustments were made.

My initial goal was to ensure the correct data types are shown in ArcGIS. Previously, I created an Excel spreadsheet (DatabaseJoin.xlsx) that sourced select information from another Excel spreadsheet. My Excel spreadsheet (DatabaseJoin.xlsx) contained formulas that pulled and displayed numbers, text, and dates taken from the original Excel spreadsheet.

Next, in ArcPy, I converted the Excel spreadsheet (DatabaseJoin.xlsx) to a dbf file (DatabaseJoin.dbf)to get rid of the formulas using ExceltoTable_conversion. I then joined the dbf file (DatabaseJoin.dbf) to a layer within my geodatabase (Projects.shp).

The problem with this original method was that everything was displayed as STRING, so I couldn't summarize the numbers in my mxd file.

My new method was to manually save a csv file (DatabaseJoin.csv) from the Excel spreadsheet (DatabaseJoin.xlsx) and make sure that all fields were saved as number, date, text, etc. In ArcPy, I joined the csv file (DatabaseJoin.csv) to my geodatabase layer (Projects.shp) and the field types carried over so I can now use the Statistics tool.

However... now I am getting issues when I alter the field names. I am receiving the following error message:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000800: The value is not a member of TEXT | FLOAT | DOUBLE | SHORT | LONG | DATE | BLOB | RASTER | GUID.
Failed to execute (AlterField).

This error must be an issue with the csv file, right?  I'm not sure if it has anything to do with it, but I notice when I open up the dbf file of the geodatabase layer in Excel, all of the field types show as 'NUMBER', even the text entries.

Here is my original code:

 ##### JOIN TO MAIN DATABASE
#Convert xlsx to table:
import xlrd

in_excel= r'C:\\VisualDatabase\\Planning_Out\\DatabaseJoin.xlsx'
out_table= r'C:\\VisualDatabase\\Planning_Out\\DatabaseJoin.gdb'

# Perform the conversion
join_table= arcpy.ExcelToTable_conversion(in_excel, out_table)

# Permanent Join
inFeatures= r'C:\\VisualDatabase\\Planning_Out\\Projects.shp'
layerName= "projects"
P_join=arcpy.MakeFeatureLayer_management(inFeatures, layerName)

# Set the local parameters
joinField= "Name"
joinField_P = "Contract"
outFeature = r'C:\\VisualDatabase\\Planning_Out\\P_join.shp'
joinTable= r'C:\\VisualDatabase\\Planning_Out\\DatabaseJoin.dbf'

# Join feature classes by joinField
arcpy.AddJoin_management ("projects", joinField, joinTable, joinField_P, "KEEP_COMMON")
arcpy.CopyFeatures_management("projects", outFeature)

#Contract
#Set local variables
Contractfield = "Database_1"
Contract_new_length = "20"
arcpy.AlterField_management(gdb,Contractfield, "CON", "CON", "TEXT", CON_new_length, "NULLABLE")

#Length
#Set local variables
Lengthfield = "Database_8"
Length_new_length = "200"
arcpy.AlterField_management(gdb,Lengthfield, "LENGTH", "Length", "TEXT", Length_new_length, "NULLABLE")

Here is my new code:

    # Permanent Join
    inFeatures= r'C:\\VisualDatabase\\Planning_Out\\Projects.shp'
    layerName= "projects"
    P_join=arcpy.MakeFeatureLayer_management(inFeatures, layerName)

    # Set the local parameters
    joinField= "Name"
    joinField_P = "Contract"
    outFeature = r'C:\\VisualDatabase\\Planning_Out\\P_join.shp'
    joinTable= r'C:\\VisualDatabase\\Planning_Out\\DatabaseJoin.csv'

    # Join feature classes by joinField
    arcpy.AddJoin_management ("projects", joinField, joinTable, joinField_P, "KEEP_COMMON")
    arcpy.CopyFeatures_management("projects", outFeature)

    #Contract
    #Set local variables
    Contractfield = "Database_1"
    Contract_new_length = "20"
    arcpy.AlterField_management(gdb,Contractfield, "CON", "CON", CON_new_length, "NULLABLE")

    #Length
    #Set local variables
    Lengthfield = "Database_8"
    Length_new_length = "200"
    arcpy.AlterField_management(gdb,Lengthfield, "LENGTH", "Length",  Length_new_length, "NULLABLE")

Maybe field mapping can fix this and make it easier?


texts: calculating bounding box from known centre coordinate and zoom

texts:
I have a map, the centre of that map (centrepoint) is = -37,175 ( gps)
I know the zoom of the map = 13
I know the size = 320x320px
I know there is 111111m in a degree of latitude and a varying degree in longitude

I want to be able to calculate the value to add and subtract from the centre coordinate that will give me an upperleft/lowerright gps coordinate.

For a zoom of 13 I used to achieve this by
Note :centrelat= -37
eg :-37 - (-37/1650) = -36.9776 deg.   In other words to find the southeast corner we subtracted .0228 degrees from the centre coordinate.
I did the same for longitude but used the value 6250
eg :175 - (175/6250) (.02804 degrees). = 174.792, ie the northwest corner
the ratio between .0228 degrees (lat)and .0280 degrees(long) is correct

So, I want this calculation to be dynamic and work for all zooms
so I'm using (cos Latitude x 111111) / 2^Zoom(13) = 10.72095
for longitude I'm using 111111/2^13 = 13.56
This is the same ratio as well so I'm on the right track!
but how do I use these values in a calculation to add or subtract degrees from the centre   coordinates for lat and long to get the coordinates for the corners of the bounding box.

any help is appreciated, and I do mean that.


texts: Do locations "move" when shifting datum?

texts:
I hope that this is the right Stack Exchange for this question. I may be oversimplifying this, but I'm looking for verification in my understanding of the following:

If I have a spatial dataset in 2 different data [datums], the coordinates [absolute location] of the "same" point may differ between the two data. This magnitude will depend on the geometric difference between the datum ellipsoids at the location of my point.

Whereas...

If I have a spatial datasets with the same datum but in 2 different projections, the coordinates of the "same" point will be identical, but the distance/shape of path/direction between this and another point may vary between the two projections, due to distortions introduced during the projection process. The type and degree of this distortion depends on the projection used and where it lies tangent to the datum ellipsoid.

Is this an acceptable degree of simplification to constitute a "strong understanding" of the topic? Or am I way off and conceptualizing this incorrectly?


texts: How to download Leaflet vectors in GPX format?

texts:
I would like to use the leaflet.draw plugin to allow users to digitize vectors on the map. At the end the data should be downloadable as a GPX-file.

Is there any sample that shows how this can be done?


texts: How to fix (or avoid) backslash in filepath to vector layer (QGIS on windows)

texts:
Probably OS specific, I see this issue while using QGIS 2.14.11 and 2.18.3 versions on Windows64 platform.

When I import a vector to QGIS by Layer | Add Layer | Add Vector Layer the layer source writes backslash in its path. Can I fix this to forward slash?

[EDIT] This includes "Can I avoid backslash when I load vector files?"

These vector layers with backslash work fine usually, but it becomes troublesome if I try to read the layer from R script. For instance if I try to read a layer of .csv file (without geometry) from a Processing rsx script by ##Layer=table it returns an error Error 'u' used without hex digits in character string.


texts:
Is it possible to display a label multiple times in QGIS?

For example, displaying the label several times along the red line in the above image? A copy and paste function would do the job.