texts: Initializing properties with values stored in the project on a custom QgsMarkerSymbolLayer

texts:
I try to write my own QgsMarkerSymbolLayer as a plugin with PyQGIS. The symbol has a specific property ("heading" in this case). I follow the sample from PyQGIS Cookbook and I replace "radius" with "heading". The value of "heading", modified with my custom QgsSymbolLayerWidget, is correctly stored in the project (qgs file).

When the project is re-open, which method must be overwritten for initialize the value of "heading"? The constructor of my own QgsMarkerSymbolLayer is always called with the default value.

I'm using QGIS 3.12.0.


texts: Disable popup on double click event on Mapbox GL map

texts:
How to disable 'show popup' on 'double click' (show popup only on 'single click' event) event without disabling 'zoom in' (or 'zoom out' (with Shift button))?
Mapbox GL jsfiddle example


texts:
I've no clue how to solve this issue in the exercise that I'm trying to perform.

The point where I'm stuck is 4. "Create signature file as LandsatCompS.sgs". I've done what it says in the exercise. I got a error message "Failed to create signature file.

The aim of the exercise is to carry out a supervised image classification of the Northern
half of Jutland.

Start ArcMap and add the Landsat images from the B series (summer images).
Create a composite image composite image for all bands except band 6 – the thermal
band. Save the image as LandsatCompS (S for summer).
Open the orthophotos for land (not urban). Add eventually more orthophotos from the
Geodata library. Try to identify the necessary number of different land cover classes to
cover all areas on the orthophotos. Not more than 15!
Open the Image Classification window, and start digitising training areas. Two for each
class. Create the signature file as LandsatCompS.gsg.
Carry out maximum likelihood classification using LandsatCompS as input raster and LandsatCompS.gsg as signature file. Output is ML_class_NJ1. Use default values for the other inputs.
Put the right colours on the new map and compare with the orthophoto and other maps available for Northern Jutland.
Where are the problems? Try to make an improved classification by increase the number of classes and digitise new training areas. Carry out the classification and assess the result. Which one is best?


texts: point to point distances along road network

texts:
I have 2 different point layers that I want to use as origins (Company offices) and a separate layer with 500+ points in it (Client Stores) I also have a road network layer.

For each of the 500+ stores I would like to have a field in the attribute table showing the distance along the road network back to each of the Offices.

I currently use QGIS.


texts: Calculating distance to a fixed point on a map

texts:
I have a point with latitude 40.7127837 and longitude -74.00594130000002

I have imagined this point on a plane like this

Latitudes run from West to East and longitudes run from North to South

Can i use a latitude only or longitude only to know how far an object is from the value of the longitude or latitude that i know?.


texts: Determining if line A is subset of line B in PostGIS?

texts:
I have two datasets of linestring features, both of which are from the same source and nearly identical but with minor changes.  One of the changes that I need to identify is when one line feature is split into multiple separate features, but with otherwise identical geometry.

So the original line, we'll call it B, is defined as the following sequence of points:

[V, W, X, Y, Z]

Line A is defined as:

[V, W, X]

How can I write a SQL query that will return True if line A is a subset of B ?  I thought the ST_Covers function would work since every point in A is in B, in the same order, but the function seems to only work with polygons and has strange behavior around edges


texts: Getting wrong results in Search Cursor of ArcPy/Python script?

texts:
I have two functions:

First one will crated the feature layer
second one will access the same created layer and prints the result.

when i run my script first time it will print the wrong results. when i run it second time it will prints correct result...

Wrong Result Script running 1st Time:

getting access to map layer 2

(repeated many times)

.

Correct Result: Running script second time
1. layer which is creating contains only 5 Rows so my script prints only 5 messages

getting access to map layer 1

repeated for all layers.

Script:

# import system modules
import arcpy
import math
import sys
import traceback
from arcpy import env

# Class to Build Boundry of Districts

class Build_Boundry:

   def __init__(self, workSpace,mapLayerFinal,censusLayer,totalDistricts,mxdLocation):
      self.workSpace = workSpace
      self.censusLayer = censusLayer
      self.mapLayerFinal = mapLayerFinal
      self.totalDistricts = totalDistricts
      self.mxdLocation = mxdLocation

   # Function to Calculate Average of Total Voters in each District
   def boundry(self):
      arcpy.AddMessage("Building Boundry of Districts ")
      if arcpy.Exists(self.mapLayerFinal):
          arcpy.AddMessage("Layer Already Exist.....")
          print(self.mapLayerFinal)
      else:
          arcpy.MakeFeatureLayer_management(self.censusLayer, self.mapLayerFinal,"DISTRICT_ID BETWEEN 1 AND "+str(self.totalDistricts),self.workSpace)

          # Execute Dissolve using LANDUSE and TAXCODE as Dissolve Fields
          arcpy.Dissolve_management(self.mapLayerFinal, str(self.workSpace)+"/"+str(self.mapLayerFinal), "DISTRICT_ID", "","MULTI_PART", "DISSOLVE_LINES")
          print(self.mapLayerFinal)
          arcpy.AddMessage("Boundry of Districts Calculated")

          mxd = arcpy.mapping.MapDocument(self.mxdLocation)
          df = arcpy.mapping.ListDataFrames(mxd, "")[0]
          addLayer = arcpy.mapping.Layer(self.mapLayerFinal)
          arcpy.mapping.AddLayer(df, addLayer,"BOTTOM")
          mxd.save()
          arcpy.RefreshTOC()

          del mxd, addLayer

      return;

# Class to Calculate Compactness
class Calculate_Compactness:
   def __init__(self, workSpace,mapLayerFinal):
   self.workSpace = workSpace
   self.mapLayerFinal = mapLayerFinal

   # Function to Calculate Compactness
   def compactness_quotient(self):
      arcpy.AddMessage("Calculating Compactness Quotient")
      with arcpy.da.SearchCursor(self.mapLayerFinal,["Shape_Area","DISTRICT_ID","Shape_Length"]) as rows:
          print "layer "+str(self.mapLayerFinal)
          for row in rows:
              area = row[0]
              district_id = row[1]
              perimeter = row[2]

              print "getting access to map layer "+str(district_id)

          print "Calculating Compactness Quotient Process Complete"

      return;

folder = "C:/Users/Abrar ahmad/Desktop/CASES/Rural/Case_1_Boundary_Input"
mxdLocation = r"C:/Users/Abrar ahmad/Desktop/CASES/Rural/Case_1_Boundary_Input/New_Rwp_Cencus.mxd"
workSpace = "C:/Users/Abrar ahmad/Desktop/CASES/Rural/Case_1_Boundary_Input/Selected_BU2.gdb"
env.workspace = workSpace

censusLayer = "Rural_Area_Rwp"
districtsLayer = "Existing_District_Boundary"
totalDistricts = int(5)

mapLayerFinal = str(districtsLayer)+"_map"

# Function to Build Boundry
boundry = Build_Boundry(workSpace,mapLayerFinal,censusLayer,totalDistricts,mxdLocation)
boundry.boundry()

cc = Calculate_Compactness(workSpace,mapLayerFinal)
cc.compactness_quotient()


texts: I am creating a database which has to consist of images (the images are older survey PDF plans that I have been saved as jpgs). I understand the feature has to be in a geodatabase, then the attribute column has to be a raster type. My problem is when the image is downloaded into my table in Editor, it comes out very blurry. The quality in the original jpg is fine. Just curious if there is a way to help this...


texts: Through QGIS 1.8 I have a layer whose data are updated every 3 seconds. The question is whether it is possible that QGIS Cloud can represent these dynamic changes?


texts: Merging two records together after Dissolve to get total number for combining both records using ArcMap

texts:
In ArcMap, I have two records for Eastbound ridership and Westbound ridership on a segment. I got this by dissolving according to the segment's unique ID. I'm left over with the 2 records showing EB and WB ridership numbers, but I only want 1 record.

Is there an automated way to combine both EB and WB ridership numbers together to just show total ridership for the segment?

Attributes:

ID, Direction, Segment ID, Ridership Numbers

1,       EB,          0001,             45

2,       WB,          0001,             61

3,       NB,          0002,             20

4,       SB,          0002,             22

5,       EB,          0003,             57

6,       WB,          0003,             71

Dissolved on Segment ID for Segment 0001.

Resulting Table:

ID, Segment ID, Ridership Numbers

1,       0001,             45

2,       0001,             61

I need to combine the above into one record like this:

ID, Segment ID, Ridership Numbers

1,       0001,             106


texts:
I have this

and I'd like to get this kind of view

.

i.e. from xy, to get the z value in a 2d drawing and is it possible to get a full 3d view ?

I spent like 1 hour on internet but can't achieve that.


texts: Is there a difference between tools with same name in the ArcGIS 3D Analyst and Spatial Analyst toolboxes?

texts: There are several of the same tools within the 3D Analyst and Spatial Analyst toolboxes (for example, Reclassify and Visibility). Is the same tool being accessed regardless of whether it is found within the 3D Analyst or Spatial Analyst toolboxes?


texts: Do different RDMS use different SRID's to identify the coordinate system of a spatial object?

texts: I'm looking for a reference that lists a standard SRID for a given CRS. Do RDMS's utilize a standardized SRID, such as OGC? Or is it unique to the RDMS?


texts: World country borders in polygon geometry format

texts:
Possible Duplicate:
  Where do I get territories data?

Is there some source I can get all world countries polygon geometry points with latitude and longitude? I find it for USA states but that's it. It is really emergency so if there's any fast way to get those coordinates, please help.

Thank you.


texts: Can I capture shared vertices with a Trimble GPS?

texts:
I'm trying to figure out how to use Trimble GeoXT and GeoXH GPS receivers to efficiently capture small farm fields in rural areas.  The main issue that I'm struggling with now is trying to deal with the boundaries of adjacent fields.  Right now if there are two adjacent fields a surveyor will have to walk the perimeters of both fields, ideally I would prefer if they only had to walk the border between the two fields once so that we are not collecting data for that shared border twice.

Is there a way to use vertices of a polygon that I have alreay captured with the GPS unit?  I'm fairly new to using Trimble units and I haven't been able to find anything in the documentation, but I'm sure someone must have had to deal with this type of problem before. We could deal with this in ArcGIS but I would prefer to solve the problem in the field when we are collecting the data.


texts:
In GeoServer, assume I have a layer named "myLayer".

Using GeoServer's REST API, I want to make a complete copy of the layer, let's say "myLayer2" in the same workspace.

What would be my best approach?

I am on GeoServer 2.9.0, the workspace is a Shape-Directory (although I am looking for a generic solution). I also have the Importer Extension available.


texts: ArcReader project and GDB Protected. How to read on ArcMap?

texts:
I have a project that can only be viewed in ArcReader93, the project format is pmf. When I open it it asks for a password (which I know),

