texts: Python problems with select by attributes and user input

texts:
I am attempting to create a tool where the user can input a census tract number within the city of Plano (there are 77 tracts) and it ultimately creates a map layout showing the population density. I am having problems using the select tool to copy the inputed tract layer into a new feature class.

It is executing successfully but it keeps copying the original plano_tract layer into a new feature class instead of copying the selected tract that was inputed. Not sure if I needed a where clause in the script or if I could simply just do a select by attribute function.

I was using this thread as reference but it I still getting the same result.

Python Script for Select by Attributes taking user input

I am pretty new to Python and this is a beginner exercise for me.

Here is my script:

import arcpy
import os
from arcpy import env

#set workspace
Workspace = arcpy.GetParameterAsText(0)

env.workspace = r"C:\Users\dallascowboy83\Desktop\project 2\project\project.gdb"
env.overwriteOutput = 1

#set local variables
tracts = arcpy.GetParameterAsText(1)

#ask user for tract to search
tract = raw_input("Please type Tract Number: ")

plano_tract = r"C:\Users\dallascowboy83\Desktop\project 2\project\project.gdb\plano_tract.shp"

plano_tract_lyr = "plano_tract_lyr"

#user selects tract, Select by Attribute tool runs
arcpy.MakeFeatureLayer_management("plano_tract", "plano_tract_lyr")

arcpy.SelectLayerByAttribute_management("plano_tract_lyr", "NEW_SELECTION", "\"Tract_Number\" = "+ tract)

arcpy.CopyFeatures_management("plano_tract", "plano_tract_feat")

#add field
arcpy.AddField_management("plano_tract_feat", "density", "DOUBLE")

#calculate field
arcpy.CalculateField_management("plano_tract_select", "density", "[DP0010001] / [sq_mile_1]", "PYTHON", "")

print "executed successfully"


texts: gain & offset values for Planet's PSScene4Band analytic_sr

texts:
I can't find it in their docs nor their website, but basically I want to convert the pixel values (16-bit uint) to decimal for further computation.

A natural gain might be 1 / 65,535, but I have a scene of a green field in May with max values of approximately 2000 for the visible bands, which would yield a reflectance of 0.03, which seems way too low.


texts:
What are the existing collaborative webmapping systems/platforms?

I am looking for some information like on this page for wiki softwares, but specific to out-of-the-box on-line geographical data capture systems.

These systems should not necessarily be open-source but should remain highly customisable for specific purposes. I am specifically interested in systems that could be made private, with a capture tool usable on mobile devices.

So far, I am aware of the systems Ushahidi and LocalWiki. I am sure you know others!

Precision: I am not looking for existing collaborative cartography projects like in this question but rather in the background systems for these projects. Wikipedia's system for example has been released as the MediWiki system - maybe there are comparable initiatives in collaborative webmapping.


texts: Merging based on attribute and spatial location in ArcGIS Desktop?

texts:
I've sifted through the questions and have not been able to properly address my issue after trying several options.  I'm hoping someone can help me out or point me in the right direction.

I have a feature class of polygons that represent forested and non-forested areas within a property boundary.  The property itself is split into several different lots.

Each polygon contains three fields ("Lot_Num", "Age_Class" and "SAF_Cov_Ty") that I am interested in merging by.

The "Lot_Num" field is simply a number corresponding to the lot number within the property.  Each polygon contains a number for the lot is is located in.

The "Age_Class" field for each polygon represents how old a forested area is and contains ONE of these four options: "0-16", "17-60",  "61+", or "NF".

The "SAF_Cov_Ty" field for each polygon represents the type of trees located there and contains ONE of these four options: "WO-BO-NRO-52", "YP-WO-NRO-59", "Pine-Strip", or "NF".

In order for a merge of polygons to be acceptable, there are certain conditions that must be met as follows:

Polygons must be in the same lot.
Polygons must touch each other at some point (so there will be a contiguous polygon if merged).
"Age_Class" value must match.
"SAF_Cov_Ty" value must match.

So if there are multiple polygons in a lot that border each other, and contain both the same "Age_Class" AND "SAF_Cov_Ty" values, I want to merge them all into one polygon.  One large polygon still represents the same age and type of trees as what all the smaller ones do, it just cleans up the overall appearance.  This will also help to cut down on the number of records in the feature class.

Below is a screenshot of the data.

Here is the legend if not visible in the image.

"Age_Class" Legend:
Yellow background = value of 17-60, Green background = value of 61+,
Red background = value of 0-16, grey background = NF.

"SAF_Cov_Ty" Legend:
Line Hatch = WO-BO-NRO-52, Dotted hatch = YP-WO-NRO-59, Grey Background = NF

White/black dashed line represents property boundaries as well as different lot numbers within the property.

In the screenshot I would want to merge the two green polygons to the west together as they are in the same lot, border one another, and share the same "Age_Class" and "SAF_Cov_Ty" attributes.
I could not merge any red polygons as they either don't share the same "SAF_Cov_Ty" attriubutes, or they don't border each other.
I could not merge any yellow polygons(minus the small one visible in the southeast corner); they are either on different lot numbers, or the "SAF_Cov_Ty" values don't match.

I'd be happy to provide sample data if anyone is able to help.  This would be simple enough to do manually, but I have over 900,000 acres to do this on.


texts:
We have a dwg file.  When we open it in autocad it looks ok. When we convert it to dxf and load it in either postgis or qgis it is located about 1000 miles from where its suppose to be.  If we reload the dxf file into autocad it is located correctly. We're using the same cordinate system (fl84) in qgis that autocad is using but we are apparently missing something.

I am verifying the data in autocad by loading a basemap and its appearing in the location I expect it to be

Why does autocad know the coordinate system but its missing from my dxf file but qgis does not?


texts: Using IF-THEN-ELSE with ModelBuilder of ArcMap

texts:
I have two optional parameters in my ArcMap model (City and date) and I want to use the tool calculate a value to create an expression that will give me a boolean (true-false).

I want the code to return me a true statement if a city and a date have been entered by the user of the model and false if only one of the two have been requested (ex: city=Chicago and no date has been entered).

So far, I have this :

expression :

x("%City%", "%Date%")

Code :

def x(City, Date)
if City is not None and Date is not None:
returns True
else:
return False

Type:
Boolean


texts: Why does a shapefile shift after transformation?

texts:
I have a shapefile created in the raster package (ER_14.3_2000_poly).

> #read in a raster file
>   ER_14.3_2000<-raster('E:/Ecoregions Models/Outputs/ER_14.3/ER_14.3_ConsensusMap3.asc')
> #convert the raster to a shapefile and add CRS
>   ER_14.3_2000_poly<-rasterToPolygons (ER_14.3_2000, fun=function(x){x==1}, dissolve=TRUE)
>     projection (ER_14.3_2000_poly)<- "+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs"
>     ER_14.3_2000_poly<- spTransform(ER_14.3_2000_poly,CRS("+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs"))
> ER_14.3_2000_poly
class       : SpatialPolygonsDataFrame
nfeatures   : 1
extent      : -856895.9, 916774.1, -2897667, -1500787  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs
nvariables  : 1
names       : value
min values  :     1
max values  :     1

I want to overlay it on to a raster image (alt) and two shapefiles (MX_L0 and USA_L0) showing political boundaries.

raster:

> alt
class       : RasterLayer
dimensions  : 365, 515, 187975  (nrow, ncol, ncell)
resolution  : 7880, 9190  (x, y)
extent      : -2713276, 1344924, -2952807, 401543  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs
data source : in memory
names       : alt
values      : -185.8762, 3942.444  (min, max)

Shapefiles:

 > MX_L0
    class       : SpatialPolygonsDataFrame
    nfeatures   : 1
    extent      : -1785794, 1407980, -3312074, -1222596  (xmin, xmax, ymin, ymax)
    coord. ref. : +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs
    nvariables  : 24
    names       : ID_0, ISO, NAME_ENGLI, NAME_ISO, NAME_FAO,                       NAME_LOCAL, NAME_OBSOL,                       NAME_VARIA, NAME_NONLA, NAME_FRENC, NAME_SPANI, NAME_RUSSI, NAME_ARABI, NAME_CHINE, WASPARTOF, ...
    min values  :  145, MEX,     Mexico,   MEXICO,   Mexico, MÃ©xico|Estados Unidos Mexicanos,         NA, Estados Unidos Mexicanos|MÃ©jico,         NA,    Mexique,    MÃ©xico,    ???????,    ???????,        ???,        NA, ...
    max values  :  145, MEX,     Mexico,   MEXICO,   Mexico, MÃ©xico|Estados Unidos Mexicanos,         NA, Estados Unidos Mexicanos|MÃ©jico,         NA,    Mexique,    MÃ©xico,    ???????,    ???????,        ???,        NA, ...
    > USA_L0
    class       : SpatialPolygonsDataFrame
    nfeatures   : 1
    extent      : -5978257, 2516534, -2116922, 3910986  (xmin, xmax, ymin, ymax)
    coord. ref. : +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs
    nvariables  : 24
    names       : ID_0, ISO,    NAME_ENGLI,      NAME_ISO,                 NAME_FAO,    NAME_LOCAL, NAME_OBSOL,                                  NAME_VARIA, NAME_NONLA,  NAME_FRENC,     NAME_SPANI,                NAME_RUSSI,       NAME_ARABI, NAME_CHINE, WASPARTOF, ...
    min values  :  240, USA, United States, UNITED STATES, United States of America, United States,         NA, United States of America|USA|US|U.S.|U.S.A.,         NA, Ã‰tats-Unis, Estados Unidos, ??????????? ????? ???????, ???????? ???????,         ??,        NA, ...
    max values  :  240, USA, United States, UNITED STATES, United States of America, United States,         NA, United States of America|USA|US|U.S.|U.S.A.,         NA, Ã‰tats-Unis, Estados Unidos, ??????????? ????? ???????, ???????? ???????,         ??,        NA, ...

When I plot it out, the shapefile is shifted to the east. The shapefile should be hugging the Mexican coast. Does anyone know where I went wrong? Any input helps!

I am thinking that for some reason the xmax value of the extent has been modified. Does anyone have ideas on how to change it so they overlap?


texts: Geocoding large amount of postcodes crashing in MMQGIS

texts:
I have 14,000 observations I am geocoding to postcodes around London and surrounding areas.

I have 2 files - London postcodes and Britain postcodes. Around 2,000 postcodes fall outside of London so I have to use the postcodes for the UK, which is considerably larger.

QGIS is crashing each time I am geocoding to the UK postcode file, presumably as it has to index 1.8 million postcodes before matching the remaining 2,000. What alternative do I have?

For reference, geocoding 12,000 postcodes in London took a matter of minutes.


texts: Creating profile cross-sections in ArcGIS Desktop?

texts:
Because the default 'Profile Graph' tool was not sufficient, I wrote a custom VBA script that creates scaled and exaggerated profile cross-sections in ArcGIS but I need more features:

Visualize more than 1 surface
Visualize vertical and directional boreholes
Ability to symbolize / edit the output
Linked with underlying data - changes in terrain (or profile 3D line) reflected in output

