texts: How to create polygons from lat/lon values and display on a vector layer

texts:
I'm very new to QGIS and would like to create a vector layer and populate it with a number of polygons defined by the latitude and longitude of their vertices in degrees.

I have a base map which is raster, and QGIS seems to display the coordinates of points on this map in a metric format. I'm also fairly happy with the concept of creating a .csv file in WKT format.

My question is, how do I define the vector layer in such a way that it reads the vertices in degrees, not some metric projection?

I'm guessing I have to choose the projection of my vector layer correctly. If so, how do I do that, and which projection is correct for that?


texts: ArcGIS tool when opened is not appearing

texts:
Recently I came across an issue with my ArcGIS tools not appearing when selected. All that appears is the tool dialogue box and it is completely blank (white).

What is causing this tool not to display?

Here is how is appears when I open the Buffer tool (I've tried this with other tools as well):

The tool does appear in ArcCatalog

I've tried rebooting ArcGIS and my computer to no avail.

I found this thread however it hasn't solved my issue.


texts:
I've created user profiles for my teammates to connect to my postGIS database with QGIS.

with my own user account I am able to successfully connect to my postGIS database on AWS RDS using QGIS 2.18.

user creation SQL:

CREATE USER foobar WITH
    LOGIN
    NOSUPERUSER
    NOCREATEDB
    NOCREATEROLE
    INHERIT
    NOREPLICATION
    CONNECTION LIMIT -1
    PASSWORD 'xxxxxx';

And granted permissions:

GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA test TO foobar;

Am I missing a step? When I connect in QGIS, I only see an empty public schema.

EDIT: In addition to the accepted answer, one can also change the default privileges so newly created tables are shown automatically in QGIS:

ALTER DEFAULT PRIVILEGES IN SCHEMA test GRANT ALL ON TABLES to foobar;


texts: How to find routes between for each entry in a list of point pairs?

texts:
I have a postgis database with two tables. In the first table I have linestrings of a street network.
The second table has points that are located on the street network.

What I want is to find the connection between these nodes using a shortest path method. The result would be an array of all the linestrings which are among these two nodes.

I want to run this code in an iterative way based on different node-pairs that I have stored in a csv file.

Which tool would you recommend me for something like this? Can pgRouting do something like this?


texts: Using ArcGIS Server SOE to listen for edit events

texts:
Bit of a conceptual issue

I have a situation where I need to add business logic to newly created features in a feature service. When new features are created I need to preform overlays and assign an ID from a stored procedure. I need this to happen automatically. In the desktop world this was easily done by listening for edit events in either an editor extension or a object class extension. Can SOEs accomplish the same thing? All the samples I have seen are for adding additional operations. I haven't seen anything for extending existing ones, in this case I guess it would be the create features operation of the REST Feature Service that needs to be extended.

My understanding of SOEs is that they can add functionality to map services but can they extend existing functionality? Am I on the right track with SOEs or is another approach recommended?

Any help/suggestions always greatly appreciated.

thanks

Drew


texts: Configuring Google closure compiler for OpenLayers

texts:
I am following this tutorial but I cannot run this command

./node_modules/openlayers/node_modules/.bin/closure-util

It says "no such file or directory" when I followed the folder structure indeed there was no such file

What am I doing wrong? is there change in structure? I am guessing this is old.

My node version is 7.6.0 and my npm version is 4.1.2 and I am trying to compile OpenLayers version ^4.0.1 as declared in package.json


texts:
I want to merge some lines with conditions but nothing seems to done
. Here is the query :

drop table if exists touches_diameter_material;
create table touches_diameter_material as select a.*,st_union(a.geom,b.geom)
as fusion from pipe a, pipe b where a.id > b.id and  a.material = b.material
and a.diameter = b.diameter   and st_touches(a.geom,b.geom)

if you know how to do it I'll be pleased to get some help.


texts:
In ArcMap there is the possibility to have a symbol, the symbol description or layer name and an additional description in your legend

Layer Properties --> Symbology --> Fetaures: Single symbol --> Description (Additional description appearing next to the symbol in your map’s legend)

Is there any way to do this in QGIS?


texts: ArcGIS Pro Error 00221 - How to limit number of features?

texts:
I have just tried to create my first web scene using ArcGIS Pro but upon sharing I receive the error 00221: Feature layer is displaying more than 2000 features.

I also tried to directly make the scene through ArcGIS Online and I received the same error.

My research took me to this page  which suggested creating a definition query but this is where I am stuck (my SQL skills are still beginning).

How do I create a definition query that will select 2000 depending on location?
How does everyone else get past this when displaying city data?  Are there any alternatives?


texts: QGIS: JSON Load error: Invallid Layer cannot be loaded in: Origin is GeoJSON

texts:
So far I have tried to load in a GeoJSON inside QGIS, but I get a problem doing so.
To give some context I am testing a system, where we can get a JSON more specifcally a GeoJson from a API. for now we are testing it with the public API. Link to the Public API documentation is here:
http://api.gipod.vlaanderen.be/#!index.md
Edit 2:
Okay after some digging I have found out that this JSON file..while clearly being established to geojson format, it is not format that is recognized by QGIS, if anyone can tell me why the heck this is feel free to do so. When clearly it has been established to be Geojson on the website. So what is going on here?
For now I am just testing if I can load the JSON file inside QGIS, since the public API claims the JSON file it delivers is in GEOJSON format. How we are gonna format that data is another step.
http://api.gipod.vlaanderen.be/#!docs/technical.md
Now for getting the JSON file itself I use this link:
http://api.gipod.vlaanderen.be/ws/v1/workassignment
And just save the file as JSON file.
Is my method wrong, or is there something else going on?
I am using QGIS 3.4.5 for now but later versions also have the same problem.
What I am doing wrong here? Is it method of delivering the JSON file itself? Or is there something else going on?
Here is the demo page they made:
https://api.gipod.vlaanderen.be/Demo/workassignment.html
Also of note I currently use the QGIS 3.4.5 version for the JSON file load.
Edit: This is the file you get:
[
  {
    "gipodId": 464424,
    "owner": "PIDPA drinkwater",
    "description": "2400 MOL - Gompelbaan",
    "startDateTime": "2014-02-13T08:00:00",
    "endDateTime": "2021-05-30T17:00:00",
    "importantHindrance": false,
    "coordinate": {
      "coordinates": [
        5.154672992272043,
        51.1939327342695
      ],
      "type": "Point",
      "crs": {
        "type": "name",
        "properties": {
          "name": "urn:ogc:def:crs:OGC:1.3:CRS84"
        }
      }
    },
    "detail": "http://api.gipod.vlaanderen.be/ws/v1/workassignment/464424?crs=WGS84",
    "cities": [
      "Mol"
    ],
    "latestUpdate": "2020-11-09T18:30:36.767"
  },


texts: Error while uploading shapefile into Google Earth Engine

texts:
I have been trying to upload a shapefile "Phu Quoc" to Google Earth Engine and hence filtering the images based on this shp, however I've got this error:

  "Landsat Collection: Layer Error: Image.Visualize: No band named 'B5'

(the picture below), although 'B5' is still available.

Could anyone please help me to figure out the problem, since I couldn't found any related post to this error.


texts: How can I extract the Dnbr value in Google Earth Engine?

texts:
I'm trying to export the Dnbr value of each pixel, but i don't know how to do.
This is my code:

//SENTINEL2
var poligono = ee.FeatureCollection('users/florianaspatola/grassano');
print(poligono)

//pre-processing
// Function to mask clouds from the pixel quality band of Sentinel-2 SR data.
function maskS2sr(image) {
  // Get the pixel QA band.
  var qa = image.select('QA60');
  // All flags should be set to zero, indicating clear conditions.
  // Bits 10 and 11 are clouds and cirrus, respectively.
  var cloudBitMask = 1 << 10;
  var cirrusBitMask = 1 << 11;
  // All flags should be set to zero, indicating clear conditions.
  var mask = qa.bitwiseAnd(cloudBitMask).eq(0)
    .and(qa.bitwiseAnd(cirrusBitMask).eq(0));
  // Return the masked image, scaled to TOA reflectance, without the QA bands.
  return image.updateMask(mask);
}

//Sentinel2
var S2 = ee.ImageCollection('COPERNICUS/S2')
  .filterDate('2019-07-01', '2019-08-31')
  .filterBounds(table)
  .map(maskS2sr);
print(S2);
Map.addLayer(S2, imageVisParam4, 's2');
Map.centerObject(table);
Map.addLayer(table, {}, 'grassano');

//area_test
var pre_fire = ee.Image('COPERNICUS/S2_SR/20190811T095039_20190811T095702_T33TWE');
print(pre_fire);
var visParams = {
  bands: ['B12', 'B8', 'B3'],
  min: 0,
  max: 3000,
  gamma: 1.4,
};
Map.addLayer(pre_fire.clip(table), imageVisParam4, '20190811_prefire');

//fire_21_08_2019
var fire_day = ee.Image('COPERNICUS/S2_SR/20190821T095039_20190821T095437_T33TWE');
print(fire_day);
var visParams = {
  bands: ['B12', 'B8', 'B3'],
  min: 0,
  max: 3000,
  gamma: 1.4,
};
Map.addLayer(fire_day.clip(table), imageVisParam4, '20190821_fire');

//post_fire
var post_fire = ee.Image('COPERNICUS/S2_SR/20190828T094039_20190828T094520_T33TWE');
print(post_fire);
var visParams = {
  bands: ['B12', 'B8', 'B3'],
  min: 0,
  max: 3000,
  gamma: 1.4,
};
Map.addLayer(post_fire.clip(table), imageVisParam4, '20190828_postfire');

//nbr_pre fire
var nbr_prefire = pre_fire.normalizedDifference(['B8', 'B12']);
print(nbr_prefire);

//nbr_post fire
var nbr_postfire = post_fire.normalizedDifference(['B8', 'B12']);
print(nbr_postfire);

//DNBR
var DNBR = nbr_prefire.subtract(nbr_postfire);
print(DNBR);
var dnbrclip = DNBR.clip(table);
print(dnbrclip);
Map.addLayer(DNBR.clip(table), {}, 'DNBR_s2');


texts: FInding the SRID for NAD_1927_UTM_Zone_7N?

texts:
How do I find the SRID for this shapefile? (output from ogrinfo -so)

Geometry: Polygon
Feature Count: 3
Extent: (-76840.712074, 7832057.693703) - (123912.271665, 7979730.291856)
Layer SRS WKT:
PROJCS["NAD_1927_UTM_Zone_7N",
    GEOGCS["GCS_North_American_1927",
        DATUM["North_American_Datum_1927",
            SPHEROID["Clarke_1866",6378206.4,294.9786982]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["False_Easting",500000.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",-141.0],
    PARAMETER["Scale_Factor",0.9996],
    PARAMETER["Latitude_Of_Origin",0.0],
    UNIT["Meter",1.0]]

I know the shapefile polygons are in Alaska. I can find a zone 17N on spatialreference.org but not a 7N. Any ideas?


texts: Setting correct proj4 string/info using GDAL

texts:
I am going to try and be as clear as I can - because I don't exactly know what I am doing but I am trying my best. I am sure this is probably simple but I have tried for hours to figure this out. I am trying to convert my .tif file to a raster tileset using GDAL tools.

For reference, I am using the following .TIF :
https://www.dropbox.com/s/85zgh1ragye27nd/tif.zip?dl=0

It is 1+MB zipped on Dropbox and 60+MB unzipped. This is "super resolution" NEXRAD weather data from a Texas radar during a tornado. It has been warped to ESPG:3857 for use in Mapbox previously (and that is what I need it in). Below is a screenshot after running gdalinfo.

With that out of the way... I am at the point where I am using gdal2tiles to convert the .tif to a tileset. But, I am getting the following error :

ERROR 6 : No translation for an empty SRS to PROJ.4 format is known

After doing research on this error, it looks like I need to define the proj4 string. (This is where I no experience at all.)

I found This link which gives instructions on adding the string to the raster file. But, is this what I need to be doing anyway?

I found https://spatialreference.org/ref/sr-org/7483/ to have proj4 information, but I am not sure how to add it to my .TIF - or if that would even fix it. Below is what apparently is missing from my .TIF.

+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs

I would add examples of what I have tried but I have done too many variations and I don't want to make a mess out of this question.

It looks like there is no coordinate system defined from gdalinfo, so is this what I should be doing?


texts: Supervised Classification Imagery for rooftops

texts: I'm trying to do a supervised classification in ArcPro that will allow me to find Tar and Gravel rooftops in Miami. I have Landsat data but just wondering if there is imagery out there with better spacial resolution that might work better?


texts: Listlayers, but exclude group names/feature dataset names with Arcpy

texts:
I am looking for a way to loop through all the feature classes (feature layers) within a mxd, to then use some geoprocessing tools on them. Before I run these geoproccesses, the script needs to change these feature classes to a certain workversion.

I have the script working the way I want except for groups or feature datasets. With the looping it thinks that these group names or feature dataset names are a layer of their own and therefore tries to change to a workversion, needless to say the script errors and I am left with no data being changed.

For grouped feature classes this is rather easy, remove the group. However this doesn't work for feature datasets.

My question is:
Is there a way to "ungroup" feature datasets or better yet, skip the names of groups/feature datasets all together in the script?

My script as it is now:

import arcpy
import arcpy.mapping

Project_number = arcpy.GetParameterAsText(0)

arcpy.env.overwriteOutput = True
inWorkspace = "G:/ZN_KGD@pkgd.sde"
parentVersion = "ZN_KGD_DIENSTVERSIE"

# Execute CreateVersion
arcpy.CreateVersion_management(inWorkspace, parentVersion, "ExPimp_{}".format(Project_number), "PUBLIC")

mxd = arcpy.mapping.MapDocument("G:\\zn\\NM\\GGB\\Applicaties-Admin\\Kerngis\\ExpImp\\{}\\{}.mxd".format(Project_number, Project_number))  # Uses your currently open MXD
for df in arcpy.mapping.ListDataFrames(mxd, ''): # Loop through dataframes
    for lyr in arcpy.mapping.ListLayers(mxd, '', df): # Loop through layers

         arcpy.ChangeVersion_management (lyr.name,
                                            "TRANSACTIONAL",
                                        "ZN_KGD.Export_{}".format(Project_number))

I am working with ArcMap 10.3.1
I have tried the solution given below on all the possible ways I can imagen, with no luck. As my knowledge of python/arcpy is very limited at best, would it be possible to explain the thought process behind it?


texts: Having trouble with Webserver configuration on Windows

texts:
I'm currently working on a WMS with QGIS 1.8.0 Desktop with Apache from xampp. What I want to do is to have my .qgs file displayed on my web page as a OpenLayers. So I followed this tutorial:

http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial#Webserver-configuration

I think the server is working correctly since I'm not having any errors when I run:

http://localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=c:/mymaps/welt.qgs

It returns a XML file. Yet something weird is in there, there are lots of tags like:

<Layer queryable="1">
<Name>welt</Name>
<Title>welt</Title>
<CRS>EPSG:32062</CRS>
<CRS>EPSG:32061</CRS>
<CRS>EPSG:32058</CRS>
<CRS>EPSG:32057</CRS>
<CRS>EPSG:32056</CRS>

And so on. I think there are about 10k lines of it. So I think there is a problem with the .qgs file instead of server configuration issues. Yet I'm new to QGIS and it's features.

And when I want to try the:

http://localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&SRS=EPSG:4326&REQUEST=GetMap&map=c:/myprojects/world.qgs&BBOX=-36.215710,6.817432,-9.700450,58.551008&WIDTH=500&HEIGHT=1000&LAYERS=world_countries&FORMAT=image/png

URL it just gives me a white box within a black frame. (I changed the &map and &layers parameter)

EDIT:

Just had this brilliant idea to test it on the osgeo-apache apache server and it worked. So I checked the httpd.conf of both osgeo-apache and xampp and had to change the

    #
    # Controls who can get stuff from this server.
    #
    Require all granted

to

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

and it works smooth now.


texts: How to change the zoom on an embedded google mymap?

texts:
I embedded a google mymap in my website using the embed code they provide. However it is zoomed much too far out. How can I zoom it in?

I added the second character (undrscore) so it would display.
<_iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?ie=UTF8&hl=en&source=embed&msa=0&msid=212526618623367333770.0004a2dd56ade1cf3f7eb&ll=34.931542,-81.894879&spn=0.043299,0.140592&output=embed">View Map Name in a larger map


texts: Openlayers requests to geoserver don't produce cached tiles

texts:
I've created a grouped layer made from 4 MrSID rasters.
I have a Openlayers map with basic Google layer.
When I preview the grouped layer in geoserver , I see that tiles are being created in the GWC folder (tried both EPSG:4326 and EPSG:900919).

When I view the layer in my openlayers application (on same localhost machine) , no cached tiles are being created (I've cleared the browser cache to make sure the tiles are being generated from geoserver).

In my Openlayers I'm using GeoExt2 ... but still its regular WMS call.

Any idea why no tiles are being generated ?!


texts: How to Install the ArcGIS JavaScript 3.2 API library on an IIS Web Server?

texts:
I would like to deploy Server API for JavaScript 3.2 in my server to use it in my asp.net project instead of connect to server

What are the steps to be followed in deploying it to a local WebServer?


texts:
Is there any way to configure OpenLayers styling method? I have a vector layer and I would like to style the features depending on a value of a flag variables, so I can't use rules. Lets say I have two types of features: houses and restaurants. houses flag is "H" and restaurants flag is "R". How can I give them a different style within a vector layer?

EDIT

function search(term)
{
var flag;
      if (regex_3.test(term))   //term is 3 letters
         {
     flag = "H";
..
..
..
    }

    else  if (regex_more.test(term))
            {
     flag = "R";
..
..
    }
}

and when I find the feature, I add it to a vector layer.but the thing is I can't find a way to make  two styles depending on the flag value.


texts: QGIS 1.8.0 on Linux treats NetCDF 4 as HDF5

texts:
I've been generating some large (28800x13920) grids of BYTE data representing the NALCMS2005 North American Land Cover dataset (original 250m projected data resampled to a WGS84 grid at 15 arc sec). I store the grid as a NetCDF 4 file with GZIP compression, using gzip level 6 and CF conventions; i.e. I use a "crs" variable to define the coordinate reference system, "lat" and "lon" dimensions and coordinate variables to define the geodetic latitude and longitude axes, and "lat_bounds" and "lon_bounds" variables to define the bounds of each row/column of the grid.

When I select one of these files with qgis-1.8.0-9_0.el6.x86_64 on a CentOS system or with qgis-1.8.0-6.fc16.i686 on a Fedora Core 16 system (these are my two Linux options right now), the "Select raster layers to add..." dialog that lists the layers found in the file displays them as

HDF5:"NA_LandCover_2005_WGS84_500m.nc"://Data

QGIS is able to load the data and display it, but the coordinate reference system and grid geometry are completely ignored. I realize that NetCDF4 files are technically also HDF5 files, but read on.

When I select one of the same files with QGIS on a Mac (Mountain Lion 10.8.4), the "Select raster layers to add..." dialog show the layers in the file as

NETCDF:"NA_LandCover_2005_WGS84_500m.nc"://Data

and successfully recognizes the CRS in the file. Unfortunately, this solution is not doing a lot for me because reading and displaying the data on this system takes about 30 minutes, and good luck changing anything or doing any navigation.

So... if I do "gdalinfo --formats | grep -i df" on the different systems I get exactly the same result:

GMT (rw): GMT NetCDF Grid Format
  netCDF (rw+): Network Common Data Format
  HDF4 (ro): Hierarchical Data Format Release 4
  HDF4Image (rw+): HDF4 Dataset
  NDF (rov): NLAPS Data Format
  HDF5 (ro): Hierarchical Data Format Release 5
  HDF5Image (ro): HDF5 Dataset

"gdalinfo --version" on the three systems:

Mac: GDAL 1.9.1, released 2012/05/15
FC16: GDAL 1.7.3, released 2010/11/10
CentOS 6.3: GDAL 1.8.1, released 2011/07/09

Maybe those older GDAL libraries on the Linux systems are the problem and I just need to build QGIS from source using GDAL 1.9 on one of the Linux machines.


texts: Creating routable grid map with pgrouting considering -180 & 180 discontinuity

texts:
I was able to create a routable grid based network table with gid, source, target, cost columns. I used pgr_create_topology function for this purpose.  I use this map to apply the pgrouting algorithms and works perfectly fine.

The worldmap I have used has the boundaries [-180,180] and [-90,90]. So the problem I have is to route from a port in Japan to a port in west coast of US. Since the network table is disconnected at -180 and 180,  the pgrouting routes alon the longest route.

My question is how can I create a routable network from pgrouting considering -180 & 180 issue?


texts:
I have a performed band calculation to calculate the NDVI grayscale.  It has float based values on a single band, between 0.0 and 1.0 respectively.  I am attempting to colorize the single band via applying a ColorRamp, with my end goal being able to generate a colored Tif that doesn't require mapping software to visualize the colors.  I believe the method approach I need to take is to apply a color ramp; however, it appears the ColorRamp only accepts integer values for the ranges though.  The documentation for the method states this:

int GDALColorTable::CreateColorRamp (int nStartIndex, const GDALColorEntry * psStartColor, int nEndIndex, const GDALColorEntry * psEndColor)

How do I apply the ColorRamp using the float based values?

Here is what I have attempted thus far:

colors = gdal.ColorTable()
colors.CreateColorRamp(0.0, (82,44,15), 0.25, (255,128,44))
colors.CreateColorRamp(0.25, (255,128,44), 0.5, (255,255,61))
colors.CreateColorRamp(0.5, (255,255,61), 0.75, (0,255,52))
colors.CreateColorRamp(0.75, (0,255,52), 1.0, (0,53,12))

ds = gdal.Open(f"{path}NDVI.tif", gdal.gdalconst.GA_Update)
band = ds.GetRasterBand(1)
band.SetRasterColorTable(colors)
band.SetRasterColorInterpretation(gdal.GCI_PaletteIndex)

Do I need to perform a gdal.Translate to get the source image from float to 0-255 range?


texts: How to add geometries using EntityFramework 6, EF designer from database, npgsql and postgis?

texts:
I have a postgre database with postgis geometries that i would like to access using Entity framework and npgsql. I tried to go for the "EF designer from database" , but when doing so i only get the non-geometric columns.

From a previous post, .NET Entity Framework with PostGIS? (from 2011) i realized that i might need a library to handle the geometry, which i would prefer to be NetTopologySuite. I tried to add NetTopologySuite.IO.postgis, but that dit not help ;)

Does EF6 support geometries natively or should i use a library like NetTopologySuite, and how do i make "EF designer from database" add the geometry columns automatically?

I have tested it using:

EntityFramework v. 6.0.0

Npgsql v. 3.2.5

EntityFramework6.npgsql v. 3.1.1

using the server explorer in visual studio do se the geometry columns of the postgre database table, with the data type geometry.


texts:
I have a GeoTiff image mymap.tif
https://www.dropbox.com/s/51chrzv9vp9olg8/mymap.tif

$ gdalinfo mymap.tif
Driver: GTiff/GeoTIFF
Files: mymap.tif
Size is 1085, 281
Coordinate System is:
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"]]
Origin = (-122.509475852140255,37.769141730303630)
Pixel Size = (0.000010000000000,-0.000010000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (-122.5094759,  37.7691417) (122d30'34.11"W, 37d46' 8.91"N)
Lower Left  (-122.5094759,  37.7663317) (122d30'34.11"W, 37d45'58.79"N)
Upper Right (-122.4986259,  37.7691417) (122d29'55.05"W, 37d46' 8.91"N)
Lower Right (-122.4986259,  37.7663317) (122d29'55.05"W, 37d45'58.79"N)
Center      (-122.5040509,  37.7677367) (122d30'14.58"W, 37d46' 3.85"N)
Band 1 Block=1085x32 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA
Band 2 Block=1085x32 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA
Band 3 Block=1085x32 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA
Band 4 Block=1085x32 Type=Byte, ColorInterp=Alpha

If I fetch the bounds of this image from Google Map I get this ground truth image https://www.dropbox.com/s/mrb3d1ho33mw9bw/truth.tif. The two images don't quite line up.

Is it possible to dewarp my image so that when overlaid on the Google Maps image they line up correctly?


texts:
I want to pan sharpen my Landsat8 scene (according to FIHS algorithm, see here).

According to the paper the following equation should do the pansharpening:

MS_high <- MS_low + (pan - I)

"MS_high" is the pansharpened MS band and "MS_low" the original MS band.

The I image is intended to be a simulated image of the Pan band at the spatial resolution of the MS bands. Spatial details from Pan are obtained by subtracting the lower resolution I band from the higher resolution Pan band.

When doing the substraction (Pan - I) the following output occurs:

  Error in compareRaster(e1, e2, extent = FALSE, rowcol = FALSE, crs = TRUE,  :
    different resolution

Does anyone used the FIHS pansharpening algorithm in R so far?

Any suggestions are welcome.


texts: Tiny difference of calculated area of polygons

texts:
I have a shapefile of about 62.000 polygons. I calculate the area of each polygon on a field, named AREA1, with Calculate Geometry option. Secondly, I create a new field field named AREA2. I calculate the are of the polygon from Field Calculator, using the code:

!shape.area!

Finally, I check if the fields AREA1 and AREA2 are equal. In 30 polygons there are tiny differences.

Does anyone can explain why is this happening?


texts: Sum up values of neighboring polygons in ArcGIS

texts:
My question is very similar to Summing up values of neighbouring polygons using QGIS?. However, I would like to be able to perform the analysis within ArcGIS Desktop if possible.
What I would like to do is calculate the percentage of blocks containing animal sightings surrounding a block and add the sum as a new field.

For example If we look at block 1 it is surrounded by 6 other blocks (224,2,7,6,5, and 227). The blocks that are highlighted in yellow are the blocks that actually contain animal sighting data. Block 1 has 1 neighboring block containing animal sightings; therefore, the new field I would like to add to block 1 would be .16 (1/6). Then we would move onto block 2 and perform the same calculation and so on.
I would have to perform this for different species and years and I seek ideas on how to automate this process.


texts: Why does PostGIS installation not create a template_postgis?

texts:
I went this route for installation of PostgreSQL and PostGIS:

PostgreSQL using the standalone KyngChaos,
PostGIS install from KyngChaos as well...
pgAdmin3 from PostgreSQL Tools

Now when I launch pgAdmin and try to create a new PostGIS database, there is no template_postgis for use in Template.

I have tried going another route, that is downloading the PostgreSQL package directly from PostgreSQL. This installs the server and allows you to use the StackBuilder to download and install PostGIS. This doesn't fix my problem.


texts: I use ArcGIS  in my Android app. I use query task for search in mapserver and show a feature by another color. I mean when a feature find should change color.my code work right but can not change color feature. This is my code:


texts: Is there a way to install FileGDB driver after QGIS has been installed?

texts:
I have QGIS 3.2 installed (Windows 7 64-bit), and I need to be able to read and write to Esri file geodatabases.

I have read the thread Installing File Geodatabase (*.gdb) support in QGIS?, which explains how to install the necessary FileGDB driver during a fresh install of QGIS; however, I would like to install the FileGDB driver for my existing install of QGIS.

So, my question is:

Is there a way to install the FileGDB driver after QGIS has been installed?

p.s. If this were on my personal computer at home, I'd just do a fresh install. As it stands, it took me a few years of pestering my IT folks to even get them to allow an install of QGIS on my machine as a "test case", so the fewer hoops I have to ask them to jump through to get QGIS to meet all of our needs, like read/write to File GDB, the better!


texts: MMQGIS Combine Layers OGR error: Can't create field

texts:
I am trying to combine about 20 shapefile vector layers in to one shapefile using MMQgis - but I keep getting the error below.

Failure creating output shapefile: creation of field Bergen_FAC failed (OGR error: Can't create field Bergen_FAC in Shape DBF file, reason unknown.)

Do you know what's causing this and how it can be solved?


texts: Using arcpy update cursor to populate a field based on subtraction from two other fields

texts:
In a counties shapefile, I have two fields named population2001 and population2010. I would like to create a third field with the difference between 2001 and 2010 using arcpy and the update cursor to better learn how to use cursors.
My code:

   import arcpy
   arcpy.env.workspace =
   r"C:\Users\Documents\geodatabase.gdb"
   ndCounties = r"C:\Users\Documents\geodatabase.gdb\Counties"
   #add the new field
   arcpy.AddField_management(ndCounties, "difference", "LONG", field_length = 10)

   fields = ['POP2001', 'POP2010', 'difference']

   with arcpy.da.UpdateCursor(ndCounties, fields) as cursor:
      for row in cursor:
         if row[0] == 'POP2001':
            row[1] = 1
            row[2] = 2
         elif row[0] == 'POP2010':
            row[1] = 2
            row[2] = 3
         row[3] = row[1] - row[2]
         cursor.updateRow(row)

When I run this code, I get this error:

TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

I'm not exactly sure if this is the right way of doing this field subtraction.


texts:
I've never used any type of GIS software before so I'm trying to find out if it is suitable for what I'm trying to do:

I've written a c++ program which estimates ground level noise from a distant source as a function partially of distance.

There are three things I'm looking to be able to do from QGIS,

select a position in 3-D space,
find the distance to the terrain below this point, and
plot the resultant noise onto the terrain.

Is this sort of functionality achievable without significant work? If so do you have any suggestions for what should be looked up in the docs?


texts:
I want to change the pre-defined red arrow link icon in the search widget to another icon:

Where would I do this? It looks like the widget is drawing from the InfoPopupWidget.swf?


texts: Kriging from raster with missing data in ArcGIS

texts: I have MODIS satellite imagery that depicts a range of surface temperatures. However, many of the cells are missing values. I think I need to perform Kriging in order to obtain an average value for the empty cells based on the values of the surrounding cells. I'm not sure how to do this because I'm working with raster data.


texts: Batch raster calculation of slope and aspect in SAGA

texts:
I am relatively new to the SAGA software, I have only used it for small amouns of data, and for basic calculations.
My data is obtained by mapping certain areas in GoogleEarth, then, overlaying the poligons with DEM data, then exporting as a raster grid of cells.

The problem is that I have to obtain the slope and mean aspect for a series (more than 1000) of rasters (grid) in SAGA. Slope is calculated in the morphometry tab, but for the aspect (mean of horizontal angles), I have to do a series of operations:

Import my grid;
Calculate slope, aspect in the Morphometry tab (that aspect is not what I need)
Creating a constant grid based on the initial imported grid;
Zonal Grid Statistics, based on the imported raster grid, the constant grid and the aspect raster from Morphometry)

With these  operations I get the correct value for mean aspect of my raster grid in a resulting table.

I am searching for methods of doing these operations all at once for my >1000 raster grids, because it would greatly reduce my working effort. I have recently found about batch operations with SAGA, but I have little programming knowledge, and I thought if this would help me.

Is it possible to do these operations with batch SAGA?

Do you know alternatives to SAGA batch?


texts:
I want to print a map with a raster image as base-map using Geotools.
The problem is that the raster image doesn't take the margins into consideration and starts always at the point (0,0) as you can see in the image below

My code :

protected void RasterConnect() {
         List<Parameter<?>> list = new ArrayList<Parameter<?>>();
         list.add(new Parameter<File>("image", File.class, "Image",
                       "GeoTiff or World+Image to display as basemap", new KVP(
                                    Parameter.EXT, "tif", Parameter.EXT, "jpg")));

         JParameterListWizard wizard = new JParameterListWizard("Image Lab",
                       "Fill in the following layers", list);
         int finish = wizard.showModalDialog();

         if (finish != JWizard.FINISH) {
                System.exit(0);
         }
         File rasterFile = (File) wizard.getConnectionParameters().get("image");

         AbstractGridFormat format = GridFormatFinder.findFormat(rasterFile);
         reader = format.getReader(rasterFile);

         // Initially display the raster in greyscale using the
         // data from the first image band
         Style rasterStyle = createGreyscaleStyle(1);

         Layer rasterLayer = new GridReaderLayer(reader, rasterStyle);
         map.addLayer(rasterLayer);
   }

public void pdf(Object object) throws FileNotFoundException,
                DocumentException {

         int marge = Mediator.getMarge();
         int scale = Mediator.getScale();
         float widthA4 = Mediator.getSize().getWidth();
         float heightA4 = Mediator.getSize().getHeight();
         float heightA4MeterWithoutMargin = com.itextpdf.text.Utilities
                       .pointsToMillimeters(heightA4 - marge * 2) / 1000;

         Document doc = new Document(Mediator.getSize().rotate(), 10f, 10f,
                       100f, 0f);

         PdfWriter writer = PdfWriter.getInstance(doc, new FileOutputStream(
                       "d:\\test4.pdf"));
         doc.open();
         PdfContentByte cb = writer.getDirectContent();
         Graphics2D graphics = cb.createGraphics(heightA4, widthA4);
         GTRenderer draw = new StreamingRenderer();
         Rectangle outputArea = new Rectangle(marge, marge,
                       (int) (heightA4 - marge * 2), (int) (widthA4 - marge * 2));

         ReferencedEnvelope referencedEnvelope=referencedEnvelopeToScale(scale,marge, widthA4,heightA4,heightA4MeterWithoutMargin);
         map.getViewport().setBounds(referencedEnvelope);

         draw.setMapContent(map);

       draw.paint(graphics, outputArea, referencedEnvelope);

         // Grid
         com.itextpdf.text.Rectangle rect = createRectangleBorder(marge,
                       outputArea);
         cb.rectangle(rect);

         MyFooter event = showInfoPaper(outputArea, scale, "map");
         writer.setPageEvent(event);

         createCrossCoord(marge, scale,  writer, cb,
                       referencedEnvelope);

         cb.fill();

         // cleanup
         graphics.dispose();

         // cleanup
         doc.close();
         writer.close();

   }

PS : Vector layers work perfectly, the problem occurs only with raster.


texts: Update data in postgis table with new version from shapefile

texts:
I have a postgis table created by importing a shapefile containing land parcels. The county releases a new shapefile containing updated data monthly and I want to incorporate that into my database.

The original data was uploaded using QGIS' database manager plugin. I'm fairly new to postgis.

I have views based on the data, so dropping the table and re-uploading isn't a great option. What I did last time was to use a DELETE command to completely empty the table then uploading the shapefile into a temporary table and using a INSERT * INTO ... command to copy all the data over.

This seems like a cumbersome process to go through monthly, especially since only a small percent of the data changes. Is there a better way to go about this?


texts: I wish to project (continue/extend/whatever) a polyline upslope following a specified gradient along a DEM surface. Is there any way of doing this?


texts: Is there any way to see a computational complexity of a tool?

texts: For example, if I run a tool, ModelBuilder or ArcPy script and I select it's input data and parameters. Is there any way to see how complex the algorithm is in some kind of units? After the tool has run you can see how long it took, but it largely depends on the CPU.


texts:
I extracted and transformed worksite records from a Oracle dB and stored them in a PostGIS dB. There are about 700 worksite records having a unique ID.

I need to extract additional worksites from the Oracle dB based on some spatial queries, which I only want to execute in close proximity of the 700 initially selected sites.

For this I want to use SQL creators transformers and in the WHERE clause of the query I would like to be able to use something as :

WHERE ID in $(id_list)

$(id_list) would be the list of my 700 initial records (78748, 48575, 05843, 47585, etc.)

I tried doing this by creating a list of all my ids but this doesn't seem to work.

Do I have to do this using a multiple choice parameter as suggested at Writing SQL WHERE Clause using Multiple Choice values in FME?

I can't seem to open the documentation to fully understand this solution.


texts: Random Forest to estimate land use in past with Landsat

texts:
I am new in Machine Learning and in R. I am working in my Master thesis. I am trying to estimate the LULC of the years 1984, 1990, 2000, 2011, 2014 for characterizing the forest dynamics. I have for each year the bands corresponding to Landsat imageries. The images were corrected and I have calculated vegetation index (NDVI, EVI, SR) and Tasseled Cap Components(Brightness, Greenness, Wetness). All this was performed using  i.landsat.toar, i.vi and i.tasscap commands in Grass 7, respectivelly.

I have as reference the year 2009 since there is a orthophoto and LiDAR data. Using the orthophoto I digitized training polygons for 5 classes (1. Crops, artificial, bareland; 2. pinus forest; 3. Mixed forest; 4. Quercus and 5. Shrubs).

I fitted a model using Random forest and my intention is to classify the other year datasets  wich have 5 reflective bands, 3 vegetation indexes and 3 tasseled Cap Components as predictor variables.

The performance of the model is quite good, OOB 10.45% but within classes the Mixed forest achieved about 30 % of error. Thus, when I use the model to classify the other years the misclassification is very high.

Am I doing anything worng? Is the Random forest useful for this purpose? Is there any software, method or algorithm that i could use to estimate the landuse?


texts: ArcGIS JS 4.15 Cluster Popup navigation for Cluster

texts:
I would like to migrate from ArcGIS JS API 3.x to 4.16. One other feature I am using from 3.x version is clustering. In 3.x is it allow user to click on Cluster marker and navigate between all individual marker information in inforwindow.
I am not able to replicate same behavior 4.15. I would like to know if it is possible rather than showing summary popup.
What I am looking for is to get list of features on click on a cluster, which was possible in 3.x but I am unable to figure it out in 4.16


texts: Checking for polygon neighbors using ArcObjects?

texts:
Could you tell me how to check in ArcObjects same feature overlapping other feature like (Building OID 10 and Another building OID 11) i tried to like below code but i am not going to for other step.

IFeatureClass Building = pfwspace.OpenFeatureClass("CO_Building");
                IFeatureCursor bld_cur = Building.Search(null, false);
                IFeature bld_F = bld_cur.NextFeature();
                int BF = Building.FindField("BUILDINGFORM");
                int BU = Building.FindField("BUILDINGUSE");
                DataTable dt = new DataTable();
                dt.Columns.Add("ObjectID");
                dt.Columns.Add("Feature Class");
                dt.Columns.Add("TGID");
                dt.Columns.Add("Error Comment");
                int tgid = Building.FindField("TGID");
                ITopologicalOperator ptopo = bld_F.Shape as ITopologicalOperator;
                IGeometry pgeo = ptopo.Buffer(1);
                ISpatialFilter pslt = new SpatialFilterClass();
                pslt.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects;
                int count = Building.FeatureCount(null);
                pslt.Geometry = pgeo;
                while (bld_F != null)
                {
                    string BF_val = bld_F.get_Value(BF).ToString();
                    string BU_val = bld_F.get_Value(BU).ToString();
                    string TGID_val = bld_F.get_Value(tgid).ToString();
                    if (BF_val == "9" && BU_val == "31")
                    {
                        IFeatureCursor f_cur1 = Building.Search(pslt, false);
                        IFeature feature1 = f_cur1.NextFeature();
                        IRelationalOperator relop = bld_F.Shape as IRelationalOperator;
                        relop.Overlaps(feature1.Shape);
                        if (Building.FeatureCount(pslt) > 0)
                        {

                            dt.Rows.Add(bld_F.OID);
                        }
                        System.Runtime.InteropServices.Marshal.ReleaseComObject(f_cur1);
                    }
                    bld_F = bld_cur.NextFeature();
                }


texts: Shortest path between start and end point with many other points in between

texts:
Sorry if double post, but I haven't found this specific problem in the search function. I want qgis to show me the shortest path (direct) between many points with each point only is hit once. There is also a start point and an end point.

So that it looks like this (just an example and obviously NOT the shortest path)


texts: Creating SLOPE from .ERS file using ArcMap

texts:
Working with ArcGIS Desktop 10.8. I have a .ERS file, it is a georeferenced image and the pixel value is a sea depth value. The depth varies from 0 to -2600 m.
I am trying to create a SLOPE (degree) and when I run the tool the resulting SLOPE appears with the same output value in practically the entire area, a value of approximately 89.
Can someone tell me what I am doing wrong and how to fix it?


texts: Getting lat/long points or coordinates from pdf file to store in database using QGIS?

texts:
I have some pdf maps that show airport noise contours. I need to get the area of noise from the map as a shape with coordinates that we can store in a database.(E.g., select 100 points on the noise area outline and store their coordinates.)

Here is a link to one of these maps:

http://www.lawa.org/uploadedFiles/LAX/pdf/2q16%20Quarterly%20Report%20Map.pdf

I tried QGIS, add layer geospatial pdf. But attribute table doesn't have x, y coordinates.

I have also converted pdf to .DXF format and inserted it to ArcMap, but it doesn't have spatial reference.


texts: How to create a map layer from a map file?

texts:
I am new to MapServer, I want to create map layer; is it required to use a shapefile  for this, and if so how can I use it.

Map file (eg2.map) is given below

MAP
    NAME ENG1
    STATUS ON
    SIZE 800 500
    IMAGETYPE GIF
    IMAGECOLOR 240 240 240
    SHAPEPATH "/www/geog5870/geog5870test/data"
    EXTENT 87000 8000 660000 660000
    UNITS METERS
    WEB
        IMAGEPATH "/www/tmp/"
        IMAGEURL "/tmp/"
    END
    LAYER
        NAME "EnglishGOR"
        TYPE POLYGON
        STATUS DEFAULT
        DATA "England_gor_2001_area"
        CLASS
           NAME "English Government Office Regions"
           OUTLINECOLOR 60 60 60
           COLOR 255 255 0
           SYMBOL 0
        END
    END
END


texts: Comparing use of GDAL to build raster pyramids or overviews versus ArcMap?

texts:
I have a large set of imagery that I created a mosaic from in ArcMap 10.1. I want to use GDAL to create the overviews because arcmap has issues building the pyramids and never seems to complete. I have experimented with using the GDAL command line utilities specifically:

gdaladdo image.png 2 4

The image alone is about 4gb. When creating the overviews using the above command, it generated and overview file over 60 gb in size.

What levels should I include in the command to mimic what ArcMap would create by default?


texts: How can I split an .hdf file with different layers into different shapefiles containing one layer each using tools of ArcGIS

texts:
I have downloaded a file from ftp://n5eil01u.ecs.nsidc.org/SAN/MOSA/MYD10A1.006/2002.07.04/MYD10A1.A2002185.h24v05.006.2016152140234.hdf but this file contains multiple layers, so I want to split this file into multiple files with each output file containing each layer.

How can I do that in ArcGIS?


texts: Finding link to ArcFM Object Reader download?

texts: Does anyone know where i can find a link to the Arcfm Object Reader 10.2.1c (64-bit) for download which works with ArcFM solution 10.2.1c and ArcGIS for server?


texts:
I have a problem with getting an Interpolation with the Interpolation Tool on QGIS 3.8.1-Zanzibar.

I just performed an IDW interpolation via the QGIS toolbox, with values from a layer that are 18 different recording stations in an area. The values I added manually to the attribute table (see field types in picture 2) and I want the extent of the Interpolation to be in the borders of that investigated area (red borders in picture 1).

After computing, it creates a raster layer, but I can not see anything and the min and max values are the same (the mean of the original values), see picture below.

The same was asked  in Performing IDW interpolation in QGIS?, but not answered how to solve it in the actual version of QGIS.

Has somebody an idea what could be the problem and how to solve it?

It worked with a GDAL raster analysis to create an IDW with nearest neighbour search, but there I just could set the extend overall points so I received a rectangle and not until the red borders.

It isn't either like in this post, because I use EPSG:25832 which is in meters and with 0,1 Pixel size X I reach 4490 rows and 13364 columns (see picture 4)

Here also the attribute Table


texts: Apply style to feature after adding it to layer Source

texts:
I am trying to apply style of my newly created feature which I add programatically to already defined vectorSource.

scope.tempSource = new ol.source.Vector({wrapX:false});

scope.drawingVectorLayer = new ol.layer.Vector({
                source: scope.tempSource,
                zIndex: 10,
                style: gaStyleFactory.getStyle('airbusBbox')
            });

Every drawed feature gets that style, also when I select feature, it applies selectStyle which is defined in my selectInteraction:

scope.addSelectInteraction = function() {
                var select = new ol.interaction.Select({
                    layers: function(lyr) {
                        return (lyr === scope.drawingVectorLayer);
                    },
                    style:gaStyleFactory.getStyle('select')
                });

I add my feature this way:

scope.tempSource.addFeature(uploadedKmlFeature);

My assumption was that it will inherit style from vector layer in which it's appended. I was wrong . Still feature can be selected and its visible inside selectInteraciton.getFeatures() but no style is applied. Does someone know how to solve this?


texts:
I'm attempting to clip a raster of global sea surface temperatures to a specific region in ArcGIS Pro.
Here are the data:
https://psl.noaa.gov/data/gridded/data.noaa.oisst.v2.highres.html
After using Clip Raster or Extract by Mask to a polygon that encompasses my region of interest, the pixel values for the raster change significantly. It seems like this is a common issue for any raster, but I have not found a clear response online. How do I prevent this from happening?


texts: QGIS 2.12 & Ubuntu 14.04 SAGA installation not found

texts:
Installing QGIS 2.12 on Ubuntu 14.04 from the debian trusty ppa. Upon opening QGIS I notice the following error under the Processing tab:

Problem with SAGA installation: SAGA was not found
or is not correctly installed

If I execute sudo apt-get install saga I then get that the version installed (2.1) is unsupported.

I did make sure to "properly" purge QGIS before installing as in QGIS install on Ubuntu 14.04 fails

Looking inside ~/.qgis2/python/plugins/processing/algs folder it does seem like SAGA is installed... but how to get QGIS to recognize it?


texts:
It's been awhile since I've dealt with optical imagery. I need to perform a land cover classification at mid-latitudes using several LANDSAT scenes. I've noticed that some online tools are still selling the imagery, but I was under the impression that the archive was now offered up at no cost.

What is the best/easiest way to obtain temporal Landsat imagery?


texts: Extract raster data by feature attributes/elements

texts:
I have a DEM raster, and a shapefile consisting of ~20 lines of steepest descent, created from the "flow Path Tracing" tool in Arc Hydro. Though the lines are all in the same shapefile, I wish to maintain their distinction (each has a separate ObjectID in the attribute table) in extracting DEM elevation values through a tool such as Extract by Mask. Using Extract by Mask with the line shapefile just produces one raster, with no separation between different lines.

Is there a way to extract DEM raster values corresponding to line location and maintain separate line IDs, so that I can later export them to Matlab for further analysis?

I'm currently using ArcMap 10.2


texts: Is there a way to use transition effect in OpenLayers layers in IE7?

texts: It seems transition effect for zooming in OpenLayers does not work in IE7.  I checked some of the development examples (for example this one) with IE7 and they show no zooming effects.  Did I miss something?


texts: What is the standard terminology for raster alignment?

texts:
I would like to identify two types of raster alignment (assuming SRS is the same), but I am unsure of the correct terminology for these (or whether there is even a 'standard')?

First, there is 'pixel alignment'; i.e. pixels between 2 rasters are of the same resolution and share the same corner coordinate, but the rasters do not necessarily have the same extents.

Then, there is 'raster alignment' or origin alignment (or whatever), i.e. where two rasters share the same origin and extents.


texts: Returning error from GeoServer WFS-T service if I cannot insert in the PostgreSQL database under the explained conditions

texts:
I know that if you try to insert a feature trying to insert as a string something that in the PostgreSQL database is a number you are getting error.

But I'm not too sure of the following situation:

Before possible insertion in the PostgreSQL database I plan on firing a trigger and check some things about a string, if it fulfills my conditions data Will be inserted, if not it won't.

But I'm not sure if there's a possible way so that if the insertion does not happen due to the trigger on PostgreSQL database not happening, it returns an error which can be caught in the client accordingly.

Is this possible to do? I'm using Leaflet to insert the data.


texts:
I am using PostgreSQL 9.3 and PostGIS 2.1.I imported a shapefile into my database. In that the_geom data type is "LINESTRING". Now I need a query to find the lines within a given radius for a particular latitude, longitude.

For example:

Consider I have latitude and longitude (12.4444 78.898900) for the given radius of 5000 meters I have to get the line details.

I tried a lot regarding this, I can't find a solution. Help me to solve this.


texts: Adjusting axes limits of graph in ArcMap

texts:
Is there a way to adjust the axis limits in the built-in graph tool in ArcMap?
I have looked all over and cannot find it. It would be easier to just adjust the axes than to save a new shapefile with the extra points removed.


texts:
I want display an openlayers map with a kml in android webview.
I implement this example.
This work on android 4.1 but not in 4.4.2.

Here is my code:

private WebView webview;

webview = (WebView)findViewById(R.id.webView);

webview.getSettings().setJavaScriptEnabled(true);
                webview.getSettings().setAllowFileAccessFromFileURLs(true);
                webview.getSettings().setAllowUniversalAccessFromFileURLs(true);
                webview.getSettings().setAllowFileAccess(true);
                webview.getSettings().setAllowContentAccess(true);
                webview.getSettings().setAppCacheEnabled(true);

webview.loadUrl("http://openlayers.org/en/master/examples/kml.html?mode=advanced");

The closest thing about OpenLayers not working on 4.4.2.
https://github.com/openlayers/ol3/issues/3035


texts:
I am working on a plugin on QGis, i want to know if it possible to change the color of the border of the selected polygone, to appare differently from other polygones when i print the layout.
Cordialy


texts: What requirements does ArcMap have for an ObjectID field name?

texts: When creating standalone tables in a geodatabase, what are the requirements for the OID/FID/ObjectID field name?  Specifically, does it have to be named 'ObjectID'?


texts: How to place points along a line using a list of distances in QGIS?

texts:
I am using QGIS 2.14 and I have a list of distances and descriptions similar to the table below

pipe1,50,lateral
pipe1,100,lateral
pipe2,51,break in pipe

I would like to add a point along a pipe at the specified distance (eg. 50,100,51) .  I know there is a processing algorithm but I don't think I can use it with selected lines.

How can I add points along a line using my table?


texts:
Near me there is an area on Google Earth that is covered up by a gray square:

The historical imagery for the tiles shows the underlying area and it is just a few ordinary upper middle class homes, nothing special or out of the ordinary.

Why would there be this random gray square appearing in just the current view?


texts: How to prevent ol.interaction.Modify module's function?

texts:
If I use ol.interaction.Modify module with the latest OpenLayers 6, I can easily implement modify function of LineString.

But even if the feature of other layers (like marker, etc.) is in front of edge layer, ol.interaction.Modify module ignore such features and show light-blue handle, and edges are modifyable.

I want to prevent ol.interaction.Modify module's function (showing light-blue handle, modifying the edges) if other features are in front of edges.
Is it possible?


texts: Calculating new field values in modelbuilder using values in an excel file

texts: I have a shapefile with polygons with fields: "Name" and "Area". I have an excel file with fields "Name" and "CostPerSquareMetre". I would like to be able to output a new excel file with fields: "Name","Area" and "Cost". Cost would be calculated by multiplying the "Area" field by "CostPerSquareMetre" field where the "Name" fields match. Is this possible using the ModelBuilder?


texts: Applying SVG marker as additional symbol to polygon layer in QGIS 3

texts:
I would like to add SVG markers as an additional symbol to a polygon layer.

The polygon layer is rendered with a categorized symbol renderer with different fill-color, and I want to add SVG markers to the centroid of the polygon for certain categories.

So far I only found the option "SVG Fill", is there a way to add one SVG Maker to the centroid of the polygon?


texts: Programatically Cache WMTS for Offline Use

texts:
Background
I have developed an app for iOS using the Swift language.  The app uses online map services, including WMTS, WMS, TMS, XYZ and makes heavy use of OpenLayers to display these.  I would like to be display some of these maps offline and therefore need to be able to cache selected portions of them locally (ie, selected extent and selected range of zoom levels).
(Don't need to remind me about copyright or licensing issues - I have my own Geoserver service so it's fine for those maps at least, and the app will have warning to users of other map services.)
TMS Works
I can cache a portion of a TMS map service, and it works fine offline displayed from the cache.  I essentially calculate which tiles are required, download them, and store them on the file system in the same heirarchy as they are in their online URLs.  Then they can simply be called by substituting the "http://servername/.../" with "file:///.../" in the base service URL.
WMTS is Complicated
However, I'm having trouble doing the same thing for WMTS, which has a much more complicated Capabilities.xml.  Additionally, WMTS GetTile URLs are not well suited to offline caching as some of them could result in a flat directory structure and some of them can include characters that are inappropriate for filenames.  So if I attempted to replicate a similar method to what I'm doing with TMS, all the tiles would end up in the same directory, making for very slow file system traversal and therefore inefficient reading of the tiles, plus I would have to work out some scheme for translating the file paths AND the Capabilities to avoid certain characters that don't play well with file names (eg, ":" is often used in WMTS tile paths, but is forbidden in iOS file names - if you see it in a file name, it is actually using a different character in the real file name, behind the scenes).
Proposed WMTS Work-Around
In order to work around these issues, I'm attempting to produce an offline TMS cache for the online WMTS service.  This enables me to work with simple file names and a directory tree that doesn't result in excessive numbers of files in any one directory.  I should then be able to feed the TMS cache to OpenLayers in the same way that I already do for my cached TMS services.
This is almost working.  It downloads all of the right tiles, but the row numbers, column numbers, extent and origin are all different to what I get when I download from the equivalent TMS service from the same Geoserver, and the cached map doesn't display in OpenLayers.
Can anybody provide advice on how to convert online WMTS to an offline cache that I can feed into OpenLayers?
As an example, just one of the issues I'm struggling with is... how to convert WMTS' array of DIFFERENT origins ("TopLeftCorner") into a single TMS origin?  (The origin-X-coordinate seems to be same as for TMS, but none of the WMTS origin Y-coordinates are anywhere near the TMS origin-Y coordinate for the same Geoserver map layer!)
I'd like to provide some code to show what I'm trying so far, but the nature of the beast is so complicated that it would require a prohibitively large base of code to be posted (and how many GIS people know Swift anyhow?).


texts:
I am trying to set up Qgis to Python but when I run Python I got this error

  Fatal Python error: initfsencoding: unable to load the file system
  codec ModuleNotFoundError: No module named 'encodings'  Current thread
  0x00002b14 (most recent call first):


texts: Is there an option in OGR2OGR to repair geometry when importing data to PostGIS?

texts:
this is related to one of my questions here Invalid Geometry in PostGIS but Valid in FGDB

If I could, I want to repair geometry while I am importing my data to PostGIS.
So I wrote this code below on OSgeo4W Shell

ogr2ogr -overwrite -progress -f "PostgreSQL" PG:"host=localhost port=5432 dbname=test user=test password=test" D:\FGDB_Edit\OCEAN.gdb -lco GEOMETRY_NAME=shape -t_srs EPSG:3857 -nln ocean_repair -dialect sqlite -sql "select ST_MakeValid(Shape) as geometry, * from ocean_boundary"

and it gives me this error

have you experienced this before? and have any solutions?


texts:
I'd like to know the way to add a "token" (draggable & deletable image) to a mapbox project. My goal is to create a wargame that can be played over the maps, at different zooming levels, and so each token (military unit)should have fix dimensions, in order to became smaller when zooming out. I know how to create a draggable marker, since it is in the mapbox.js examples library, but I have no idea how to make draggable an fix dimensions image (such a polygon or an overlaying image added to the map)

I know very little about code but I can copy/paste or customize styles.


texts: How to add svg logo for polygon layers of web map created via qgis2web?

texts: I need some edits on  my Leaflet webmap which are not supported using qgis2web plugin. I want to add SVG logo on two polygon features on the map. The SVG logos that I want to place on two parcel data. I have tried to add svg symbol for polygons, but that is not visible on the generated leaflet webmap. SVG symbols for point features are supported in the plugin, but not for polygon. How I can solve my problem?


texts: osm2pgsql Error - no schema has been selected to create in

texts:
I have a Postgres database with PostGIS and hstore extensions created. The data tables are in a schema called geodata with the search path set

ALTER DATABASE wapdb1 SET search_path = 'postgres','geodata' , 'hstore';

osm2pgsql script:

osm2pgsql -c -d wapdb1 -U postgres -H localhost  -S  C:\default.style  --hstore C:\england-latest.osm.pbf

It is failing with an error - no schema has been selected to create in. Do I need to specify the schema to create in using osm2pgsql? If so how?

Can anyone help please?


texts: Unable to stylize raster data as pseudocolor render type on MAC OSX

texts:
In a raster layer's Style Properties, I can choose pseudocolor render type, and choose a color ramp and classify the raster.

However, when I click the 'Apply' button, or click 'OK', the visualization of the raster never changes.  I was able to output a 'colorized' version of the same raster using GRASS plugin.  I also reinstalled QGIS 2.8, and was able to adjust and see a raster stylings using the steps I outlined above.

So, can anyone confirm this as an issue, or confirm that there's a mistake somewhere in my process?

I should note that I'm on a Mac, 10.10.4, and I'm using the QGIS provided by KyngChaos, 2.10.1-1 .

Update 1:
Here's a screenshot of the rest of my settings.

I have Grayscale set to off in the Style setting.  Also, I don't believe grayscale/color-blind Preview is available on the Mac version of QGIS.  They're does't appear to be the option where it should be, in the Menu Bar under View / Preview / Photocopy (grayscale) etc.  Either way-- I added a shapefile to show color.

Update 2:
I've experimented with setting color interpolation to discrete, linear, and exact, but still am not able stylize using Singleband pseudocolor.  I've also confirmed that the 'Render' box on the the main map view is checked.  Also, I am able to adjust Color Rendering settings, like Hue, Blending Mode, etc., and see the results when clicking 'Apply' or 'OK'.

Update 3:
As other Mac users are confirming this, I think it may be a bug. I've created a bug report at the official QGIS issues page.


texts: How do I scale my raster x and y values?

texts:
I am extracting cross sections from a DEM which is only available in meters. I need my cross section (x,y) data in feet. Scaling the vertical raster values is straightforward enough using the "raster calculator"; ["DEM_Merged1@1" * 3.28] converts my raster values from meters to feet. But, that only solves half the problem. This operation does not scale the raster horizontally.
How can I scale my DEM raster pixels in the X and Y directions to represent feet?
I believe this is covered in ArcGIS with the "Rescale (Data Management)" function.


texts:
I am trying to start with PyQGIS and make a simple script in the processing toolbox.

##theVector=vector
 theVec = processing.getObject(theVector)
 features = theVec.getFeatures()

now, if I'd like to iterate over every Object I'd write:

for feature in features:

but I just want to get the first object, and NOT interate over everyone..
I have tried:

f1 = features.get(1)

and get

  'QgsFeatureIterator' object has no attribute 'get' See log for more details

How do I get just one feature?


texts: In orther to undestand the api of pyqgis, i'd like to konw where can i find a diagram of pyqgis api ?


texts: How do I restore the docking guides in ArcMap 10?

texts:
I lost my docking guides quite some time ago and I can't figure out how to get them back.

Initially, I thought maybe it was an OS (Windows 7) configuration but my visual studio docking guides work correctly.

I can still dock, but it's the old style of docking (no docking guides).

ArcGIS 10 SP2 in Windows 7, x64


texts: Naming and Extracting shapefiles using value from attribute table using ArcGIS Pro ModelBuilder

texts:
I am working with ModelBuilder in ArcGIS Pro to create a process that will select a distinct shapefile from a feature class and create a new layer. This new layer will then be used to clip and extract by mask a land cover raster.
For organizing purposes I would prefer the new unique shapefiles to be named with a value from their attribute table, this value is "LandCode_ID".
Is there a way to automate the naming process in ModelBuilder so that it pulls the value in the "LandCode_ID" field and then uses that to names the extracted layer or is turning the model into Python and adding a line of code my most viable option?


texts: Last vertex incorrect after Dissolve (QGIS)

texts:
I have a polyline layer which is in individual segments in some areas, i.e. there are two line features which share an end vertex location but are separate database features. The line is a route that is split into zones, and each zone has sub-sectors. For some reason, some sectors are made up of multiple individual lines. I need to add a Marker Line that displays a symbol at the last vertex, to help distinguish the zone-sectors, and so I need to ensure each sector is a single line.

I used Dissolve on the original layer, with zone and sector as specified fields, to combine the segments into one where the values in the two fields are identical. Exploring the results of the dissolve show that this has worked as expected, as I now have a single feature for each zone-sector combination.

I have found how to add the marker line, with marker displayed "on last vertex only", within the layer's Style. However, the marker displays in the middle of the line as well, at the vertices that used to be the end of the initial segments (before the dissolve). On sectors that did not need to be dissolved, it displays as expected with a marker only at the end. It is as if the previous vertices have retained their "end" status after the dissolve operation.

Image: Selected single line feature shown in purple, with "last vertex only" markers showing at non-last vertices.

I am an experienced ArcGIS user making my first serious use of QGIS (v2.18.7). Is there some subtle difference in the Dissolve tool that I am missing, or is it a bug? How can I get my markers to show up only at the true last vertex of my dissolved lines?

Edit: example file here. This is a shapefile containing a feature which was digitised as a single line, then split using Split Feature, then Dissolved based on the ID. If you apply a Marker Line symbol to it, to display at last vertex only, markers appear at the split points.


texts:
This is a follow-up question to an answer to Deleting Shapefiles using QGIS?

I tried to run the script, however it always returns False and the shapefile is not deleted - any ideas what needs to be changed in order to make it work?

This is what it looks like:

    layer = iface.activeLayer()
    layer
    <qgis._core.QgsVectorLayer object at 0x0000000012DFC1E0>
    shp_path = layer.dataProvider().dataSourceUri().split('|')[0]
    shp_path
    u'C:/GIS/GIS_Kirchenkreise/13 GIS/Grundlagen/Daten_aufbereitet/Wahlkreise_Test.shp'
    print (QgsVectorFileWriter.deleteShapeFile(shp_path))
    False


texts: Auto incrementing field that begins with text in ArcGIS Desktop?

texts: I am searching for a way to auto increment an ArcGIS field which begins with text and followed by numbers. Ex. SWCL0000. I have tried the auto increment code in the field calculator but once I added text and a starting number, I kept on getting errors.


texts: What reference system uses coordinates such as "726822 4881333 to grid reference 726803 4881420"? (Nova Scotia Anglers' Handbook, 2021)

texts:
Here is a sample from the Handbook.  I don't know how I am supposed to fish legally here when I don't have a clue where and where not!

DIGBY COUNTY
Salmon River, downstream from the Route 1 Highway Bridge approximately 500 m to a line drawn across the Salmon River from grid reference 726822 4881333 to grid reference 726803 4881420, including tributaries,May 1 to Dec 31.

How does this translate to GPS, decimal or degrees?


texts:
I work with R almost all the time, and now I am using it for doing spatial data mining.

I have a PostGIS database with (obviously) GIS data.

If I want to make statistical spatial analysis and plot maps is the better way to:

export the tables as shapefiles or;
work directly to the database?


texts: I am looking for a way to convert KML to three Shapefiles (point, line, polygon) with a Windows script (exe or bat). The script should open a window to choose the input KML and save the three Shapefiles to a defined path with a defined coordinate reference system.


texts: IOError trying to change PICTURE_ELEMENT sourceImage

texts:
I recently ran into this issue after I published a Geoprocessing Task to a production server. It appears to be the same problem discussed in this question, but there is no answer posted there yet. Hopefully, sharing the details of my circumstances will allow someone to provide an answer.

My geoprocessing python code is an enhanced Web Map Print service that loads a map via the arcpy.mapping.ConvertWebMapToMapDocument function and either sets the sourceImage of a PICTURE_ELEMENT or moves it off of the page. The published GP Service works correctly on a development server, but returns the following error when running on the production server.

Unable to complete operation.
Error executing tool.:
 Traceback (most recent call last):
   File "<ags_folder>\PythonWebPrint.GPServer\extracted\v101\my_toolboxes\service.py", line 643, in <module> main()
   File "<ags_folder>\PythonWebPrint.GPServer\extracted\v101\my_toolboxes\service.py", line 634, in main (message, output_file, image_files) = execute(web_map_json, output_format, layout_template, layout_template2, georef_info, quality)
   File "<ags_folder>\PythonWebPrint.GPServer\extracted\v101\my_toolboxes\service.py", line 482, in execute staticLegend.sourceImage = legendPath
   File "c:\program files\arcgis\server\arcpy\arcpy\arcobjects\_base.py", line 87, in _set return setattr(self._arc_object, attr_name, cval(val))
  IOError: Cannot set path based on current settings.
  Failed to execute (PythonWebPrint). Failed to execute (Python Web Print).

I have verified that the correct file path is being used, and that the file exists and that the folder and file permissions are identical to the MXD files being loaded by the arcpy.mapping.ConvertWebMapToMapDocument function.

Any ideas as to the source of or how to fix this issue, or other diagnostics that I can perform?


texts: Can I call 32-bit python from an ArcGIS Server 10.3.1 GP Service?

texts:
I've developed a geoprocessing service that accepts a personal geodatabase as an attachment. After this MDB is copied to the server, I'd like to use ArcPy to open it, edit some feature classes, then append the data to an existing SDE dataset.

Given that ArcGIS Server GP Services are running 64 bit python, I tried using a subprocess to call 32 bit python:

try:
     arcpy.AddMessage(subprocess.check_output(["C:\Python27\ArcGIS10.3\python", \
                      "D:\Data\GISData\Scripts\CheckFCExists.py", newSourceData]))

except subprocess.CalledProcessError, e:
    arcpy.AddMessage('It failed!')
    arcpy.AddMessage("Subprocess output: {0}".format(e.output))

When running as a script tool in ArcGIS Desktop, the subprocess completes successfully with the STDOUT printed via arcpy.AddMessage.

When published as a GP service, it fails. The code enters the except block, prints 'it fails!' and then "Subprocess output", indicating that e.output is empty.


texts: How to download the aerial linescan images from open data cube?

texts:
Below code gives the metadata information, using matplotlib the data can be plotted, but how can I download all the 134 aerial images in jpg format. Is there an option to download the image files directly from open data cube?
from datacube import Datacube
dc = Datacube(app="aerial linescan images")
linescan_datasets = dc.find_datasets(product='linescan')
print(f'\nNumber of linescan datasets: {len(linescan_datasets)}')

Number of linescan_datasets : 134


texts: QGIS standalone application, problem with prefix path

texts:
I am trying to create a standalone application of QGIS in PyCharm. My code is:

app = QgsApplication([], True)
app.setPrefixPath("usr/lib/qgis/plugins", True)
app.initQgis()
canvas = QgsMapCanvas()
canvas.setWindowTitle('Aeee')
canvas.enableAntiAliasing(True)
canvas.setCanvasColor(Qt.white)
layer = QgsVectorLayer('LineString?crs=epsg:4326', 'MyLine' ,"memory")
pr = layer.dataProvider()
linstr = QgsFeature()
geom = QgsGeometry.fromWkt("LINESTRING (1 1, 10 15, 40 35)")
linstr.setGeometry(geom)
pr.addFeatures([linstr])
layer.updateExtends()
QgsProject.instance().addMapLayer(layer)
canvas.setExtent(layer.extent())
canvas.setLayerSet([QgsMapLayer(layer)])
canvas.zoomToFullExtent()
canvas.freeze(True)
canvas.show()
canvas.refresh()
canvas.freeze(False)
canvas.repaint()
exitcode = app._exec()
QgsApplication.exitQgis()

And the error I get is:

QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/run/user/1000/snap.pycharm-professional', please create it with 0700 permissions.
QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/run/user/1000/snap.pycharm-professional', please create it with 0700 permissions.
Process finished with exit code 1

I supposed this problem is because of the application that is trying to access the qgis path and that it having a problem with privileges. My first clue is to change the folder permissions and ownership, but because I am new to Ubuntu and PyQGIS, I asked this question.


texts: How to connect push button in dock widget form?

texts:
Following this tutorial as a guide, I created a plugin using the Plugin Builder with the dock widget form. I am now trying to connect a pushButton to a function. The following is a snippet of code:

def __init__(self, iface):
    self.dockwidget.pushButton.clicked.connect(self.test_print)

def test_print(self):
    print 'It works!'

However, I receive an:

  error when calling its classFactory() method

I have also tried:

def initGui(self):
    QObject.connect(self.dockwidget.pushButton, SIGNAL("clicked()"), self.test_print)

But then there's an error calling its initGui() method. Any pointers?

Edit:

I have tried the following variations in the run(self) function, I no longer receive errors but nothing is printed in the console:

def run(self):
    #self.dockwidget.connect(self.dockwidget.pushButton,SIGNAL("clicked()"),self.test_print)
    #self.dockwidget.pushButton.clicked.connect(self.test_print)
    QObject.connect(self.dockwidget.ui.pushButton, SIGNAL("clicked()"), self.test_print)


texts: How do you set the math model's CRS in PCI OrthoEngine? I keep getting an error saying that it is different than my DEM and new Orthophoto

texts:
I am trying to orthorectify a pansharphened WV2 image and keep running into this error. I have 19 control points and 6 check points that allow the model to be calculated with 10 coefficients. I am using the optical satellite model and the rational function (compute from GCPs)
My error message is shown below.


texts:
I am working with the tri.txt (terrain ruggedness index) file from this paper: http://diegopuga.org/data/rugged/

I've uploaded the raster data from the file into ArcMap and now have it as a .tif file. My goal is to use this data and PostGIS to get the ruggedness value for certain cities in the US (I have the lat/lon values for the cities I'm interested in). I'd like to convert the raster data to points, get the lat/lon values of each of those points, and find the closest data point to each city.

Questions:

The website I got the raster file from doesn't mention an srid. How do I find out what projection it uses?
I'm not familiar with scripting in ArcGIS. I've found the arcpy.RasterToPoint_conversion function in Python that I think I can use for this, but I'm not sure what the arguments should be.


texts: [GDAL API]: can't save image in some formats

texts:
edited "32-bit buffer" below means that it contains 32-bit rgba pixels.

I need to save image to file from 32-bit memory buffer. Code below works well for that when I use TIFF format. In this case saved image file is correct. But the same code doesn't work for JPEG and PNG. In these cases files are created, they have valid dimensions, color depth, but all pixels are black. GDAL functions don't signal any errors.

Some strings with error checking were omitted in the code below.

buf variable refers to 32-bit source buffer with ready image pixels.

To save to PNG format, I change driver name strDrv to "PNG" and file extension to .png correspondingly. For jpeg too.

union rgba_t {
    struct { unsigned char g, b, r, a; };
    unsigned c;
};

int cx = 500, cy = 500;
rgba_t buf = new rgba_t[cx * cy];
memset(buf, 0xff, cx * cy * sizeof(rgba_t));

GDALAllRegister();

GDALDataset     *pDs, *pDsMem;
char            **opt = NULL;
GDALDriver      *pDriver, *pDriverMem;
int             nBands = 3;
char            *strDrv = "GTiff",
                *fpath = "c:\\tmp\\o.tiff";

pDriverMem = GetGDALDriverManager()->GetDriverByName("MEM");
pDsMem = pDriverMem->Create(fpath, cx, cy, nBands, GDT_Byte, opt);

pDriver = GetGDALDriverManager()->GetDriverByName(strDrv);
pDs = pDriver->CreateCopy(fpath, pDsMem, FALSE, opt, NULL, NULL);

GDALRasterBand  *pBandR = pDs->GetRasterBand(1),
                *pBandG = pDs->GetRasterBand(2),
                *pBandB = pDs->GetRasterBand(3);

int szScan = cx * sizeof(rgba_t);

CPLErr err;
err = pBandR->RasterIO(GF_Write, 0, 0, cx, cy, (BYTE *)buf + 2, cx, cy, GDT_Byte, 4, szScan);
err = pBandG->RasterIO(GF_Write, 0, 0, cx, cy, (BYTE *)buf + 1, cx, cy, GDT_Byte, 4, szScan);
err = pBandB->RasterIO(GF_Write, 0, 0, cx, cy, (BYTE *)buf + 0, cx, cy, GDT_Byte, 4, szScan);

GDALClose(pDs);
delete[] buf;


texts: Using ArcGIS Geoprocessing and 32/64 bit architecture with ArcObjects?

texts:
I am coding a VB.net console application using ArcObjects to call ArcGIS 10.1 geoprocessing tools. I have several geoprocessing calls that actually work, but that pop up an irritating message box when I  call them from code. This is a problem because I need to run my application in batch at the command line and this message box pauses the application while it waits for input.

The message box appears consistently on certain geoprocessing calls, but not for all calls. The two main culprits are "Calculate Field" and "Raster Calculator". Below is an example of the former:

Dim GP As New Geoprocessor
Dim CalcFieldTool As New CalculateField
CalcFieldTool.in_table = pFClass
CalcFieldTool.field = "Elevation"
CalcFieldTool.expression = "!RASTERVALU!"
CalcFieldTool.expression_type = "PYTHON"
CalcFieldTool.code_block = " "
GP.Execute(CalcFieldTool, Nothing)

The messages does NOT appear if I use VBA syntax for the calls instead of Python. However, my application has to run against ArcGIS Server which does not (and cannot) include VBA, and so I am tied to Python Syntax. Also, the message box does not appear when I run the same geoprocessing tools in ArcGIS Desktop.

This code works and the Elevation field is indeed updated with the values from the RASTERVALU field. I am just need to avoid the message box popping up. Also note that this is well tested code and used to work without the popup until recently... perhaps ArcGIS 10.1 service pack 1. (I cannot upgrade to 10.2.)

I am now almost certain that this is related to an architecture mis-match somewhere. My computer is 64 bit, ArcGIS is 32 bit, my console application is compiled as 32 bit (not Any CPU) and I have both the original 32 bit version of Python installed as well as the ArcGIS 10.1 Service Pack 1 64 bit background geoprocessing download installed. But I am unsure how to direct my code to use the latter.


texts:
I'm trying to extract centroids from polygons.
I have already done it on Linux Fedora, MAC OS-X shell. The result was good.

Now I need to run the same command on UBUNTU shell, but it returns the following error:

ogr2ogr -dsco "SPATIALITE=YES" -sql "SELECT ST_Centroid(geometry), * FROM poly" -dialect sqlite centroids.shp filtered_result.shp

Warning 6: driver ESRI Shapefile does not support creation option SPATIALITE
ERROR 6: The SQLite driver needs to be compiled to support the SQLite SQL dialect

I have already installed SQlite as following:

wget Page on sqlite.org
tar xvfz sqlite-autoconf-3190200.tar.gz
cd sqlite-autoconf-3190200
./configure
make
make install

What is the problem? How can I fix it?


texts: Automatically name rectangles by spatial order or position to each other

texts:
I need a solution for that case:

I have got a fishnet-raster (as polygons) without any systematic order in the ID of the features and need to label every rectangle from A1 to F6:

For now I do it manually but I have 150 of them.

I'm looking for a way using QGIS, Python or PostGIS to automatically assign a name or a number to my grid-rectangles.


texts: Compute and label distance between points on a line?

texts: I have a line and I want to find and label the distance between the nodes (like the cad aligned distance). The v.distance GRASS tool from Processing Toolbox outputs an empty vector file. Is there another way?


texts: How to change the order of layers added to the map in Google Earth Engine

texts:
I have two feature collections(a border of a country and point locations of surveys conducted) and 30 images. I would like the feature collections to be displayed on top of all 30 images but I can only seem to get them to display as the bottom layer under the 30 images. Here is a link to my code
https://code.earthengine.google.com/36a216f0598b2c397ad566f94cd23269
Map.centerObject(Benin_pt,6);

///Dates that need to be classified 11/01/12-02/01/18

//Filtering to date

 var AquaFilt=Aqua.filterDate('2013-02-01','2013-02-28');
 print(AquaFilt);

 function addtoMap(image){
 var id=image.id
 print(id);
 image=ee.Image(image.id).select('sur_refl_b01','sur_refl_b04','sur_refl_b03')
 var date=image.get('system:time_start')
 date=ee.Date(date)
 Map.addLayer(image,Aqua_vis,'Aqua'+date)

 }

 AquaFilt.evaluate(function(AquaFilt){
 AquaFilt.features.map(addtoMap)
 });

Map.addLayer(DHS_PSU, {'color':'FF0000'}, 'DHS_PSU');
var Benin= Africa.filterMetadata('COUNTRY','equals','Benin');
Map.addLayer(ee.Image(0).mask(0).paint(Benin,0,2),{},'Benin');


texts:
I would like to use osm2pgsql to load the europe.osm.pbf to the database.
I've already read about the optimalization to make the osm2pgsql do it as fast as possible. However, there's one option, that I really don't understand, which is --flat-nodes <flat nodes>.
What is this file? Where is it located?


texts: QGIS: Lines between multiple nearest neighbors

texts:
So I have a set of hubs and spokes and want to connect each spoke to its three nearest hubs. I used the distance matrix method (Returning Multiple Nearest Neighbors) and now I have a (MultiPoint) shp-file that looks like this:

For each BezirkNr (spoke) I have 3 entries KnotenNr (hub) with their respective distance. Now  I would like to draw a line between each of these pairs to get a shp-file in the end. I have been trying with Join by lines (hub lines) and MMQGIS (hub) but haven't been able to find a method to connect all 3 entries of each BezirkNr.

Any kind of help would be greatly appreciated.


texts: What is wrong with this proj4 string that the raster package in R will not accept?

texts:
I am trying to use a .tif file from USDA's CropScape, which has the proj4 string

"+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0
+datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"

Creating the original raster object succeeds and is plottable, but comes along with the error message

"Warning message: In .newCRS(value) :   +proj=aea +lat_1=29.5
+lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0 is not a valid PROJ.4 CRS string"

Likewise, trying to manually assign the CRS by typing
crs(cropscape) <- "proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"

does not work and returns a similar error message, that it is not a valid PROJ.4 CRS string.
I'm no CRS or PROJ4 genius but I do not see what is wrong with this string. What is the problem here?
For reproducability: this is the code being used to generate the cropscape raster object:
cropscape <- GET(url="https://nassgeodata.gmu.edu",
                 path="axis2/services/CDLService/GetCDLFile?year=2014&fips=06") %>%
  content('text') %>%
  str_remove(".*<returnURL>") %>%
  str_remove("</returnURL>.*") %>%
  raster()


texts: What causes Error in ogrInfo when using readOGR to open a layer in a shapefile?

texts:
When I use readOGR to read a shapefile from thematicmapping.org, the shapefile is successfully displayed by leaflet in a shinyapp.

However, when I use readOGR to read a shapefile from mt.gov, the result is an Error in ogrInfo.

download.file("http://ftp.geoinfo.msl.mt.gov/Data/Spatial/MSDI/Cadastral/Parcels/Sheridan/SheridanOwnerParcel_shp.zip" , destfile="SheridanOwnerParcel_shp.zip")
#Unzip them ##
unzip("SheridanOwnerParcel_shp.zip")
SheridanCountyMTParcelShapes = readOGR(dsn=getwd(), layer="SheridanOwnerParcel_shp")

Resulting error :

Error in ogrInfo (dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, : Cannot open layer


texts: OpenLayers Select a feature from attribute or id

texts: Using Openlayers.....Is it possible to select a feature on a map by an attribute? eg: Select a feature from a dropdown menu populated with the feature "id" or a table field attribute values.


texts: Table to Excel creating sheet name with special characters 10.3

texts:
I have been searching through forums to solve this issue with no luck.  I work for a housing finance agency specializing in affordable housing.  When we receive applications, we send letters to announce the development to the district's elected officials.  We have created a database (Access) to which I would like to link the geocode output and subsequently joined attributes.

I've built a model that takes the geocoded file and joins each feature class's (Districts) attributes to one output shapefile.  The model then converts the output shapefile's attribute table to Excel.  This Excel file is intended to link to the Access database which contains the names and addresses that correspond to each district/level of government. From Access, the letters are created.

The model works very well however, I cannot get Access to find the file because during the conversion from .dbf to Excel, the Table to Excel tool names the data sheet with the file name, which contains the file extension. For example, I can name the Excel file whatever I like, but the sheet tab will be alloutput.shp with no option to define the sheet name by the user.

I've attached a couple images to show the model and the output.  Wondering if there is a workaround here.


texts: Calculating distance between many users of a handful of facilities, a small hangup

texts:
I am trying to calculate distance between thousands of people and a handful of facilities.  I know the ArcGIS ROUTENAME issue has been addressed many times in forums.  I have scoured them and am hung up on one point.

In this thread (https://geonet.esri.com/thread/88593) it is stated that "You might have to load multiple copies of the same park because multiple people use the same park."  Exactly.  In my case, these are facilities.

In this thread (https://geonet.esri.com/message/233312#233312) it is stated that "...your 368 locations are repeating. You could do this with some relates...".  Yes, I need to repeat locations (facilities), but there is not direction on how to use relates to generate repeated locations.

I need to figure out how to make hundreds of duplicate copies of the same facility.  Once duplicated, I will then give each one of the hundreds of copies of the same facility a unique ID.  Then I can match the facility to the thousands of users of it using ROUTENAME.

It is just duplicating the facility that is hanging me up.


texts: Improving ArcGIS Pro Basemap Quality when exported to PDF?

texts:
Since making the switch to ArcGIS Pro all of my exports (to PDF) have poor Basemap quality, especially the World Topographic basemap and the Light Gray Canvas Basemap. The export settings I used for ArcMap are the same for ArcGIS Pro.

Any suggestions?


texts: How to put QgsCheckableComboBox() into standby

texts:
I'm trying QgsCheckableComboBox() in my simple python script in QGIS. How to pause code execution while a comboBox-window is open (like a dialog box)? In my example, I want to ensure that the print() function is executed only after the comboBox-window is closed. Then the checkedItems list will not be empty and will contain the selected lines ("Venus", "Earth", "Mars"). How can I achieve this?
from qgis.PyQt import QtGui
from qgis.core import *

planet_list = ["Venus", "Earth", "Mars", "Jupiter", "Pluto"]
items = QgsCheckableComboBox()
items.addItems(planet_list)
items.showNormal()

print('\n\n-----------CheckedItems: ', items.checkedItems())


texts: Add Surface Information alternatives in QGIS?

texts:
Is anyone aware of a single tool or possible routine of tools in QGIS (2.6) which emulate the results of the ESRI 3D Analyst tool 'Add Surface Information'? I have several polygon shapefiles (some with 1000+ features) I am trying to tag with information from a LiDAR-derived raster.

As a bare minimum, I am wanting to extract MIN and MAX elevations, but would also like to grab MEAN elevations and SLOPE information from the raster.

TO UPDATE: I've recently stumbled across the Zonal Statistics plugin which produces MEAN values for raster data within a set polygon(s). Am still searching for a plugin to generate SLOPE data.


texts: R: Self-intersection error when using intersect with two shapefiles

texts:
I am trying to "translate" worldwide raster data to European nuts3 polygons. That means I try to overlap two shapefiles to find the average value on nuts3 level.

Unfortunately, when I use the intersect function, I get the following error:

new_spdf <- intersect(grid,nuts)
    Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_lower_td, unaryUnion_if_byid_false,  :
      TopologyException: Input geom 1 is invalid: Self-intersection at or near point 13.3081265 48.608032999999999 at 13.3081265 48.608032999999999

Below you can find the full code.

### download the files available through this link:
# https://drive.google.com/open?id=0By9u5m3kxn9yUy1xVDF2NV9TajA

> library(rgdal)
> nuts <- readOGR(".", layer = "NUTS_RG_60M_2010")
OGR data source with driver: ESRI Shapefile
Source: ".", layer: "NUTS_RG_60M_2010"
with 1920 features
It has 4 fields
> grid <- readOGR(".", layer = "a3_mean_annual_runoff_1950_2000")
OGR data source with driver: ESRI Shapefile
Source: ".", layer: "a3_mean_annual_runoff_1950_2000"
with 41553 features
It has 2 fields
> summary(nuts)
Object of class SpatialPolygonsDataFrame
Coordinates:
        min      max
x -61.74369 55.83663
y -21.37656 71.17308
Is projected: FALSE
proj4string : [+proj=longlat +ellps=GRS80 +no_defs]
Data attributes:
    NUTS_ID       STAT_LEVL_     SHAPE_Leng         SHAPE_Area
 AT     :   1   Min.   :0.00   Min.   :  0.1326   Min.   : 0.00057
 AT1    :   1   1st Qu.:3.00   1st Qu.:  1.6480   1st Qu.: 0.11795
 AT11   :   1   Median :3.00   Median :  2.9772   Median : 0.35707
 AT111  :   1   Mean   :2.66   Mean   :  5.1573   Mean   : 1.56752
 AT112  :   1   3rd Qu.:3.00   3rd Qu.:  5.3525   3rd Qu.: 0.97955
 AT113  :   1   Max.   :3.00   Max.   :132.3810   Max.   :81.09899
 (Other):1914
> summary(grid)
Object of class SpatialPolygonsDataFrame
Coordinates:
   min   max
x -180 180.0
y  -55  83.5
Is projected: FALSE
proj4string :
[+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0]
Data attributes:
       ID             CODE
 Min.   :    1   Min.   :   0.0
 1st Qu.:10389   1st Qu.: 118.6
 Median :20777   Median : 260.0
 Mean   :20777   Mean   : 432.1
 3rd Qu.:31165   3rd Qu.: 528.8
 Max.   :41553   Max.   :6854.2
grid <- spTransform(grid, CRSobj = CRS(proj4string(nuts)))
> new_spdf <- intersect(grid,nuts)
Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_lower_td, unaryUnion_if_byid_false,  :
  TopologyException: Input geom 1 is invalid: Self-intersection at or near point 13.3081265 48.608032999999999 at 13.3081265 48.608032999999999


texts: Bing Authorization interrupts arcpy script

texts:
I made this happy little arcpy script to fix some data source problems:

print "Hi, I will fix find and replace file path sections on your behalf. \nGive me a moment to just count the number of MXDs I'll be looking at for you today..."
import os
import arcpy
mxdfiles = [os.path.join(d, x)
            for d, dirs, files in os.walk(r"PATH")
            for x in files if x.endswith(".mxd")]
print "\nOk, I'll be working through "+str(len(mxdfiles))+" MXDs. \nStarting this process now..."
for item in mxdfiles:
    print "\nWorking on: "+item
    mxd = arcpy.mapping.MapDocument(item)
    mxd.findAndReplaceWorkspacePaths(r"PATH OLD1", r"PATH NEW")
    mxd.findAndReplaceWorkspacePaths(r"PATH OLD2", r"PATH NEW")
    mxd.findAndReplaceWorkspacePaths(r"PATH OLD3", r"PATH NEW")
    mxd.findAndReplaceWorkspacePaths(r"PATH OLD4", r"PATH NEW")
    mxd.findAndReplaceWorkspacePaths(r"PATH OLD5", r"PATH NEW2")
    mxd.save()
    del mxd
    print "Completed "+str(mxdfiles.index(item)+1)+" maps so far."
print "\nProcess complete!"

Unfortunately, though, when it comes across a MXD with a Bing imagery layer, up pops a Bing Authorization box which you have to click 'OK' on (hitting Enter works, too). This is because my company no longer has a license to use Bing/Microsoft Virtual Earth, so this little box comes up every time a MXD is opened manually, or, it seems, when one is invoked by my script. This means I have to either:

Find a way to programmatically click that button or ignore it.
Leave a coffee mug on my Enter key overnight.
Remove the Bing (or Microsoft Virtual Earth*) layers programmatically.

I Googled to no avail regarding option 1. Before going for option 2, I tried option 3. As a test, I used the following script (as this one didn't work) to try removing Microsoft Virtual Earth* layers (their group is Microsoft Virtual Earth, inside that there are three layers with the same name plus Hybrid, Aerial or Roads suffixed):

import arcpy
mxd = arcpy.mapping.MapDocument(r"PATH")
for df in arcpy.mapping.ListDataFrames(mxd):
    for lyr in arcpy.mapping.ListLayers(mxd, "*Microsoft*", df):
        arcpy.mapping.RemoveLayer(df, lyr)
        print "Removed from "+ df.name+" dataframe: " +lyr.name
        mxd.save()
del mxd, lyr, df

It ran without errors and removed the layers. The Bing Authorization dialog box pop up did not appear whilst the script ran. Only thing is, the pop up does appear when I open the map I just modified with that script - even though the layers are gone! Does anyone know why removing these layers with this script doesn't stop the pop up? I have tested removing these layers manually, saving, closing then reopening the MXD. The pop up does not appear then. So there is something done in the manual process which is not done in my script.

Curiously, when I open the offending MXD, run the above layer removal script using the Python window, then close and reopen the MXD the Bing Authorization pop up does not appear. Also, if I delete all other layers and tables from the MXD so it only has Microsoft Virtual Earth layers in it, then remove those remaining layers with the script, then open the MXD manually, the Bing Authorization pop up still appears :-\

Before I try to incorporate my script to remove these layers into the one I'm working on to walk through all MXDs and fix their paths, I need to know:

What is causing the Bing Authorisation dialog box to pop up with my initial script, but not the layer deletion one?
Why after running the Bing/Microsoft Virtual Earth layer deletion script the authorization pop up still appears?