once I load the project I can consult the information, change colors of the layers among others, and generate a "map" (it's awful) to print.

However I need to load the database in ArcGIS to perform geoprocessing with the information, but when trying to open the GDB with ArcGIS is not possible, only error appears. It does not request the password.

The folders are:

data: contains file00.gdb and file01.gdb
Pmf: contains project.pmf

The worst thing is that it can only be opened in ArcReader93, When trying to open the GDB in ArcGIS , it does not recognize it as a geodatabase But the option to enter the password never appears .Is there any way to export the information from the GDB or at least access it from ArcGIS , or Qgis?


texts: What causes QGIS 2 Plugin Manager Error from showPluginManagerWhenReady?

texts:
there.
when i open the plugin manager in qgis, i get this:

Ocurrió un error durante la ejecución del siguiente código:
pyplugin_installer.instance().showPluginManagerWhenReady()

  A Google translation of the Spanish is: An error occurred during the execution of
  the following code

Traceback (most recent call last):

File "", line 1, in

NameError: name 'pyplugin_installer' is not defined

any help?


texts: Print attribute value of a polygon with OnClick function GEE

texts:
I have a shapefile with many polygons and attributes (example "polygon_ID"). I would like to get the printed ID when i click on a specific polygon.
It would be a simillar function to the "inspector" label.
I also would be intereseted on gettin a chart of the ndvi mean for that clicked polygon between dates.
Is that possible?
var coleccion = ee.ImageCollection("COPERNICUS/S2").map(function(im){return im.clip(shapefile);})
.filterDate("2020-08-01","2020-10-15").filterMetadata("CLOUDY_PIXEL_PERCENTAGE", "LESS_THAN", 10)
.map(function(i){var ndvi = i.normalizedDifference(["B8","B4"])
  i = i.addBands(ndvi.rename("NDVI"))
  return i.clip(shapefile)})
var visparm = {bands: ["NDVI"], min: -0.15, max: 0.9, palette: ["blue", "black", "white", "yellow", "green", "red"]}

var NDVI = ui.Chart.image.seriesByRegion(coleccion, click, ee.Reducer.mean(), "NDVI", 10, null, "NDVI")
print("NDVI",NDVI);

var click = shapefile.select("polygon_ID")
var callback = function(coords) {
print(click)
print (chart)}
Map.onClick(callback)


texts: How can I define the extent setting of environments programmatically in VBA?

texts:
I use the following line of code to define the extent setting of the environments GP.Extent = "144566.589424822 351191.130242809 145772.160224822 353810.742942809". However, I need to define it programmatically via the boundaries of a layer like the procedure is carried out in any relevant window (e.g. in Clip window)
:'Environments'-'General Settings'-'Extent'-'Same as layer...'.
Thanks
Demetris


texts: Image service uploaded using ArcPy has no statistics?

texts:
I am trying to publish an image as a service using python in ArcGIS 10.5. Everything works except that the published imageserver has no statistics especially minimum and maximum. However, imageserver published from ArcGIS Desktop has statistics.

Below is my python code.

arcpy.CreateImageSDDraft(img_path, sd_draft, service, 'FROM_CONNECTION_FILE ',
                         con, True, 'targeting_tools', "User uploaded image service.",
                         "user,image service")
# Set local variables
out_service_definition = os.path.join(upload_path, service + ".sd")

# Execute StageService
arcpy.StageService_server(sd_draft, out_service_definition)

# Set local variables
arcpy.UploadServiceDefinition_server(out_service_definition, con)

ImageServer created has no minimum and maximum pixel values or any other statistics. Is there a way to fix this?


texts:
I downloaded hypsography (topo lines) in DLG (Digital Line Graph) format. The file came from OGRIP, although it originally came from USGS. According to Wikipedia, DLG files are

  topologically structured for use in mapping and geographic information system (GIS) applications.

However, when I try to load the .dlg file into QGIS, I get an error message:

  Invalid Data Source: C:/Users/.../cl303ohy.dlg is not a valid or recognized data source.

Searching for how to load a DLG file into QGIS doesn't yield any helpful results. Apparently 'dlg' is used in the python coding for creating or loading a plugin, so all the search results discuss plugins.

How can I use a DLG file in QGIS?


texts:
I developed an application depend on Oracle Map JS api v1, my application have multilayer, when I click on the map view all FOIs attributes should posted on a div; i.e: I need to identify a point like esri do.

Can you help?


texts: I want to get the feature at where mouse was clicked in map. So I was wondering how to get features which intersects with that point. Plus I was wondering how can I check what type of object it is (point, poly-line, polygon) ?


texts:
What I want to do is to fill a polygon (country) with a graphic file in any format (jpg., bmp., png.).
It should look like this:

I'm aware that GIS soft is not proper for such a operations but maybe is there any option to do it only in QGIS.


texts: Error trying to save vectorfile in QGIS 2.10?

texts:
I'm trying to save some changes I made in a vector file (polygons) in QGIS 2.10.

The file contains properties and I want to merge two of them into one.
I toggled and selected the two and then pressed

But when I try to save my changes, I get an error message that says that it could not be saved.
Export to vectorlayer failed. Object geometry not imported. OGR-error.
This is my translation of the original message (Swedish).

It worked the first time I merged two properties and saved, but not when I try to do the same thing again?

QGIS doesn't crash, I just can't save my work.

I use Windows 8.


texts: Finding significant co-occurrence between data points

texts:
I'm rather new in the field and I'm looking for advice in a problem.

I have a data set of several data points, each with category, latitude and longitude.

How can I find if there is a significant co-occurrence between different categories?

I'm working with QGIS and I'm familiar with typical data analysis libraries in Python (Pandas, numpy, etc.).

Edit: my dataset is a series of datapoints each point is representing a place like resturant hotel etc. the only daya i have about each point is it's lattitude, longtitude and the type(resturant, Atm,hotel, etc.) what i'm interested in is to see if there is any significant relationship between the placement of these different types of data
you can take a look at my datasets here: Googlemap metaData of Moscow,Russia


texts:
I would like to make a pdf document with all the layers I have on my mxd.

The layers are represented according to a classification, this classification is different from one layer to another.

When I export in pdf, I have a document with all the layers, but I don't have any symbology for the layers, so I couldn't read the information that each layer represents and I could not add a legend, because I have several layers.

Someone have a solution.


texts: QGIS: where are custom color ramps stored?

texts:
Using QGIS 3.4.0, I have created a new custom color ramp, using:

Settings > Style Manager > Color ramp > green plus sign

I saved the new color ramp as follows:

The color ramp works just fine.

Out of curiosity, I searched the entire local drive for the new ramp, using the text string (test_example).  Nothing returned.

So, where are these new ramps stored, i.e. folder and file name?


texts: Keeping Highest Valued polygon using ArcPy

texts:
I have a single polygon feature class that contains large polygons which represent signal strength.  Often times these polygons overlap.  I dissolve to get multi-part polygons with a value range of 3 to 8.

What I need to do is "stomp" the feature class to only keep the highest value in a given area.  I've tried looping the polygon and creating a temp feature class of each value, then erase/merging from the highest value down, but I get an error if there is a multipart polygon.  I wrote in code to explode the multipart feature, but it locks up the pc.

I think the arcpy.update_analysis tool will work, but I need to be sure that it loops from the highest value to the lowest.

Here's the code from my first attempt:

with arcpy.da.SearchCursor("temp_terr_wireless_mau","MAU") as cursor:
    for row in cursor:
     wrt("MAU Value = " + "{0}".format(row[0]))
     wireMAU = ("{0}".format(row[0]))
     arcpy.Select_analysis("temp_terr_wireless_mau", "temp_mau_" + wireMAU, '"MAU" = ' +wireMAU)

    if arcpy.Exists("temp_mau_8"):
            arcpy.Erase_analysis("temp_terr_wireless_mau","temp_mau_8","temp_mau_e")
            arcpy.Merge_management(["temp_mau_e", "temp_mau_8"],"temp_terr_wireless_mau")
    if arcpy.Exists("temp_mau_7"):
            arcpy.Erase_analysis("temp_terr_wireless_mau","temp_mau_7","temp_mau_d")
            arcpy.Merge_management(["temp_mau_d", "temp_mau_7"],"temp_terr_wireless_mau")
    if arcpy.Exists("temp_mau_6"):
            arcpy.Erase_analysis("temp_terr_wireless_mau","temp_mau_6","temp_mau_c")
            arcpy.Merge_management(["temp_mau_c", "temp_mau_6"],"temp_terr_wireless_mau")
    if arcpy.Exists("temp_mau_5"):
        arcpy.Erase_analysis("temp_terr_wireless_mau","temp_mau_5","temp_mau_b")
        arcpy.Merge_management(["temp_mau_b", "temp_mau_5"],"temp_terr_wireless_mau")
    if arcpy.Exists("temp_mau_4"):
        arcpy.Erase_analysis("temp_terr_wireless_mau","temp_mau_4","temp_mau_a")
        arcpy.Merge_management(["temp_mau_a", "temp_mau_4"],"temp_terr_wireless_mau")


texts: QGIS how can I open my own map into QGIS (not an Open Street Map)?

texts:
I am working on a project, that shows a list of German institutes financed by a treaty in the year 1949. Therefore I need to work with an historical map of this year, which I have.
How can I upload this map into QGIS?


texts: Avoid adding "_1" to field names when reading csv in QGIS?

texts:
When I read my csv file below

"Data Source","World Development Indicators",

"Last Updated Date","2017-02-01",

"Country Name","Country Code","Indicator Name","Indicator Code","1960","1961","1962","1963","1964","1965","1966","1967",...
Actual data...

"_1" is added to "1960","1961",...

Why does it happen and how can I avoid it?

My environment is Ubuntu 14.04 and QGIS 2.18.1


texts: creating lines (distances) from points within buffer - thousands of points and buffers

texts:
i'm trying to assess the connectivity of an arboreal species' pathway. i have (1) a vector layer with approximately 15,000 tree points and (2) a layer with a buffer created for each of these trees. each tree has a different buffer radius that shows the potential distance the species can travel from the tree; it is calculated based on the tree's vertical height and relative elevation.

i want to create a line vector shapefile that shows the potential connection from one tree to all the trees within its buffer, and to do that for every single one of the 15,000 trees that i have.

how do i do it on QGIS? i can't use arcgis as i have only the standard license for arcgis so i can't use the spatial analyst tools. i was thinking of using the "distance to nearest hub" tool and to use an expression (manually input a formula?) for the hub distance, but i've been unsuccessful thus far.


texts:
I need a C++ API to convert x,y Image Coordinates in their native projection to output image pixel,line coordnates.  I see the gdallocationinfo documentation, but no API for it.

Where in online GDAL doc I look ...or do I have to write my own?


texts: Excepting FME, is there a way to convert 3d model to point cloud?


texts: Creating Feature Class in ArcPy gives RuntimeError?

texts:
I am new to Python.

I am trying to create a new Feature Class within a long script but before I do so, I am running it separately to make sure I have the syntax correct.
The code below mimics the one in the ESRI help documentation.

# create new featureclass in which to put points
import arcpy

arcpy.env.workspace = "C:/Test2"

out_path = "C:/Test2/GIS"
out_name = "RhinoLines.shp"
geometry_type = "POLYLINE"
spatial_reference = arcpy.Describe("C:/Test2/GIS/RhinoTracks.shp").spatialReference
print spatial_reference.Name

if arcpy.Exists(out_name):
    arcpy.Delete_management(out_name)

else:
    arcpy.CreateFeatureclass_management(out_path, out_name, geometry_type, spatial_reference)

But I keep getting this error:

  GCS_WGS_1984
Traceback (most recent call last):
  File "C:\Python27\ArcGIS10.3\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\Test2\Scripts\stupid.py", line 20, in <module>
    arcpy.CreateFeatureclass_management(out_path, out_name, geometry_type, spatial_reference)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py", line 1807, in CreateFeatureclass
    raise e
RuntimeError: Object: Error in executing tool


texts:
I want to display a shapefile that I have made in QGIS, in the GeoServer OpenLayers preview.

When I try it, there is a strange object that appears, and I want to ask how to get rid of the strange object?


texts: From AutoCad Map 3D to QGIS: Coordinates conversion QGIS still being confused that the coordinate system is invalid

texts:
To make our drawings work from AutoCad Map 3D in QGIS, we make sure that our drawings have coordinate system assigned (even though we only use 1 coordinate system in particular, so it is kind of pointless). Then we save either as DXF or export them as to shapefiles.
If we do the export to shapefile we also make sure it is the right coordinate system, that is why we also do a conversion, even though it is the same coordinate system we convert to.
But the thing is (rather is a DXF or shapefile does not matter) even though we clearly assigned it the correct coordinate system and when we load it in a project, . QGIS still is confused and thinks the coordinate system is invalid. We have to manually assign the coordinate system again. The shapefiles are on the location as they should be, but considering these shapefiles/DXF files need to be Lambert 72 standard. This is kind of annoying.
Why does this happen? Does AutoCAD Map 3D not save a coordinate file or something?


texts: Python Script to iterate numerous, single-band rasters for arcpy.CompositeBands

texts:
I have a large collection of single-band geotiffs (NIR, Green, and Red) that I would like to composite using a Python script. The goal is to iterate through multiple folders in a main directory, identify each tiff as band1, band2, band3 to input into CompositeBands_management, and do this for every raster scene. To clarify, each image number, i.e. scene, has three single-band tiffs associated. For example, the naming convention is: TTC2500_Green_Channel_8.TIF where TTC2500 is the image number.

So far, my script can go through each folder and identify the specific bands based on the filename but I am having difficulty bringing them into the tool. The attached script has the Composite tool commented out but the result is a printed list of each geotiff. Any thoughts on how to move from here into an automated processing method to output new false color composite geotiffs?

import arcpy
import os
from arcpy.sa import *
from arcpy import env

env.workspace=(r"C:\Users\cc\Desktop\tcamPractice")
env.overwriteOutput = True

outws=(r"C:\Users\cc\Desktop\tcamPractice\false")
folders=arcpy.ListWorkspaces()

for root, dirs, files in os.walk(r"C:\Users\cc\Desktop\tcamPractice"):

    for raster in files:
        rasterlist=arcpy.ListRasters("*", "TIF")
        outraster=outws+"comp.tif"
        if raster.find("Green")>0:
            band1=raster
            print band1
        elif raster.find("Red")>0:
            band2=raster
            print band2
        elif raster.find("Nir")>0:
            band3=raster
            print band3
        #arcpy.CompositeBands_management([[band3;band2;band1]], outraster)


texts: Getting day and time from date field with time, with field calculator?

texts:
I'm using ArcGIS 10.1 and have a field containing a date and time
I need to get the day of the week based on my date field
and also when the same field that contains date and time

I need to do this from the field calculator

example


texts:
I just created my account on this forum to find an answer to a stupid (?) problem I can't deal with.
First, let's precise I just (some months ago) learned on my own what GIS was, and gave it a try using QGIS. I'm working on Windows XP.
I apologize in advance for my not so good English, and my poor skills (and maybe bad vocabulary) in GIS and kriging.

My problem is:

I need to use kriging to interpolate punctual data from a vector layer (points); this layer is created by me from fieldwork measurements and is in .shp format (try.shp).
I had a look on the internet and saw there were 2 possibilities : use SDA4PP plugin, or Sextante toolbox with SAGA. I wasn't able to have any of them working.
Apparently, SAGA is much easier, thus I would prefer to work with SAGA.

What I have done so far:

I downloaded the last version of QGIS via OSGeo4W (all packages selected).
I downloaded SAGA 2.0.8 from Sourceforge.net (version *_bin_msw_win32), activated it Sextante toolbox, entered the right folder path (which contains spaces) in Sextante configuration.

When I want to perform ordinary kriging, I select the layer, the attribute (which is "id"), ask for a variance grid, target grid is "[0] user defined" (no other choice), I choose an exponentiel variogram model, no block kriging and no logarithmique transformation, and let the default values for the other parameters (especially, grid and variance rasters are saved to temporary files).

Then I click "OK" and get this message error:

Could not layer: C:\DOCUME~1\user\LOCALS~1\Temp\sextante\sagaordinarykriging6fd1782d35df....tif. Check the Sextante log to look for errors.

Here is the error log :

Could not load model watersheds.model
ALGORITHM:ftools:export/addgeometrycolumns

and the algorithm log :

sextante.runalg("saga:ordinarykriging","C:/Documents and Settings/user/Bureau/Kriging/try.shp","id",True,0,1,False,100,False,0,10,100,1,0.1,1,0.5,1000,4,20,1,True,"-55.4887564869,-55.4887477484,-8.61474380806e-07,4.59453003047e-06",None,None)

Any idea of the reason why it doesn't work?

I tried to uninstall-reinstall OSGeo4W using the advanced options. I selected SAGA as a package when reinstalling, but SAGA was not really installed: the tar.gz was downloaded and that's all. I unzipped it, and then I had to enter manually the path, which I chose to be without spaces (C:\OSGeo4W\saga, after having cut-pasted the SAGA unzipped folder at this very place). And ... same as before ... Same error, same behaviour, all the same. Any clue ?

--

The installation worked well, no errors. I precise I removed all the files concerning SAGA and QGIS before reinstalling (with Add/Remove Programs and Search).

It worked !
I really can't explain why, but it worked. Until now, I was working on a self-made point shapefile, with random points with "id" within the range 0-150. Recently I used a file containing real data from fieldwork, and it worked. I did exactly as for the first file, no clue why it suddenly worked.

One more thing. When using SAGA software, I can choose to select a variogram or not; it seems I can't select a variogram using SAGA via the Sextante toolbox, even if I want to. Why ? Is there a way to select a variogram using SAGA via the Sextante toolbox ?
Besides, I guess it's always better to select a variogram (I'm a beginner in kriging).