A few years ago I tested an extension by A-Prime software called 'CrossView For ArcGIS' but I am not sure if it is compatible with ArcGIS 10 (Contacted A-Prime but they have not yet responded)
http://www.aprimesoftware.com/

Area there any alternatives? Other 3rd party software? A functioning script? that can do this?


texts: Calculate mean for a each object of SpatialPointsDataFrame

texts: I have a list with several SpatialPointsDataFrame objects, and each object has certain slots. How can I calculate the mean value of a certain slot for every object in the list, and then save that object (that was found to have the minimum mean value on that certain slot) to another object separately? I work with R.


texts: Appending to a cartodb table - duplicate key value violates unique key constraint

texts:
I'm trying to insert rows from one cartodb table into another using the method outlined here:

INSERT INTO gfw_mining_test (the_geom, the_geom_webmercator, objectid, country,type, gfwid, st_area_sh, st_length_) SELECT the_geom, the_geom_webmercator, objectid, country, type, gfwid, st_area_sh, st_length_ FROM gab_mining_staging WHERE cartodb_id >= 0 and cartodb_id < 500000

I'm getting an error that there's duplicate data in the table:

duplicate key value violates unique constraint "gfw_mining_test_pkey"

I've queried the table to get the primary key and it seems to be cartodb_id. Both my source and my target datasets have this column. I'm trying to append data from my source without including the cartodb_id column in the hopes that the cartodb_id values for these new rows will be automatically generated in the target table.

Does this make sense? Why am I getting this error? Is there another key constraint that I'm running up against?


texts: Changing the default comma separator for CSV files in QGIS

texts:
QGIS by default saves csv files with values separated by a comma, but I want to save my csv files with semicolons. When I save a vector layer as csv, I can choose if saving with a comma, semicolon, or others, but changing every time such option is tedious. Moreover, some plugins (e.g. 'Point sampling tool') save csv files without giving you the possibility to choose commas or semicolons.
Is there a way to set semicolons as the default in QGIS?


texts: Building predictive maps of response variables in R

texts:
I am a novice in spatial statistics in R. So, I am looking for some advises. In particular, I would like to create a predictive map of capture success from a generalized linear mixed-effects model (GLMM). In my GLMM, the dependent variable is the total number of unique individuals captured per 100 trap nights in trapping sites and the independent variables are the proportion of land cover types in trapping sites. I included a random effect for the year. My raster of land cover types has cells of 25 x 25 m. How can I assign predicted values from the GLMM to raster pixels in R?  Have I to use a kriging method?
As the covariates are proportions of land cover types in trapping sites, is it a problem if a raster pixel represents a single land cover type (and not several land cover types)?

Update:

Here are:

The structure of my dataset:

A representation of one trapping site:

So, a trapping site is composed of several land cover types and each raster pixel is assigned to one land cover type. The trapping sites have different sizes. I defined the proportion of a given land cover type as number of pixels for the land cover type in the trapping site / total number of pixels (thus for all land cover types) in the trapping site.


texts: MapScale not being persisted properly in mxd when programmatically changed outside of ArcMap environment

texts:
I am trying to change the scale of a map in an mxd OUTSIDE of ArcMap in a standalone Windows application.  The problem is the scale is never persisted - the best code I have come up with is the following:

private void UpdateMapScaleInMxd(double scale, string mxdFullPath)
        {
            IMapDocument mapDocument = new MapDocumentClass();
            mapDocument.Open(mxdFullPath, "");
            IPageLayout pageLayout = (IPageLayout)mapDocument.ActiveView;

            IGraphicsContainer graphicsContainer = (IGraphicsContainer)pageLayout;
            graphicsContainer.Reset();
            IMapFrame mapFrame;

            IActiveView tmpActiveView = null;

            IElement element = graphicsContainer.Next();
            while (element != null)
            {
                if (element is IMapFrame)
                {
                    mapFrame = (IMapFrame)element;
                    tmpActiveView = (IActiveView)mapFrame.Map;

                    mapFrame.ExtentType = esriExtentTypeEnum.esriExtentScale;
                    mapFrame.MapScale = scale;
                    tmpActiveView.Refresh();
                }

                element = graphicsContainer.Next();
            }

            mapDocument.Save(false, false);
            mapDocument.Close();
        }

I check the mxd by opening it up in ArcMap and the map scale has changed i.e the data frame now has a fixed scale and the scale combobox is greyed out.

So now I try to export the map as a PDF in code - and the most frustrating thing is - it exports the map at the previous scale that was set - NOT the scale I just changed it to!  So infuriating - if anyone can help me understand where I am going wrong that would be great.

UPDATE:

In the code above I am using the IMapDocument - and I think there are limitations (according to the help):

  The IMapDocument interface provides
  properties and methods for reading map
  document files (*.mxd, *mxt, .pmf)
  and writing and saving changes to map
  document files (.mxd).  However,
  since it is not tied to the ArcMap
  application, application-specific
  functionality in the MapDocument will
  not be persisted.  Examples of
  application specific functionality are
  toolbar settings, UI customizations,
  VBA projects, and ArcMap graphs.  For
  desktop developers who need to use
  this functionality, the MxDocument
  interface located in the ArcMapUI
  library is a better choice.

I am now thinking that changing the map scale can not be persisted properly using the IMapDocument interface.


texts: How can I bring in grid files from Geographix into ArcGIS?

texts: I have a set of grids of subsurface horizons, created from contours, that I have created in Geographix and am having trouble brining them into ArcGIS. Currently when I try to export the grid Geographix is only showing me the cell boundary and is not importing the grid values. Do you know how to correctly export the grid from Geographix so that it will display in ArcGIS as a grid file?


texts: Labels displaying with multiple bounding rectangles

texts:
While setting up labeling of a line (road) layer, the labels started displaying with multiple bounding rectangles along with the text.

After trying many different labeling configurations without getting only text to display, I was able to work around by abandoning the problem project and starting over with a new project, same data, same label configuration, and they started displaying correctly.  So the problem seems to be with the project itself.

Easier to show than describe.
Problem project -

Correct rendering -

Looks to me like the boxes are the tracks of the placement iterations of the labeling engine.  Maybe I have bumbled into some debugging setting?

Using QGIS 2.18.16 running in Ubuntu 16.04.


texts: shapefile for mumbai area or section wise

texts:
I am working on a project in which i need to plot data on Mumbai city map section wise or area wise but i am not able to get Shapefile for the same.

Can anyone please provide me the link where i can get this Shapefile? or guide me on creating one using QGIS?.I mentioned QGIS because i know a little about OGIS and hence it will save time.

Also i tried certain links which are listed below but i couldn't find what i need.

I mentioned shapefile because these are easy to manipulate, later i will convert it into geoJSON and work on it so if geoJSON files are there then it would also help. An image is also provided below.

Note: only the important links are listed:

http://monsoon.mcgm.gov.in:8080/RESTFulWS/WardMaps.html0
http://www.naturalearthdata.com/downloads/10m-cultural-vectors/
https://groups.google.com/forum/#!topic/datameet/ZVeyx7vT49g


texts:
QGIS 2.01 on Windows 8

I have a polygon layer which I edit in QGIS 2.01. Editing (cutting, deleting, editing new polygons with attributes) works fine. I am saving the changes after every edit or so while in edit session. Then after editing away for some time (10 Min) and saving 4-5 edits the saving process becomes unbearably slow and it takes between 1 and 7 (!) minutes to save the changes. Mouse cursor is going crazy, CPU and ram are maxing out. Then after the edits are finally saved, ending the edit session again takes several minutes. I tried the dataset with SQLite and shp, both delivered the same experience.

Any clues why this might be the case? Thanks for your help.


texts: Where to find shapefile basemap for the Indian Ocean?

texts:
I need to plot point data over a basemap of the Indian Ocean.

Can anyone tell me where I can find such a basemap in shapefile format?


texts: Why is my QGIS installation not updating to a more recent version?

texts:
I've QGIS 2.18 installed in Ubuntu 16.04 for a long time. I added the repository https://qgis.org/debian.

Why is it not updating to version 3.0 or 3.2? I thought the respository for the LTR version is https://qgis.org/debian-ltr.


texts: Increase string limit when exporting qgis2web map

texts:
I have a csv file imported into QGIS with some string fields. The number of characters in the string fields vary but some go beyond the default limit of 255 characters. When exporting the map using qgis2web, all points with less than 255 characters are plotted and all points above 255 characters are ignored.
Is there a way for qgis2web to include points that has more than 255 characters in a string field?

