texts: How to copy entire fields into a python list

texts:
I'am trying to find a way to copy entire fields(columns) in a feature class attribute table as lists inside a master list (python).

To illustrate it, consider the table below:

So the list should look something like this:

talukas = [[26190, 26191, 26192, 26193, 26194, 26195, ...],
   [Tharad, Vadgam, Vav, Amod, Ankleshwar, Bharuch, ...],
    [None, None, None, None, None, Ahmedabad Ciy, ...] ]

I was trying this,

    features = [[row.getValue(f) for f in fields] for row in arcpy.SearchCursor(fc)]

but this gives the entire row values in sub-list and not column value.


texts:
I have a shapefile (Point) and a table which I join using the following code.

public ITable JoinLayer_Table(IFeatureLayer pFeatLayer, IStandaloneTable pStTable)
        {

            IDisplayTable pDispTable;
            IFeatureClass pFCLayer;
            ITable pTLayer;
            pDispTable = (IDisplayTable)pFeatLayer;
            pFCLayer = (IFeatureClass)pDispTable.DisplayTable;
            pTLayer = (ITable)pFCLayer;

            IDisplayTable pDispTable2;
            ITable pTTable;
            pDispTable2 = (IDisplayTable)pStTable;
            pTTable = pDispTable2.DisplayTable;

            IRelationshipClass pRelClass;
            IMemoryRelationshipClassFactory pMemRelFact = new MemoryRelationshipClassFactory();
            pRelClass = pMemRelFact.Open("TabletoLayer", (IObjectClass)pTLayer, "HouseNo", (IObjectClass)pTTable, "UNIT_ID", "forward", "backward", esriRelCardinality.esriRelCardinalityOneToMany);

            IRelQueryTableFactory pRelQueryTableFact = new RelQueryTableFactory();
            ITable pRelQueryTab = (ITable)pRelQueryTableFact.Open(pRelClass, true, null, null, "", true, true);
            return pRelQueryTab;
        }

The join results is an ITable.

Now I need to make a shapefile from the Join results and add it to the TOC in ArcMap.  How can I do this?

Any code example would be greatly appreciated.

Actually I wanted to join two shapefiles (a point shapefile and a polygon shapefile) and get a point shapefile for the JOIN results, but could not do that.  So that's why I have a point shapefile and the corresponding dbf of the polygon shapefile to create the Join.

Any help on this also would be greatly appreciated.


texts: Trouble with syntax of preselection in a cursor

texts:
I am trying to determine the maximum values in a column [1] in relation to a column [2]. For this purpose I have written all occurring values of column [2] in a list and now I want to make a selection when creating the cursors for finding the maximum in column [1]. If I write the value manually into my script it works fine, but if I want to use the list for the selection, my script unfortunately aborts. I guess that my issue is the preselection by definition of the secound cursor. How can I do this?

My current code is

#creating a list ->"mast_value" with unique values of field [ID_1]
with arcpy.da.SearchCursor(inLAS[:-4] + '_POLE_POINTS.SHP','ID_1') as max_cursor:
    for row in max_cursor:
        mast_value = sorted({row[0] for row in max_cursor})

#iterate through the list to find highest value in field [pointz], but only in features which have the value of the element of the list "mast_value"
for mast in mast_value:
    with arcpy.da.SearchCursor(inLAS[:-4] + '_POLE_POINTS.SHP','POINT_Z'), ("\"ID_1\" = mast") as cursor:
        for row in cursor:
            print str(max(row))


texts: Problem loading image in HTML Pop up in ArcGIS

texts:
I am trying to load a small image along with other field in Html pop up but i am getting some problem. I tried using field calculator with Python code "" % r'!Location!' where the 'Location' is field in the same attribute table with full address of the image to be displayed in pop up.
With this code the result returned was  . Now when I check in the HTML pop up all the fields are shown along with picture field but without picture. After some checking when I remove that 'u' alphabet before the address of the image , the image is displayed in the HTML pop up. Now how can I avoid getting 'u' before the address?


texts: I have a CSV file with WGS84 trackpoints and visualizing them with QGIS textplugin works fine. The log interval is 1sec and I like to get the current speed to get a visual feedback, how fast the vehicle was between two points (so distance/time). Any idea how I can realize this with a style?


texts: Why does only one of three elevation rasters display correctly?

texts:
I downloaded a selected sub-set of the USGS National Elevation Data (NED) using their online GUI. This download came in the form of three files.

The names of the files are 61471006, 61471006_2, and 61471006_3.

To load the rasters, I have found I go into these files and load the file of type ".adf". (Is this not true?)

It works just fine for one file at a time.
When I load all three in turn, the QGIS layers list shows three little raster icons with tiny "previews" of the area covered; the name of each one happens to be identical to the other two (w001001).

They always load "flat" -- that is, one gray-scale tone. So I use the Properties dialog to stretch to MinMax. When I do, only one of the three will change and show the range of shadings indicative of elevation range. The other two turn black.

How can I get all three to show the MinMax range?


texts: How to add 3d Breaklines to a raster in Arcgis desktop?

texts:
I have prepared some breaklines from surveyed points. I want to modify a raster which has already been prepared for the area of interest based on these new breaklines.How can I do this in Arcgis desktop?

I've prepared this raster from Arcgis Ascii file. something like this :

ncols          301
nrows          801
xllcorner      383995.00000000
yllcorner      236995.00000000
cellsize       10.00000000
NODATA_value  -9999
-9999 11.9425 11.9487 12.0082 12.0337 11.941 11.9333 11.9294 11.9889 11.9194
11.8746 11.8893 11.8306 11.7449 11.7564 11.5078 11.2522 11.2105 11.2252
11.2128  11.1542 11.2738 11.2406 11.3117 11.2684 11.3148 11.4144 12


texts: Extracting nodes and edges from osm data

texts:
I am trying to extract the edges and nodes of a certain city from osm files and save them to a database. How can I accomplish this. I am not sure how much osm2po and osm2pgrouting tools are acceptable. I mean what is the standard procedure to get the graph. I mean when I use osm2po and tools like that they generate their own data structures. I mean they have this column called geometry of type multiline string and stuff. I am not sure if I should use this. Actually, I want to implement shortest path algorithm of my own.

I am not sure if osm is the only source to get such graph. Also, I want to plot the generated graph in matlab. How can I accomplish this?


texts: Export to DXF from Multipoint Z geometry in PostgreSQL using ogr2ogr

texts:
I want to export a PostgreSQL table of geometries in Multipoint Z to DXF using ogr2ogr

I tried this command

ogr2ogr -f "DXF" output.dxf PG:"host='127.0.0.1' port='5432' \
dbname='dbname' user='user' password='password'" -sql \
"select st_transform(st_geomfromewkb(decode(geometry_base64, 'base64')), 4326) as geom \
from my_table limit 1"

but get errors:

ERROR 1: No known way to write feature with geometry 'Multi Point'.
ERROR 1: Unable to write feature 0 from layer sql_statement.

ERROR 1: Terminating translation prematurely after failed
translation from sql statement.


texts: This functionality is not supported by Default spatial service. DevArt dotConnect for PostgreSQL error

texts:
I want to get geometry data as binary. Its give me an error {"This functionality is not supported by Default spatial service."}. I am searching but nothing found about it.

var ilces = db.MaksIlces.Where(p => p.GID == 0).FirstOrDefault();
var aa = ilces.Geom.WellKnownValue.WellKnownBinary;

in the second line gives me this error.


texts: When appending new data (points) in AGOL, the new points dont show up in the map?

texts:
So my workflow was:

Open csv file in arcgis pro and plotting points on the map
Make a feature service and upload it to arcgis onine
Added 1 extra row to the csv file with new data.
Saved this csv file in sharepoint
Go to AGOL, to my feature service I uploaded here
Clicking on append data, then selecting my new csv file in sharepoint
Succesfully appended. It is shown in the table but not shown on the map

Anyone know why the point isn't showing up on the map ?

(Coordinate system is in RW new, when I click zoom to point in AGOL I can zoom to the location but nothing is to be seen there)

They are clearly in the table but not visible in the map.


texts: Georeferencing DWG files on imagery which is hard to see through (e.g. trees)?

texts:
Here I have a few campgrouds that I have for are in DWG files that I am going to georeference them. I have no problem with that however; some of these campgrounds I need to georeference on the imagery are pretty much covered with alot of trees and it is difficult to georeference it. Is there a way around that can I see "through" the trees where I can see the road under the trees? I have in my mind but the campgrounds are mostly on the Forest Service lands. Right now I am using the ESRI Basemap World Imagery. Most of the campground I found are able to identify easily. I need to do 3 of them. I checked other basemaps and they are not that good to see it.  Any ideas ?

Here is the example taken from picture


texts: Remap 'NoData' values 1 using arcpy.sa.RemapRange

texts:
I'm trying to remap values of NoData to '1' using the arcpy.sa.RemapRange object. I understand there needs to be a range of values using [[startValue, endValue, newValue],...], however I'm struggling to get NoData values to remap to value 1. I also want values of 1 staying as 1. I've tried the following:
Both of these remap NoData values to 0.
remap = arcpy.sa.RemapRange([["NODATA",1],[1,1,1],[2,2,2],[3,maxval,3]])

remap = arcpy.sa.RemapRange([["NODATA",0,1],[1,1,1],[2,2,2],[3,maxval,3]])

I'm not sure what the endValue should be. Does anyone know the correct endValue to use?


texts: Regular expression to match all numbers in comma-separated list in FME

texts:
In FME, I have a Feature Type with municipalities and their IDs, and a string attribute made of an unknown number of these IDs, separated by commas, like for example:

5586,5587,3468,9942

The goal is to keep only the features whose IDs are in the list. I wanted to use the StringSearcher transformer to extract the numbers in a list, but I can't figure out the Regular Expression to use.

I'm fairly new to FME, so is this the right way to do that?
If so, what would be the regular expression to use to return every numbers to the "Matched Parts Attribute"?


texts: How can I merge overlapping nodes of a polygon in QGIS?

texts: My shape is composed of 7 polygons which are supposed to be adjacent (ie sharing sharing same nodes). Would like to join the polygons by their nodes and make sure there is no space in between two polygons. But the 7 polygons maintained separately. Is there a way to do that?


texts: Import 3D tracking data in ECEF coordinates from a Google Earth Studio project as a layer of of points into a WGS 84 QGIS project

texts:
In addition to the rendered frames, Google Earth Studio has the option to generate a .jsx or a .json file with the 3D tracking information. (for information see https://earth.google.com/studio/docs/advanced-features/3d-camera-export/ ).
The JSON file has the camera position for each frame in xyz Global coordinates per ECEF (Earth Centered, Earth Fixed)) as well as lat long altitude coordinates. I want to use this information to produce the rendered frames as atlas pages in QGIS.
After converting the JSON to a CSV, I can create a layer from it in QGIS but the locations on the map are nowhere where there should be. I have experimented with different CRS for the layer but none seem to position the positions correctly on the map.