What do you think ?


texts: GRASS GIS Attribute Table - Problems when adding new column

texts:
I want to add several new columns to a shapefile (v.db.addcolumn), using GRASS GIS 7.0.5, but the software don't allow me to change the "length" (set to 250), and it provides and error when asking to add the column ("Error: Unable to add column <1 integer>.; where "1" is the name of the column and "integer" is the type).

It already worked in other shapefiles, with the same version. I tried to create a new project, work with another shapefile but it does not seem to work anymore.

Does anyone know what may be the problem, and how to solve it?


texts: How to remove the line from inside the circle? QGIS

texts: How to remove the line from inside the circle in QGIS?


texts: Making Multipart Features to Unique features

texts:
I have a layer with two lines crossing over each other. I create intersection point over them and then create a buffer for a specified distance and then using difference tool, I delete the buffer area.

The resultant of the above process is four individual lines. Although the lines are four, the features are only two since they have been just separated by the above process.

What is the way to make the feature of each one unique so that I get a total distinct feature of four?


texts: Import Microstation geometry to ArcGIS 10

texts:
I have geometry alignments of land parcels defined in MicroStation InRoads V8i. Instead of using the dgn files I want to use the geometry files. I have ArcGIS 10 Desktop advanced license with Data Interoperability extension. InRoads will export to a LandXML file but ArcGIS is not able to read the files - "AdvanceToElement: unable to find xml element.

Does anyone know what process needs to happen in order to utilize these files?

Right now I am creating a separate dgn using the alignments and then bringing those into ArcMap but this is not feasible for the long-term and I want to automate the process of reading the geometry. I will not actually bring the geometry into ArcMap but overwrite current shapes with the Inroad geometry (geometry transfer).

An alternative would be to create shapefiles from the alignment files.

Does anyone know if this is possible?


texts: TO_DATE query on ArcSDE for Oracle dataset failing?

texts:
I'm trying to use TO_DATE to query an Oracle SDE dataset. It's not working in the javascript API application so I tried to query the rest end point directly and I get the error:

"Unable to perform query" on a java version of ArcGIS Server I also get the error "Please check your parameters"

Here is the ESRI topic at 10 which shows how to_date should be used
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000.htm

The format:

Datefield = TO_DATE('yyyy-mm-dd hh:mm:ss','YYYY-MM-DD HH24:MI:SS')

My Query:

DateTest = TO_DATE('2012-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS')

I have also tried not including the time and using / instead of -

Oracle version is 10g. ArcGIS server is version 10 (.net and java tried)


texts: Styling polygon layer as dissolved with QGIS Geometry generator?

texts:
The QGIS Geometry Generator seems like a nice way to keep data intact while allowing for some creative visualisations.

I have a layer of tesselating polygons that I would like to style as a continuous surface without internal borders.

To dissolve a number of polygons in Spatialite I would use the UNION function, but Union in the Geometry Generator doesn't give a result, ie:

 union( $geometry, $geometry )

So is it possible to use the Geometry Generator to show a polygon layer as dissolved, and if so, how?


texts: Expression does not evaluate to a column or table name error when updating object in MapBasic

texts:
I tries to set styles for all objects in my processing_table, but gets Expression does not evaluate to a column or table name

My code:

'...
pen_style = currentpen() 'get_pen(styles_table_name, obj_type, class_id, selected_scale)
altering_obj = processing_table.obj
alter object altering_obj
    info OBJ_INFO_PEN, pen_style
cmd = "select * from processing_table where objectid = " & id_value & " and class_id = " & class_id & " into one_obj"
run command cmd
update one_obj set obj = altering_obj where rowid = 1 ' Expression does not evaluate to a column or table name error
close table one_obj
'...