edit:
This link (https://ukerc.rl.ac.uk/TOOLS/EnergyDemonstrators/map.html#5/55.674/-2.490) from a previous question that someone asked shows the exported map showing more than 255 characters in the "Description" field. How was this done?


texts: Converting .ply files to .las for ArcGIS input?

texts:
I'm trying to open a .ply file (point cloud in ArcGIS Desktop and ArcGIS Pro), but I can't.

How can I convert the .ply file to .las, or open .ply in ArcGIS Desktop or ArcGIS Pro?


texts: Export raster to PNG in 1:1 scale from QGIS?

texts:
The raster I have is 1m LiDAR data that's been patched and properly color corrected.
The resolution of it should already be 1m/pixel.

The coordinate system is properly set, the measure tool measures accurate distances in meters.

When exporting an image, I get odd results and bad pixel sizes when selecting a scale of 1:1.

Either I do not understand how this scale option works, or I'm doing this incorrectly.

I need an output file that matches the extent of the selected area with a ratio of 1m per pixel. DPI should not matter.

Furthermore, if possible, the output should be a PNG @ 16 bit.
I'd settle for any sort of uncompressed image where the ratio is correct and each pixel is a meter.


texts: How do I clip data frame (without clip shp file) in QGIS?

texts:
How can I produce different map view that shows data frame according to a predefined polygon?

In ArcGIS, one can clip data frame (without clip shp file)  using the Clip options on the Data Frame tab of the Data Frame Properties dialog box. Clearly, I need to learn how this process (https://www.youtube.com/watch?v=EqPPghMw4Aw) can be done in QGIS 2.18.


texts: ArcGis Runtime (.net) powered REST-services?

texts:
I am currently involved in a project where we need a few services for complex geometry processing.

At the moment, some services has been implemented as Python GP-tools and deployed on an ArcGIS server. This is an ugly approach, thinking of debugging, error handling, performance etc.

ArcGIS Runtime has started to become a reasonably capable API, and most of the functionality we need is there.

It is intended as a client API though, has anybody tried to use it on the server side ? I am thinking of ASP.NET Web Api.


texts: Reading ESRI SDE data from network port 5151

texts:
I am performing a network vulnerability scan of an Android Automotive platform. My setup consists of a Kali Linux machine and an Android Automotive Infotainment System on a local network.
During the scanning, I found that port 5151 is open and is being used by a service named esri_sde.
kali:~$ sudo nmap -T4 -p- 192.168.x.x     //IP for infotainment system
Nmap scan report for 192.168.x.x
PORT     STATE SERVICE
5151/tcp open  esri_sde

Doing a netcat on the port 5151 for listening, provides me continuous data which is not human readable.
kali:~$ nc 192.168.x.x 5151
7ò”°R YJøOæÝ½9^çÆC€E†éÃºaI™íÐåY—
...

I am not familiar with ESRI SDE or related services. Can anyone tell me how I can read this data on my Kali Machine. For eg. saving it to a file and reading it via some editor, or having some kind of SDE client on my Linux machine that can read the data being produced on port 5151.


texts: python script error- with GetParameterAsText

texts:
I have a seemingly simple code which iterates through a list of feature classes and calculates an ID field in the attribute table that is equal to the first 5 characters of feature class name.  The script works fine if I hard code the workspace.  As soon as I change it to "Get Parameter as Text"  I receive this error:

ERROR 000539: Error running expression: expression : name 'expression' is not defined
Failed to execute (CalculateField).

The script is:

import arcpy, sys, array, time, datetime

#Get feature dataset
inws = arcpy.GetParameterAsText(0)

#Set geoprocessing environments
arcpy.env.workspace = inws
arcpy.env.overwriteOutput = True

#Iterate through the list of feature classes

fcList = arcpy.ListFeatureClasses()

for fc in fcList:
    print str("processing" + fc)

#Define field and expression
field = "SID"
expression = str(fc[:5])

#Create a new field name and expression
arcpy.AddField_management(fc, field, "TEXT")
arcpy.CalculateField_management(fc, field, "expression", "PYTHON")

does anyone know what is going on here?
Thanks!


texts: Write out a WKT file from a loaded shapefile

texts:
We are looking to load and display a shapefile, simple polygons, then write out a WKT string of that shapefile and have the user save it somewhere.

Does anyone have some code snippets of that very function or a link to a site that covers this need?

I imagine we will be using Geotools and java to do this.


texts: Create categorized renderer from styles won't color categories

texts:
I'm trying to use the tool named 'Create categorized renderer from styles'

When I classify my layer by an attribute table value in layer properties/symbology/categorized I get different colors automatically.

When I use this tool, it classifies my layer correctly but won't assign different colors to them.

Here is the log output when I'm running the tool.

  Prepare algorithm: native:categorizeusingstyle_1 Running Create
  categorized renderer from styles [1/12] Input Parameters: {
  CASE_SENSITIVE: False, FIELD: 'Product', INPUT:
  '/Users/user/Downloads/python/sample.shp', STYLE: '', TOLERANT: False
  } No categories could be matched to symbols in file.

  4 categories could not be matched:

  Product1
  Product2
  Product3
  Product4

  115 symbols in style were not matched: ∙ “cat trail” ∙ “dash  black” ∙
  “dash blue” ∙ “dash gray 1” ∙ “dash gray 2” ∙ “dash gray 3” ∙ “dash
  gray 4” ∙ “dash green” ∙ “dash red” ∙ “diamond blue” ∙ “diamond green”
  ∙ “diamond red” ∙ “dot  black” ∙ “dot  white” ∙ “dot blue” ∙ “dot
  brown” ∙ “dot green” ∙ “dot orange” ∙ “dot pink” ∙ “dot purple” ∙ “dot
  red” ∙ “dot yellow” ∙ “effect drop shadow” ∙ “effect emboss” ∙ “effect
  neon” ∙ “gradient   plasma” ∙ “gradient  gray fill” ∙ “gradient blue
  fill” ∙ “gradient brown fill” ∙ “gradient green fill” ∙ “gradient
  orange fill” ∙ “gradient pink fill” ∙ “gradient purple fill” ∙
  “gradient red fill” ∙ “gradient yellow fill” ∙ “gray 1 dot” ∙ “gray 1
  fill” ∙ “gray 1 line” ∙ “gray 2 dot” ∙ “gray 2 fill” ∙ “gray 2 line” ∙
  “gray 3 dot” ∙ “gray 3 fill” ∙ “gray 3 line” ∙ “gray 4 dot” ∙ “gray 4
  fill” ∙ “gray 4 line” ∙ “hashed black /” ∙ “hashed black X” ∙ “hashed
  black \” ∙ “hashed black |” ∙ “hashed black —” ∙ “hashed cblue /” ∙
  “hashed cblue \” ∙ “hashed cgreen /” ∙ “hashed cgreen \” ∙ “hashed
  cred /” ∙ “hashed cred \” ∙ “hashed gray /” ∙ “hashed gray \” ∙
  “honeycomb faux 3d” ∙ “outline black” ∙ “outline blue” ∙ “outline
  green” ∙ “outline red” ∙ “outline xpattern” ∙ “pattern circles” ∙
  “pattern dot  blue” ∙ “pattern dot  green” ∙ “pattern dot  red” ∙
  “pattern dot black” ∙ “pattern zelda” ∙ “pointing arrow” ∙ “shield
  disability” ∙ “simple  black” ∙ “simple  black line” ∙ “simple  white”
  ∙ “simple blue fill” ∙ “simple blue line” ∙ “simple brown fill” ∙
  “simple brown line” ∙ “simple green fill” ∙ “simple green line” ∙
  “simple orange fill” ∙ “simple orange line” ∙ “simple pink fill” ∙
  “simple pink line” ∙ “simple purple fill” ∙ “simple purple line” ∙
  “simple red fill” ∙ “simple red line” ∙ “simple yellow fill” ∙ “simple
  yellow line” ∙ “topo airport” ∙ “topo building” ∙ “topo camp” ∙ “topo
  foot” ∙ “topo forest” ∙ “topo hospital” ∙ “topo hydrology” ∙ “topo
  main road” ∙ “topo path” ∙ “topo pop capital” ∙ “topo pop city” ∙
  “topo pop house” ∙ “topo pop village” ∙ “topo railway” ∙ “topo road” ∙
  “topo steps” ∙ “topo swamp” ∙ “topo urban” ∙ “topo water” ∙ “triangle
  blue” ∙ “triangle green” ∙ “triangle red” OK. Execution took 4.46 s (1
  outputs).

Is it possible to have this tool assign random (any) colors to classified items?


texts: Merging buffers together with no fill colour?

texts:
I am a bit of a novice with GIS.

I have created several 500m buffer zones around streets in GIS. I ultimately want a combined buffer so only the outside line that measures 500m away from all of these streets can be seen on the map.

I have tried Merge-ing and then Dissolve-ing the buffers I have created around each street but whenever I remove the colour fill the map appears to resort back to the original with all the lines of all buffer zones apparent.

Could somebody advise me on how to combine my buffers and remove the overlapping outlines in the centre?


texts:
I would like to select my input file and output folder path via a GUI. At the moment, I simply defined my paths like this
#path to het input file
input_path = 'c:/Users/tobias/Desktop/object1/object2/inputfile.dxf'

#path for produced output file
output_path = 'c:/Users/tobias/Desktop/object1/object2/output_folder'

I would like to use 'QtGui' which is already implemented in PyQGIS. I try to implement it but I am pretty new in GUI programming.


texts: Adjusting brightness/contrast for XYZ Tile Data

texts:
Is there a way to adjust brightness and contrast for XYZ tile data in QGIS 3.4?

Specifically, I'd like to adjust the settings for the Google Imagery Hybrid XYZ tile. I'm running QGIS on Windows 10.


texts: Leveraging spatial indexes in min st_xmin

texts:
Is there a way to leverage spatial indexes to query the min and max coordinates in a table without running a full seq scan?
It seems min(st_xmin(geom)) always runs a full seq scan even though theoretically this information is available in the R-tree.
Queries
select min(st_xmin(geom)), min(st_xmax(geom)) from geometries;
select ST_Extent(geom) from geometries;

Table
CREATE TABLE geometries (name varchar, geom geometry);

INSERT INTO geometries VALUES
  ('Point', 'POINT(-10 -20)'),
  ('Linestring', 'LINESTRING(0 0, 1 1, 2 1, 2 2)'),
  ('Polygon', 'POLYGON((0 -1, 1 -1, 1 1, 0 1, 0 -1))'),
  ('PolygonWithHole', 'POLYGON((0 0, 10 0, 10 10, 0 10, 0 0),(1 1, 1 2, 2 2, 2 1, 1 1))'),
  ('Collection', 'GEOMETRYCOLLECTION(POINT(2 0),POLYGON((0 0, 1 0, 1 1, 0 1, 0 0)))')

CREATE INDEX geometries_spatial ON geometries USING gist (geom);

Analyse
 ->  Partial Aggregate  (cost=10602.36..10602.37 rows=1 width=8) (actual time=860.548..860.610 rows=1 loops=2)
              ->  Parallel Seq Scan on geometries  (cost=0.00..2708.24 rows=60724 width=120) (actual time=0.019..415.183 rows=51615 loops=2)


texts: How is the legal situation for edited maps?

texts:
I am currently working on a commercial GIS project and have a lot of uncertainties regarding legal situations and terms of use for different maps.

For example, the data of eurostat does not allow a commercial use of this data.
But looking at the following dataset by the European Environment Agency, you can see, that they used the eurosat data as template. According to their terms of use, the data is also free for commercial use.

Now I am asking myself whether I could also use some datasets, which are not free for commercial use, redraw them in GIS for myself based on the template and then work with them without violating any legal rights?


texts: How to produce a finer resolution spatial grid from coarser grid in R?

texts:
I have a spatial grid of an image. Now I want to use this grid and make a finer resolution grid out of it.

For example an image structure in R is given below:

str(c)
Formal class 'SpatialGridDataFrame' [package "sp"] with 4 slots
  ..@ data       :'data.frame': 35100 obs. of  1 variable:
  .. ..$ class: num [1:35100(1d)] 0 0 0 0 0 0 0 0 0 0 ...
  ..@ grid       :Formal class 'GridTopology' [package "sp"] with 3 slots
  .. .. ..@ cellcentre.offset: Named num [1:2] 563450 6355500
  .. .. .. ..- attr(*, "names")= chr [1:2] "x" "y"
  .. .. ..@ cellsize         : num [1:2] 25 25
  .. .. ..@ cells.dim        : int [1:2] 36 39
  ..@ bbox       : num [1:2, 1:2] 563438 6355488 564338 6356463
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr [1:2] "x" "y"
  .. .. ..$ : chr [1:2] "min" "max"
  ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot
  .. .. ..@ projargs: chr "+proj=utm +zone=35 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"

Here i want to create a finer resolution grid with increasing the cell.dim i.e by multiplying rows and columns by a scale factor S=5 and also changing cell size by dividing the same by scale factor 5.

So, to do this we need to change the cellcentre.offset, which am unable to do so. The bounding box would remain same.

The problem m facing is that the data is of 35100 observations but when i display it, i can only display 1404 observations (36*39) because of the present grid topology. I want to display all the observations for that I need a finer resolution grid topology with the same bounding box.


texts: Operations Dashboard Category Selector Zoom 'settings'

texts:
Is there code that sets Category Selector Zoom scales?
I have my dashboard map's default scale set to just outside the boundary area of interest - in my case a large long N/S city.
Within our city we have 8 Council Districts of varying size.
I've set up a Category Selector based on Districts, and configured it to 'flash' then 'zoom' to the selected District.
This works - except that when it zooms it actually zooms out instead of in!  I would expect it to zoom to approximate extents of the selected District polygon.  But instead it zooms well outside of the City limits - well beyond the default map scale setting.
I don't believe there is any way to change this in the map or dashboard settings.  I'm hopeful there might be a JSON fix(?).
Do you have any insights on how to correct this?


texts: Geoserver WFS-T not saving edits from QGIS to MS SQL layer

texts:
I added a MS SQL layer from my Geoserver to QGIS.  It will save changes for attributes in the table and it will save the file if I delete features.  However, if I add a feature or change a feature, it will not save the changes and Geoserver returns a commit error:

Errors: ERROR: 1 geometries not changed.
Provider errors: unsuccessful service response: Update error: Error occured updating features

I do not see anything specific in the Geoserver documentation for allowing geometry edits to MS SQL layers.  Am I missing something?  Why does it save deletes and attribute changes but not geometry edits?  Is there a special setting somewhere in Geoserver or MS SQL Sever that allows geometry edits to be saved to a MS SQL layer?


texts: I'm trying to figure out if ArcGIS Online (as our database host) supports ODBC connections. My workflow is such that the data I maintain in ArcGIS Online needs to flow into Adobe Indesign for table populating. In order to do this, I have to use a 3rd party software which allows me to connect ODBC or CSV data sources to InDesign. We're a small company trying to automate anything where we can, and this would make a huge difference in our workflows. Does anyone has any information about what database ArcGIS Online uses, and whether they support ODBC.


texts: I am using geometries in a JavaScript page and it is best to use JSON objects rather than GML which is XML based. I heard of GeoJSON, but is it an OGC open format?


texts: How to export a vector layer to a new layer and take extent from canvas?

texts:
I want to create a new vector layer based on an existing one and the extent should be based on the current extent of the canvas.
How do I do that?

Edit: I am looking for a quick way to do that (a couple of clicks). I don't want to create any additional layers.


texts: Parsing WFS write transaction response in OpenLayers

texts:
When a user modifies the geometry of a feature on my map, I am using WFS to write the new modified feature to the GeoServer. I have verified that this works: the modified geometry is indeed saved in the database.
Also the server responds with an XML payload that, inside a <wfs:TransactionSummary> supplies the correct number of updates (1), deletes (0) and insertions (0). I know that by inspecting the "Network" tab on my browser's developer console.
My question is how to parse this response in JavaScript using the open layers library. I have found the readTransactionResponse method on the ol/format/WFS class but I am not getting the results I expected; instead I get an empty object ({}).
Here's the code:
 const featureRequest = wfs.writeTransaction(
    [],        // inserts
    [feature], // updates
    [],        //deletes
    {
      srsName: 'EPSG:3857',
      featureNS: 'https://geoserver.anon.com/',
      featurePrefix: 'coredb',
      featureType: 'eae_field_geospatial_data'
    });

  return fetch('https://geoserver.anon.com/geoserver/coredb/ows', {
    method: 'POST',
    body: new XMLSerializer().serializeToString(featureRequest)
  }).then( (response) => {
    const tr = wfs.readTransactionResponse(response);
    console.log(tr);
    return tr;
  });

The above code prints {} on the console.
Any ideas?


texts: ArcGIS 10.3 Build Raster Attribute Table fails for large rasters

texts:
I am looking at forest loss in Central and South America within protected and unprotected areas. So I have a binary raster (0 or 1) for forest in 2000 and another raster for forest in 2013. I want to use Zonal Statistics as Table to look at forest loss in each country in protected and unprotected areas (which I have a polygon shapefile for). However, Zonal Stats as Table fails saying it couldn't build attribute table.

When I try to use the Build Raster Attribute Table tool it fails and gives the following error: "Error 000049: Failed to build attribute table." Clicking on the error it says that the rasters need to be integer and single band. But both of my rasters are in GRID format and are single-band, unsigned integer (8 bit).

When I tried clipping the rasters (~500-600MB) into smaller pieces, one for Central America (CA) and one for South America (SA), then the attribute table was automatically built for CA (~60MB), but not SA (~300MB). With the attribute table for CA, I was able to complete my analysis with Zonal Stats as Table. Unfortunately, the Build Raster Attribute Table still fails for the clipped SA raster.

I figured that maybe the raster is still too big, so I clipped the SA raster into two pieces (133MB and 174MB), however the tool still fails on both. I could keep clipping the raster until it is small enough, but that is extremely annoying and inconvenient for the rest of my analysis. Am I doing something wrong with Building the attribute table? There aren't really many options in the tool besides input raster and then overwrite or not (I've tried both ways, doesn't matter).

I've tried turning off Background Geoprocessing, removed and re-added the rasters, tried restarting ArcGIS, and the computer, but same result. Could this be a problem with ArcMap 10.3? I could have sworn that I've dealt with larger rasters than 600MB before in earlier versions, and it was slow but still worked.


texts: Subsetting rasterstack for subtraction between elements using R?

texts:
I want ro calculate the differences between rasters within a raster stack with a certain step, and I am unsure how to do so.

What I want is to subtract every element from its 5th next one, something like layer1-layer5, layer5-layer9, layer9 -layer13 and so on.

I tried to use the following to avoid loops but it does not work.

    r = raster(matrix(1:30,5,6))
    mstack<-stack(r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r)
    msub<-subset(mstack, 1:nlayers(mstack)) - subset(mstack, 1:(nlayers(mstack)+5))


texts: Words from ArcPy Scripts Appear in Map Document?

texts: I created a slope map of the U.S. using ArcPy scripts (ArcGIS 10.2). I just completed the map. However, some of the words from my ArcPy scripts show up in the map document, both in data and layout views. I need to remove this print from the map.


texts: Use R to Create a New Decile Variable in a Shapefile

texts:
I'm getting an error when trying to add a new field (of deciles of my income variable) to my shapefile within R. The error might be related to the fact that the input is a shapefile...

  UseMethod("mutate_") : no applicable method for 'mutate_' applied to
  an object of class "c('SpatialPolygonsDataFrame', 'SpatialPolygons',
  'Spatial')

require(rgdal)
#input data SES field
mydata<-readOGR("C:\\Users\\Desktop\\mydata.shp")
library(dplyr)
deciles = mutate(mydata, quantile_rank = ntile(mydata$income,10))
deciles


texts:
I'm doing a lab and I'm trying to understand exactly why I'm using the tool "minus".

I have a raster which I'm calling "heights". I also have two rasters with water surfaces and watercourse. I have changed the values in the water rasters so that water pixels has the value 10 and noData has the value 0.

I have then used the tool "plus" to put these two rasters together into a joint raster which I'm calling "water" plain and simple.

Now, I am supposed to use the tool "Minus" to put in the water raster together with the raster heights, I can't understand why I need to do that.

My first thought was that the intention is to make sure that it's only the watersurfaces that shows up in my result later on and not land surfaces, but that doesn't seem right.

Why am I using minus in this scenario? It's to lower the watercourses I guess but why is that needed?

The final goal of the lab is to find out from what area of the map a poison is coming from. To investigate this I have made an analysis of the watersurfaces in the area based on the water surfaces data and the flow direction.

When answering the question "why do you have to use minus in this scenario " What I answered was basically

"after I have run the layer heights minus the layer water the watercourses will be lower than they really are in comparison to the surrounding surface. This happens because the pixels in the raster water i have the water values at 10 everything else at 0 (with reclassify). The height data will then get a value that's -10 lower than all the water courses. I'm doing this to get elevation in all the watercourses and in the modell the water will prefer to travel trough the water courses that's within the flow direction area. If I don't do this then some water courses may be without elevation and /or streams will be in the wrong places, even if I have a perfect height model, compared to where the actual streams are. So, I'm using this method to increase the chance that the watercourses are where they should be"

This was dead wrong. The answer I received that it will very well work with a perfect height model and that the height model should do just fine for analyzing. So the answer was wrong, that's not why I was using minus.

I'm totally lost here. No idea why of would use minus if that's not the answer. Any ideas?

This is the layers I'm using:

I convert the polygons and polylines to rasters:

I changed the values with reclassify so that all the water pixels have value 10 and noData has the value 0.

Then I get these layers:

I combine these two layers with "plus" and create a layer I call "water"

Then I use the tool "minus" that I'm having problems motivating why I'm using. I combine the water raster with the height model raster.

Next steps is to Use "fill" on the height layer, flow direction and watershed to control where the poison in the water is coming from. I can also use flow accumulation and snap pour point .


texts: Quantifying polygon changes between shape layers in ArcGIS?

texts:
I have a map with two shape layers from different years, which are made up of habitat polygons, and are the same shape other than changes to the areas of these habitats.

How do I get a table of the habitat changes by area from one year to the next? I want to know how much of habitat A has become habitat B, etc.

I have made a union of both shape files, but don't know where to go next.


texts:
I have a shapefile of points with geotagged photos attached through the Photos toolset, they correspond to a line shapefile that documents a trail taken while hiking. I am looking to create a video of the progress through the trail with the photos displaying at the relevant times (both data sets are time-enabled).

I have experience with the time slider tool but cannot get the photos to display when the points they are attached to are in the time frame, and am completely unexperienced with ArcScene and the Fly tool. I am going to start fumbling around with the fly tool now, but if anyone has any experience with this I would appreciate tips.
Thanks!


texts: How To Determine Frequency Of Overlapping Polygons (Bounding-Boxes)

texts:
My starting point is a series of bounding box polygons, representing the extents of all the data sets in my inventory.

I am trying to produce an output grid showing the frequency of coverage over the the extent of the entire inventory, in my case the world.

I had thought that a combination of Intersect and Dissolve functions would get me what I wanted, but haven't had any success with this approach yet.

Can anyone suggest a better process?  I am open to any suggestions, whether it be some tools already available in ArcMap, QGIS...etc or through programmatic/scripting using ArcPy,GDAL...etc.


texts: Plotting Netcdf data. How to get right projection?

texts:
Maybe it's very easy for someone to fix, but I'a a new one in R, so I really need help. I/m trying to plot data containing lat, lon and variable (nmf2). The grid isn't a regular one, so there are some difficulties with plotting. I've already read Plotting NetCDF file using lat and lon contained in variables and about the other method, but I still can't get the right image. Here is the code:

library(raster)
inputfile <- "F18-SSUSI_EDR-NIGHT-DISK_DD.20150107_SN.26920-00_DF.NC"

lat <- raster(inputfile, varname="PIERCEPOINT_NIGHT_LATITUDE")
lon <- raster(inputfile, varname="PIERCEPOINT_NIGHT_LONGITUDE")

plat <- rasterToPoints(lat)
plon <- rasterToPoints(lon)
lonlat <- cbind(plon[,3], plat[,3])

lonlat <- SpatialPoints(lonlat, proj4string = CRS("+proj=longlat +datum=WGS84"))
extent(lonlat)
#class       : Extent
#xmin        : 0.008961686
#xmax        : 359.983
#ymin        : -84.95161
#ymax        : 89.68419

pr <- raster(inputfile, varname="NMF2_DISK")
proj4string(pr) <- "+proj=longlat +datum=WGS84"

pr
#class       : RasterLayer
#dimensions  : 408, 13, 5304  (nrow, ncol, ncell)
#resolution  : 27.69031, 0.4280289  (x, y)
#extent      : 0.008961686, 359.983, -84.95161, 89.68419  (xmin, xmax, ymin, ymax)
#coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
#data source : C:\Users\Svetlana\Science\GUVI\R\SSUSI\F18-SSUSI_EDR-NIGHT- DISK_DD.20150107_SN.26920-00_DF.NC
#names       : NMF2_DISK
#zvar        : NMF2_DISK

plot(pr)
r <- projectRaster(pr, crs=CRS("+proj=longlat +datum=WGS84"))
plot(r)

the results are like this^

The date is available here https://docs.google.com/file/d/0B6IqnlmRMSpcNFBXWWlha1JUUzQ/edit?usp=docslist_api


texts: How to quantify polygon as potential exposure to points

texts:
I have a set of points and a series of ellipses (polygons) that I can overlay on the points. Let's say that the ellipses represent where an individual spends most of their time—an activity space. And the points represent something bad like crime (it does not in my case, but this makes for a clean example).

I want to use the activity space (polygons) and the "crime data" (points) to quantify someone's potential exposure to an environmental factor like crime.

I don't do much GIS work, so I'd like to get help thinking through it conceptually (and maybe technically at a later point).

I can think of 3 ways of characterizing the activity space in terms of exposure to the points:

Count how many points fall inside of the ellipse.

Create buffers around the points of a certain size and count how many buffers intersect with the ellipse.

Create kernel density estimates and sum the density values inside the ellipse.

Counting points inside the ellipse is clean but it ignores points in close proximity but outside of the ellipse.
Counting intersections with buffers overcomes this limitation a bit but still lacks a way to capture nearby but non-overlapping buffers.
The density appears to capture more information, but it's not as intuitive.

Thoughts about these options? Are there better options not represented here?


texts: Has anyone used ArcGIS for 'automatically' detecting lineaments from a high-resolution (1m) DEM?

texts:
I have a set of DEM's produced from LIDAR data. I am wondering if anyone is familiar with or knew of any published research papers which looked at (semi-)automatically detecting lineaments /or fractures of the Earth surface. I would like to do this in ArcGIS 10.1.
Or is there any way to write an application/code in ArcGIS for it?


texts: What is format of Natural Earth SQLite database GEOMETRY column?

texts:
I need to extract coordinates of polygon boundary points in order to draw a map in my application. Does anyone know what is format of "GEOMETRY" column in this database? It doesn't look like .SHP format, rather something else.

I'm looking for a documentation or explaination the binary data, so I can use it.

This is sqlite example: https://github.com/nvkelso/natural-earth-vector/blob/master/packages/natural_earth_vector.sqlite


texts: Is it possible to change a Geotiffs CRS?

texts:
I have created a Geotiff from the Bing Aerial photography.

As it is automatically in WGS 84 it inserts perfectly into QGIS, however this image is of no use to me outside of QGIS.

I need to convert this referencing system from WGS84 to OSGB 1936.

Is this possible at all?

I am using QGIS 1.8.0 on windows 7 and I am not great with Grass, and need to import the image into AutoCAD at some stage.


texts: Retrieve lineal regression from scatterplot in GEE

texts:
I'm trying to get a lineal regression from scatterplot of two bands in GEE, but i don't how to do It. I was trying to apply over the example of scatterplot available in GEE docs.

// Define an arbitrary region of interest.
var sanFrancisco = ee.Geometry.Rectangle([-122.45, 37.74, -122.4, 37.8]);

// Load a Landsat 8 image.
var image = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_044034_20140318');

// Get a dictionary with band names as keys, pixel lists as values.
var result = image.reduceRegion(ee.Reducer.toList(), sanFrancisco, 120);

// Convert the band data to plot on the y-axis to arrays.
var y1 = ee.Array(result.get('B5'));
var y2 = ee.Array(result.get('B6'));
// Concatenate the y-axis data by stacking the arrays on the 1-axis.
var yValues = ee.Array.cat([y1, y2], 1);

// The band data to plot on the x-axis is a List.
var xValues = result.get('B4');

// Make a band correlation chart.
var chart = ui.Chart.array.values(yValues, 0, xValues)
    .setSeriesNames(['B5', 'B6'])
    .setOptions({
      title: 'LC8 TOA B4 vs. {B5,B6}',
      hAxis: {'title': 'B4'},
      vAxis: {'title': '{B5,B6}'},
      pointSize: 3,
});

// Print the chart.
print(chart);

Any idea?


texts: ArcGIS region group open source equivalent in numpy/python?

texts:
I am trying to get a unique ID for contiguous raster objects with the same value, like what the Region Group tool from ArcGIS does. However I need an open source solution using python/numpy/gdal/whatever. I have searched for a while but haven't come up with anything particularly useful. Any leads/direction for a possible solution out there? With the note that the rasters are rather large, ~50,000 x 50,000 pixels, so I am anticipating memory issues.

I am looking at using the GRASS r.clump tool from this answer, but I have never used GRASS within Python (or at all) and so I am unfamiliar with how to implement it.


texts:
We have a custom WMTS source which we want to show on Android and iOS. What would be my options to do this using native APIs (so no Leaflet or OpenLayers)?

An ideal API not only shows the maps but can also handle the interaction with a map (panning, pinch zoom, detecting clicks etc.). It should also offer us a way to draw figures, images and text on top of the map.

I've tried searching for it online and so far I have come up with Google Maps and ArcGIS. Does anyone know any other native APIs, preferably open source or with a flexible license.


texts: Decrease the volume of vector tiles generated by GeoServer

texts: I've used GeoServer vector tile extension to produce PBF files from set of shape files. The problem is the generated MVTs from GeoServer have larger volume in comparison with Mapbox ones. How can I reduce the volume of each PBF file to be optimized?


texts:
I need the names of countries, country regions and cities of the world.

Where do I get that kind of information?


texts:
I'm running WMS service, that corresponds with OGC standard on WMS 1.3.0 - Queryable WMS "conformance class". It supports both mandatory requests - GetCapabilites and GetMap - and also optional request getFeatureInfo.

I was testing it with requesting the service by the method GET and I wanted to test it via POST request as well, but unfortunatelly, I wasn't able to create proper XML requests, because I haven't found any XSD schema on WMS requests. All I have found is XSD on capabilities (which deals with proper form of GetCapabilites document) and XSD on exceptions (which deals with exceptions format to be machin readable).

That forces me to think, that there is no possibility to request (properly) WMS service by POST request, or is there?


texts:
We have recently purchased some new GPS survey gear (ProMark 500) and we have set up a localization around the town using some of the known survey marks.

While I'm pretty confident that I have got it right so far, I was wondering if anyone had any good tips for setting up a GPS localization.  Is there is anything to watch out for, or things I can do to reduce any error.

Also if anyone has any good articles on the subject it would be greatly appreciated, I'm struggling to find anything good on the net.

EDIT:  While I appreciate the general GPS surveying tips, I was more interested about Localization in general.  Does having localization marks close together negatively affect result. Can you have to many localization marks?  Things like that.


texts: I would like to explore the possibility of using texture in an ecognition algorithm for classifying vegetation. Though, it seems to be based on sub-objects I am not sure how to actually create the sub-objects to get the specific texture value. ecognition "help" does a decent job of explaining what the texture values are, but does not really tell you how to get those numbers or how to add them to an algorithm.


texts: I am using QGIS Atlas to export my work into PDFs. I have created a support polygon layer, which contain rectangles and I use this layer as coverage layer in QGIS atlas. My problem is that I don't know how the pagenumbers work. It change the page order when I update a feature in the coverage layer. For that reason I activated the sort by option, and used the autoincrement id of the coverage layer, but nothing had happened. It looks like the atlas is using kind of time metadata for page numbering. Is there any way I can fix this?


texts: Divide raster map into segments, maintaining georeference in ArcMap

texts:
I have some historical maps so heavily distorted that usual rubbersheeting is possible but already quite problematic. I need 400 control points and more, and performance is abysmal, and "local" results in different parts still aren't always great.
It would be much simpler and cleaner to work,  dividing the map in maybe 25 bits, setting the local parts into their context.
Now, I don't want to georeference them all from scratch as finding their position might be a bit tedious. So I thought it would be great to have an initial position for them to start with.
Is there maybe a way to divide a mosaic dataset? I can't find a tool that would help.


texts: I have upgraded to QGIS 3.4.4 and using the georeferencer and there appears to be shift when zooming in and out of a georeferenced image (Transformation type is Helmert, Resampling Method is Linear and CRS is 27700) which I haven't had on 2.18. Also getting colour issues when zooming out as well. Not sure if anyone has had the issue or knows If I'm doing anything wrong.


texts: Converting raster symbology to vector shapefiles using ArcGIS Desktop?

texts:
I am using ArcGIS Desktop.

I have a satellite raster geoTIFF, the image shows a coastal region with water, rocks, grass.

To display these three features of interest, I've symbolised the raster via a classified style using 3 classes. The automatically created 3 classes respond quite well to the regions of water, rock and grass.

I therefore want to export this classified symbology as a vector shapefile (i.e., 3 shapefiles for the 3 classess. A shapefile for the pixel values that fall in the water values, another shapefile for the pixel values that fall into the rock values and a final shapefile for the pixel values that fall into the grass values).

Is this possible?

I know it is possible to create a classified raster using the supervised classification tools and create training datasets. However, I want to specifically convert the three classes from the automatically created from the classified symbology tab as shapefiles.


texts: Merging speed limit from OpenStreetMap with Ordnance Survey data using ArcGIS for Desktop?

texts:
I am working with the Ordnance Survey ITN layer for the UK road network in ArcGIS. Unfortunately, whilst it has many attributes, speed limits is not one of them.

I have produced roughly accurate speed limits based on the attributes provided, i.e.

DescTerm = A Road

Nature = Single Carriageway

Speed would equal 60mph.

Whilst this is roughly right, in reality, many roads have reduced speed limits through towns etc. OpenStreetMap data has speed limits within it and I would like to bring these across to the ITN layer data. The roads roughly line up but are not always perfect.

I envisage that ArcGIS would somehow snap one road to another and then, with code, bring across the appropriate attributes.

I am looking for some assistance in where to begin with this.


texts: Tutorials GeoJSP API for business intelligence

texts: I need tutorials about geojsp. It's an open source component (GPL) written in Java that adds geography to Business Intelligence Systems. I searched for tutorials but I didn't find anything.


texts: Locating shapefile of European railways for goods transportion

texts:
We are trying to make a project about European goods trade so we need railway data in shapefile format.

More specifically, we are trying to find the potential of mine products being exported from Turkey to Europe by using Geomarketing tools.

Basically, we need a European railways layer for ArcGIS (excluding passenger-only railways).


texts: Correct, full and unambigous data source of layer in QGIS

texts:
I'm currently developing a plugin (python, pyqt4) for QGIS 2.10+. Normal data source which I could use should contain complete path to the loaded layer. For example, my Alaska layer when uploaded normally contains path as:

  /home/user/qgis_dataset/shapefiles/Alaska.shp.

The crucial thing for my plugin is to extract correct data source, which proves to be a problem in certain situations. When layers are uploaded as directory, source looks like:

  /home/user/qgis_dataset/shapefiles|layer_id={num}.

Although I derived a hack to solve this problem there are some cases which still remain problematic. Firstly I tried to use provided source and look for file names that match layer.name(), but what if user changes layer name. Than I must use layer.id() which looks like original_layer_name201709281148. For now I'm using layer.name(), layer.source() and layer.id(), and it would be great if there is some kind of method that returns correct data source


texts:
I went through the documentation, and searched around but wasn't able to figure this out.  What I want to do is export shapefiles, but have certain fields turn off.  I was successful in turning off regular fields with delete.field.management, but I was unable to delete the FID field, so now I am looking into turning the field off, instead of deleting it.  Below is a part of the sample code I am working on before I fill in with my data -

fields= arcpy.ListFields(out_layer_file)

# Create a fieldinfo object
fieldinfo = arcpy.FieldInfo()

# Iterate through the fields and set them to fieldinfo
for field in fields:
    if field.name == "FID":
        fieldinfo.setVisible(field.name, "HIDDEN")

arcpy.MakeFeatureLayer_management(out_layer_file, "New2", field_info)
arcpy.SaveToLayerFile_management("New2", out_layer_file1, "ABSOLUTE")

Most of this was taken from ESRI, there isn't a lot of info on fieldinfo. I am new to python in general and trying to figure this out my error is this:

  type 'exceptions.AttributeError': FieldInfo: Error in parsing
  arguments for SetVisible

Its not the FID field because even if I change it to a regular field I still get the error.

Any ideas - or any other documents on how to go about this?


texts: Rendering layer properties consistently in Print Composer in QGIS

texts:
I have created a layer of lat-long coordinates in the map I am working with that. On the map, I can appropriately size the "simple marker" representing each point for a given zoom. However, when I change the zoom or select a portion of the map to put into print composer, the size of the dots change. The size of the dots then seem to change again (seemingly randomly, though I assume there is some underlying logic that I am not understanding) as I export the print composition as an image. I would like the dots to keep the size of the dots consistent at different zoom levels, especially when exporting the image from the print composer.

In the "Layer Properties > Style" I have tried various combinations of units ("Map Unit", "Pixels", "Millimeters"), but cannot seem to find one that gives me a consistent size across different zooms and, especially, in the print composer and exported image. I have searched around the internet, but have not located anything specifically about this issue.

Is there a way to ensure that the dots representing the points stay a consistent size at different levels of zoom, especially in the print composer and in exported images?


texts:
I would like to use some projections in QGIS that I can't see supported directly. An example would be something like this conformal cube projection. http://www.csiss.org/map-projections/Polyhedral_Globes/Cube_Gnomonic.pdf
Any hints on finding details and using this or similar projections?


texts: QGIS Python variable not updating properly after layer data is saved

texts:
This problem is a continuation of this one

I am running a little script on OpenProject event that sets the feature id automatically after a new feature is digitized.

Code:

def openProject():
from qgis.core import QgsMapLayerRegistry
import os
# Set active layer
#layer = qgis.utils.iface.activeLayer()
layer=None
for lyr in QgsMapLayerRegistry.instance().mapLayers().values():
    if lyr.name() == "Pozos":
        layer = lyr
        break
# Define function to select added feature and add attribute to field "Name"
def update(featureAdded):
    idx = layer.fieldNameIndex('id')
if layer.editBuffer():
    layer.changeAttributeValue(featureAdded, idx, layer.maximumValue(idx) + len( lyr.editBuffer().addedFeatures() ))
# Connect "featureAdded" event to "select" function
layer.featureAdded.connect(update)

As I am using the number of addedFeatures in editBuffer to create the new id. I have a big problem: when the user saves the data, the number of addedFeatures in editBuffer is 0 again and the new ids created after saving are then duplicated.

I suppose that a solution for my problem would be to use:

layer.changeAttributeValue(featureAdded, idx, layer.maximumValue(idx) +1)

instead of:

layer.changeAttributeValue(featureAdded, idx, layer.maximumValue(idx) + len( lyr.editBuffer().addedFeatures() ))

I tried it, but the second solution gives me the same id all the time. I suppose that layer.maximumValue(idx) returns the max id of the saved features and does not take into account the ones in editBuffer.

Antoher approach would be to reexceute the macro when user saves the data of the layer, but I don't know how to do that.

I need same expert help with this issue...


texts: Geo-referencing large PDF files when DXF doesn't work

texts:
I've a 4567kb PDF which won't load even into the georeferencer (stops responding) but a 1538kb one from the same source with the same encoding will. Why? If I drag it it then it loads but won't let me see it without crashing.

I have it in a DXF as well and if I drag it in or import as a vector layer  then 'not valid or a supported data source' if dxf2shp then mini dump, if using the updated DXF import/convert plugin then I get 'Plugin Fehler: process 'gdalogr:convertformat' could not start please restart QGIS'.

Why are none of these working/any solutions? Can see the files in DWGSee/Acrobat so it can't be the files, but using a fairly slow computer so is it just inadequate processing capacity?

Using 2.18.3 but have tried 2.16.3 and 2.6.1 as I still have them on the computer.


texts: How to display only layers where is my selection in clipper?

texts: I'm using the Raster->clipper plugin to clip raster layers but I've a lot of layer and every time I have to search the right one in the big list in the input raster file. I would like to see the list of only the layers contained in the selection and not the list of all the rasters layers of the project.


texts: Copying categorized colors from line object to point object using QGIS?

texts:
I have two layers in QGIS one with point geometry and one with line geometry. Both layers have the same value in the "identification_id" column so I want to copy the colors (categorized by the identification_id) from the point layer to the segment layer. If both were point layers (or line layers) I would just simply right click on the layers and copy and paste the style..

The layers contains hundreds of different values for the identification_id so making it by hand would take too long time..

Any suggestion?


texts: How to get leaflet polyline segment length?

texts:
I'm working on a project that plots out some pipes on a leaflet map, these are displayed on the map as polylines with arrows showing flow direction.

i am feeding the data in as geojson linestrings via ajax.

each "pipe" has multiple segments and i am calculating the approx total length of all segments server side and putting it in as a property of the linestring. this all works fine. the problem is, i also need the length of each segment.

i am having no luck figuring out how to get the start and end of each segment of a polyline in leaflet, if i could get the start and end coordinates i could use the haversine formula to work out the approx length.

if i cant figure this out i will have to make 1 linestring for each segment, and will loose the ability to calculate the total length server side as well as make my geojson file HUGE as it will have to store the properties for each segment of a line, not a big issue if it has only 2-3 segments, but if it has 20,30,100 or more segments it will be huge.


texts: Converting latitude, longitude (epsg:4326) into EPSG:3857?

texts: I'm looking to study the math involved to see how a given latitude and longitude in decimal degrees can be converted to EPSG:3857. Can anybody point to a good reference or a possible Ppython/C/C++/Java library source code for checking the math?


texts: How to export layer attribute table to specific worksheet of already existing Excel workbook?

texts: How to export a feature layer attribute table to a specific worksheet of an already existing Excel workbook?


texts: Saving as/export results of GeoVisual Search (Descartes Labs)

texts:
I am working with satellite imagery processing.

I'm using this service to search for some objects in the US:

https://search.descarteslabs.com

Can I export about 1k results, for example, to KML or CSV/TXT with geographic coordinates?

Or, maybe, there are other services for finding some objects on satellite imagery (area of the US) with a possibility to save/export results of this searching.


texts: Calculating statistics for discrete regions in feature collection using Google Earth Engine

texts:
I am working on a script for calculating burn area statistics for multiple regions of interest using dNBR. The original script calculated burn area on a single region defined by a polygon and I've attempted to build upon it. I've gotten a bit stuck and seek some advice on the best way of approaching the following workflow.
The workflow I'm aiming for is:

Import .shp containing buffers around points of interest
Run script to calculate burn area statistics for each individual region
Append resulting statistics (burn area in hectares for each burn severity class) to the feature collection and export the result.

Can .set be used with lists?
Desired fields to be added to the feature collection are: 'NA', 'High Severity', 'Moderate-high Severity', 'Moderate-low Severity', 'Low Severity','Unburned', 'Enhanced Regrowth, Low', 'Enhanced Regrowth, High'
Full script here:
https://code.earthengine.google.com/6151358ab2813de7ffe6831fb5b43cd2
Problem child in lines 272 to 312, visible below:
//                      ADD BURNED AREA STATISTICS FOR EACH OBJECT

// count number of pixels in entire layer
var allpix_hotspots =  classified.updateMask(classified);  // mask the entire layer

var pixstats_hotspots = allpix_hotspots.reduceRegions({
  reducer: ee.Reducer.count(),               // count pixels in a single region
  collection: buffer,
  scale: 30
  });

var allpixels_hotspots = ee.Number(buffer.get('sum')); // extract pixel count as a number

// create a function to derive extent of one burn severity class
// arguments are class number and class name
var areacount_hotspots = function(cnr, name) {
 var singleMask_hotspots =  classified.updateMask(classified.eq(cnr));  // mask a single class
 var stats_hotspots = singleMask_hotspots.reduceRegions({
  reducer: ee.Reducer.count(),               // count pixels in a single class
  collection: buffer,
  scale: 30
  });

// severity classes
var names2 = ['NA', 'High Severity', 'Moderate-high Severity', 'Moderate-low Severity', 'Low Severity','Unburned', 'Enhanced Regrowth, Low', 'Enhanced Regrowth, High'];

var pix_hotspots =  ee.Number(stats_hotspots.get('sum'));
var hect_hotspots = pix_hotspots.multiply(900).divide(10000);                // Landsat pixel = 30m x 30m --> 900 sqm
var perc_hotspots = pix_hotspots.divide(allpixels_hotspots).multiply(10000).round().divide(100);   // get area percent by class and round to 2 decimals
buffer.set({names2: hect_hotspots});
};

// execute function for each class
for (var i = 0; i < 8; i++) {
  areacount_hotspots(i, names2[i]);
  }

print(buffer);


texts: Understanding the difference between coordinates projection in OSM and Google Maps in China

texts:
I'm looking at the coordinate differences between Google Maps and OSM. I'm a noob in the technicality behind GIS.

Having read:

EPSG 3857 or 4326 for GoogleMaps, OpenStreetMap and Leaflet
How to adjust the difference between the coordinate from OpenStreetMap and Google Maps

I'm not sure whether is it because of #1 or #2 that causes the difference for the same coordinate that appear few hundred meters on the projected map.

And the differences between the data stored and the projected map when using lat/long.

Thanks!

EDIT

This may be more specific to China and the infamous offset issue.

Looking at the following coordinates: 31.230548,121.470965 for the
Shanghai Art Museum on Google Maps and ditu.

Having entered the same set of coordinate in OSM, it gives me the Shanghai Art Museum is about 400M away in the NW direction.

I don't understand why a physical point in space is different on the projected maps? Is this specific to China?


texts:
I am looking at a software development project where we will make the software open source.  The GUI will have icons, and I like the look and feel of some of the icons on QGIS 2.0.  Are there any licensing restrictions or issues with using icons from the QGIS project in other software development projects?

Thanks...


texts: How to calculate the shortest geographical distance between a line and a point?

texts:
I'm trying to calculate the shortest distance between a line (described as a pair of [lat, long]s) and a point (lat, long) accurately.
I've read many Wikipedia pages, but I'm new to the topic. I've read this question, but I'm still confused, because they say that

  Literally, a "straight line" will pass beneath the earth's surface.

while my line lies on the surface of the Earth. How can I calculate this?


texts:
I'm getting use FillSinks by ArcHydroTools but some problems are happen.

I use this code:

import arcpy
import ArcHydroTools
from arcpy import env
ws = env.workspace = r"C:\Users\fractal\Desktop\python_teste\projecaoMiriab2.tif"
output = "C:\Users\fractal\Documents\ArcGIS\Layers"
ArcHydroTools.FillSinks(ws, output)

and this error appears:

  arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
  ERROR 000840: The value is not a Raster Layer.
  Failed to execute (FillSinks).

I already tried to change my raster to format .lyr but it doesn't work.

What should I do?


texts: What are all the straight lines on old nautical charts?

texts:
I was checking out this old VOC chart, and I couldn't help but notice a pattern that I've seen on most nautical charts of the time: lines that to me seem to be just every possible line one can draw.

Are these lines helpful in some way, for instance when plotting courses? My best bet is that they're meant to be used like today's windrose on modern maps, but I can't seem to figure out how exactly.


texts: Cannot get the LocalFeatureService to start when transporting code and data

texts:
I have a C# project that uses a LocalFeatureService, a LocalGeoprocessingService and a LocalMapService. Everything runs fine when I run it at my own machine. However, when I transport the code and data (including packages) to another machine, and try to run the code, it is not able to start the Local Feature Service.

I'm not sure yet if the other services will start successfully, because it bombs at the Local Feature Service.
The error messages are:
      LocalServerException was unhandled.
      Service Failed to initialize.   Error code 500
      Feature service creation failed

Everything is there, so what might I look for to understand why the service doesn't start?

Thanks!


texts: Geoprocessing using large image service in ArcMap

texts:
I am using ArcMap 10.4.
I'm trying to use the Extract Multi-Values to Points tool on an image service raster layer. It runs, but just produces a column of <Null> in the attributes. I've done a bit of research and think this is due to the maximum request limit.
I've tried using the Make Image Server Layer tool, but this produced the following warning:

WARNING 000950: Output raster exceeds the size limitation (rows: 4100
and columns: 15000) defined on the image server. Please input smaller
extent.

and the Extract Multi-Values to Points tool still returned <Null> values.
How can I get around this? I wonder if it would be possible to loop through the image service, using image server layers of 15000x4100 and performing Extract Multi-Values to Points on those?


texts:
I did this:

dojo.connect(featureLayer, "onUpdateEnd", function() {
        var defaultSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([0,0,255]));
        dojo.forEach(this.graphics, function(graphic){
                graphic.setSymbol(defaultSymbol);
            });
});