texts: for a Dutch studentsmagazine I'm writing an article about gis and how to use it in different Fields of Science Research. I'd like to put some fun stuff in there, like this study on Banksy (http://www.tandfonline.com/doi/full/10.1080/14498596.2016.1138246), but somehow this one seems to be the only one I can find. Weird, 'cause I guess there must be tons of funny, geeky research examples.


texts: How to make crs transformation of a QgsVectorLayer?

texts:
I need to transform QgsVectorLayers in python from one crs into another crs. By googling I found the following solution (https://qgis.readthedocs.org/en/latest/docs/pyqgis_developer_cookbook/05_crs.html), which works for points only:

crsSrc = QgsCoordinateReferenceSystem(4326)    # WGS 84
crsDest = QgsCoordinateReferenceSystem(32633)  # WGS 84 / UTM zone 33N
xform = QgsCoordinateTransform(crsSrc, crsDest)
pt1 = xform.transform(QgsPoint(18,5))

Is there a way to make a crs transformation of an entire layer?


texts: Making separate Python installation that can call ArcPy?

texts:
I see a lot of Q&As asking how you can create a separate Python installation (e.g. the Anaconda or Python XY distribution) that can use arcpy, while not 'breaking' the original ArcGIS python installation.

I had this same problem, and I think I have found a 'universal' solution. So far we have done this on about 8 computers at work and it all works fine.

How to install a separate Python distribution that can use ArcGIS?


texts: Changing the order of columns in QGIS attribute table?

texts: How can I rearrange the order of columns in my attribute table?  I'm inputting a lot of data and would prefer to not have to scroll all the way to the end of my columns for each new entry.  Ideally i'd like to be able to just filter out the columns i don't need to view for this task.


texts: Create a GeoDataFrame with more than one geo_column

texts:
I am working with PostgreSQL/PostGIS and geopandas. I have tables with more than one geometry.
How can I move this kind of tables to geopandas recognizing all the geometries columns? I am using GeoDataFrame.from_postgis but I can only specify one column with geometry.


texts: Combine two separate georeferenced data sets in one table using CartoDB

texts: I have two tables each georeferenced in CartoDB with the same timestamps, can I merge the two and keep the georeferenced data so I have two sets of points but in one table?


texts: Google Map with search box and drag-able Pin

texts:
I'm trying to build a map with a search and with drag-able pin and the results will give an address and Latitude Longitude. I'm trying this code but something doesn't work and I can't find it...

Please help

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />

<input id="address123" type="textbox" value="Sydney, NSW">

<input type="button" value="Geocode" onclick="codeAddress()">

    Marker status:

Click and drag the marker.

    Current position:

    Closest matching address:


texts:
Unable to set background image of Qframe using python following code works fine in centos but in  window 7 not even its did not show any error

self.frame_2.setStyleSheet(_fromUtf8("border:0px;background-image:
url("+self.getImagePath("4.jpg")+")"))

 def getImagePath(self,image):

    pluginPath = (os.path.dirname(__file__))
    themePath = str("icons")  + QDir.separator() + str(image)
    filePath =  pluginPath + QDir.separator() + themePath
    if QFile.exists(pluginPath + QDir.separator() + themePath):

         return filePath
    else:
        return ""


texts: r - reinsertion of intersection points into initial dataset after sf::st_intersection

texts:
I have one dataset with POINTS called pts1. I'm connecting them into aLINESTRING and I'm calculating intersection points of that LINESTRING with multiple LINESRINGs from another dataset. The main goal is when the intersection points are calculated I want them to be reinserted into the pts1 dataset in their corresponding place. Maybe there is a function in sf I don't know about or maybe this can be done with several conditions ?

Simplified example below:

# initial dataset
pts1 <- data.frame(id = c(1,1,1,1,1), lon = c(2,4,5,7,8), lat = c(1,4,3,2,5)) %>%
  st_as_sf(coords = c("lon", "lat"), dim = "XY") %>% st_set_crs(4326)

# make linestring
lns1 <- pts1 %>% group_by(id) %>%
  summarise(geometry = st_union(geometry), do_union = FALSE) %>% st_cast("LINESTRING")

# second dataset with multiple linestrings
lns2 <- data.frame(mark = c(1,1,2,2), lon = c(3,3,6.5,6.5), lat = c(1,4,1,4)) %>%
  st_as_sf(coords = c("lon", "lat"), dim = "XY") %>% st_set_crs(4326) %>%
  group_by(mark) %>% summarise(geometry = st_union(geometry), do_union = FALSE) %>% st_cast("LINESTRING")

# intersection points
inters <- st_intersection(lns1, lns2)

# desired output: the intersection points have been reinserted in the first dataset pts1 between the original two points where the lines intersected
desired_df <- data.frame(id = c(1,NA,1,1,NA,1,1),
               lon = c(2,3,4,5,6.5,7,8),
               lat = c(1,2.5,4,3,2.25,2,5),
               mark = c(NA,1,NA,NA,2,NA,NA)) %>%
  st_as_sf(coords = c("lon", "lat"), dim = "XY") %>% st_set_crs(4326)


texts: Script won't delete feature classes from file database using ArcPy?

texts:
I wrote a script that creates a GDB using a designated parish/county name and then does a selection by location and extracts from another db to the newly created db. This all works fine but there are some empty feature classes in the db that I want to remove.

The code below recognizes the empty fc's but does not delete them. In the results, it creates the message saying that it deleted the fc but when I check the geodatabase everything was stored in, the empty fc's are still there. This portion of  the code runs perfectly fine when adjusted for other scripts that just involve shapefiles in a folder. Is it an issue with the gdb that I'm not aware of?

    arcpy.env.workspace = output + r'/' + parish + '.gdb'

for file in arcpy.ListFeatureClasses():
    layerName = arcpy.Describe(file).baseName
    arcpy.MakeFeatureLayer_management(file, layerName)

    if int(arcpy.GetCount_management(layerName).getOutput(0)) == 0:
        arcpy.Delete_management(file)
        arcpy.AddMessage('Deleted "{}" because it contains no features!'.format(file))


texts: How to have a locator map display the study area or IOT with out you setting it yourself

texts: I have  included a locator map but i would like to make it dynamic in a way that when the user is mapping changes to a different area to map the locator map should change the location automatically.


texts:
I'm trying to find out all the circles stored in the database(The circles are present all over the world) that intersect or overlap a given circle. I've stored the circles like this:

CREATE TABLE circles(gid serial PRIMARY KEY, name varchar, code integer, the_geog geography(POLYGON,4326) );

INSERT INTO circles (gid, name, code, the_geog) VALUES (1,"hello", 11,geometry(ST_Buffer(geography(ST_GeomFromText('POINT(48.732084 -3.459144)')), 1000)));

Now when I'm trying to find out all the circles that intersect a given circle, I'm getting this error:

ERROR:  Only lon/lat coordinate systems are supported in geography.

I'm using this query to get the data:

select * from circles where st_intersects (circles.the_geog,ST_Buffer(ST_Transform(ST_GeomFromText('POINT(-105.04428 39.74779)', 4326), 2877), 1500));

Can anyone tell me what I'm doing wrong ?


texts:
QGIS 1.8 on Mac: I'm hoping to migrate several dozen local maps from my 30 year old Win3.1 plotting system to QGIS. Polygons are in X,Y (CSV), first point repeated at the end to close it, with polygons separated by a blank line. They're each in local coordinates (meters from a corner). I can transform to UTM and replace the polygon delimiter by something else if needed, but it would be easier not to have to.

The format is

10,10
20,20
20,30
10,10

5,5
5,6
6,5
5,5

I've tried Import as Text Layer: the attribute table shows the values correctly, but each coordinate only shows as a point, the polygon separator lines are omitted, and the layer can't be edited. Tried to export it as vector layer as http://maps.cga.harvard.edu/qgis/wkshop/import_csv.php suggests- export fails. I can't find the mmqgis mentioned in several posts here; the Points2One plugin doesn't do anything.

Any suggestions?


texts: Filtering out data points on water or outside specified polygons using QGIS?

texts:
How do I filter out points that lie in the water or outside specified polygons?

For example I want to filter out the erroneous points in the oceans in one project, and filter out all points not in the green polygons in another project. I only know how to filter an attribute table by column and sorting using words, not sorting using shapes


texts:
Is there an R package/function that computes a least cost spanning tree given a shapefile or vector containing the latitude/longitude of each point and a raster file that contains the cost of traversing each pixel?

So, I want to be able to type:

leastcostspanningtree(shapefile, rasterfile)

and have a shapefile returned with the spanning tree.

I know I could use multiple packages/functions to do this, but I want a clean, simple solution.


texts: Problem with Coordinate Tolerances when I export my .shp files to .mdb

texts: When I export my shapefile to a personal geodatabase using ArcMap, the result is not the same as the original database. I do not know how to solve this problem.


texts: Displaying Vectortile Source using ngx-openlayers

texts:
I downloaded a tileset from OpenMapTiles and host it with tileserver-gl, what is working just fine. Now I want to load and display the vector tiles in an Angular 7 application using ngx-openlayers, but am not sure how to achieve this.

What I did so far

Setting up the tileserver with the following config.json:

{
  "options": {
    "paths": {
      "root": "",
      "fonts": "fonts",
      "styles": "styles",
      "mbtiles": "tiles"
    }
  },
  "styles": {
    "positron": {
      "style": "positron/style.json",
      "tilejson": {
        "format": "pbf"
      }
    }
  },
  "data": {
    "v3": {
      "mbtiles": "2017-07-03_europe_germany.mbtiles"
    }
  }
}

After starting the tileserver listening on the default port, localhost:8080 shows the following:

"Positron" is the style I want to use for rendering the vector data.

Inside the Angular template I tried to load the vector tiles as following:

<aol-map>
    <aol-view
        [zoom]="mapState.zoom"
        [minZoom]="5"
        [maxZoom]="17"
    >
        <aol-coordinate
            [x]="mapState.coordinates.latitude"
            [y]="mapState.coordinates.longitude"
            [srid]="'EPSG:4326'"
        >
    </aol-view>
    <aol-layer-vectortile [style]="mapStyle" [renderMode]="'vector'">
        <aol-source-vectortile [tileUrlFunction]="tileUrlFunction">
            <aol-format-mvt></aol-format-mvt>
            <aol-tilegrid></aol-tilegrid>
            <aol-attributions>...</aol-attributions>
        </aol-source-vectortile>
    </aol-layer-vectortile>
</aol-map>

Inside the Angular component, I define mapStyle like this:

public mapStyle: ol.style.Style = require("src/style.json");

However, I am not sure how to define tileUrlFunction, or if I am on the right way at all.
When I render the "Positron" style on the server and serve it as png, I can display the map as a normal tile layer without any problem.


texts: Is there a way to open an (embedded or not in QGIS...) window containing a Google Streetview view at given coordinates using PyQGIS?


texts: Representation/meaning difference between religious icons in open street map?

texts:
I'm curious what the difference is between these two icons used in open street map.
The cross clearly represents a christian church.
Is the kneeling icon a more general religious icon representing building that isn't necessarily a church and/or christian?


texts: Selecting only the first row of polygons around polygons

texts:
I am currently working on my thesis and after trying for a few days I decided to ask this questions since I guess I'm stuck. I'm working on ArcGIS PRO 2.7.0 with datasets obtained via Esri (online) the Netherlands.
Basically, I have data from a lot of buildings all depicted by polygons which is one data layer (I have clipped it to the municipality of Amsterdam and hence it contains around 120000 rows). In addition I have outlined a few parks in Amsterdam I wanted to research and I have made buffers of 10~50m around them. What I want to research is the functions of buildings in close adjacency to parks.
I have tried to intersect the buffer layer with the buildings layer which has given me outcomes as expected. However, I want to research only the FIRST ROW of buildings close to parks. Is there a way to do this (non-manually)? I have attached a screenshot of the outcome of the buffer (40m) and buildings layer in which you can clearly see multiple rows of "buildings" are selected. To clarify, I am trying to obtain an output in which only the first row of buildings (i.e. the buildings that are adjacent to the parks) are selected; the buildings that are surrounding the park on each site.
I am thinking that an option could be to change the polygon layer of the parks (indicated in black in the picture below) to a line. I read somewhere that this could help but I am not sure.


texts: Iterate over GeoPandas rows to translate multipoints by different values

texts:
I would like to iterate over each row in a GeoPandas multipoint dataframe to translate each point by different x, y values as such:

x = [numpy array of x translations of length of dataframe] ex: [5,10,6,8,...]
y = [numpy array of y translations of length of dataframe]

for index, poi in test1.iterrows():
    test1.loc[index, 'geometry'] = test1.loc[index, 'geometry'].translate(xoff=x[index], yoff=y[index])

I'm getting the error: AttributeError: 'MultiPoint' object has no attribute 'translate'

As a note: it will run using

for index, poi in test1.iterrows():
    test1['geometry'].translate(xoff=x[index], yoff=y[index])

but ultimately moves all the points over and over.

Any ideas?


texts: QGIS 3.16 different results in volume calculation

texts:
I am trying to find ways to calculate a volume with :

1 base DEM resolution 1m
1 elevation DEM resolution 1m

First method:
Using the extension volume calculation tool as follows.
The result seems correct 22484 m3.

Second method:
I wanted to do the calculations by hand from a DEM representing the difference between elevation and base DEM.
So in raster calculator :

then in theory, I have to multiply number_of_pixel by surface_of_pixel by sum_of_pixel_value
With zonal statistics algorithm, I have number of pixels and the sum of their values (?).

Here is the point :  56495 * 1 * 22503,27 = too many m3.
It seems obvious that I do something wrong in the second way but can't figure it out.


texts: Distance of many polygons to a segmented line

texts:
I have a shapefile of U.S. counties.  I also have a line segment.  I want to compute the distance of each county to the line.  I have also divided the line segment into 10 equal segments.  I want to know, for each county, which of the 10 segments is closest?

Is there an easy way to do this in GIS? Right now, I just do the distance separately for each border segment, 10 times.  Then in Excel, I determine which segment gives the shortest distance.  Identifying, for each county, which of the 10 distances is the miniimum, and then which segment gives that minimum.

I know I can streamline this for the distance part had I not subdivided into the 10 segments.  I can just get the shortest distance in general using the whole line.  However, I don't know what's a fast way to identify which line segment yields it.

I use ArcGIS 10.1 and ArcMap.  I would appreciate any help that you can provide!


texts: PostgeSQL Trigger St_Intersect Insert, Update

texts:
I have a problem creating a trigger in PostgreSQL that will get data from polygon layer.

Issue:

I have two tables:
1. point (id, geom, address)
2. polygon (id, geom, address)

Polygon table represent House. I would like to, when I create point on polygon that point.address get data from polygon.address

I try this:

CREATE OR REPLACE FUNCTION test()
  RETURNS trigger AS
  $$
  BEGIN
  UPDATE point
  SET address = topology.polygon.address
           from polygon
           where ST_Intersects(polygon.geom, point.geom);
END;
$$
LANGUAGE 'plpgsql';

CREATE TRIGGER test_trigger
 AFTER INSERT
 ON topology.point
 FOR EACH ROW
EXECUTE PROCEDURE  test()


texts: QGIS Scale Dependent Visibility not working with specific XYZ Tiles zoom level

texts:
How does one determine what map scale the XYZ Tiles are exporting their zoom levels at? I cannot seem to be able to configure a scale-dependent visibility to show labels and symbols on only specific XYZ Tile Zoom Levels.

For example: I am trying to configure symbols and labels to only appear in certain zoom levels for use in a leaflet map. I have been referencing the OSM Zoom Levels.

I have been testing with zoom level 11, which should correspond to 1:250000 map scale. I have configured my labels and symbols to have a scale dependent visibility from 1:249999 to 1:250001, which should only show such labels on zoom 11 on an XYZ Tiles export. QGIS properly shows these layers only on the 1:250000 map scale. However upon export the layers are not visible on zoom 11, which leads me to believe my zoom 11 is not exactly exporting at 1:250000.

I have also checked out this MapTiler website and confirmed that my XYZ Tiles export matches Google's tile names and bounds, which supports that the tiles exporting at 1:250000.

I have referenced some other questions which led me to play with the DPI on export, but this does not fix the issue either.

Any ideas? Am I missing something on how the map scale, DPI, CRS etc. and XYZ Tiles interact? How can I confirm that my XYZ Tiles are exporting as per the OSM Zoom Levels?

Edit: After much trial and error I have found for my layer to print only at XYZ Tile Zoom 11 (1:250000) at 96dpi (default), I need to have the layer visible to a Scale Dependent Visibility of 1:288895. I am not sure why there is a 15% difference between the intended and actual XYZ Tile Zoom Scale. Can anyone shed any light on this.


texts:
I'd like to do a space syntax analysis for a city I observe, but when I use the Space Syntax Plugin, the desired shapelayer roads doesn't show up.

It's an OSM vector layer, what do I have to do to be able to select it for space syntax?

Apparently Axwoman, a plugin for ArcMap can do this:

  with the help of Axwoman, axial lines of a large city can be
  automatically generated within a few minutes from the road central
  lines, [using] the new definition of axial lines based on
  walkability or drivability.

Is there a plugin/program like this for QGIS?


texts: How to set layout element's "name" property in ArcMap?

texts:
Map Layout elements appear to have a "name" property that can be used to identify them.  In ArcMap is it possible to set this property (interactively), and if so how is this done?  I'm using ArcGIS 10.1, and the only place I can think to look is on a map layout element's "Properties..." options (when you right click on an element) however nothing obvious is present unless there is some pseudo-code that you can enter, similar to how dynamic text works?

From the help page (ListLayoutElements, in case the link doesn't work):
"It is the map document author's responsibility to ensure each page element is given a unique name so that elements can be uniquely identified."

So how would a map author do this?

Please note, I'm not interested in an arcpy/python solutions (that seems straight forward) as I want this to be applicable for non-python users.


texts: Leaflet Polyline with custom fill pattern

texts:
I'm drawing Lines with leaflet.js an have to create custom styled polylines.
So i got various image files which should be like a repeated background image in HTML.
So is it possible to give a drawn L.polyline a Custom background image (texture)?

I know SVG has Support for that but is It also possible via leaflet API?

<defs>
    <pattern id="bad" patternUnits="userSpaceOnUse" x="0" y="0"
     width="10" height="10" viewBox="0 0 10 10" >
        <image x="0" y="0" width="10px" height="10px"
         xlink:href="img/non-sprite/grade_0.png" />
    </pattern>

<defs>

And tried to use the pattern by assign its ID as color/fill without any luck.

L.circle(lat, lng, 200, {fill : 'url(#best)'}).addTo(map);

The circle is shown on map but only in color 0033ff (Leaflet default line color)


texts: Sentinel-2 topographic artifacts: How to fix?

texts:
I'm working with Sentinel-2 (Level2A) false color composite images. A few of them present artifacts in alpine terrain. See highlighted area on the image below, in the Swiss Alps.
These artifacts are present on the side of the mountain that is in the shade due to the sun angle. There are grey-ish areas that probalby come from a wrong satellite image processing step between the shadows (black) and the glaciers (white). You can see that in these areas, all information is lost.

My questions are: Is that normal artifacts in mountain areas? Is there a way to get a correct image in these areas by applying some filters on the raw S2 data (like a shadow mask, a re-classification of image classes, ...).


texts: How can I convert the following coordinates to something I can put in Google Earth?

texts:
I've tried converting the following lat/long data into Google Earth but the intersection doesn't show up on my map when I try entering them.

What does N87° 40'20"E convert to?

What does N1° 49'33"W convert to?

UPDATE

This is the only other map I have of the area. The zoom in is located using the orange square in the image below. Not finding a control point, could be off the map as it seems this is piecemeal and a custom map from the original.


texts: What is the proj4 for World Behrmann (54017)?

texts:
I have this in an old SDE database:

PROJCS["World_Behrmann",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Behrmann"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],UNIT["Meter",1.0]]

The spatialreference.org postgresql spatial_ref_sys insert statement doesn't have a proj4 value.


texts: How can I get OSM data in QGIS in a way that shows the nodes of roads intersecting as it would in JOSM?

texts:
By using OSM data in QGIS, how can I show the nodes that are at the intersection of two roads? This is useful, because how will I know by just looking at the downloaded data from OSM into QGIS that the crossing of the two roads is an intersection or a bridge? In OSM a node shows that there is an intersection and that a car can turn from the one road onto the other, if the node is not there a car cannot turn, this is the case with a bridge.

I have tried downloading all the nodes with the key 'highway' but that doesn't include these nodes. That only downloads things like traffic lights.


texts: Managing multiple dates in single column of shapefile using ArcGIS Desktop?

texts:
I have data example an organizations,

which consists sl.no, name of organization, facility type, latitude, longitude starting date of facility.My problem is for particular facility i had two or more starting dates, now i want to store  those multiple dates in single file, how is it possible?
my data is now in excel, i want to make shape file now..


texts: Looking for a US state file for geofences with as few geofences per state as possible (so group islands with mainland)

texts:
UPDATED TO MUCH MORE DETAILED QUESTION

I'm building a set of geofences to be installed on a GPS unit to track vehicles as they cross state lines.  The list of geofences are simple latitude/longitude pairs, but each geofence needs to be a single polygon.  The problem I'm having is that all datasets I find include a polygon for EVERY body of land (so every island off of Maine gets its own geofence).

What I'm looking for is something more like this:

Notice how Massachusetts is a single geofence, as is Rhode Island and Connecticut.  Including water in the geofence is fine.

I know this isn't possible for some states due to the Kentucky Bend, but I don't know if there are other exclaves (or enclaves) in the United States.  In the case of Kentucky, I could simply have a Kentucky_Geofence_1 and Kentucky_Geofence_2, whereas I'd only need 1 for each of the three green states illustrated above.

As long as there's a way to export the data from a given format to JSON, XML, CSV, etc, I don't care what the file format is.  I'm also not opposed to buying it, if it's already out there.

Again, because water doesn't matter, Alaska could look something like this:

And Michigan could look something like this (but ideally with better resolution on the borders):

(These images come from a custom Google Map I've been tweaking manually by dragging-and-dropping pins to manually create these, but it's going to take a LONG time to do them all, and it seems like this must have been done somewhere else already....)


texts: Is there a way to configure user logins to be case-insensitive in WMX (JTX) for ArcGIS 10?

texts: I have some users who login on different workstations and the case of the username is different: John.Doe might be john.doe on another workstation.  I would like WMX to treat this as the same user.  I figure this might addresses by a windows configuration change, but I'm hoping I can leave the OS alone and just have WMX ignore case.


texts: Python code: Using Search Cursor to find missing values in attribute table between two layers in one MXD

texts:
I need help! I am writing a program that will look through the table of a station layer and then go to the annotation layer and list all the missing values. For Example: The station layer has a field called TFLAG which has the station id in it. The annotation layer has a field called TFLAG with the same station id in it. I want to look through the annotation layer and find all the missing values that the station layer has that the annotation layer is missing. I have written some code. I need to know if I am headed in the right direction!!

import arcpy, os, sys, string
arcpy.env.overwriteOutput = True
fc = "K:\TASS\4_MAPPING_DATA_SUPPORT\Traffic_Mapping\Traffic_Count_Data\2011_Counts\2011_Annual_Stations\Final_Annual_Stations_2012.shp"
fields = ("TFLAG", "T_FLAG")
Value = "TFLAG" <> "T_FLAG"
where = "%s = '%s'" % (field, vlaue)
dhList = []
for w in ws:
    arcpy.env.workspace = w
    gdb = arcpy.ListWorkspaces ("*", "TFLAG")
    for fc in gdb:
        arcpy.env.workspace = fc


texts: How can I access the bands of a grib file with gdalwarp?

texts:
How can I access the subdatasets of a grib file? I am working with NLDAS data and I want to process only the first band of the grib file. I know how to do it with HDF data but I couldn't handle it with grib files. Any hints?

For example this one has 11 bands in it.

NLDAS_FORA0125_H.A20070702.1700.002.grb

I want to gdalwarp the first band of it which is temperature.

This is the gdalinfo output.

Driver: GRIB/GRIdded Binary (.grb)
Files: NLDAS_FORA0125_H.A20070702.1700.002.grb
Size is 464, 224
Coordinate System is:
GEOGCS["Coordinate System imported from GRIB file",
    DATUM["unknown",
        SPHEROID["Sphere",6371200,0]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
Origin = (-125.000500000000002,53.000500000000002)
Pixel Size = (0.125000000000000,-0.125000000000000)

Corner Coordinates:

Upper Left  (-125.0005000,  53.0005000) (125d 0' 1.80"W, 53d 0' 1.80"N)
Lower Left  (-125.0005000,  25.0005000) (125d 0' 1.80"W, 25d 0' 1.80"N)
Upper Right ( -67.0005000,  53.0005000) ( 67d 0' 1.80"W, 53d 0' 1.80"N)
Lower Right ( -67.0005000,  25.0005000) ( 67d 0' 1.80"W, 25d 0' 1.80"N)
Center      ( -96.0005000,  39.0005000) ( 96d 0' 1.80"W, 39d 0' 1.80"N)

Band 1 Block=464x1 Type=Float64, ColorInterp=Undefined

  Description = 2[m] HTGL (Specified height level above ground)
  NoData Value=9999
  Metadata:
    GRIB_COMMENT=Temperature [K]
    GRIB_ELEMENT=TMP
    GRIB_FORECAST_SECONDS=0 sec
    GRIB_REF_TIME=  1183395600 sec UTC
    GRIB_SHORT_NAME=2-HTGL
    GRIB_UNIT=[K]
    GRIB_VALID_TIME=  1183395600 sec UTC
...


texts: Fix shapefile with basemap in ArcGIS for Desktop?

texts:
How I can fix the shapefile with the basemap in ArcGIS 10.2?

I have transform the basemap projection to GREECE GRID, the same with the shapefile...but they don't fix exactly...

I try to attach a Picture for the theme, but I cannot see it...


texts: Merging polygon and line shapefiles into one using QGIS?

texts:
I have two shapefiles: One is a line feature of the rivers and waterways of London, the other is a polygon feature of the reservoirs, lakes and ponds of the same area.

Is it possible please to merge these two different shapefiles into one using QGIS?


texts: Adding Models dynamically to fit the polygons size Cesium JS

texts:
I am trying to add 3D glb models to fit the parcel/geom size of the polygon. What i wish to do is that the model should sit within the boundary of the polygon and fit to the polygon size.

I have a shapefile which i have converted into mysql table which includes the polygon geom and the centroid points of that polygon. I want to add one model to all the polygons for the time being. Right now i can show the model on the polygon using centroid and i even tried the northeast rectangle method but i am not achieving the desired results as the polygons are of various shapes and sizes. see picture below

Now this is my code to add the model.

var passedArray =  <?php echo json_encode($cords); ?>;
for(var i = 0; i < passedArray.length; i++){

 var heading = Cesium.Math.toRadians(100.0);

 //pitch describes the up and down dive of the model
 var pitch = Cesium.Math.toRadians(0.0);

 //roll describes the rotation of the model on its own axis
 var roll = Cesium.Math.toRadians(0.0);

 //position describes the long,lat and the height of the model from the ground
 //xcenter and ycenter are the coordinates point taken from the table which were calculated via arcmap mysql centroid was giving a false centroid.
 var position = Cesium.Cartesian3.fromDegrees(passedArray[i]['xcenter'],
 passedArray[i]['ycenter'], 0.0);

//orientation combines all the aspects above to get the right direction and location of 3d object
var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, new
Cesium.HeadingPitchRoll(heading, pitch, roll));

//first
//adding the 3d model to the map.
//scale: the scale of the object 1.0 defines the original scale.
//glb files are mostly suited for the 3d models
 entity[i] = viewer.entities.add({
 position : position,
 orientation : orientation,
 model : {
    uri : '<?php echo base_url();?>Cesium/Apps/SampleData/models/newmodel/Bambo_House.glb',
    scale : 50.0
 }
 });

 }

Anyway to get the models to fit and scale perfectly within the polygon size and take the polygon boundary as its bounding box.
Regards


texts:
I am having trouble with this raster layer that I downloaded from PASDA website - "Birds Habitat 2006 - Natural Lands Trust"

The attributes values habitat quality ranked 1-10. It looks like the
background of this raster image (solid brown) have been assigned one of the values. I tried making the background value transparent - but I lose some of the
actual data on the raster image that that value represents.

But if I zoom in close enough to the image the background disappears and the layer appears correctly.

How to get this this layer to appear correctly?


texts:
I am trying to add a WMS radar overlay to my map but it won't seem to gather it.

  noaaRdr = new OpenLayers.Layer.WMS("Latest Radar", "http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs?", {
    layers: 'RAS_RIDGE_NEXRAD',
    transparent: true,
    format: 'image/png'
  }, {
    visibility: true, isBaseLayer: false, singleTile: true,
    ratio: 1,opacity: 0.7
  });

  radarArray = [noaaRdr];     //adding more layers later..
  map.addLayers(radarArray);

I have seen this URL used elsewhere but i can't figure out whats wrong.  The layer shows up in the layer switcher but the image never shows on the map and the file "obs" never gets requested from the NOAA server ??

Can anyone help me with this.


texts:
When I actually work with SRTM 3 data in a meteorological application and especially when doing simulation over mountainous regions I expected and found a lot of voids in SRTM3 data. Has there been anyone here who has actually fixed the voids by interpolating using bilinear interpolation as this developer has done - http://fossies.org/dox/gpsprune_17.1_source/LookupSrtmFunction_8java_source.html and then can talk about their experiences with the "fixed" SRTM 3 data ?

Or the better option is to download the NASA void filled SRTM 3 data. I do not want to go down the route of using ASTER GDEMs for various reasons.


texts: How to get information about only one data point?

texts:
I have a vector-point shapefile. The data are not dense (about 1 x 1 degree). Lets say that every point includes value of average wind speed.

I would like to create a interactive web-map so that every time a user click on it, he/she get information about the point of interest (POI).

This map includes 3 layers

bluemarble base layer
WMS layer of points with data
TIFF layer created from wind speed data (red - high, blue - low)

I have two problems.
1) to many points clicked

when the map is zoomed-out it happens that user's click covers more then 1 point of the vector so that GetFeatureInfo returns too much info.

In the event.text I got info of the TIFF raster clicked pixel, GREEN, RED, BLUE, ALPHA_BAND and values of all the clicked points:

 fid
  long
  lat
  codetec
  modelno
  tecdiff

  allinfo.122239
  -4.000000000000000
  4.000000000000000
   27.210000000000001

   2
  2.150000000000000

  allinfo.122240
  -4.000000000000000
  3.700000000000000
  27.210000000000001
  2
  2.150000000000000

 allinfo.122241
 -4.000000000000000
 3.300000000000000
 27.030000000000001
 2
 2.250000000000000

  allinfo.122242
  -4.000000000000000
  3.000000000000000
  27.030000000000001
  2
  2.250000000000000

and some more, but you got the point.

2) no point clicked when zoomed-in

When it is zoomed-in too much the user obviously does not click any point of the vector layer. So there is no info about the vector layer only the TIFF raster colour band info.

I would say that the 1) problem can be solved by formatting the GetFeatureInfo response but I am lost in the problem 2).

Is there a way how to force to get info from the nearest point? Or show info always from one point only? Should I change the vector layer? I tried to use create Voronoi polygons but I did not succeed to produce any layer (and there two links : Q1 and Q2 suggest that that does not work that well in QGIS anyway). Is it possible to retrieve the value from the raster colour band?


texts: Mapbasic Code - Change Symbol Style Basic on Column Content

texts:
I wrote a piece of code a while ago for colouring lines depending on what was in a certain column. I struggled through it, but managed to get it to work. Now, I want to write a piece of code that will do the same for points, rather than lines. I'm presuming I can alter my existing code slightly to do this but I can't for the life of me figure it out! It doesn't help that I'm not that experienced with MapBasic, and have forgotten most of what I learned the first time round!

Here is my existing code. It looks at what each entry in the table has in column called 'symbology', and changes the colour and line style as such.

My new code will need to make all points a size 5 circle (from Map Symbols font) with a border. The only thing that will change will be the colour.

Include "MapBasic.def"

Declare Sub Main

Declare Function ChangeLineColour (ByVal objTarget as Object, ByVal stringAttribute as String) as Object

Sub Main()

Update ww_gravity_pipe_location set Obj = ChangeLineColour(obj, symbology)

End Sub

Function ChangeLineColour (ByVal objTarget as Object, ByVal stringAttribute as String) as Object

Dim curPen, newPen as Pen

Dim penWidth, penPattern, penColour as Integer

'// check that the object is a line object, if not just return the original object

If Not ObjectInfo(objTarget, OBJ_INFO_TYPE) = Any(OBJ_TYPE_LINE, OBJ_TYPE_PLINE) then

       ChangeLineColour = objTarget

       Exit Function

End if

 '// get the current pen style

curPen = ObjectInfo(objTarget, OBJ_INFO_PEN)

'// get the individual style attributes of the current pen

'// set the new pen colour based on the numerical attribute

Do Case stringAttribute

       Case "Surface Water  (S)"

              penColour = BLUE
          penWidth = 2

       Case "Combined  (C)"

              penColour = RED
          penWidth = 2

       Case "Foul  (F)"

          penColour = 11239175
          penWidth = 2

    Case "Proposed"
          penColour = GREEN
          penWidth = 2
              penPattern = 12

    Case "Abandoned"

          penColour = 9079434
          penWidth = 2
          penPattern = 112

End Case

'// - Colour codes from http://www.tydac.ch/color/
'// create a new pen with the new colour

newPen = MakePen(penWidth, penPattern, penColour)

'// alter the object we passed into the function to use the new pen

Alter Object objTarget Info OBJ_INFO_PEN, newPen

'// return the altered object to the update statement

ChangeLineColour = objTarget

End Function

All the cases will remain the same, so they don't need to be changed.

I'm guessing I need to change all the 'pens' to 'symbols' or something along those lines.


texts: Split Polyline QGIS - Too Many Resultant Features

texts:
I'm trying to split a single polyline into 2 polylines (I have lines that loop back on themselves, and I need to split each one into two lines: one for going, and one for coming back).

When I use the Split Feature tool in Advanced Digitizing, it takes the single polyline feature, and splits it into 66 different polylines, with what looks like anywhere between 2 and 5 vertices per polyline.

I was hoping someone could point out what I'm doing wrong, or what a better feature/tool might be to take a single polyline feature and split it into 2 (and only 2) parts at a given point that I manually choose.

I'm using QGIS 2.8.2 running on a Mac 10.10.4.


texts:
I am doing a spatial query to see if water sensors exist or not in a database.  If so I want to return the unique identifier # that exists on the ones in the database so I can match it to the ones that are going to be added to the database.  This # is populated when it is inserted so want to make sure i dont have one sensor with two different unique identifier numbers.

So far here is my code for trying to do the spatial search but not sure how to return the unique identifier for ones that already exist.

WITH nodes_existing AS
(
 SELECT
  *
 FROM
  public.equipment_nodes
 WHERE
  ST_Within(shape::GEOMETRY, ST_GeogFromText('@Value(_location)')::GEOMETRY)
)

SELECT
 count(*) > 0 AS node_exists
FROM
 nodes_existing,

If any one can help me pull the records if the node exists that would be awesome.  I am not sure where to go next.

Also _location is geometry extracted from the incoming files with the nodes that I am trying to see if they exist or not.  I do know this part works so far.


texts: ArcGIS Arcade - Scaling numbers from 1000 to $1k and 1000000 to $1M

texts:
I have number field (Price) that I would like to:

Label numbers between 1000 - 999,999 as $1k - $999k
Label numbers >=1,000,000 as $1M
Numbers <1000 remain as $1 - $999

so far, I got an iif statement to work with this:

IIf($feature.price>=1000,"$" + $feature.price /1000, 0)+"k"

that labels everything above 1000 as $1k

How can I get all three steps listed above completed?


texts: No module name processing (Ubuntu Xenial)

texts:
I had installed QGIS with it in ubuntu :

sudo apt-get install qgis python-qgis qgis-plugin-grass

refer to this guide : https://www.qgis.org/en/site/forusers/alldownloads.html

then i try to import QGIS module that usually work in Windows QGIS Desktop application such as :

from qgis.core import *
from osgeo import *

but then, i try to :

import processing

and it said:

No module named processing

Ok i see since this is run as external application, so i try to do something like this:

import sys
sys.path.append('/usr/share/qgis/python/plugins')
import processing

but what i've got is:

QPixmap: Must construct a QApplication before a QPaintDevice
Aborted (core dumped)

Then i my python console was exited automatically

So my question is, how to import processing in ubuntu python console that had been QGIS installed?

I really need this module..


texts: Compressing map algebra outputs from ArcPy?

texts:
When creating a raster map algebra output, is it possible to set its compression?

I'm creating a model which generates many hundreds of rasters, and currently each is being stored without any compression which quickly adds up. I expected to be able to use arcpy.env.compression but that seems to have no effect. Example script which produces this behavior:

import arcpy

arcpy.env.compression = 'LZW' # supported by GeoTIFF and most packages

map = Raster("raster.tif") + 100
map.save("raster_plus_100.tif") # would expect this output to have compresssion


texts: Map Coordinates to Neighborhoods from MySQL Table

texts:
I have a MySQL database with a set of coordinates and a shape file (Zillow Neighborhood Database for Chicago) containing the boundaries for each neighborhood which I have converted to a spatial database.

How do I map each set of coordinates to the neighborhood that it is in? UbuntuGIS is installed.


texts: highresolution images from geoserver get scaled down

texts:
I uploaded a 300 dpi png (2024x1012) as world image to my geoserver. The image/map is displayed as WMS layer on a virtual globe in an android app. Unfortunalty, the layer on my globe gets pixelated heavily when I zoom in the image/map. How can I fix this and get a highresolution WMS layer to my app?

I use the following framework:

http://www.glob3mobile.com/

The glob3mobile engine generates 8 requests to receive tiles of the image.
One of the 8 requests looks like this:

http://192.168.175.80:8080/geoserver/cite/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=512&HEIGHT=512&BBOX=-180.0,-90.0,-90.0,0.0&LAYERS=cite:imagename&FORMAT=image/png&SRS=EPSG:4326&STYLES=&TRANSPARENT=FALSE


texts:
I am trying to generate a report of data i captured using Quick capture. I am looking for something like sample type and then its image with observation date.
I exported data from ArcGIS Online to file geodatabase and it is working fine. When i click on a feature in ArcMap and ArcGIS Pro it shows image as attachment.
When i create report i am unable to add attachment image. No matter if i use ArcMap or ArcGIS Pro.
In ArcGIS Pro report template, i click on details and add attachment from data group in insert panel. I add and attachment frame comes in report. but when i exort report it is empty.
In ArcMap report template, when i add image and click while field should i choose ? I am generating report from a feature class, and in mxd there is a attachment table which contains image as well. I tried generating report from that table as well but it is not giving me option to choose data column which contains the image.
I am looking for Any guidance in this regard. Or any helping links.
I have been reading what is published in esri links.
I have ArcGIS Pro 2.5 and and ArcMap 10.5


texts: Is Geoslavery complicity a violation of GISP code of Ethics?

texts:
Would developing applications to support Geoslavery be considered a  violation of the GIS Professional (GISP) code of ethics ?

  Human tracking devices, however, introduce a new potential for
  real-time control that extends far beyond privacy and surveillance,
  per se. As a result, society must contemplate a new form of slavery characterized by location control. Geoslavery now looms as a real,
  immediate, and global threat.
  - Jerome E. Dobson and Peter F. Fisher, IEEE Technology and Society Magazine, Spring 2003

Dobson defines geoslavery as:

  a practice in which one entity, the master, coercively or
  surreptitiously monitors and exerts control over the physical location
  of another individual, the slave.

What about a applications that support Volunteered Geoslavery?

  It is therefore understandable how inciting fear has made the
  trade-off of spatial data privacy for security appear on balance to be
  a good bargain for many people. - Nancy Obermeyer Thoughts on “Volunteered (Geo)Slavery”, Indiana State University.


texts: Producing cloud and cloud shadow mask from Sentinel images?

texts:
What is a good tool to produce (cloud) and cloud shadow masks?

I tried fmask tool and Sentinel SNAP but while those can produce reasonable cloud masks, cloud shadow results are poor.

I need to produce cloud shadow mask to mask such pixels in my final output.


texts: How to derive ui.Label and ui.Thumbnail from image List?

texts:
I am trying to generate some ui.Labels and ui.Thumbnail's but having a hard time getting around the server-side and client-side issues after using .evaluate().

I did some S5P preprocessing steps,
generated medians, histograms,
added those as properties to each image.

At the moment, I am having a List of images with image properties from median and histogram values. I used the  'Mosaic Editor' example to get a nice thumbnail grid setup but now I am failing to create a ui.Label and a ui.Thumbnail from my Image List. My issues are between line 151- 164.

How do I access the image from a client-side object?
How do I get the image property from the client-side object?

Full script is here https://code.earthengine.google.com/5d8d784dadb6195c6b355f8f0bc1f525

Any help is very much appreciated.


texts: How to re-arrange attributes of a polygon based on attributes of polyline file?

texts:
I have a polyline (subrivers) and polygon (subshed) shapefile with both of them are shown  along with tables.
Their FID index don't overlap spatially, e.g.  surivers second row attribute doesn't overlap with second row attribute of subshed. I want to re-arrange the order of attributes in subshed as per in subrivers such that FID of 'subshed' should read like 1,3,4,2,5 (FROM_NODE attributes) with GRIDCODE values also shuffled accordingly.
Any suggestions to do it would be very much appreciative.

fc = "C:/temp/spatial_join.shp"
sc = arcpy.da.SearchCursor(fc, ("FID","SHAPE@))
poly = "C:/temp/polygon.shp"
fc = arcpy.da.InsertCursor(poly, ("FID","SHAPE@"))
row1 = sc.next()
for i in sc:
    fc.insertRow(row1)

del row1


texts: Are there any QGIS tools or plugins that can display photos stored in a database?

texts:
A colleague's team has been using the eVis plugin in QGIS to store research photos. eVis relies upon a filepath or URL stored in the data source (shapefile, Spatialite db, etc.). They are using a filepath on the local machine.

They recently ran into problems with photos not displaying, and after investigating, they found that folders had been moved or renamed. I have suggested that they organize their data (currently in shapefiles) in a spatial database (Spatialite or PostGIS), and they are interested in doing so. I also think they can benefit from storing the photos as BLOBs in the Spatialite or PostGIS database. I tested eVis and it works fine with data in Spatialite or PostGIS as long as the photo files are external and accessed through the file system or URL. It doesn't appear to provide a way to access photos stored as BLOBs in the database.

Is there a way that QGIS (or a plugin) can display photos stored as BLOBs in a Spatialite or PostGIS database?


texts:
Here is a table that is a sub-set of the data I am working with, I am trying to use the Summarize Statistics tool to select the X,Y values of the First and Last Addresses.

I am looking for something like this:

But I would need the Min_X and Min_Y to correspond to 3 Palisade Basin and the Max_X and Max_Y to correspond to 27 Palisade Basin.

Thanks for the help!


texts: Specific mixed feature between offset, buffer and intersection

texts:
I'm trying to reproduce the steps needed to aim this goal: Given a layer of polygons, I'm want to retrieve for each polygon which is at a distance less than 50m to a 2nd polygonal layer the only 5m band in the polygon facing the items of the second layer.
Quite complicated explanations...I know....so, a drawing is a better way to explain myself.
I want to build the red parts (the 5m band of the orange layer polygons facing the green ones, when they're at a distance less than 50m)....How would you do that with QGIS?


texts: Leaflet marker cluster from JSONP WFS + Popups

texts:
I'm fairly new to Leaflet and just managed to use Leaflet marker-cluster with a JSONP WFS which provides my data from Geoserver. Now I would like to have a popup for my markers by mouse click. But I do not know where to insert the .bindpopup onEachFeature.
Maybe I have to rewrite my code, but nothing what I've tried works.

At the end I will have more than 100,000 markers. Any ideas for a good performance?

var markers = L.markerClusterGroup();
var geoJsonLayer = new L.GeoJSON();

var geoJsonUrl ='localhost:8080/geoserver/test/ows';
var defaultParameters = {
    service: 'WFS',
    version: '1.0.0',
    request: 'GetFeature',
    typeName: 'test:bh',
    maxFeatures: 120000,
    outputFormat: 'text/javascript'
    };

var parameters = L.Util.extend(defaultParameters);
console.log(geoJsonUrl + L.Util.getParamString(parameters));

$.ajax({
    url: geoJsonUrl + L.Util.getParamString(parameters),
    dataType: 'jsonp',
    jsonpCallback: 'parseResponse',
    success: function (data) {
        console.log(data);
        geoJsonLayer.addData(data);
        markers.addLayer(geoJsonLayer);
        map.addLayer(markers);
    }
});


texts:
Given the number of questions about basic/intermediary usage of Esri products on this site and in a lot of other mail lists, I became curious to know why people don't ask them to the technical support.

So, for registered ArcGIS platform users:

How does Esri technical support work i.e. what kind of questions does it answer?


texts:
Many time when I try to retrieve statistics from images in GEE, I get some images appears "twice" according to their dates as you can see in this Excel table (I added their order):

In the past I have realized that this phenomena occurs when the different tiles of Sentinel overlap, and then I get one "big" raster that is full size, and then a small raster (usualy it waas the second one between the two rasters).

However, today when it happened and I checked the images, for example 0 and 1, I got two different full images:

Image 0:

Image 1:

(I displayed each one of them alone so that how they look)

How can I avoid those two images on the same date? I have been told that maybe mosaic() can help but I'm not sure how.

This is my code:

/**
 * Function to mask clouds based on the pixel_qa band of Landsat 8 SR data.
 * @param {ee.Image} image input Landsat 8 SR image
 * @return {ee.Image} cloudmasked Landsat 8 image
 */
function maskL8sr(image) {
  // Bits 3 and 5 are cloud shadow and cloud, respectively.
  var cloudShadowBitMask = (1 << 3);
  var cloudsBitMask = (1 << 5);
  // Get the pixel QA band.
  var qa = image.select('pixel_qa');
  // Both flags should be set to zero, indicating clear conditions.
  var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
                 .and(qa.bitwiseAnd(cloudsBitMask).eq(0));
  return image.updateMask(mask);
}

var dataset = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
                  .filterDate('2013-04-30', '2019-10-16')
                  .select('B1','B2','B3','B4','B5','B6','pixel_qa')
                  .filterBounds(geometry)
                  .map(maskL8sr);

var visParams = {
  bands: ['B4', 'B3', 'B2'],
  min: 0,
  max: 3000,
  gamma: 1.4,
};

//clip the dataset according to the geometry
var clippedCol=dataset.map(function(im){
  return im.clip(geometry);
});

Map.centerObject(geometry,15);
//Map.addLayer(clippedCol.median(), visParams);

// Get the number of images.
var count = dataset.size();
print('Count: ',count);
//print(clippedCol);
print(dataset,'dataset');

//function to calculate NDVI in LANDSAT8
var addNDVI = function(image) {
  var NDVI = image.normalizedDifference(['B5', 'B4'])
  .rename('NDVI')
  .copyProperties(image,['system:time_start']);
  return image.addBands(NDVI);

};

//NDWI to the clipped image collection
var withNDVI = clippedCol.map(addNDVI).select('NDVI');

var NDVIcolor = {
  min: -1,
  max:1,
  palette: ['FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718', '74A901',
    '66A000', '529400', '3E8601', '207401', '056201', '004C00', '023B01',
    '012E01', '011D01', '011301'],
};

var listOfImages =(withNDVI.toList(withNDVI.size()));
var randomImage=ee.Image(listOfImages.get(4));
var randomImage1=ee.Image(listOfImages.get(5));
var randomImage2=ee.Image(listOfImages.get(2));
var randomImage3=ee.Image(listOfImages.get(3));
Map.addLayer(randomImage,NDVIcolor,'Random_Image_tes0t');
Map.addLayer(randomImage1,NDVIcolor,'Random_Image_test1');
Map.addLayer(randomImage2,NDVIcolor,'Random_Image_test2');
Map.addLayer(randomImage2,NDVIcolor,'Random_Image_test3');
print(randomImage,randomImage1,randomImage2,randomImage3);

print(ui.Chart.image.series(withNDVI, geometry, ee.Reducer.mean(), 30));
print(ui.Chart.image.series(withNDVI, geometry, ee.Reducer.max(), 30));
print(ui.Chart.image.series(withNDVI, geometry, ee.Reducer.min(), 30));


texts: Using Union tool without optional overlay layer

texts:
In QGIS 3.10.3, I'm trying to figure out how to use the Union tool without the optional overlay layer.

When I go to "Vector > Geoprocessing Tools > Union..." and bring up the tool, the description says the overlay layer is optional, but the field is already filled in and I can't for the life of me figure out how to clear the field and run the tool without the overlay layer.


texts: Can I use Google API or Google Maps in web application developed with ArcGIS APIs?

texts:
I need to know that is it possible to use Google Maps (as a base map) and its GIS functionalities (like find/search features) in my web application developed with ArcGIS API for Silverlight/JavaScript.

Also I don't want to use ArcGIS server. I want to use open source GIS technology.


texts:
I am trying to publish some ecw files with geoserver 2.7.2 on ubuntu 15.04 x64. I downloaded gdal plugin, gdal_data and native libraries for image-io 1.1.11 and set environment variables; GDAL_DATA, LD_LIBRARY_PATH.

I can see new store types when adding new one (ECW, EHdr, JP2ECW etc.). But when I try to save an ECW store with a valid ecw file which I tested with ArcMap, geoserver crashes with this error:

terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_S_create
Aborted (core dumped)

Do you have any idea about this problem?


texts: ArcGIS Pro PostgreSQL SSH connection string

texts:
I am involved in a project where a SQL Server-base application is being retired and replaced with a PostgreSQL/PostGIS-based tool under development. There is a large amount of cross-checking to be done related to data migration, so being able to write queries across the old/new databases would be helpful.

To that end, I am trying to establish a connection to the new PostgreSQL DB from ArcGIS Pro. Connecting to both databases from SSMS is not possible because Linked Servers are unavailable from our production server (though we are also looking into linking from a test server).

My pgAdmin connection depends on SSH, but neither the ArcGIS > Catalog > New Database Connection dialogue nor the arcpy.CreateDatabaseConnection_management() (and related methods) appear to accept SSH-related parameters.

Any ideas?


texts:
I am trying to add borders to the icons in open layers and I am able to do so but when i try to increase the thickness of the border, the border is not uniform and at one side becomes larger than other sides. How do i fix this?

var activeColor = "red";

@Component({
  selector: 'app-map',
  templateUrl: './map.component.html',
  styleUrls: ['./map.component.css']
})
export class MapComponent implements OnInit {
  iconFeatures:Feature = [];
  ngOnInit(){

    var iconFeature = new Feature({
      geometry: new Point([0, 0]),
      color: 'green',
      scale: 0.1,
      imgSrc: "assets/non_transparent.jpg"

    });
    iconFeature.set("style",this.createStyle(iconFeature.get("imgSrc"),undefined));

    this.iconFeatures.push(iconFeature);

    var map = new Map({
      layers: [
        new TileLayer({
          source: new OSM()
        })
      ],
      target: document.getElementById("map"),
      view: new View({
        center: [0, 0],
        zoom: 3
      })
    });

    var vectorSource= new VectorSource({
      features:this.iconFeatures,
      wrapX: false

    });
    console.log("Entering vector layer");

    var vectorLayer = new VectorLayer({
      source: vectorSource,
      style: function(feature) {
        console.log("inside style function");
        if (feature.get("color") !== activeColor) {
          var initStyle = feature.get("initStyle");
          if (!initStyle) {
            initStyle = feature.get("style");
            feature.set("initStyle", initStyle);
          }
          var image = initStyle.getImage().getImage();

          if (image.width > 0) {
            console.log("inside width > 0");

            var canvas = document.createElement("canvas");
            var ctx = canvas.getContext("2d"); //this method returns an object that provides methods and properties for drawing on the canvas. eg: text, line, boxes, circles, and more

            var dArr = [-1,-1, 0,-1, 1,-1, -1,0, 1,0, -1,1, 0,1, 1,1], // offset array
            s = 100,  // thickness scale
            i = 0,  // iterator
            x = 6,  // final position
            y = 6;

            // fill with color

            //set new canvas dimentions adjusted for border
            canvas.width = image.width + s + s;
            canvas.height = image.height + s + s ;

            // draw images at offsets from the array scaled by s
            for (; i < dArr.length; i += 2){
              ctx.drawImage(image, x + dArr[i] * s, y + dArr[i + 1] * s);
            }

            // fill with color
            ctx.globalCompositeOperation = "source-in";
            ctx.fillStyle = activeColor;
            ctx.fillRect(0, 0, canvas.width, canvas.height);

            // draw original image in normal mode
            ctx.globalCompositeOperation = "source-over";
            ctx.drawImage(image, x, y); //, image.width, image.height);

            //create new openlayers icon style from canvas
            var newStyle = new Style({
              image: new Icon(
                /** @type {olx.style.IconOptions} */ ({
                  crossOrigin: "anonymous",
                  src: undefined,
                  img: canvas,
                  imgSize: canvas
                    ? [canvas.width, canvas.height]
                    : undefined,
                  scale: feature.get('scale')
                })
              )
            });

            feature.set("style", newStyle);
            feature.set("color", activeColor);

          }
        }
        return feature.get("style");

      }
    });
    map.addLayer(vectorLayer);

}

  public createStyle(src, img) {
    return new Style({
      image: new Icon({
        anchor: [0.5, 0.96],
        crossOrigin: "anonymous",
        src: src,
        img: img,
        imgSize: img ? [img.width, img.height] : undefined,
        scale: 1
      })
    });
  }
}


texts: ArcPy not selecting layer by attribute when run in ArcGIS Pro?

texts:
Working in ArcGIS Pro with ArcPy, I'm trying to create a script that creates a density based clustering, performs a select layer by attribute on it and then takes the extent of that selection and use it for my layout.

When run as a script from my toolbox, the script runs without fail except that it doesn't select any features. If I paste the code into the Python window it works 100% correctly and actually selects the features.

My code looks something like this:

#Import necessary modules
import arcpy
import os

#Get project variables
arcpy.env.overwriteOutput = True
aprx = arcpy.mp.ArcGISProject('CURRENT')
maps = aprx.listMaps("Map")[0]
GDB = aprx.defaultGeodatabase
lyt = aprx.listLayouts("Boorpunten1")[0]
lyr = maps.listLayers("Boringen")[0]
mf = lyt.listElements("","Main")[0]
mf.map = maps

#Group boringen for custom mapseries
arcpy.stats.DensityBasedClustering("Boringen", "Boringen_DBC", "HDBSCAN", 4, None, 50)

#Add the created layer to the map so it can be accessed by layer/layout functions
dbc2 = arcpy.management.MakeFeatureLayer(GDB+"\\Boringen_DBC", "Boringen_DBC").getOutput(0)
maps.addLayer(dbc2,'Bottom')
dbc = maps.listLayers("Boringen_DBC")[0]

#Select features and zoom the camera to those features
arcpy.management.SelectLayerByAttribute(dbc, "NEW_SELECTION", "CLUSTER_ID = 1", None)
ex = mf.getLayerExtent(dbc, True, False)
mf.camera.setExtent(ex)

What am I missing here? My guess is it has something to do with adding the newly created layer to the map document but I feel like I covered every aspect.


texts: Reproject "unknown" coordinate system to LCC 2SP across lon 180

texts:
Starting with a grib file with limited projection information, I am trying to import it as a GeoTiff in Geoserver 2.7.x.

The original gdalinfo is:

Size is 218, 81
Coordinate System is:
GEOGCS["Coordinate System imported from GRIB file",
    DATUM["unknown",
        SPHEROID["Sphere",6371229,0]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
Origin = (174.849999999999994,79.150000000000006)
Pixel Size = (0.300000000000000,-0.300000000000000)
Corner Coordinates:
Upper Left  ( 174.8500000,  79.1500000) (174d51' 0.00"E, 79d 9' 0.00"N)
Lower Left  ( 174.8500000,  54.8500000) (174d51' 0.00"E, 54d51' 0.00"N)
Upper Right (     240.250,      79.150) (240d15' 0.00"E, 79d 9' 0.00"N)
Lower Right (     240.250,      54.850) (240d15' 0.00"E, 54d51' 0.00"N)
Center      (     207.550,      67.000) (207d33' 0.00"E, 67d 0' 0.00"N)
Band 1 Block=218x1 Type=Float64, ColorInterp=Undefined

the file covers alaska and crosses lon 180.
When I try this:
gdalwarp -s_srs "EPSG:4326" -t_srs "+proj=lcc +lon_0=-152.45  +lat_0=60.925 +lat_1=73.075 +datum=WGS84" input.grb output.tif

The results fail to import into geoserver.
Geoserver complains that

  Error decoding CRS: Value 207.55 is out of range [-180..180].

The resulting tif gdal info is:
Size is 230, 182
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",73.075],
    PARAMETER["standard_parallel_2",0],
    PARAMETER["latitude_of_origin",60.925],
    PARAMETER["central_meridian",207.55],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-1694471.810281516984105,2114705.707116945646703)
Pixel Size = (14712.347452214831719,-14712.347452214831719)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-1694471.810, 2114705.707) (145d28'51.94"E, 75d15'58.24"N)
Lower Left  (-1694471.810, -562941.529) (176d50'52.24"E, 51d39'16.98"N)
Upper Right ( 1689368.104, 2114705.707) ( 90d30'45.10"W, 75d17'39.86"N)
Lower Right ( 1689368.104, -562941.529) (121d49'59.11"W, 51d40'25.97"N)
Center      (   -2551.853,  775882.089) (152d31' 3.00"W, 68d43'25.61"N)

I have tried using +over and +lon_wrap in attempt to cerce the central meridian to a value between -180 and +180, but all the combinations I have tried result in no change to the reprojected tif at all.


texts: How to limit zoom level in OpenLayers 2.x

texts:
I would like to have only 3 levels of zoom available (from level 6 to level 8).

demolayer2 = new OpenLayers.Layer.WMS(
"abc...","http://localhost:8080/geoserver/gwc/service/wms",
{layers: 'def...', transparent:"true", format: 'image/png', numZoomLevels: 3, minZoomLevel: 6 },{isBaseLayer:false},

{ tileSize: new OpenLayers.Size(256,256)});

map.addLayer(demolayer2);

 map.addControl(new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('layerswitcher')}));

map.zoomToExtent(new OpenLayers.Bounds(-4.601615515076983,39.8769407866263,-3.0527184873294764,41.16710732525929));


texts: Calculating NDVI vegetation area in GEE generates error

texts:
I'm trying to calculate & extract the vegetation areas country wide (TZA) using Sentinel-2 imagery, and getting an error when trying to print that area. I'm listing the code below.
    var region = ee.FeatureCollection("users/GISSpecialist/tza");
    var S2 = ee.ImageCollection("COPERNICUS/S2_SR");

    // Step 1 - Loading the images using filters
    var filtered = S2
      .filterDate('2020-01-01','2020-12-31')
      .filterBounds(region)
      .filterMetadata('CLOUDY_PIXEL_PERCENTAGE', 'less_than',10)
      .median();

    //Locate center and zoom level
    Map.centerObject(region, 6.5);

    // Step 2 - Calculating the NDVI
    // Identify the values of NIR & RED
    var NIR = filtered.select('B8');
    var RED = filtered.select('B4');

    // Calculate NDVI
    var NDVI = NIR.subtract(RED).divide(NIR.add(RED));

    // Clip NDVI Map to Egypt boundaries
    var NDVIc = NDVI.clip(region);

    // Step 3 - Extract Vegetation
    // Select NDVI cells with greater than 0.3 value
    NDVIc = ee.Image(1).mask(NDVIc.gte(0.3));

    // Display vegetation cells extracted from NDVI Map
    Map.addLayer(NDVIc);

    // Step 4 - Calculate area of extracted cells

    var area_pxa = NDVIc.multiply(ee.Image.pixelArea())
                        .reduceRegion(ee.Reducer.sum(),region,10,null,null,false, 1e30)
                        .get('constant')
                        ;

    area_pxa = ee.Number(area_pxa).divide(1e6);
    print ('Area using ee.Image.pixelArea (km²)', area_pxa);


texts:
This is my first script and I having a problem trying to clip a shp file.

I'm running on a linux server and this is my code:

 #! python

from datetime import date
from qgis.core import *
from PyQt4.QtGui import *
import sys

#disable gui
qgs = QApplication([], False)

#call qgis
QgsApplication.setPrefixPath("/usr/bin/qgis", True)

#scrip start

QgsApplication.initQgis()

#call processing plugin
sys.path.append("/usr/share/qgis/python/plugins")
from processing.core.Processing import Processing
Processing.initialize()
from processing.tools import *
import processing

#centroamerica
centroamerica = QgsVectorLayer("/pronosticos/centroamerica/ca.shp", "Centroamerica")

#date
date = date.today().strftime('%Y%m%d')

#global data

precipitacion_24h = QgsVectorLayer("/pronosticos/global/gfs_precip_shp_tif_" + date + "/gfs_precip_gis_24_" + date + ".shp", "Precipitacion 24 horas")

#clip
processing.runalg('qgis:clip', precipitacion_24h, centroamerica,'/pronosticos/salidas/precipitacion_24h.shp')

# Exit applications
QgsApplication.exitQgis()
QApplication.exit()

I got this message:

 python clip.py
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
Traceback (most recent call last):
  File "clip.py", line 51, in <module>
    processing.runalg('qgis:clip', precipitacion_48h, centroamerica, "/pronosticos/salidas/precipitacion_48h.shp")
  File "/usr/share/qgis/python/plugins/processing/tools/general.py", line 66, in runalg
    alg = Processing.runAlgorithm(algOrName, None, *args)
  File "/usr/share/qgis/python/plugins/processing/core/Processing.py", line 305, in runAlgorithm
    if not alg.checkInputCRS():
  File "/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line 292, in checkInputCRS
    layers = QGisLayers.getAllLayers()
  File "/usr/share/qgis/python/plugins/processing/core/QGisLayers.py", line 93, in getAllLayers
    layers += QGisLayers.getRasterLayers();
  File "/usr/share/qgis/python/plugins/processing/core/QGisLayers.py", line 69, in getRasterLayers
    layers = QGisLayers.iface.legendInterface().layers()
AttributeError: 'NoneType' object has no attribute 'legendInterface'


texts: Extract Values to Points between rasters and point shapefiles of the same name

texts:
I have a task of extracting raster values to point shapefiles, which is simple enough, but only where the raster filename is identical to the shapefile. For example, I have shapefiles "G1", "G2", "G3", and "G4" and I need to extract the values of rasters "G1", "G2", "G3", and "G4" to their corresponding shapefile.

Using Python (or Arc), is there a way I can convey this condition and automate the process?


texts: How to solve the "Map data not yet available" tiles when exporting from QGIS Composer?

texts:
I have a basemap layer from ESRI (through Quick Map Services plugin > 'Search QMS') and everythings works fine for me while being on the project.

The problem appears in the composers window. When I try to export as an image or PDF, I get this:

"Map data not yet available".
It doesn't happen with other basemaps (for example OSM), and it affects only some zoom level.

I must say that while on the project, the zoom level I'm using doesn't "crashes", so I imagine it is not a lack of "this-level-of-zoom" tile information.

Anyone knows why this is happening and how to solve it?

(QGIS 2.8.6 on Windows 7)


texts: GRASS error reading raster map: request for row 1 is outside region

texts:
I'm a rather inexperienced GRASS user, and am trying to use an addon module called r.geomorphon (see http://sil.uc.edu/downloads.html#software). I've managed to get it installed and am trying to run it, but get an error of:

ERROR: Reading raster map <decal1@PERMANENT> request for row 1 is outside region

and I have no idea what that means. From the Googling that I've done it seems that this error can be caused by some commands when the vector data doesn't overlay the raster data properly - but this routine only uses a single raster DEM file as input. Does anyone have any idea why this might be caused, or do I need to go directly to the author of the addon?

In case it affects things, I'm using a simple arbitrary location, as this DEM was generated by a computer model and therefore only has arbitrary X and Y co-ordinates.


texts: Unable to open folder.gdb with OpenFileGDB driver in GDAL

texts:
I have upgraded to GDAL 2.1 on Windows, binaries from: http://www.gisinternals.com/query.html?content=filelist&file=release-1800-gdal-2-1-2-mapserver-7-0-2.zip

I am able to use the command line:

> ogrinfo -al "C:/path/to/my/folder.gdb"

and it works fine, giving me details of the contents.

However, from my C code:

 GDALDatasetH dataset = GDALOpen( "C:/path/to/my/folder.gdb", GA_ReadOnly );

I get back NULL, and the console says:

  ERROR 4: `C:/path/to/my/folder.gdb' not recognized as a supported file format.

Yet I am still able to successfully open other files with GDALOpen(), such as .tiff, .sid, and others (all rasters, this is the first time I'm trying to open a vector file). Further, when I use GDALGetDriverCount() and GDALGetDriver(), and print the short and long name of each driver, I get a list of 200 drivers, including:

159 ESRI Personal GeoDatabase -- PGeo
160 MySQL -- MySQL
161 ESRI FileGDB -- OpenFileGDB

At one point I was including ogr_FileGDB.dll in my plugins directory, and that was giving a .dll load error on GDALAllRegister() because I don't have the Esri GDB SDK .dlls. But I thought maybe just having ogr_FileGDB.dll in the plugins directory was confusing GDAL and that's why the OpenFileGDB driver wasn't working. But even after removing ogr_FileGDB.dll from the plugins directory, I still get NULL when opening the .gdb.

Any ideas for how I can figure out what's going on?


texts:
I have been using Panoply for a while now, and I noticed that you can export a command line script to reproduce the figure. If I look at the first lines of the script, it tells me that I should run it as:

java -jar PanoplyCL.jar script.panjs

However, in the jars directory I cannot find PanoplyCL.jar:

lopezom@kw12964:~/bin/PanoplyJ/jars$ ls
commons-lang3-3.4.jar  monte-cc.jar          slf4j-api-1.7.12.jar
itext-2.0.0.jar        netcdfAll-4.6.3a.jar  slf4j-jdk14-1.7.12.jar
jhlabs-filters.jar     Panoply.jar

I tried passing the .panjs script as an argument to Panoply.jar but it skipped it because it was expecting a netCDF file:

000002 WARNING: Panoply parseCommandLineOptions - Skipping 'script.panjs'. No netCDF filename extension

Did PanoplyCL.jar used to be included in earlier versions? How can I run CL scripts? I really want these figures to be reproducible without using the GUI.


texts: I'm trying to move from Arc to QGIS, and spend a lot of time making maps out of polygon features. One tool that I can't find is an equivalent to ArcGIS' topology tool "Align Edge" - is there such a thing or do people have an alternative solution?


texts: Find all census tracts N miles from a lat, lon point

texts:
Using R, I'd like to find all census tracts within a given distance of a point (lon,lat).

i.e. All census tracts within 20 miles of 34.0522, 118.2428

I have used the sp library and over command to locate the tract of a given point, but would like to use it to find all the tracts covered by a "disc".

Ideas?


texts: raster output name capture from Input data in ArcPy

texts:
In writing a Python script, where I want to  capture last 3 digits from the  input raster's name and assign it to output raster name.

For Example:  My Input file names are: Mean_Temp_001.tif, Mean_Temp_002.tif so on, Mean_Temp_012.tif. After a calculation based on input data, I want to name the output raster based on the input.

for inRaster in list:
    localRaster = Raster(inRaster)
    outRaster = (localRaster/5)**1.514
    tifname = inRaster[3:]  # ( trying to captures "001" for output tiff name, as input name Mean_Temp_001.tif, Mean_Temp_002.tif)
    print tifname

    HI_OUT= os.path.join(outFolder, 'Heat_Index_{0}.tif'.format(tifname))
    outRaster.save(HI_OUT)

Updated code as per suggestion, its not producing any output its only printing 001, 002, 003 at the end of script,

    for inRaster in list:
        localRaster = Raster(inRaster)
        outRaster = (localRaster/5)**1.514
        file_name_only = os.path.splitext(inRaster)[0]
        tifname = file_name_only[-3:]

        HI_OUT= os.path.join(outFolder,'Heat_Index_{0}.tif'.format(tifname))
        outRaster.save(HI_OUT)


texts: Populating new field in QGIS only if row and column names match

texts:
Is there a way in QGIS or with pyqgis to populate a new column only when row and column names match (like in the example below)?
It's easy to do that with R but I can't find a solution in QGIS or with PyQGIS.


texts: Granting permission in ArcSDE geodatabasewhen layers are inside geometric network?

texts:
When I use sdetable command to grant pemission to a table that located in a SDE SQL server geodatabase it works properly, this table is a non-spatial table which is in geodatabase immediately, I mean when I open geodatabase in ArcCatalog, I can see it in the root of geodatabase.

But we have a FeatureDataset named "dsDisNet" and almost all feature classes inside in this feature dataset are members of a geometric network(except one).When I use sdelayer command to grant permission for one feature class, it is done successfully but the user can't still update the table.

Here is steps I do:

define a login in SQL Server, then define a user in geodatabase mapped to login
give the data_reader role to this user, so user can see all layers successfully
run this command

sdetable -o grant -t myTable -U gisUser1 -A SELECT,INSERT,UPDATE,DELETE -s GISServer -i 5151 -D GDBase -u sa -p mypassword

and it works successfully, and this user can work with that table

sdelayer -o grant -l myLayer,Shape -U gisUser1 -A SELECT,UPDATE -s GISServer -i 5151 -D GDBase -u sa -p mypassword

this last command doesn't work properly even it is run successfully,but the user still receive this message in ArcMap (something like this "cannot edit the folder or database you selected, the user doesn't have enough permission"

Is this problem because the layer is inside a feature dataset or member of geometric network? If so, how I can give update permission for this layer?


texts: Why my Shapefile is not loaded into OpenLayers?

texts:
This is my website for test: http://www.cv.nctu.edu.tw/tonywang/shapefile-js-openlayers/ol_simple.html

I want to put my Shapefile in OpenLayers. I found an example at https://github.com/mattwigway/shapefile-js/tree/openlayers

I tried it and put my Shapefile in OpenLayers using proj4 to convert EPSG:3826 (my Shapefile's projection is EPSG:3826) to EPSG:4326.

But, I can't see my Shapefile on the OpenLayers map. What's wrong?


texts: Seeking route calculation service to get route between several points?

texts:
I need a routing service with an API callable from a web or desktop application.
I have several points: a start, an end, and intermediate points in the disorder. I expect the routing service to send me the shortest path between the start and the end, via every intermediate point.

Do you know such a service ?


texts: Creating water and vegetation mask via image collection?

texts:
I am a Java script and EE novice but I'm already a great fan of Google Earth Engine. I am simply trying to create a single NDVI and NDWI masked layer to work on. Below you'll find my Frankenstein of a script where I've pieced code together, and it has worked well to create and NDVI and NDWI layer,I can do it with a single image but I just can't figure out how to apply it to the image collection, as it returns the error- 'S2 masked: Layer error: ImageCollection.mosaic: Error in map(ID=20160801T095532_20160801T133428_T32SQD):
Image.select: Pattern 'NDVI' did not match any bands'.

I know why it returns this error, the code is wrong, but I just can't figure it out for find an example to help me out.

FYI: I am using Sentinel-2 MSI: Multispectral Instrument, Level-1C for the image collection.

var S2collection =  imageCollection.filterDate('2016-08-01','2019-04-10')
            .filterBounds(aoi)
            .filterMetadata('CLOUD_COVERAGE_ASSESSMENT', 'equals', 0);
                Map.addLayer(S2collection, {bands:['B4', 'B3', 'B2'], max:3000});

  // Function to calculate and add an NDVI band
  var addNDVI = function(image) {
   return image.addBands(image.normalizedDifference(['B8', 'B4']));
  };
  // Add NDVI band to image collection
  var S2 = S2collection.map(addNDVI);
  // Extract NDVI band and create NDVI median composite image
  var NDVI = S2.select(['nd']);
   var NDVImed = NDVI.median(); //I just changed the name of this variable ;)
    var ndvi_vis = ['#d73027', '#f46d43', '#fdae61', '#fee08b', '#d9ef8b',
       '#a6d96a'];
       Map.addLayer(NDVI, {min:0, max:0.7, palette: ndvi_vis},'NDVI');

  // Add NDWI band to image collection
  var addNDWI = function(image) {
    return image.addBands(image.normalizedDifference(['B3', 'B5']));
  };
  // Add NDWI band to image collection
  var S2S = S2collection.map(addNDWI);
  // Extract NDWI band and create NDWI median composite image
  var NDWI = S2S.select(['nd']);
   var NDWImed = NDVI.median();
    var NDWIViz = {min: 0, max: 0.5, palette: ['00FFFF', '0000FF']};
      Map.addLayer(NDWI, NDWIViz, 'NDWI', false);

  // Function to mask out NDVI
  var S2maskedVeg = function(image) {
   var NDVI = image.select(['NDVI']);
     return image.updateMask(NDVI.lte(0.15));
  };
  // Apply water and veg masking functions to image collection
  var S2MASKNDVI = S2collection.map(S2maskedVeg);

  // Function to mask out NDWI
  var S2maskedWater = function(image) {
   var NDWI = image.select(['NDWI']);
    return image.updateMask(NDWI.lte(0.15));
  };
  // Apply water and veg masking functions to image collection
  var S2maskedW = S2MASKNDVI.map(S2maskedWater);
    Map.addLayer(S2maskedW,{max:1},'S2 masked');


texts:
I also posted this question on stackoverflow.

I successfully overlayed a WMS layer in google maps v3, however, as the information on tiles is black on transparent, it is not well seen on dark background (like satellite map), see some tile for example:

(This was the WMS link to retrieve that tile)

Question: how to modify the above WMS request to change the foreground color (currently black) to some custom color (e.g. red)? In other words, how to style the layer? The server is apparently able to do it for this layer, since it is possible to do it via their web map application (which works in IE only), where you can select the color. See this map image for example:

(The following link was used to retrieve the image - note that it contains scale and logo, so it's not a proper tile.)

Unfortunatelly, this web application doesn't use WMS to get this styled map so I can't just copy the styling parameters to WMS request. I must do the styling via the WMS request (because this other request format is proprietary, retrieves whole map - not designed for tiles - and it doesn't seem to support WGS coordinates) - how shall I do it?

I tried to:

look at the WMS documentation, especially version 1.1.1
look at the SLDs, but it seems pretty complex thing to grasp...
look at the GetCapabilites command output for the WMS server
Also, having look at DescribeLayer and GetStyles command outputs for my desired layer (HLMCR) I don't even know if this layer will support styling over WMS...

I got lost, I'd be grateful if you point me to the right direction - or information if it's even solvable in WMS (for this layer).

"It's not possible" is also a useful answer for me!

Thanks in advance.


texts: How to add Projection name, Ellipsoid, and Datum in QGIS 3 layouts

texts:
I am trying to add the map CRS information to text boxes in a layout in QGIS 3 automatically so if the project crs changes the text in the map will also change.

I  can add the EPSG code to a text box using the expression [%@project_crs%] or the full details using [%@project_crs_definition%] for British National Grid this just gives the following:

EPSG:27700
+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717  +x_0=400000
+y_0=-100000 +ellps=airy +towes84=446.448.-125.157.542.06.0.15.0.247.0.842.-20.489
+units=m

What i am looking for is:
EPSG:27700
British National Grid
Airy_1830
OSGB 1936

Does anyone know of a way i can use expressions within the text box properties to add this information. I can't really use python as yet (though i will be learning soon!)


texts: Inserting Grids and Graticules in ArcScene?

texts: I have searched Grids and Graticules option in ArcScene 10.3 but didn't found there. I am specifically interested to mark Y-axis (as in below map I've prepared in Surfer) to show vertical values of my DEM. How would I insert axis in ArcScene?


texts: How to draw lines with different colors in Openlayers 2?

texts:
I want to display multiple polylines with different colors in openlayers. Can any one guide me regarding this.

I have done this in google maps. but i don't know how to do it in openlayers. I am newbie to Openlayers.


texts: Assigning Arrow Symbology on Point-to-Point Connections

texts:
I have an excel file containing points of departure and arrival places and their lat/long.

I have lat/long for both arrival and departure cities in spreadsheet.
I have created seperate point feature shapefile for departure cities and origin cities.
want to assign symbology for these files displaying arrows going from origin to destination. (if displaying arrows is possible without symbology, would be accepted).
I want to create a shapefile of this excel displaying arrows going from the point of origin to the point of destination.

The lines should be curved but i have no information abut the angles or bearings

please suggest a procedure.

I'm a newbie at this!


texts: Converting Visio diagram to GIS layer for ArcGIS Desktop?

texts:
I have a office floorplan that is a standard Visio drawing file (*.VSD) that I would like to convert into a GIS feature class (shapefile, GDB, PostGIS, or any other applicable format, it doesn't matter much).

A couple of options occurred to me, but I am wondering if anyone know of any other tools/techniques for converting a Visio file to a feature layer?

My ideas:

Simply load the VSD file into a Desktop GIS software and heads-up digitize the features (walls, doors, cubical's, network ports, etc)
Convert the Visio to Raster, then using ArcScan to help automate the generation of feature linework.

Another idea I found in the question: Transforming Visio polygon to shapefile? was to:

"export Visio Shapes (file, save as) to a .dxf (AutoCAD exchange file)", which seems like it might be the easiest method I have found so far.

My preference would be to use ArcGIS 10.0 tools to accomplish this task, but am open to other possibilities.