And sandbox script works perfectly:

'...
query = "select * from " & selected_layer_name & " where " & id_field_name  & " = " & filter_value & "into filtered"
run command query
id_field = "filtered.objectid"
while not eot(filtered)
    id_value = id_field
    altering_obj = filtered.obj
    alter object altering_obj
        info OBJ_INFO_SYMBOL, point_symbol

    query = "select * from " & selected_layer_name & " where objectid = " & id_value & " into one_obj"
    run command query

    update one_obj set obj = altering_obj where rowid = 1
    close table one_obj
    fetch next from filtered
wend
close table filtered
'...

I can't understand where these scripts are different. Algorithm is same:

Alter object from processing table
Select this object into one_obj table
Update it

Both scripts I checked with same tables.
May be reason is in different connection to tables?

In sandbox I use already opened table:

selected_layer_name = layerinfo(window_id, suitable_layers(selected_layer), LAYER_INFO_NAME)
query = "select * from " & selected_layer_name & " where " & id_field_name  & " = " & filter_value & "into filtered"

And in non-working script I opens table from disk:

cmd = "open table " & chr$(34) & tab_file & chr$(34)
run command cmd
table_name = TableInfo(0, TAB_INFO_NAME)
'...
cmd = "select * from " & table_name & " into processing_table"
run command cmd


texts: Raster calculator fails with large raster in QGIS

texts:
I'm working in QGIS 2.14.1  with a DEM ranging from 200 feet to 1600 feet elevation called "dem_3m_Zft1b"  (geotiff, 16822 X 33349 cells, No-data =-9999)

If I enter

"dem_3m_Zft1b" > 0

in the raster calculator I get a result that has a value of 0 everywhere in the raster extent. The calculator does not seem to recognize the existence of any values or of the no-data flag.

With a subset/portion of the DEM called "atest9b@1" (4489 X 6175 cells, No-data=-9999),  If I enter "atest9b@1" > 0 in the raster calculator I get a result that has a value of 1 where there was data and a value of no-data where there was no-day. Everything seems OK when using the subset.

The larger DEM "dem_3m_Zft1b" seems OK in other ways, e.g. the "Identify" tool finds valid values for Band1, but the raster calculator doesn't seem to recognize the data in it.

I tried the same operation on the large DEM in the Processing Toolbox, SAGA, Raster Calculator with the syntax:
g1 > 0
and I get the correct results, i.e. 1 where there is data and no-data where there isn't.

Any ideas or is QGIS 2.14.1 having a problem with the raster calculator?


texts: Maximum likelihood not working in QGIS SCP?

texts: I was trying to use maximum likelihood in SCP QGIS, but a warning come out "Information [18]: Select at least one signature", and when I selected all signature, it still won't run.


texts: Geolocation using global map in ArcGIS Desktop?

texts:
I want to show my study sites (15 from different countries) using a global map in ArcGIS Desktop.

I'd like to show latitudes and longitudes (perhaps with a map grid).

Is there a way to drop pins to show locations, or at least include map grid?


texts: MapBox Studio: Styling Water in template dataset

texts:
I am using MapBox Studio with their own template dataset called Outdoors.
I discovered that categories of waterways can be addressed by classes such as river, stream, stream_intermittent etc. This allows me to toggle its visibility according to the zoom level. I want to do the same just for lakes and other water bodies. Unfortunately, the available layer "water" does not have such classes and presents just one layer containing all oceans, seas, and all other water bodies not considered rivers or such. Apparently, this accounts for their other datasets too.
This is confusing to me as smaller water bodies are not just scaled-down but disappear completely when you zoom out (see images) which means that there must be a way to access them by category.
I did not find an answer in the documentation so any help is welcome.
Screenshot of two different zoom level views with different waterbodies


texts: Understanding updateParameters and updateMessages interaction in Python Toolbox?

texts:
I have been developing a Python toolbox which consists of 6 parameters. I have received immense amounts of help on this through StackExchange through the following posts:

How to Determine if a Layer is a Point

How to Change a Parameter Type from Optional to Required

I must say, you guys rock! I'm getting close to finishing up this toolbox and have yet again hit another wall.