I'm not satisfied with this solution because when I add new features to the layer they are added with a default symbol (black circle). Do you know how to set up symbols for the layer once and for all?


texts: PostGIS - ST_Collect but only include POLYGONs not POINTs?

texts:
In PostGSI, is there anyway to turn a GEOMETRYCOLLECTION into a MULTIPOLYGON by dropping all non-POLYGONs/non-MULTIPOLYGONs?

I'm doing a query that cuts a bunch of geometries (using ST_Intersection) and I want to group them together. I'm using ST_Collect to turn this into a GEOMETRYCOLLECTION. I could use ST_Union, but that's slower. Is there an alternative approach where I can drop all the non-POLYGONs/non-MULTIPOLYGONs from a GEOMETRY collection and just return a MULTIPOLYGON?

I know would be less accurate than ST_Union, but it should be faster. For what I'm doing a small hit in accuracy is worth it if it speeds it up.


texts: Importing Leaflet Draw NGX for angular 4

texts:
I followed the steps from the main git:
https://github.com/Asymmetrik/ngx-leaflet

first I installed the required libraries (leaflet, leaflet-draw, leaflet-ngx, and leaflet-draw-ngx)

then I declared the required directive imports in app.module.

In my view I set the following:

but I get the following error:

> Uncaught Error: Template parse errors:
Can't bind to 'leafletDrawOptions' since it isn't a known property of 'div'. ("fletDraw [leafletOptions]="options" [leafletLayers]="layers" [leafletLayersControl]="layersControl" [ERROR ->][leafletDrawOptions]="drawOptions">

 <table class="table table-striped c"): ng:///gxxxx.html@0:258
    at syntaxError (compiler.es5.js?524d:1689)
    at TemplateParser.parse (compiler.es5.js?524d:12802)
    at JitCompiler._compileTemplate (compiler.es5.js?524d:26852)
    at eval (compiler.es5.js?524d:26772)
    at Set.forEach (<anonymous>)
    at JitCompiler._compileComponents (compiler.es5.js?524d:26772)
    at eval (compiler.es5.js?524d:26659)
    at Object.then (compiler.es5.js?524d:1679)
    at JitCompiler._compileModuleAndComponents (compiler.es5.js?524d:26658)
    at JitCompiler.compileModuleAsync

I am new to angular 4, I'm I doing something wrong ? or is it related to ES version ?


texts: Reading non-spatial Access tables with ogr2ogr

texts:
I am trying to read a whole Access database into Postgis using the ogr2ogr (Version 1.9.1) command.

For some reason however, it only reads spatial tables and no non-spatial tables. All my attempts to overcome this problem so far have failed^.

I have tried configuring options such as "-nlt None" or "SET PG_LIST_ALL_TABLES=YES"

How is it possible to read ALL tables and not only the spatial tables?

This is the command I've used:

ogr2ogr --config PG_LIST_ALL_TABLES YES -f "PostgreSQL" PG:"host=localhost user=postgres dbname=ele_schnottwil password=bsb port=5432" C:\ele.mdb -a_srs EPSG:21781 -overwrite -skipfailures

I know PG_LIST_ALL_TABLES is a Postgis driver command but I read this could be used for the ODBC driver, too.

Can anyone see the problem or help me out.

Thanks so much in advance.

Best regards, Arne


texts: Installing QGIS on Ubuntu xenial - QGIS nightly repo?

texts:
I'm having major problems installing QGIS3 on my Ubuntu 16.04 system...

I followed a recently posted answer. Even after adding the deb qgis.org xxx line to /etc/apt/sources.list, the only thing it installs is a really old one, QGIS 2.8.