For one of my parameters, I would like to throw a warning to the user if it is not a point shapefile. The main purpose of this tool is to label point shapefiles, so if they enter a polygon, that's going to potentially be a whole lot of labels showing on one map (at least for polygon shapefiles that I deal with). For some reason, the only way for the warning to appear correctly is for my updateParameters and updateMessages functions to consist of the following:

    def updateParameters(self, parameters):

    describe = arcpy.Describe(parameters[0].value)
    if describe.shapeType not in ('Point', 'Multipoint)':
        parameters[0].setWarningMessage('This is not a point feature class')
    else:
        parameters[0].clearMessage()

    if parameters[2].value == True:
        parameters[3].enabled = True
        parameters[4].enabled = True
        parameters[5].enabled = True

    else:
        parameters[3].enabled = False
        parameters[4].enabled = False
        parameters[5].enabled = False

    return

def updateMessages(self, parameters):

    if parameters[0] != None:
        describe = arcpy.Describe(parameters[0].value)
        if describe.shapeType not in ('Point', 'Multipoint'):
            parameters[0].setWarningMessage('This is not a point shapefile. Labeling is not recommended.')
        else:
            parameters[0].clearMessage()

    return

I can feed in a polygon shapefile and the warning appears and everything runs as it should. However, if I comment out the first 5 lines of the updateParameters method (the portion that checks if its a point and which also appears to be redundant), then my toolbox initially appears to have a bunch of errors with it once I open it:

My guess is that this has something to do with the order of validation that is performed for the tool. However, once I feed in a shapefile into the tool, all of the errors go away and the tool runs fine. So I have my tool working, just not in the way that I want it to since (a) I don't want to include a piece of code that I feel is redundant and (b) I shouldn't have error flags all over the place with the initial state of my tool.


texts: When i try to move my vertexes from my line feature in QGIS 2.10, the line is getting "separated", also when i delete the vertexes my line is getting holes. Any ideas why?


texts: base layer on openlayers 2.13 not showing Google if set first choice

texts:
I am working a ol 2.13.1 & i have a strange issue.
As base maps I have OSM & Google.

When I set as default Google it doesn't shows nothing. Only the OSM layer appears when selected.

BUT if i have the OSM as default then I switch between all base layers without issue.

var map = new OpenLayers.Map("map-id");
        var format = 'image/png';
        // pink tile avoidance
        OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
        // make OL compute scale according to WMS spec
        OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

        var googleMercator = new OpenLayers.Projection("EPSG:900913");
        var wgs84 = new OpenLayers.Projection("EPSG:4326");

        //base layer
        map = new OpenLayers.Map({
            div: "map",
            units: "m",
            projection: googleMercator,
            displayProjection: wgs84
       });

        var mapBoxBackground = new OpenLayers.Layer.XYZ(" AWMC Background",["http://a.tiles.mapbox.com/v3/isawnyu.map-knmctlkh/${z}/${x}/${y}.png",
            "http://b.tiles.mapbox.com/v3/isawnyu.map-knmctlkh/${z}/${x}/${y}.png",
            "http://c.tiles.mapbox.com/v3/isawnyu.map-knmctlkh/${z}/${x}/${y}.png",
            "http://d.tiles.mapbox.com/v3/isawnyu.map-knmctlkh/${z}/${x}/${y}.png"],
            {
                attribution: "Tiles &copy; MapBox | " +
                "Data &copy; OpenStreetMap and contributors, CC-BY-SA |"+
                " Tiles and Data &copy; 2013 AWMC" +
                " CC-BY-NC 3.0",
                sphericalMercator: true,
                wrapDateLine: true,
                transitionEffect: "resize",
                buffer: 1,
                numZoomLevels: 13
            }
        );

        var google_var = new OpenLayers.Layer.Google(
                "Google LayerName",
                {type: google.maps.MapTypeId.BaseLayer}
            );

         map.addControl(new OpenLayers.Control.LayerSwitcher());

         var google_hybrid = new OpenLayers.Layer.Google(
             "Google Hybrid",
             {type: google.maps.MapTypeId.HYBRID}

         );

so this is doensn't work

        map.addLayers([google_var,google_terrain,mapBoxBackground,google_hybrid,google_physical]);

but this works

map.addLayers([mapBoxBackground,google_var,google_terrain,google_hybrid,google_physical]);


texts:
I want to create and edit shapefiles for my application.

Is there a free shapefile editor?


texts: How can i create single feature fwith Combining Selected feature qgis?

texts:
I am trying to create a single Qgsfeature from the Combination of selected features in Pyqgis.
Currently i create the feature using a loop over selected features and combine them 1 by 1.
but this process froze qgis UI.
does anyone can suggest me another idea ?


texts: Openlayers GeoJSON reprojection issue 4.3.3 vs 5.3.0

texts:
While switching from ol 4.3.3 to 5.3.0 I encountered a problem. The WMS layers work as I expected (display in the right location), geojson data don't.  I read all the data from the same service in both ol versions, everything that is changed is class notation ( I mean here: new ol.format.geojson() to new GeoJSON()). The part of code responsible for geojson import is as follows:

var dJson = (new GeoJSON()).readFeatures(response1.data, {
                                 featureProjection: 'EPSG:3857',
                                dataProjection: 'EPSG:2180'
                            });

var source = new VectorSource({ features: dJson});

Result data appear in  location (wrong one) that suggests that source data were not projected to epsg:3857 from epsg:2180. In the old version they display in Poland, now near the equator in Africa.
EPSG2180 is decleared in code ahead via proj4 lib.
What am I missing?


texts: Is the circle drawn on leaflet a spherical cap or a flat circle?

texts:
I am new to GIS, so please bear with me.

I think the circle must be a flat "Web Mercator" circle, since that is the mapping, but the circle information is given as WGS84 (lat,long for center and meters for radius), so that leads me to think of it as a spherical cap.

It is my understanding that it can only be one or the other, not both.
Which is it?


texts: GeoServer: which library for boosting (raster) WMS output generation

texts:
I have a GeoServer instance, which is only used as a WMS service.

Reading the docs, there are libraries, which can be used to boost WMS ouput generation:

native JAI and ImageIO
JAI-EXT
libjpeg-turbo

I have some questions regarding these libraries. I am mainly interested in performance gains when serving JPEG image tiles from raster data:

Should I install all of them and will this result in the fastest WMS output generation?
If not, which one is recommended?
If I use JAI-EXT, should I also install native JAI and ImageIO?
Will these libraries also have an impact on serving PNG image tiles from vector data?

I realise that when serving raster data, the biggest difference, performance wise, is to use tile caching and to properly prepare the source data (i.e. create GeoTiffs with internal tiling and overviews etc.), but my question is only about WMS output generation.


texts: QGIS - extract xyz of max raster values in mask vector layer

texts:
I have a bathymetric raster from which I want to extract the max depth value within a mask (vector) layer.
The vector layer has 252 circular polygons
The end result must have x, y and depth attributes

I tried the zonal statistics function, but this function only adds the max value and not the x and y coordinates

I have added a screen shot of what I actually want:

I have a one raster (north sea bathymetry) containing 63 locations.
(In the screenshot only a few locations are shown.)
At each location a jack-up barge (which has 4 legs hitting the seabed) is positioned.
The center xy coordinates of the legs are known (I have a CSV)
I created a delimited layer of all these coordinates (CSV).
Then I made a circular buffer around all coordinates, which represents the footprint of the legs.

Now what I want is to get the Max value (x,y depth) of the raster within each circle and store the values in a point file.
This point file should have 63 x 4 =252 records.

I also need this for the Min value


texts: Automatically creating 2D-point features for ArcGIS Desktop from addresses in SQL database?

texts:
I currently have an SQL-Table which contains our buildings. I already added the table and now want to create features ( 2D-Points ) from that information. The biggest problem I have is that the "location" of those buildings is stored as an address.

I think I may have to use python and ArcPy to automatically add those buildings from the database as features on my map. However, I am new to ArcGIS, so maybe I don't know about some functionality that comes with it. So:

Is there a tool to read addresses from a data source and automatically create points out of those?


texts: Setting different transparency for different areas of basemap

texts:
I want to print the map of a town and I would like to see the basemap more transparent outside the town area (border polygon) or vice versa.

How can I do this?

I'm using ArcGIS 10.2.2 for Desktop and ArcGIS Online Basemaps which are chosen from the Add Data button.


texts: How to set the number of digits in Identify Features tool output for a pixel value query in QGIS 2.18

texts: I found out that for a raster in float32 Identify Features tool reports rounded values. For example on the screenshot it reports that the pixel value is -0.3, although the real value is -0.300000011920929 (and I can see the real value using "Layer properties/Transparency/Add values from display" ). How to disable rounding in Identify Features tool? I'm using QGIS 2.18.12


texts: Dynamically update feature style on menu selection event

texts:
I'm working on a chloropleth map that compares two geoJSON values associated with Pennsylvania County features. The values are chosen though an html select menu, where value="feature.properties.[data]. The select menus (inside the legend control) initiate function ratioFinder via onChange, which evaluates the value of each geoJSON property, finds the ratio of the two, and uses the function getColor to give a chloropleth style to each feature.

I've gotten each county feature to update individually on mouseout using the function onEachFeature and function resetHighlight, but I'm hitting a wall on how to have all the features dynamically update each time a menu selection is made.

I'm thinking I just need another bit of code in function ratioFinder, since it is already initiated each time a menu selection is made, but I'm not sure what should be added (or if that's the right way to go about it).

//Variable contains the geoJSON data called by the preceeding script and adds it to the map.

var legend = L.control({position: 'topright'});

legend.onAdd = function (map) {
    var div = L.DomUtil.create('div', 'info legend');
    div.innerHTML = '<select id=select_a onchange="ratioFinder(this.value)"><option value="feature.properties.peopleCount">People</option><option value="feature.properties.farmCount">Farm Count</option>[.....]</select>

<select id=select_b onchange="ratioFinder(this.value)"><option value="feature.properties.peopleCount">People</option><option value="feature.properties.farmCount">Farm Count</option>[.....]</select>';
    div.firstChild.onmousedown = div.firstChild.ondblclick = L.DomEvent.stopPropagation;
    return div;

};

legend.addTo(map);

//Adds styled geojson data to the map.

geojson = L.geoJson(PAcounties, {
    style: ratioFinder,
    onEachFeature: onEachFeature
}).addTo(map);

//Function is an if-else color-picker. Values are sent down to the 'style' function - this determines what color to display chloropleth shapes on the map.

function getColor(c) {
return  c === Number.POSITIVE_INFINITY ? '#aaaaaa':
        //[.....]
        c >= 4 ? '#E7BD92' :
        c >= 2 ? '#E1CCB7':
        c >= 1 ? '#DCDCDC':
        c >= 0.5 ? '#B7CCE1':
        //[.....]
        c === 0 ? '#aaaaaa':
            '#aaaaaa';
}

//Function calls attribute data from the select pull-down menus and finds the ratio between values for each county.

function ratioFinder(feature) {

    if (feature=="");
        var a = eval(document.getElementById("select_a").value);
        var b = eval(document.getElementById("select_b").value);

    return {
        fillColor: getColor(a/b),
        weight: 2,
        opacity: 1,
        color: 'white',
        dashArray: '3',
        fillOpacity: 0.7
    };
}

//Function defines the hover-over styling of each county shape. Triggered by function 'onEachFeature'.

function highlightFeature(e) {
    var layer = e.target;

    info.update(layer.feature.properties);

    layer.setStyle({
        weight: 5,
        color: '#666',
        dashArray: '',
        fillOpacity: 0.7
    });

    if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) {
    layer.bringToFront();
    }
}

//Function defines the reset styling of county shape after hover-over event. Triggered by function 'onEachFeature'.

function resetHighlight(e) {

    info.update();

    geojson.resetStyle(e.target);
}

//Function is an event listener that triggers when a county shape is moused over or moused out of.

function onEachFeature(feature, layer) {
    layer.on({
        mouseover: highlightFeature,
        mouseout: resetHighlight,
    });
}


texts:
I have a web page with a map and search field. Something like Derek's "beer's finder"
When I type a search request I somethimes use arrows to fix something. But if mouse is over the map, then I can't use arrows for text editing because map catches them. I tried to fix it the following way (without result):

    dojo.connect(this._currentmap, "onKeyDown", function(ev) {
        if (ev.keyCode >= 37 && ev.keyCode <= 40) { //if arrrow
            dojo.stopEvent(ev);
        }
    });

Do you know how I can fix this problem?


texts: If a QGIS Attribute Form is too long/high, is it possible to get it to automatically resize or break into 2 columns?

texts:
I've created a form using the Drag and Drop designer but when there are to many fields to fit in my screen resolution I can't resize it or get scroll bars to see all the fields (2 in image below).

Apart from creating and providing a UI file is there some option that would allow a vertical scroll bar to be seen so I can see all fields? The scroll bar is there when you don't use Drag and Drop designer (1 in image below).


texts: Is it possible to display the embed color palette of a TIFF file using earthPy?

texts:
I try to display a map that I have created. This map embed a color palette that I can read in QGIS to obtain directly this kind of display :

I discovered recently that I can as well directly plot this image using earthPy.plot:
raster = pm.getGfcDir() + 'PU_glad_check.tif'

# Use rasterio to import the reprojected data as img
with rio.open(raster) as src:
    img = src.read()

ax = ep.plot_bands(
    img,
    title="Country boundaries",
    scale=False
)

But it's displayed with a gray-scale from 0 to 255. I've been to this doc page that explains how to create a custom discrete legend but I'd like to extract it from my file.
Is there a way to use the embed color palette as in QGIS but in earthPy?


texts: Get projection or calculate latitude and longitude from a central point

texts: I have a central point (with longitude) and I measure a radius (30º) degrees, I have a distance of 200 KM. Problem: know with precision what is the latitude and longitude of the point that is 200 km from a known point that it is at 30º degrees (heading) a determined central point. Try to find it in several places, and I didn't find it. They even ate me and gave me an answer to a question that I asked previously, only using a library, and I used to research or summarize it all by hand.


texts: Union from all feature classes from feature set using ListFeatureClasses

texts:
I want to use the union tool in ModelBuilder to combine ALL the features from two feature data sets from two different gdb together.

I use ArcGIS 10.5.1 with an advanced license. I tried to use the arcpy.union_analysis().

How can I automate the input, so all the features from a feature class are selected?

I tried so far:

import arcpy, os
arcpy.env.workspace = "C:Test\01_Data\15_Test.gdb"
featureclasses = arcpy.ListFeatureClasses(feature_dataset='A_Test')
for fc in featureclasses:
arcpy.Union_analysis([fc,"C:\Test\14_Test.gdb\Other_Union"],"C:Test\01_Data\16_Output.gdb","NO_FID")

It is not working the way I hoped it would. It does not take all the features from the list rather every feature at one time and then overwrites the output.

I think the For iteration is not the right thing to use - is there a possibility to take all the listed features as input?

I use ArcGIS 10.5.1 with an advanced license.

@BERA helped me find the right solution:

import arcpy, os
arcpy.env.workspace = "C:Test\01_Data\15_Test.gdb"
featureclasses = arcpy.ListFeatureClasses(feature_dataset='A_Test')
arcpy.Union_analysis(featureclasses,r"C:Test\01_Data\16_Output.gdb","NO_FID")


texts: Doing spatial analysis on ArcGIS service containing more than 100,000 records?

texts:
I was using the CadastreParcels layer to do spatial analysis in ArcGIS, and got below the error, according to Esri’s help, it says only layers contain fewer than 100,000 features could do analysis, there are more in it.

https://enterprise.arcgis.com/en/portal/latest/use/use-analysis-tools.htm

Is there any other way to do spatial analysis on big service layer?


texts:
I am trying to do Mann-Kendall test over a stack of 620 MODIS images. The code is as follows:

library(sp)
library(raster)
library(Kendall)
library(spatialEco)

setwd("C:\\NDVI_prueba")
rlist=list.files(pattern=".tif$", full.names=T)
rasters=stack(rlist)
rasters

fun_kendall <- function(x){ return(unlist(MannKendall(x)))}
kendall_result <- calc(rasters,fun_kendall)
writeRaster(kendall_result$tau, filename = "C:\\NDVI_prueba\\NDVI_STACK_tau.tif", format="GTiff", overwrite=TRUE)
writeRaster(kendall_result$sl, filename = "C:\\NDVI_prueba\\NDVI_STACK_p-value.tif", format="GTiff", overwrite=TRUE)

I cannot make it for 620 images but if I add a stack of 5 images I can make it. Does anyone know why?


texts: Force a minimum value in a color ramp classes in QGIS 3.4.1

texts:
I am trying to apply a color ramp to a shape using percentage values where red would be low and green would be high.  The data ranges from 74% to 100%, but I need the minimum value to be 0%, so that 74% would actually display as light green.  It currently shows as red because it is the lowest value in the class.

I have other indicators to plot on the same map and want to use the same color ramp, where the lowest value will be much lower than 74%, and I need the color ramp to be consistent across maps.  Such that red is always in the 0 end of the values.

I know I can manually change the values in the classes, but I am hoping there's a more automated way to do this.

I'm using QGIS 3.4.1


texts: Using QGIS and PostGIS for multi-user capabilities, similar to ArcSDE for ArcGIS

texts:
I have previously used ArcSDE technology with Microsoft SQL Server to allow for multi-user database editing.

My ESRI licenses have recently ran out and I have been using QGIS for my GIS work.
I am now thinking of using QGIS to create a database on Postgres/PostGIS so I can give multiple people in my department the capability to edit and create GIS data on the same database. I am hoping to use only free and open source software for this and was wondering if I would need a server as well to fulfil these requirements?


texts: Can Google Geocode returning addresses nearby

texts:
I am using google geocoding to bring me addresses according to what a user type on the search box in my iOS app. I would like to know if it is possible, lets say when the user types m google api returns addresses that start with m in my state, country or even near my locality.

Is that possible to create a behaviour similar to the apple and google maps.

My url is this one:@"http://maps.googleapis.com/maps/api/geocode/json?address=%@&components=country:AU&sensor=true"

Regards


texts: Runtime Error 424 when embedding MapInfo map in Access form

texts:
I'm kind of new to VB and DAO so please bear with me on this! I'm not sure if this belongs in gis.se or stackoverflow.

I am trying to embed a simple MapInfo map in an Access form based on
the code provided in the MapInfo user guide. It seems I've fallen at
the first hurdle. So far I have this:

Dim mi As Object
Private Sub Form_Open(Cancel As Integer)
    Set mi = CreateObject("MapInfo.Application")
    MsgBox (mi)
    mi.do "Set Application Window " & Form1.Hwnd
    mi.do "Set Next Document Parent " & Form1.Hwnd & " Style 1"
    mi.do "Open Table ""World"" Interactive Map From World"
    mi.RunMenuCommand 1702
    mi.do "Create Menu ""MapperShortcut"" ID 17 As ""(-"" "
End Sub

I am getting runtime error 424 "object required" on this line:

mi.do "Set Application Window " & Form1.Hwnd

The MsgBox outputs "MapInfo Professional" which leads me to believe
that the CreateObject command has worked successfully.
However if I comment out the problem line I get the same error on the
next line. Therefore I assume that the mi variable isn't correctly set
up.

Can anybody shed any light on this?

Are there any good resources on line for MapInfo integrated mapping?

Thanks in advance!


texts: Adding direction and lengths of semi-major axes of ellipses to their attribute tables in ArcMap

texts:
I made a polygon shapefile with hundreds of ellipses (using the ellipse tool). I want to know their orientations and the lengths of their semi-major and semi-minor axes (and add these to their attribute table), but I can't figure out how to generate this information. I thought it would be easy, as when I am creating an ellipse, I can specify these three inputs to make the ellipse.
Does anyone know how to do this, or a workaround?
My ultimate goal is to compare the aspect ratios of a bunch of geomorphic features and see what direction they are pointing. I drew the ellipses enclosing each of my features so that I could do all of these things at once.


texts: So I have successfully installed Lizmap, Qgis-server, Apache, and a BigSQL postgreSQL database and published a map with a working WFS pointed at a PostGIS enabled table in my database.  When I try to save an edit in Lizmap it gives me a non descriptive error.  When looking at the network calls in developer console in Chrome it seems to hang on the sending the edit to the database.  I have installed php-pgsql on my Ubuntu Xenial server but I think it is looking in a directory where it expects PostgreSQL to be when my BigSQL is in a different place.  Is there a way to point php-pgsql to look at a different directory?  Has anyone else tried this type of install and made it work and if so how?


texts: Can generating a shapefile from a pgdb cause topology errors due to floating point conversion?  I am running into gaps in a line layer of really small distances (order of 10^-4; CRS EPSG:2227 usft).


texts: I am working in a viewer with suite sdk gxp and I can see my layers, but some of them in the viewer are located wrong. I have checked postgis and geoserver and every layer is ok with the same EPSG, 4326. Any idea about this?


texts:
I have a spreadsheet in Google Docs with about 20-30 rows, with the following 6 columns:

ID
Name
Address
Cell_No
Latitude
Longitude

where the last two columns are empty.
What is an easy way, for a novice user, who is a non-programmer, to geocode the address and populate the Latitude and Longitude fields with result of Geocoding?
I just need to populate the Latitude & Longitude fields. I do not need to see any data on a map.


texts: Is there a way in qgis to merge repeated values in attribute table print composer? Something like on the second image bellow.


texts: How to change the the style of a vector layer programmatically?

texts:
I want to change the style of the polygon contained in the vector layer.
Is there any API available?

(I can click the properties of the shapefile, then select the style and change the symbol properties, but I want to do this programmatically.)

I am using Python to customise QGIS.


texts: Checking Functionality of GIS layers of map services hosted by Geocortex and Flex applications

texts:
I would like to be able to run a python script each morning that checks each sites map service layers for proper functionality.  Currently we have 10 sites with map services hosted by Geocortex and Flex.

I am able to run a script to open our sites in a browser and return a url code if they are up and running using

import webbrowser
url = 'http://entgisweb01/CountyView/'
webbrowser.open_new(url)

import urllib2

def main():
  # open a connection to a URL using urllib2
  webUrl = urllib2.urlopen("http://gis.ventura.org/CountyViewNew")

 # get the result code and print it
  print "result code: " + str(webUrl.getcode())
  print "http://gis.ventura.org/CountyViewNew"

if __name__ == "__main__":
  main()

I would like to be able to check the layers of each map service within the sites using a python code instead of simply opening the site in a browser.


texts:
In processing several spatial data sets (tbl_data_01, tbl_data_02, tbl_data_03, etc) using FME I establish a spatial table called "tbl_metadata" with information about each of the data set. This table holds the metadata (if available) and the layer name for each of the spatial data sets. A spatial object, a rectangular envelope, is also established.

I would like to use tbl_metadata to produce an atlas (a dataset fact sheet) in QGIS 3 for each of the spatial data sets. The atlas should present a map sheet showing each spatialdata set as well as a table with the available metadata. The spatial data sets have already been read in to the project.

I have read several presentations doing something similar. One is to use the coverage layer to highlight the current atlas feature using a conditional (@atlas_featureid = $id)  or even selecting certain objects in a separate layer based on a feature name. An option could also be to define presets. But this latter method requires manual adjustments.

Is there a method to use the atlas table (here tbl_metadata) to filter/add the associated spatial data sets to respective maps in the atlas?


texts: Files in shared Google Drive not appearing in ArcGIS Online 'Add Item from Cloud Drive'

texts: I am trying to add a Google Sheet to ArcGIS Online through the 'Add item from cloud drive' option as per https://support.esri.com/en/technical-article/000022290.  It works pretty well aside from the fact that I can't see the files on the shared organizational Google Drive.  That is where the Google Sheet is that I want to bring into AGOL.  A colleague manages that sheet, so I can't move it to my personal Google Drive (where AGOL apparently has no issue seeing it).  The only files showing up through the 'add item from cloud drive' option are those that are in the 'shared with me' tag - which is a super small subset from the shared google drive - not all files on the shared drive.  I asked the colleague to share the file again with me, and she did, but it still doesn't appear in 'shared with me' in Google or in the ArcGIS Online dialogue.  Suggestions?  I also tried adding this google sheet as a shortcut in my Google Drive, but that didn't work either.


texts: How do I update the extent of a raster in QGIS to the actual extent?

texts:
I have a project that references several raster files.

I've grouped and styled them in QGIS 2.18, saved and closed the project, and then changed these raster files on the disk, with a larger extent.1

When opening the QGIS project again, the rasters were still being displayed cropped to their previous extents. Examining the *.qgs file in a text editor, I see that the extent of each layer is explicitly stored.

How can I update these extents in the QGIS project to the ones of the actual rasters in the raster files on disk?

I could of course add the rasters to the project anew, group and style them again (or copy the styles from the existing references) and then remove the old references. However, I'd like to avoid this repetition of effort, if possible.

Or I could just edit the *.qgs XML in a text editor, but this seems rather error-prone.

Is there a way to do this in QGIS, with the existing references?

1 actually, re-generated them with the same file names. I had originally generated them with a Python script using gdal.Warp() with cutlineDSName=... and cropToCutline=True and later without cropToCutline.


texts: Building model that loops through several origin/destination points to create several different trip routes in ArcMap?

texts:
I have a Network Dataset ready to go for the streets of New York City, and from that I'd like to map out a table of individual taxi cap trips. From what I've been told, I should be using ModelBuilder to loop through each row of the taxi data, use that to parse out points for each individual trips pickup origin and drop-off destination, and use those points to create individual routes for each trip so that I ultimately have a shapefile containing several lines (one for each trip) following the street network. I am trying my best to figure out how to get this to work, but it has been incredibly confusing.

How do I set this up?


texts: Average area calculation differences between raster stack and single Maxent models

texts:
I ran 100 bootstrap replicated models, for which I want to calculate the area of suitable habitat based on three different threshold rules (MTP, ESS and MaXSS).
The issue I'm having is that for the same threshold I get different mean area values based on either the entire raster stack of 100 models than on area single models summed and then averaged.
For example:
When I create an average raster stack of all model replicates (100 models) and reclassify it using the average threshold value of MTP from the maxentResults file I get 11 000km2.
However, when using an iterative process where I iterate through each replicate and reclassify it with its corresponding threshold value from the maxentResults file and then calculate the mean on the sum of the area from all replicates I get something totally different in this case 17 000km2.
Could someone explain why I get different mean area values?
What I would like to achieve is to create boxplots showing the variation in the area of suitable habitat produced from each model replicate.


texts: "Error Code 701": Hosted Feature Service from ArcGIS Online?

texts:
I got this error message when trying to view item details of a hosted feature service on ArcGIS Online. Along with this error message, the layer in question could not be loaded to the web map nor was visible on the Collector App.

Has anyone else experienced random outages where layers could not be loaded to an AGOL web map/on Collector?

Error:

  The service has encountered an error processing your request. Please
  try again. Error code 701. A severe error occurred on the current
  command. The results, if any, should be discarded.

ESRI technical support (UK) can't seem to put their finger on the issue, and it is causing a great deal of pain!


texts:
I'm a newbie in pgrouting. I want to create a web-app with routing function. I want to ask how to avoid a road intersection with pgRouting? For example, there are some traffic jams happened in several road intersection and I want the route to avoid/exclude that road intersecton from calculation.

regards


texts: Spatial joins in ArcMap (points to polygons) - capturing points that are just outside of outer boundaries

texts:
I am working with geocoded crime event data, and attempting to join that point layer with a census block group layer in order to get a count for each census block group (and ideally sums/averages for a couple other variables, but one thing at a time).
When I run the join in ArcMap using the Spatial Join tool (one to one, using the intersect function, no radius), I'm (understandably) unable to capture points that fall just outside of the outer boundary of my block group layer (equates to 2,705 of 1,346,047 events that are not captured). Since ideally I would like to count these data points, I've played around with changing the radius while still using the intersect function. I'm able to then capture these outer points. However, my total count far exceeds the number of events I have in my data (when I use a 1 m radius, my count captures 1,832,027 points for example), which somehow means I'm over-counting despite still calling for a one-to-one join.
I've also tried using Joins and Relates from my block group layer using both point to polygon options. The "fall inside it" option gives me 1,092,213 points (missing points that fall along the outer AND inner borders) and the point "closest to the polygon" option gives me 1,344,971 points (pretty close to my total number of events, but still not capturing some outer points for some reason).
Any thoughts?
Note: I've verified GCSs and datums are the same for both layers.


texts: Analyzing network dataset using ArcGIS Network Analyst?

texts:
I am curious as to how you would determine the strengths and weaknesses of a network dataset.

I can compare the results of different network datasets, but how do you go about determining any potential limitations to a network dataset?


texts: Custom Projection for Photogrammetry and 3D Modeling

texts:
We are an animation company specializing in infrastructure and urban design.  We get lots of data from engineers and GIS agencies in various state plane coordinate systems.  Often the coordinates are very large numbers which 3D animation packages and game engines will truncate because most use a fixed numbers of decimals to store values.

To put Portland, Oregon somewhere close to 0,0 in 3D Studio Max, we translate all of our local data in NAD 83 Oregon State Plane North (HARN) by the following:

X: -7645805.0
Y:  -683955.0

As we get into photogrammetry, we're looking at more data that is geolocated in state plane.  It would be great if we could translate data to our the coordinates directly in the apps (Pix4D, Reality Capture, qGIS, ArcGIS) using a custom projection.

Can anyone suggest how we could modify NAD 83 Oregon State Plane North (HARN) to move 0, 0 to -7,645,805.0,  -683,955.0?


texts: Nearest point on line from a point in PostGIS and its attribute value

texts:
Consider the following image;

I have points (shown in blue circles) stored in my database with their geometry and an attribute value. Additionally, I have another table with User Points (yellow rhomboids). I want to get the projection of user points on the path line of the vehicle points on the basis of their proximity to path line and also on those project points on line, I want to interpolate the value of attribute values of the nearby vehicle points.

So far, I have been able to get the points as shown in yellow circle using ST_ClosestPoint but currently I am unable to proceed further to get the interpolated values of the attribute and assign it to the yellow circles.


texts: Remove Images from Image Collection in Google Earth Engine?

texts:
In the below code, I'm going to remove some images from image collection by if condition in .map() instead of filter.neq(), what should I do for this purpose?
Map.centerObject(table);
Map.addLayer(table);

var s2 = ee.ImageCollection("COPERNICUS/S2")
.filterBounds(table)
.filterDate('2016-01-01','2020-01-01')
.filter(ee.Filter.lessThan('CLOUDY_PIXEL_PERCENTAGE',45))
.filter(ee.Filter.eq('system:index','20170910T071621_20170910T073037_T39SUR').not())
.filter(ee.Filter.eq('system:index','20180518T071621_20180518T071934_T39SUR').not());

print(s2);

code link: https://code.earthengine.google.com/7dc1cf120153095b7f48c133015398ca


texts: How to compute distance between two spherical Mercator points

texts:
I am computing the Mercator points according to the top answer at Convert latitude/longitude point to a pixels (x,y) on Mercator projection.

Now that I have two Mercator points on a spherical projection, how do I compute the distance between them?

For some background, what I am attempting to do is implement the answer at How to calculate the optimal zoom-level to display two or more points on a map and am stuck at step #2 where I need to compute the distance.


texts: How can I programmatically add a new feature template to the "Create Feature dockable window"?

texts:
This is a new question but a continuation of this post: How can I programmatically display the "Create Features" dockable window in ArcMap 10?

I like the new template system in ArcGIS 10 but for quick editing it is a somewhat cumbersome several-click process. I have a tool that starts editing a layer that is currently selected in the TOC. It also pops the "Create Feature" dockable window.

I would like to add the currently selected layer as a template to the dockable window using it's default symbology.  (VB.Net)


texts: Google Earth Engine - error when exporting table

texts:
I'm trying to export a frequency histogram table of a classified image for a region.

function country (image) {var c = image.reduceRegion({
  geometry: image.geometry(),
  reducer: ee.Reducer.frequencyHistogram(),
  scale: 30,
  maxPixels: 1e12,
}); return ee.Feature(c.select(['classification']))}

// export function
function export_table (table, description, date) {
  var em = Export.table.toDrive({
    collection: ee.FeatureCollection(table),
    description: region+'_'+description+'_'+date,
    folder: region,
});return em}

But I get the error: Error: Invalid argument: 'collection' must be a FeatureCollection.

I've set the FeatureCollection in the export function, so I don't know what's happening here.

Link to code: https://code.earthengine.google.com/582da4a11433f1645b359b8ae2086c86


texts:
a simple question. Did anyone manage to use time manager with dates before 1900? Other than the solution suggested by Anita in

Is it possible to change the year range of time manager in QGIS?


texts:
I'm trying to write a tool that moves a selected point from its old location to wherever I click, but can't seem to find the code in the MapBasic user guide.

Ideally, I would like to select an object, click the button for the tool, then click the new location and the point would be moved.

I have attempted to build the tool using the following code but when I click the new point where the feature should be located, it does not move.


texts:
I use some color palettes (1) that I added through QGIS settings and I would like to know if it is possible to customize how these palettes are displayed in the Layers Properties or any popup widget for color selection. More specifically, the width of the columns or the number of "pixel" colors displayed in a row. By default, QGIS shows this way:

My goal is to have a better visulization as shown below:

(1) https://www.davidrevoy.com/article27/palettes-for-gimp-mypaint-or-krita


texts: QGIS becomes non-responsive when adding jpg raster layer

texts:
When trying to add a raster layer (georeferenced jpg-files) QGIS becomes non-responsive. I have tested the jpgs and they are not corrupted, sometimes they appear and it works for a little while before QGIS freezes and somtimes the programme freezes while loading the images. I am using the latest version 2.12 Lyon, but had the same problem with Lisboa. My PC has 7GB ram and the jpgs are not larger than 16 to 20mb. I have loaded images in QGIS before, without problems.

Any suggestions to why QGIS becomes non-responsive?


texts: Eliminate noise when using spatial join with tolerance

texts:
I have two networks, which doesn't align perfectly with each other, so when I want to attach attributes from one to another, I have to use spatial join with a certain amount of tolerance. However, at the same time, it creates noise due to the tolerance including extra geometry which should not be included, as you can see from the following pictures. As far as I know, it is the problem due to the quality of the two networks. If the two network can align with each other perfectly, I won't have this issue. I wonder if there is a way to eliminate the noise, given the two networks having the quality issue.

I am using the ArcGIS 10.3.1 Advanced License.


texts: Using ArcPy to find connected features and update attribute table?

texts:
I have a map containing Polylines. There are some blank field names. I want to fill them with the name of connected features. How to use python to find the connected features and update the attribute table? My strategy is to read each row of the attribute table and find the field name of corresponding connected feature. If there are multiple connected features, just pick one of them.

I'm fairly new to ArcGIS.

The "connected" here means INTERSECT (A, C, D, E, F, G, H, I, J)

The following code is what I have so far.

import arcpy
my_shp = "Z:\Desktop\example\Export_Output.shp"
rows = arcpy.UpdateCursor(my_shp)
arcpy.MakeFeatureLayer_management(my_shp, "new_lyr")
arcpy.AddField_management(my_shp, "NEWFIELD", "TEXT", "", "", "25", "", "NON_NULLABLE", "NON_REQUIRED", "")
for row in rows:
    targetRow = row.targetfield
    query = """ "NAME" = '%s'""" % targetRow
    arcpy.SelectLayerByAttribute_management("new_lyr", "NEW_SELECTION", query)
    my_selection = arcpy.SelectLayerByLocation_management("new_lyr", "INTERSECT", my_shp, "", "NEW_SELECTION")
    ##################
    # unfinished here#
    ##################
    print(targetRow)
    print(THE RETURN NAME)
    #update the NEWFIELD with the return name
    row.NEWFIELD = return_name  #the return name
    rows.updateRow(row)
del row
del rows

Attribute table

Expected result

For example, The field NAME of FID = 11 is blank and if featcure of FID = 7 is connected to it, then fill the blank NAME with "S32"

Data


texts: Import polygons to PostgreSQL database using ogr2ogr (Ubuntu 16.04)

texts:
I want to use ogr2ogr to import data into a PostgreSQL database. Therefore, I create the database like this:

sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt update
sudo apt install postgresql
sudo apt install postgis

sudo su postgres
psql
DROP DATABASE globcit;
CREATE DATABASE globcit;
\q
exit

Afterwards, I want to copy polygons from an OSM pbf file to this data base.

ogr2ogr -f PostgreSQL PG:dbname=globcit -nlt GEOMETRY
-sql "select * from multipolygons where natural=\'water\'"
-progress lakes turkey-latest.osm.pbf

(formatted for better reading, usually one-liner)

However I get the error:

FAILURE:
Unable to open datasource `lakes' with the following drivers.
  -> PCIDSK
  -> netCDF
  -> JP2OpenJPEG
  -> PDF
  -> ESRI Shapefile
....

what am I missing?


texts:
I am trying to make many points in a map as a grid.
The code makes what I expect but the time to load is quite long so I suppose that there should be other ways to be more efficient drawing many circles.
The code used is the one below (the script).

<script>
    var map;
    function Initialize() {
        LoadMap(40.36, -3.66, 6);
    }

    //***************************************
    // MAP
    //***************************************

    function LoadMap(lat, lon, zoom) {
        //Define map options

            var fromProjection = new OpenLayers.Projection("EPSG:4326");                                                    // transform from 3857?  //4326,900913
            var toProjection = new OpenLayers.Projection("EPSG:900913");                                                    // to Spherical Mercator Projection
            var extent = new OpenLayers.Bounds(-7.5, 36.5, -2.5, 39.5).transform(fromProjection,toProjection);  // (W,S,E,N)
        var options = {projection: "EPSG:900913", units: 'km'};
        map = new OpenLayers.Map("mapDiv", options);

        //base map
            var ghyb = new OpenLayers.Layer.Google( "Google Hybrid", {type: google.maps.MapTypeId.HYBRID, visibility: false} ); //numZoomLevels: 22

            //Switch control
            map.addLayers([ghyb]);
            map.addControls([new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoomBar()]);

        //Build up all controls
        var lonLat = new OpenLayers.LonLat(lon, lat).transform(
                new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
                map.getProjectionObject() // to Spherical Mercator Projection
              );

        //Center the map
        map.setCenter(lonLat);
        map.zoomTo(zoom);

        //add Rectangle
            var style = new OpenLayers.Style({
                fillOpacity: 0.0,
                fillColor: "#7ab800",
                strokeOpacity: 1,
                strokeColor: "#7ab800",
                strokeWidth: 3
            });

        boundingLayer = new OpenLayers.Layer.Vector("Bounding Layer",{styleMap: new OpenLayers.StyleMap(style)});
            box = new OpenLayers.Feature.Vector(extent.toGeometry());
            boundingLayer.addFeatures(box);
        map.addLayer(boundingLayer);

        //Circles layer
            for (i = 36.5; i <= 39.5; i = i + 0.25) {
                for (j = -7.5; j <= -2.5; j = j + 0.25) {
                   lonLatLocation  = new OpenLayers.LonLat(j, i).transform( // LonLat(lon, lat)
                               new OpenLayers.Projection("EPSG:4326"),      // transform from WGS 1984
                               map.getProjectionObject()                            // to Spherical Mercator Projection
                             );
                   vectorLayer = new OpenLayers.Layer.Vector("Circles Layer");
                   map.addLayer(vectorLayer);
                   createCircle(new OpenLayers.Geometry.Point(lonLatLocation.lon, lonLatLocation.lat));
                }
            }
    }

    //Add circles to circles layer
    function createCircle(center) {
        vectorLayer.removeAllFeatures();
        var sunpoly = OpenLayers.Geometry.Polygon.createRegularPolygon
            (
                center,
                1000 / Math.cos(50 * (Math.PI / 180)),
                36,
                0
            );

        var suncircle = new OpenLayers.Feature.Vector(sunpoly, null, { fillOpacity: 1.0,
                                                                                fillColor: "#FF0000",
                                                                                strokeOpacity: 1,
                                                                                strokeColor: "#FF0000",
                                                                                strokeWidth: 3 });
        vectorLayer.addFeatures([suncircle]);
    }

</script>

Is there any other better way?


texts: Running second FME workspace when first workspace is completed

texts:
I've got a workspace that inserts data in a database. It runs on FME Desktop and FME Server.

After the insertion (the first workspace) is completely done, I'd like to run a second workspace that checks the data quality (if there are spatial duplicates).
So the first workspace has to transfer a parameter to the second workspace (the database scheme).

How do I do it?

I thought about using automations on FME Server but I don't see an appropriate trigger event


texts:
There is no appropriate zoom event listener in OpenLayers v5.3 yet, but there is a workaround suggested in this ticket:

  You can use this.view.instance.on('change:zoom', evt =>
  console.log(this.view.zoom)); where view is a viewChild :
  @ViewChild(ViewComponent) view: ViewComponent; to detect zoom changes.

Can anyone please explain to newbies how to utilize this? How to use that weird :-) code with an instance of a map view which is usually got by calling map.getView()?


texts: What are "DR$XMLDOCIX1" tables in ArcSDE?

texts:
I was wondering if anyone knows what these tables are in SDE?
I'm working in an ArcGIS 10.1 environment, Oracle 11gR2 database.


texts: QGIS hotkey assign: "select next feature and zoom to feature"

texts:
I have a dataset with 2000+ feature based on addresses. I need to zoom to each point individually and move them a little (no consistent shift so no other way to do it).

Selecting the next feature in the attribute table and hitting the "zoom to selected" is a bit tidious. Is there a way (or python script) to assign a hotkey which automatically selects and zooms to next feature?


texts: Open and read spectral library as array in Python?

texts:
I'm creating a spectral library in envi and I need to read this as an as array in python. I'm trying to use pysptools (pysptools.classification.SAM) package but i don't understand how to do this from the documentation.

sam.classify(M, E, threshold=0.1, mask=None)

Parameters:
M – numpy array A HSI cube (m x n x p).
E – numpy array A spectral library (N x p).

How to pass parameter E (I have spectral library created in ENVI)?
Please Provide example if possible.


texts: Seeking LiDAR data processing and analysing tool?

texts:
I am working on Lidar VLP-16.

Can you advise me about the open source software that I could use for processing the lidar data and extract the object from the data?


texts: Downloading salinity data from Government of Canada

texts:
Since I would like to use the salinity data with lat/lon in the Gulf of St. Lawrence, Canada to compare with the fishing data.
I'm trying to download the 2010-2019 average salinity data.
As the table in this database showed. (https://www.arcgis.com/home/webmap/viewer.html?url=https%3A%2F%2Fgisp.dfo-mpo.gc.ca%2Farcgis%2Frest%2Fservices%2FFGP%2FTeleost_BottomTemperatureSalinityFond%2FMapServer&source=sd)


texts: I am trying to find PDF documentation for Maplex for ArcGIS

texts:
Does anyone know where to find the PDF documentation for Maplex for ArcGIS 9.3 ? There was a website from ESRI but it was broken link ?

I need to review it because I am working on impaired streams and lakes and needs their labels to set it up properly. Trying to do it in Label Manager several times.

Thanks,


texts: QGIS - Remove buffer from line to make polyline again

texts: I added a buffer in order to merge multiple polylines into one long polyline. I had to select buffer distance 10 to achieve the join i wanted but now im left with a buffered line that i would like to get back to a thin 0 width polyline. How to solve this?


texts:
I was wanting to embed some animal sounds in a leaflet map my son and I are creating.  Have images embedded, but would like sounds in the popup if possible.

Like embedding images, can this be done with some simple code in the attribute table referencing the .wav or similar files?

Obviously the attached image didn't work, but I was wanting something like this if possible.


texts: How to Fill blank Fields with other column QGIS

texts:
I have two columns of the same data and I want to unite

for example I have the column "pole_type" and "pole_type_"
and sometimes one has values and some times the other

like seen in the photo

I want to get all the values in "pole_type_" into "pole_type" so I can delete the first

Iv'e used so far the following rules but not succeeded

IF(NULL,"pole_type_","pole_type")

or

IF("pole_type='',"pole_type_","pole_type")

and so on
but I havn't came up with anything that works.


texts: Downloading and starting MapServer4Windows

texts:
I am new to web mapping and am trying to use MapServer For Windows. While I have found tutorials I have been unable to even install the program.

I have updated to the most recent LTR version of QGIS and its associated programs, as I was under the assumption that I needed OSGeo4W to run MS4W. However, I am still having issues accessing MS4W.


texts: Maplex not respecting feature weight in ArcMap?

texts:
I have a bunch of unlabeled point features with a high feature weight (800) and a labeled street centerline file with a weight of zero. Despite setting the weights for conflict resolution my street labels still overlap the point features.

Has anybody experienced this in ArcMap 10.2.2 on Citrix VDI, and have a workaround?


texts: Getting error when removing join using Arcpy

texts:
I have joined a CSV table to a raster layer, now I am trying to remove the join. I have typed the following command:

arcpy.RemoveJoin_management("hwsd_lyr",hwsd_csv)

It gives the following error:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000800: The value is not a member of  | HWSD_CLS_DATA.csv.
Failed to execute (RemoveJoin).


texts: How to export polygon coordinates to CSV (not WKT)?

texts:
I am trying to export polygon coordinates from a shapefile to a CSV file, but so far all my attempts have failed. I have found numerous questions and answers about this, but none have solved my problem.

I have downloaded the file

www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip

which is a shapefile containing a basic world map. I have imported the shapefile into QGIS by adding a vector layer, and then I try to export the polygons with coordinates for each country. The tips that I have found suggest either saving the layer by right-clicking it and then selecting Save as or opening the attribute table and copying it into Excel. If I try these I only get master information with one row for each country in the map.

Does anyone know how I can retrieve detail information for each country containing the polygons with coordinates?


texts:
I have installed the geonetwork, a link with http.
I recently upgraded to use https, but many of the chosen options work.
Feedback
The geonetwork prepared to work over https?
Try geonetwork in https and ter error 403 in POST, DELETE, PUT.


texts: Create a working standalone Windows executable

texts:
Has anyone been able to create a working standalone Windows .EXE file from a QGIS Python Script Using PyInstaller?

I'm create to file.exe ..not found..## Heading ##failed to execute script...

File "site-packages\geopandas\base.py", line 17, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "c:\osgeo4w64\apps\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\rtree\__init__.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "c:\osgeo4w64\apps\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\rtree\index.py", line 5, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "c:\osgeo4w64\apps\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\rtree\core.py", line 116, in <module>
OSError: could not find or load spatialindex_c.dll
[12116] Failed to execute script mergefiles_completo


texts: What format comes out when you export from OSM

texts: I am trying to export this osm output (and then convert it into geojson).  I click export and get a file called "map." What format is this file in?


texts: Remove Geometry from map using ArcGIS API for JavaScript?

texts:
I need to remove a geometry from the map. It may be a marker, circle, polyline etc.
I don't see any method like remove, clear or destroy. I already know how to clear everything on the map but this is not what I need.

I would like to remove it with javascript.


texts: i.nightlights.intercalibration, Problem with running code

texts:
Problem with running i.nightlights.inter-calibration for the Elvidge (2014) model-coefficients.

Steps I have followed:

1.I have imported all the following layers individually:

  g.list type=raster

F101992
F101993
F101994
F121994
F121995
F121996
F121997
F121998
F121999
F141997
F141998
F141999
F142000
F142001
F142002
F142003
F152000
F152001
F152002
F152003
F152004
F152005
F152006
F152007
F162004
F162005
F162006
F162007
F162008
F162009
F182010
F182011
F182012
(Tue Jun 19 12:29:21 2018) Command finished (0 sec)

I have run the code on the dialog box of i.nightlights.intercalibration :

For Some reason after running the code I got the following error message:

What could be possibly going wrong?


texts: load svg file in esri map in arcgis android sdk

texts: How to load .svg file in Esri map android sdk version 10.2.9?


texts: How to select congruent polygons in PostGIS?

texts:
Title says it all. What is the best way to select congruent polygons in PostGIS?

CREATE TABLE polygon_a (
gid serial NOT NULL,
geom geometry(Polygon, your_SRID),
CONSTRAINT polygon_a_pkey PRIMARY KEY (gid)
);

CREATE TABLE polygon_b (
gid serial NOT NULL,
geom geometry(Polygon, your_SRID),
CONSTRAINT polygon_b_pkey PRIMARY KEY (gid)
);

SELECT * FROM polygon_b
WHERE
-- ???
;


texts: Calculate the length of a line feature and then add points at percentage length in arcgis

texts:
The scenario is we have chopper pilots who are laying baits for wild dogs, pigs etc every X metres along a predetermined run length (multiple line features).

What I want to be able to do is determine where on the run they will be 25,50,75% through their flight run and they can determine the percentage of baits used so that they can be more accurate with their bait laying

Preferably within the arc toolbox so I can add to the existing modelbuilder project that automates the creation of flight paths etc.