I also tried to edit the sources file to only contain https://qgis.org/debian-nightly/. I tried the following sequence of commands on a) a fresh (was acutally a fresh install) and b) a fully commented /etc/apt/sources.list file:

sudo sh -c 'echo "deb http://qgis.org/debian-nightly xenial main " >> /etc/apt/sources.list'
sudo sh -c 'echo "deb-src http://qgis.org/debian-nightly xenial main " >> /etc/apt/sources.list'

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CAEB3DC3BDF7FB45
sudo apt-get update
sudo apt-get install qgis

For a): QGIS 2.8 was installed

For b): Package 'qgis' has no installation candidate

I just switched to Linux from Win, so I might not know all the tricks.. I also saw this post on how to specify the repository when you're installing smth. I didn't really understand how to make this work with the QGIS nightly repo: sudo apt-get install -t xenial qgis?! I don't think so..

Is anyone patient enough to quickly outline the steps for me?


texts: Looking for a way to concatenate two fields on the fly when defining a FeatureCollection

texts:
I was looking for some way to concatenate two fields on the fly when defining a FeatureCollection.  Perhaps something using some combination of .select, .setMulti or .cat but haven't been able to determine what the syntax would be.  I was hoping to avoid mapping across the Features as it is a very very large FetureCollection.  So hoping for something along the lines of (this obviously doesn't work, but for illustration):

var myFC = ee.FeatureCollection('users/path/mytable').select(['FIELD1', 'FIELD2'], ee.FeatureCollection.setMulti(FIELD1.cat(FIELD2)));


texts: ogr2ogr: How to convert Oracle tables DBF

texts: I wish to convert a layer that has no geometry field from Oracle to the Esri Shape format (DBF file only). I can do it manually from within QGis but I'd like to automate the process and use ogr2ogr (or a similar tool) instead, as I have dozens of such layers.


texts: Why do we georeference from the image to the shapefile (and not the other way around)?

texts: Why do we georeference going FROM the image, TO the shapefile (and not the other way around)?


texts:
I have faced with a problem to run QGIS 2.14, and 2.18 version.

During reloading it pops up an error message called 'GeODin is not found'.

What can I do?


texts: Mouse Scroll in ArcGIS different from that of Google Maps?

texts:
On moving the mouse scroll forward, the map Zooms-Out in ArcGIS while it Zooms-in in Google Maps.

Can it be changed to match the Google behavior?


texts: OGR error: file location not a directory

texts:
I have an Excel file that I converted to CSV. Then I used MMQGIS to geocode CSV with web service. Then I use the OpenStreetMap as the type of web service. I make sure the to be converted file is going to the right folder. Once I've applied it and it finished converting it tells me:

Failure creating output file: Creation of data source failed (OGR
error: H:\Mijn
documenten\GIS\Projects\1.KGV\Shapefile\Clubhuizen\clubhuizen.shp is
not a directory.).

I checked the CSV file and its exactly the same as my another file that I geocoded succesfully. What went wrong?


texts: How to find the shortest path within a polygon?

texts:
I am trying to find a way to calculate the shortest path from one point to another without crossing the boundaries of a polygon. I would like to do it with QGIS as I do not have access to ArcGis.

It thought of a solution using network tools:
1) Fill the polygon with a given number of points
2) Generate all the possible links (figured as line vectors) between every pair of points
3) Suppress all the links that intersect my polygon boundaries
4) Use GRASS to calculate the shortest path between two given points

My problem is that I do not find a way to manage the 2nd step.

I found the "Flow Mapper plugin" in QGIS, but I really can't figure out how I am suppose to use it.

Any help would be more than welcome! :)
Thanks a lot

Damien


texts: Using arcpy.FieldMappings() to load data into tables

texts:
I have been tasked with bringing in a dataset from one table with a hard and fast schema into another table with the same. Both tables have very similar fields, but the names and capitalization are slightly different across 133 fields in each table. I have tried using the arcpy.FieldMappings() object and it evades me. I have done several online searches and I managed to find couple of code pieces that almost get me there, but my code still refuses to do the append. The problem appears to be that the fields are shifted in the list and the mappings aren't picking up the proper cross referencing. Particularly, the code fails with one of these two error messages, depending on which variables I am feeding to the fMap object.

AttributeError: 'FieldMap' object has no attribute 'addOutputField'
NameError: The attribute 'outputField' is not supported on this instance of FieldMap.

I do have a cross-reference table built into my GDB that does the field matching. It explicitly lists each input field (in_raw_table) and matches that field with an output field in the output table (in_table).

Here is the code I am using. Quite a lot of it was sourced from an online GIS blog that I found on this subject.

import arcpy
import sys
from arcpy importenv
inPGDB = 'U:/Aquadat/Aquadat.gdb'
arcpy.env.workspace = inPGDB
arcpy.env.OverwriteOutput = True
in_table = 'AquaDat_Incoming'
in_raw_table = 'AquadatRawTable'
xrefTbl = 'AquadatXrefTable_Incoming'
fields = ['SOURCEFIELD_XLS','TARGETFIELD']

def importFromExcel():
    arcpy.env.workspace = inPGDB
    print "Incoming Excel file: {0} \nIncoming Excel sheet {1}".format(inExcel,inSheet)
    arcpy.ExcelToTable_conversion(inExcel,in_table,inSheet)
    print "{0} raw table created".format(in_raw_table)

# define function to get unique field values from a table
def GetUniqueFieldValues(table, field):
    """
    Retrieves and prints a list of unique values in a user-specified field

    Args:
        table (str): path or name of a feature class, layer, table, or table view
        field (str): name of the field for which the user wants unique values

    Returns:
        uniqueValues (list): a list of the unique values in the field
    """
    # get the values
    with arcpy.da.SearchCursor(table, [field]) as cursor:
        return sorted({row[0] for row in cursor})

# get a list of unique input feature classes
print "Listing the unique input fields."
inputs = GetUniqueFieldValues(xrefTbl, 'SOURCEFIELD_XLS')

# get a list of unique output fields
print "Listing the unique output fields."
outputFields = GetUniqueFieldValues(xrefTbl, 'TARGETFIELD')

# create an empty field mappings object
print "Creating an empty field mappings object."
fm = arcpy.FieldMappings()

# build the field mappings object
print "Building the field mappings object."
for f in outputFields:
    print "\t" + str(f) + "..."
    # create a field map object
    print "\t...Creating a field map object."
    fMap = arcpy.FieldMap()
    with arcpy.da.SearchCursor(xrefTbl, fields, """{0} = '{1}'""".format('SOURCEFIELD_XLS', f)) as cursor:
        for row in cursor:
            name = row[0]
            nameStr = str(name)
            # add the input field to the field map
            print "\t...Adding " + nameStr + " as an input field."
            fMap.addInputField(in_raw_table, name)
    # set the output name
    print "\t...Setting the output name."
    outputFieldName = fMap.outputField
    outputFieldName.name = f
    fMap.outputField = outputFieldName

    # add the field map to the field mappings object
    print "\t...Adding the field map to the field mappings object."
    fm.addFieldMap(fMap)

print "\nAppending!"
arcpy.Append_management(in_raw_table, in_table, "NO_TEST", fm)

I guess the long and short of it is that I have no idea how to use this thing and could use some help.


texts: Altered projection in Google Earth Engine, how to correct?

texts:
When I create a collection (named here geeCol) using Google Earth Engine, the projection displayed by geeCol.first().projection().getInfo() returns:

{'type': 'Projection', 'crs': 'EPSG:4326', 'transform': [0.25, 0.0, -180.0, 0.0, -0.25, 90.0]}

Based on this thread, I wrote a function that takes the average of multiple images within a time defined in days:

def makeComposite(collection, start, count, interval, units):
    sequence = ee.List.sequence(0, ee.Number(count).subtract(1)) # Create a sequence of numbers, one for each time interval.
    originalStartDate = ee.Date(start) # Original start date

    def col(i):
        startDate = originalStartDate.advance(ee.Number(interval).multiply(i), units)
        # Get the end date of the current sequence.
        endDate = originalStartDate.advance(ee.Number(interval).multiply(ee.Number(i).add(1)), units)
        return collection.filterDate(startDate, endDate).reduce(ee.Reducer.mean())
    return ee.ImageCollection(sequence.map(col))

When I map this function on to my collection, the new projection is:

{'type': 'Projection', 'crs': 'EPSG:4326', 'transform': [1.0, 0.0, 0.0, 0.0, 1.0, 0.0]}

Since  'crs' is preserved but 'transform' is changed, I am wondering if:

This discrepancy really matters when I export my data to a csv
If it does, what is the appropriate way of redefining the 'transform' field of the projection? Since the function does not appear to truly change the projection, is it a matter of (i) using image.reproject() or (ii) image.setDefaultProjection()?

In other terms, I am unsure whether it is a matter of re-projecting the entire image or just to correct a field that was lost.

Merci!


texts: Is there a way of changing the rendering settings on QGIS so that only the visible map extent renders? It seems that all layers are rendered to the full layer extent. I'm trying to speed rendering up and have changed any settings in settings>options>rendering which I thought would help (including simplification, caching etc) and they have had an impact, but thought the visible window functionality would be helpful. Does it exist?


texts: My ArcGIS online map keeps breaking, says it can't show base map

texts:
I have an ArcGIS online map I have made here: http://arcg.is/2gTY9wt

It seems to work fine while I am editing it and then save it and open it.

But if I come back the next day and open it again it gives me the message "Something went wrong, the map did not load correctly."

Even if I change the base map and resave it it will seem to work then (but not always). But if I open it later it seems to have that basemap problem.

So I am looking for a way to save the correct basemap into each of maps and have the application show all of them.

Actually the link in the question is it to the web app. But I actually want the 5 maps in the app. I will place the links for each of the maps here. But now it isn't even opening the map with the data.

http://www.arcgis.com/home/webmap/viewer.html?webmap=de9a0021338a4fafad3320cdb06123a9


texts: Optimising Min/Max temporal raster search in python/gdal

texts:
I need to search across ~100 1200x1200 raster tiles and produce a min and a max raster. Along the way i also want to exclude values that are over 1 or less than 0. What would be the quickest method to do this in python with gdal? I was previously loading all the rasters into memory and then looping over the pixels, but this seems the slowest possible method.

Thanks!


texts: Unable to add feature class based on database view in ArcMap

texts:
To solve Rendering features based on relationships using ArcGIS for Server?, we created a view in the database that joins the two tables together. That works fine. I see the feature class in ArcCatalog and can view the features in the preview window. But when I try to add the feature class in ArcMap, nothing happens (ArcMap seems to be working for a few seconds but nothing changes) - and no error message either. Is there something that needs to be done so that I can add it to a map?

We created the view as a simple join between the two tables, selecting the shape from the feature class and some attributes from the table. When viewing the class in ArcCatalog it's called feature-class instead of sde-feature-class, but the option to register the class with the geodatabase is greyed out.

We're using Oracle as our DBMS and the view is defined as follows (note that I simplified my context; as such, the names of the attributes in the SQL are not the same as in the screenshot but only differ in name):

SELECT a.statusinfo, b.objectid, b.shape, a.workpackage, a.objectid as status_oid
FROM statustable a, buildingtable b
WHERE a.refobject = b.objectid AND a.buildingclass = 'specificbuilding'
    AND a.statusinfo IS NOT NULL
ORDER BY b.objectid

This is what the feature class looks like in ArcCatalog:

And this is what the context menu looks like:

Sorry for using a german interface, I don't have a environment with english culture settings right now.


texts: How to correctly upload shapefile into PostGIS on Ubuntu?

texts:
I want to know how to use upload shapefile via Postgis. Can you please help me?

.com/nsVuQ.png


texts: Make specific objects not identifiable in QField

texts:
Some objects of my layer have empty attribute table. Is it possible to make them unidentifiable - like eg. all objects of layer marked as unidentifiable in QGis project settings?

EDIT: Maybe I haven't described it properly, but I want to make unidentifiable only SOME elements of layer, not ALL


texts: Qfield 1.4.4 - value relation widget working on QGIS and not on Qfield - list of invisible unfiltered values

texts:
I am trying to use value relation widget (working on QGIS) in Qfield (which should be implemented in the latest releases).

I'm trying to use the widget to filter a long list of plant species.
A first table contains all the letters of the alphabet.
A second table contains the species and a field with the respective initial of the species.

The polygonal gpkg vector (habitat) requires to fill two fields for the insertion of a species. The first field allows you to choose the initial letter. In the second field you choose the species in a list filtered with the initial letter chosen previously.

On QGis it works, while on Qfield I see the first field (alphabet letters) and I can choose the letter. But when I open the species dropdown menu I see a long, empty, white dropdown menu.
In reality it is the complete list (unfiltered) but invisible (I understood it by choosing at random and then reimporting the project in QGIS where fields where filled, but not filtered on the initial).

I tried with the two tables saved as gpkg, spatialite, csv and dbf.
In none of the cases did it work.

Tested with version 1.4.4 and 1.5.1 - Piz Palü.
Tested with Tablet Samsung Tab Active 2 and Smartphone Lenovo P2

Here a couple screenshots


texts: TileMap: How to convert MBTiles to RMaps SQLite?

texts:
These two map formats look very similar (based on SQLite and Tiled Maps).

I am looking for method to convert maps from mbtiles to RMaps SQLite and vice versa without quality lost.


texts: Displaying length of feature on page in print composer?

texts:
I'm making a map for a walking trail in QGIS. In the below screenshot, the red line is the trail.

The trail is about 60km in length in total, but on this page of the map, the trail is about 23km long (I eyeballed this, it's probably off by a bit).

The trail is a single, long line feature.

What I would like to do is have the length of the trail on this page of the map be displayed.

I know that I can get the total length of the feature, but I haven't got the faintest idea how to measure the trail on a per-page basis.


texts:
If we have a public web site, and use OSM as the background, is any data also open source?

The use case I'm looking at is a site to report pot holes, where we'd like to have a map showing a location and allow the member of the public to click on the actual location of the pot hole. This would then be added to the back office application that handles road repairs

Would this data be "open"?, i.e. we would have to publish it for anyone else to use?


texts:
Is anyone aware of a source for QGIS Style Libraries which mimic the MassGIS base map on their Oliver mapping website?
I've poked around MassGIS, Github, and a general Google search and haven't located anything as of yet.


texts: ArcObjects: How to get the Cell Size from the raster.MeanCellSize call?

texts: When I setup the call to MeanCellSize -- for which ESRI documentation states will return the mean average of the cell size -- all I get is an IPnt object.  I've played with a ton of the various casts but cannot figure out what to cast it to so that I can actually get a value for the mean cell size!!  Has anyone figured this out?


texts: Accessing JavaScript modules in Google Earth Engine

texts: I am trying to use some of the functions in the math.js module for JavaScript within Google Earth Engine, but I can't seem to import or cut and paste the math.js script because it is too large. Has anyone used math.js on the client side of Google Earth Engine?


texts:
Is it possible to put EPSG:3035 WMS layer over Google Maps or OSM?
I managed to do this, but my WMS layer is placed differently then Google Maps or OSM. I assume, Google Maps/OSM uses different projection.

I was wondering is it possible to show my EPSG:3035 WMS layer over "map" (without transforming my WMS data)?

I managed to put my WMS layer in correct position, but then WMS layer "gets" curved and OpenLayers fills rest of the square black - which is bad.


texts: Can I view a Postgis Geometry Array in QGIS?

texts: I've got an array of geometry as a column in a postgis database. Is it possible to view the data (even the n'th element?) in qgis?