texts: Is it possible to export spatial data from database to shapefile without writing SQL manually?

texts:
Shapefile is being imported to Oracle DB. Is there a tool to export this spatial data as a shapefile without writing any SQL (like you have to do with SQL Developer and GeoRaptor)?

EDIT: from all your answers I understand that there is no way for me to do action: import shapefile X to my database and later use some tool to export same shapefile X without using SQL or SQL like filtering... Unless I want to export whole layer which is not my interest.


texts: Recommended programming language for remote sensing?

texts: I am beginning studies that hopefully will lead to a long career as a remote sensing specialist.  I am currently working with ArcGIS for some applications and learning ENVI for others.  I have realized that it is imperative that I learn a programming language, and am stuck facing a choice between IDL and Python.  I would love to hear which programming language the community recommends for the remote sensing of land surface processes.


texts: Layer is not visible in map, but appears in console

texts:
I am developing an app with Ionic, Capacitor and OpenLayers, but when I try to load a new layer in map, this layer does not appear. I can see that the layer was loaded in map using console, all features are presented inside the layer source. I don't know what is happening because in the same version with Cordova this function works.
I tried to load this layers one by one, when the user click in a checkbox, and then I tried load all layers programatically when the map load.

Map.page.html
<ion-menu side="start" menuId="layersMenu" contentId="main" type="overlay">

    <ion-content color="primary" id="main">
        <div *ngFor="let layer of layers">
            <ion-item color="primary">
                <ion-label>{{layer.name}}</ion-label>
                <ion-checkbox color="dark" (ionChange)="toggleLayer(layer.id)" checked="{{layer.visibility}}"></ion-checkbox>
            </ion-item>
        </div>
    </ion-content>

</ion-menu>

Map.page.ts
/** Change layer visibility on the page */
toggleLayer(id){
    this.storageService.fetch('layers', id).then(result => {
        this.datashare.activeLayer(result);
    });
}

Datashare.service.ts
/** Active selected layer */
activeLayer(layer : Layer) : void {
    return this.activeLayerSubject.next(layer)
}
activeLayerObservable(): Observable<Layer> {
    return this.activeLayerSubject;
}

Openlayers.component.ts
/** Observable to active layer in browser */
this.activeLayerSubscription = this.datashare.activeLayerObservable().subscribe(layer => {
        this.loadLayer(layer);
});

/** Load selected layer */
loadLayer(layer: Layer): void {
    if (this.platform.is('cordova')) {
        this.checkFileInDeviceStorage(layer).then(result => {
            layer = layer as Layer;
            if (result) {
                this.readFileInDeviceStorage(layer.path).then(fileAsText => {
                    this.createLayer(fileAsText, layer.name);
                });
            } else {
                this.presentToast("Não existe arquivo neste diretório: <br>" + layer.path);
            }
        });
    }
}

/** Create layer in map */
createLayer(fileAsText: string, name: string): void {
    let newVectorSource = new VectorSource({})
    let newVectorLayer = new VectorLayer({
        source: newVectorSource,
        zIndex: 55,
        visible: true
    });
    newVectorLayer.set('name', name);

    let format = new KML({});

    newVectorSource.addFeatures(format.readFeatures(fileAsText, {
        featureProjection: 'EPSG:3857',
        dataProjection: 'EPSG:4626'
    }));

    this.map.addLayer(newVectorLayer);
}

Ionic Info
Ionic:

   Ionic CLI                     : 6.12.4 (C:\Users\cliente\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 5.5.5
   @angular-devkit/build-angular : 0.1101.4
   @angular-devkit/schematics    : 11.1.4
   @angular/cli                  : 11.1.4
   @ionic/angular-toolkit        : 3.1.0

Capacitor:

   Capacitor CLI   : 2.4.7
   @capacitor/core : 2.4.7

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v14.16.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.14.11
   OS     : Windows 10

OpenLayers:

   v6.5.0

Console

Features in console using map.getLayers()


texts:
I need to Replace the Domain on Field level on my Geodatabase.

My Geodatabase having multiple features and tables where at each on field one Domain is assigned, I need to replace that Domain and Delete old domain.

To better way understand. (example)

Table1 having Field XYZ on which Domain A1 is assigned

now I like to replace A1 with A2 and once it change for all the tables I would like to delete A1 from my Domains.

I search on internet but I could not find any helping materials.

Do I do this with performing some query on database ?

select * from sde.GDB_ITEMS

Above query get me all the domains which exists for my Geodatabase but I could not to find relation how this domains is assigned to my tables (how's the relationship between them?)

I do believe that with that relationship I can replace the domain.

I am not python developer.. but I am trying to write this script..

>>> import arcpy
... admin_workspace = "Database Connections/WGis01-SDE.sde"
... arcpy.env.workspace = admin_workspace
... domain_to_search = r"MM Work Function_1" #supply the CV domain name
... datasets = arcpy.ListDatasets()
... for dataset in datasets:
... if dataset == N.Electric:
... featureclasses = arcpy.ListFeatureClasses()
... for featureclass in featureclasses:
... print featureclass
...

  Parsing error IndentationError: expected an indented block (line 9)


texts: HRESULT E_FAIL Error -2147467259 when using IEnumDataset.Next()

texts:
I'm writing a Desktop Add-In that scans our directories and pulls in georeferenced raster images that contain a point geometry. While it's been working on many image file types so far for some reason I get the HRESULT E_FAIL error when I get to these files via IEnumDataset.Next():

private static void PullImages(IPoint centerpoint, string directoryPath)
{
    IWorkspace ws; IDataset dataset; IRasterDataset rasterDataset; IRasterLayer rasterLayer;
    ws = RWSF.OpenFromFile(directoryPath, 0);
    IEnumDataset enumDataset = ws.get_Datasets(esriDatasetType.esriDTRasterDataset);
    dataset = enumDataset.Next();

    while (dataset != null)
    {
        rasterDataset = (ws as IRasterWorkspace).OpenRasterDataset(dataset.BrowseName);
        IEnvelope rasterEnvelope = (rasterDataset as IGeoDataset).Extent;
        rasterEnvelope.Project(NAD83);
        if ((rasterEnvelope as IRelationalOperator).Contains(centerpoint))
            {
                rasterLayer = new RasterLayerClass();
                rasterLayer.CreateFromDataset(rasterDataset);
                RemoveHistogramStretchAndMinimize(ref rasterLayer);
                MXD.AddLayer(rasterLayer);
            }
        dataset = enumDataset.Next();
    }
}


texts: How to add our own routing data from postgresql into osm2po graph

texts: Is there any way to convert data from a PostgreSQL noded table into an osm2po graph? this library is able to read pbf data and generate a graph from osm data but If I want to update roads data it is not possible. I can update a PostgreSQL database which contains osm data but have no idea if it is possible to deploy them into an osm2po graph?


texts: Trying to save Draw object in OpenLayers as GeoJSON with a different projection

texts:
I'm trying to draw a polygon or line then save that object into a database. The map is in EPSG:3857 projection but I would like to save the polygon as GeoJSON using EPSG:4326 projection.

I was hoping to use the dataProjection of the writeFeatureObject method but this still saves the data in EPSG:3857.

I did try transforming the geometry which worked for the output but then removes the polygon from the map as its in a different projection.

Below is some of my code:

draw.on("drawend", (arg1) => {
                console.log('Arg', arg1);
                // let rawGeo = arg1.feature.getGeometry();
                // let gps = rawGeo.transform('EPSG:3857', 'EPSG:4326');
                let parser = new ol.format.GeoJSON();
                let featuresGeoJSON = parser.writeFeatureObject(arg1.feature, {
                    dataProjection: 'EPSG:4326'
                });
                console.log(featuresGeoJSON)
            });

Hope you can point me in the right direction.


texts: PyWPS output created but not accesible by the Javascript client

texts:
The good thing: I've a working PyWPS process.
The bad thing: I cannot access the output using the PyWPS Javascript client.

What I did.

I created an PyWPS python script with one LiteralInput (type=FloatType) and one ComplexOutput (formats='mimeType':'xml/application') from the browser accessible by:

  localhost/cgi-bin/pywps.cgi?REQUEST=Execute&IDENTIFIER=pyhants&SERVICE=WPS&VERSION=1.0.0&DATAINPUTS=input_ts=3

And gives the following output:

This seems to be OK.

I've created a PyWPS Javascript Client and tried two options, one by hand and one automatic. The one manually only gives me null as output, but the automatic gives output. It provide a URL as a reference as seen below:

That's fine, and if I look in this folder this file is created, is accessible and contains output. But if I try to access this URL from within my browser it tells me that the requested URL was not found on the server. As can be seen in the following screenshot.


texts: Determining correct Coordinate System DHDN Bessel 1841

texts:
I am working on a data set and coordinates are supposed to be in DHDN Bessel 1841.
Have a look here: https://www.pegelonline.wsv.de/gast/stammdaten?pegelnr=2330013

I created a shapefile with the cordinates. But I need to define the projection. I am using qgis and when I checked DHDN options, there were a lot like DHDN/ Gauss-Kruger 2,3,4,5 or DHDN/ 3-degree gauss zone 1,2,3,4,5. I am confused which one to use.

Some insight will be of great help.

Thanks

NS


texts:
I want to convert longitude and latitude coordinates from WSG84 to Google Mercator. The following code-samples show my coordinates in a KML/KMZ file and where I need the coordinates in the javascript file.

<LatLonBox>
   <north>50.0</north>
   <south>46.0</south>
   <east>18.0</east>
   <west>13.0</west>
</LatLonBox>

new ol.layer.Image({
            source: new ol.source.ImageStatic({
                url: 'file:///C:/Users/Xhy/Desktop/cubic.png',
                imageExtent:[1447153.38031, 5780349.22026, 2003750.83428, 6446275.84102]
            })
        })

I am currently using this site here to convert my coordinates from WSG84 to Google Mercator.

I need to automate these conversion, since I have to create OSM-files with different image layers. I have the latitude and longitude in a KML/KMZ file, I can read out of it, and use the coordinates. My problem is, these coordinates I extract from the KML/KMZ files are WSG84 but for java-script I need the coordinates in Google Mercator.

Any ideas how I can make this conversion inside the javascript file?


texts: Create a "wide" table recording all overlaps between polygons in PostGIS

texts:
I have a set of overlapping polygons and would like to record which polygons are overlapping at each intersection. I have followed the instructions at:
boundlessgeo.com/2014/10/postgis-training-creating-overlays/

So I now have a set of polygons recording all the unique intersections between all the overlapping polygons (and have added the count of the number of overlaps) but I am stuck at how to indicate which polygons overlapped at that area.
So for example if I had 26 polygons labelled a-z I'd like to end up with a table with 26 columns for each intersection showing a 1 or a 0 as to whether it was overlapping at that intersection.

Code used so far

*1 break up intersecting polygons

CREATE TABLE boundariesd AS
SELECT ST_Union(ST_ExteriorRing(geom)) AS geom
FROM uniond;

*2 create unique polygons from intersections

CREATE SEQUENCE polyseqd;
CREATE TABLE polysd AS
SELECT nextval('polyseqd') AS id, (ST_Dump(ST_Polygonize(geom))).geom AS geom
FROM boundariesd;

*3 get the count of intersecting polygons

ALTER TABLE polysd ADD COLUMN count INTEGER DEFAULT 0;
UPDATE POLYSD set count = p.count
FROM (
  SELECT count(*) AS count, p.id AS id
  FROM polysd p
  JOIN uniond c
  ON ST_Contains(c.geom, ST_PointOnSurface(p.geom))
  GROUP BY p.id
) AS p
WHERE p.id = polysd.id;

John Barça suggested using crosstabN() which looks appropriate but still not clear to me how to implement it.


texts: I'm working on my bachelor thesis right now and I want to find a catchment area for different bus stops. Is there a function in QGIS where I could use a point layer as input, use ways as distances and I want to determine the distance (so e.g. a busstop has a catchment area that contains 500m). I think in ArcGIS it should work with the Network Analyst Tool. I'm looking for a similar tool on QGIS.


texts: Automate Access to all Tools in a Dynamic Toolbox in ArcMap?

texts:
Is there any way to automatically open a toolbox in ArcMap either from a model, a Python script or a Python Add-In, or similar?  Or to otherwise make all of the tools in a toolbox easy to access for novice ArcMap users who are unfamiliar with the Toolbox view or Catalog view?

I would like my Python Add-In to have a button that will open a toolbox so that the user can see a list of the in-house custom tools that are all in a particular toolbox.

Note that the list of tools in this toolbox is dynamic.  There are new tools being added periodically, and old tools may be removed from time to time.  I would like the users' to always see the current tools, and not have to navigate among system tools to find them.  (They are welcome to use the system tools - but that's a separate issue).

At present, the only work around I've found is to add a button for each tool, but this requires a lot of tedious configuration in the Python Add-In each time a new tool is added, and also requires the user to download and install the new Add-In each time a new tool is added.

Otherwise, they have to navigate the Toolbox view or the Catalog view, which is tedious for our users, many of whom are ArcMap novices.

UPDATE:

I do not want to have to manually configure each user's system any more than I already do.  They already use our custom in-house Python Add-In toolbar, so if it can be done that way, that would be ideal (ie, they only have to update their toolbar once, and then for ever after that, they have the current set of tools available, even if that set changes from time to time).

There are about 30 users.  At present there are about a dozen tools (and growing).


texts:
I feel like this should be easy, but how can I set coordinates for a jpeg image using Python?  I have a python add-in that draws a polygon and then uses its geometry to post a query request to a REST endpoint for an Image Service.  The JSON return is a .jpg image.

I am able to download the image no problem, but obviously it is not georeferenced because it is just an image.  The JSON return does give me the extent of the photo though (UTM 15N).  How can I set this extent to be that of the image?  I thought about making a world file, but this does not use the extent of a raster.

Here is the JSON return, how can I apply that extent to the downloaded image?

I have looked all over the help docs and cannot find where I can set an extent manually.  I was hoping that the arcpy.Raster() class would allow me to set the extent, but that property is read only.  Am I missing something obvious?  Seems like this should be easy.


texts: Building a plugin in Qgis for NDVI calculation using qt creater

texts: I want to build a Qgis pluin using Qt designer. What elements will I add to the dialogue of plugin in Qt designer. Also I want a python script for that plugin which can manipulate the raster stacked image to calculate ndvi just like we do in Arcmap or ENVI. I don't want to provide Red and NIR layers as input. Instead I want to give raster stacked image as an input and want NDVI map as an output. please help me guys. I want to complete my term project but I don't have good programing skills.


texts: How do I generate a WorldWind importable image file with a transparent background using an SLD file with PointSymbolizers on Geoserver?

texts:
I've been tasked with visualizing a few types of metoc data onto Worldwind based on .grib files. I'm VERY new to the GIS world and I'm just beginning to figure out how a lot of these pieces go together (so expect more questions from me!)

I just learned how to use an SLD to generate windbarbs in Geoserver. The windbarbs themselves look correct and get plotted in Worldwind correctly (in the right location) when I download a geotiff off Geoserver. However question #1 is how do I generate an image file that I can import into WorldWind with a transparent background? I think i read that tiffs don't support transparency, so should I use a different format? Which one? and how do I configure my layer in geoserver or edit my SLD to produce a transparent background?

I tried downloading jpeg, png, etc.. from Geoserver but the only format that produces an image is any tiff format.

Here's a link to my SLD file: http://pastebin.com/km05xVAR

Here's the variable info from the grib2 file I'm using (v-component obviously identical):

float u-component_of_wind_surface(time=61, lat=29, lon=29);
  :long_name = "u-component of wind @ Ground or water surface";
  :units = "m/s";
  :abbreviation = "UGRD";
  :missing_value = NaNf; // float
  :grid_mapping = "LatLon_Projection";
  :coordinates = "reftime time lat lon";
  :Grib_Variable_Id = "VAR_0-2-2_L1";
  :Grib2_Parameter = 0, 2, 2; // int
  :Grib2_Parameter_Discipline = "Meteorological products";
  :Grib2_Parameter_Category = "Momentum";
  :Grib2_Parameter_Name = "u-component of wind";
  :Grib2_Level_Type = "Ground or water surface";
  :Grib2_Generating_Process_Type = "Forecast";

If you're curious, here's the entire data dump of u/v data: http://pastebin.com/sJf61EYk

Here's what I have in Worldwind right now:


texts: How to edit the GDAL/OGR console call in QGIS 3.0?

texts: In QGIS 2.XX, the drop-down menu bar tools had an editable call box at the bottom, where commands not available in the gui could be manually entered (by clicking a pencil button). In 3.0, the menu bar tools are the same as the GDAL tools found in the processing toolbox, which makes more sense, but now I do not see a way to add simple commands to a tool operation. The example I attach is the warp (reproject) tool, I wish to add the command "-wo CUTLINE_ALL_TOUCHED=TRUE". How do I do that?


texts: Converting Korea 2000 coordinate system to WGS84?

texts:
I have coordinates in Korea 2000 EPSG:5181 projected coordinate system.

Is there a way to make a formulation in excel to convert these coordinates to lat long (WGS84)?


texts: Tools to conduct Kernel Network Density estimation in an ESRI environment

texts:
Are there any tools or resources to conduct Network Density Estimation using ArcGIS 10.5 or ArcGIS Pro?

I've found this tool http://sanet.csis.u-tokyo.ac.jp/ but it only works on version 9 - 10.2.


texts: Loading local GeoJSON file in OpenLayers without Geoserver

texts:
I have a GeoJSON file saved locally and it is also present on GeoServer.
I can successfully load it as a vector layer in my OpenLayers map when pointing to its GeoServer URL.

Is it possible to load the locally saved file without the use of GeoServer?

This is the error I get when I try to load it locally:

Cross origin requests are only supported for protocol schemes:
http, data, chrome, chrome-extension, https*"


texts: Method of multiple values - Rasterize SAGA

texts:
I'm converting a thematic shapefile (polygons) into a raster file using the Rasterize-SAGA algorithm.

What criteria should I use to decide for  [0] last, [1] first, [2] minimum, [3] maximum, [4] mean in Method of Multiple Values?

What does the algorithm consider in each option?


texts: How to convert a String to OpenLayers.Geometry.Polygon using javascript?


texts: ArcGIS - How to find street map labels for separate layer

texts:
I'm super new to GIS mapping. I just installed the trial of ArcGIS and I've just barely begun poking around in ArcGIS Online trying to figure out what I'm capable of. I'd like to have a street map (at least of US and Canada) and then overlay various data on top of it in separate layers. I've already overlayed radar data from the National Weather Service, for example.

My problem is that since the street names are embedded on the basemap, it's impossible to see them when covered by the weather data.

I saw that there are a couple stock basemaps that include labels in a separate layer like "Terrain with Labels" and "Imagery with Labels" where I can position my weather, crime data, etc. in between the basemap and the labels.

Are there basemaps available somewhere that allow me to do this with street names instead of just imagery/terrain data?


texts: Showing all points of point cloud layer using ArcGIS Pro

texts:
I have a point cloud file of some trees. I first convert this to a LAS using some converter tool. I then open this LAS file in ArcGIS Pro and somehow it doesn't show all points there is. Even if I set the maximum points to 20.000.000.

My goal is to publish these point cloud to ArcGIS Online. But I can't do that if ArcGIS Pro can't show all the points.

What to do?


texts: Unable to map over ImageCollection for NDVI export as CSV

texts:
a bit long - sorry for that.

I am looking for a way to export NDVI values for all the images in the ImageCollection.
I must be using the wrong variable types because they don't pass well through the map function.

//Dates of Interest
var start = ee.Date("2018-04-01");
var finish = ee.Date("2018-05-01");

///--------------------- SENTINEL2 Collection ---------------------------------------///
var sen2 = ee.ImageCollection('COPERNICUS/S2_SR')
.filterDate(start, finish)
.filterBounds(region)
.map(function(image){
  return image
  .clipToCollection(region)
  .updateMask(image.select('QA60').not())
})

///--------------------- Unique list creation ---------------------------------------///
// MilliSec Extract function
function millisec(imgcol){
    var iter_func = function(image, newlist){
        var date = ee.Number.parse(image.date().millis());
        newlist = ee.List(newlist);
        return ee.List(newlist.add(date).sort())
    };
    return imgcol.iterate(iter_func, ee.List([]));
}

var ymd = millisec(sen2)
var allImagesInRange = sen2.filter(ee.Filter.inList("system:time_start", ymd))

//define all AOI
var field1 = ee.FeatureCollection(region.filterMetadata("system:index","equals","00000000000000000000"));

//-----------------------NDVI CALC-----------------------//

//Get the ndvi for the specific field and time
function get_ndvi_sen2(subRegion, id){
  var ndvi_s2 = ee.Image(id)
  .normalizedDifference(['B8', 'B4'])
  .rename('ndvi_s2');

  var ndvi_s2_Features = ee.FeatureCollection(ee.List(ndvi_s2
  .reduceRegion({
    reducer: ee.Reducer.toList(),
    geometry: subRegion,
    scale: 10
  })
  .get('ndvi_s2'))
  .map(function (ndvi_s2) {
    return ee.Feature(null, {ndvi_s2: ndvi_s2});
  })
  );
  return ndvi_s2_Features;
}

//------------------ CSV Export ---------------------//
var sen2_disc, sen2_selc = 'ndvi_s2';
var sen2_folder = 'GOOD/SEN2'

function write_to_drive(col, disc, selc, folder, field){
  print("Col: ",col, "Disc: ",disc, "Selc: ",selc, "Folder: ",folder, "Field: ",field);
  Export.table.toDrive({
  collection: col,
  fileNamePrefix: disc+' '+field,
  selectors: [selc],
  folder: folder+'/'+field
  })
}

var feat_per_img = function(sngl_img){
  return get_ndvi_sen2(field1, sngl_img.id())
}

function write_to_drive_front(feat){
  write_to_drive(feat, 'NDVI_Sen2', sen2_selc, sen2_folder, 'field1');
}

//------ Export all the NDVI values from the ImageCollection ----------//
write_to_drive_front(ee.FeatureCollection(allImagesInRange.map(feat_per_img)));

I had to make front and back functions for the write_to_drive because I didn't manage to understand the arguments that needed to be passed through the map functions.

My error while running the script is:
FeatureCollection (Error) Actual value for parameter 'id' must be a constant.

Link to the original code, with the original region asset.

My main goal is to have a CSV file with the pixel-wise NDVI value for each image.


texts: Converting from Geography to Geometry data type in PostGIS?

texts:
I have a shapefile that has geography types.

Can I convert it with a tool like shp2pgsql or is there a postgis function to do that?


texts: Create polygon layer from polyline layer

texts:
Our systems expect polygon shapefiles, representing a collection of non-intersecting and geometrically valid (multi)polygons. Specifically, farm fields. We often receive our representations of farms and their fields as polyline shapefiles containing the field boundary polylines, typically with some small geocoding errors like dangling ends.

Is there a reliable way to transform the polyline layer into a polygon layer, where the polygons perimeters are calculated as minimal loops around polylines in the shapefile? I understand I'll probably have to tidy up the polylines first.

I am primarily interested in solutions involving Quantum GIS or other free tools, since my company doesn't buy any of the professional packages.


texts:
I request a .PNG from a rest API, store it and create a IRasterLayer.

My problem is I'm trying to draw it to the focus map with the RasterLayer.Draw() method, but does not look like I'm doing it right because literally nothing seem to happen...

I'm using ArcObjects 10.4.1

Here is the code:

            byte[] image = await GetBBoxAsync(endpointUri, accessToken);
            MemoryStream ms = new MemoryStream(image);
            Image i = Image.FromStream(ms);

            i.Save("demo.png");

            IRasterLayer rasterLayer = new RasterLayerClass();
            rasterLayer.CreateFromFilePath("demo.png");

            foreach (ILayer layer in layers)
            {
                // Get a random feature's spatial reference

                rasterLayer.SpatialReference = randomFeature.Shape.SpatialReference;

                break;
            }
            IDisplay display = ArcMap.Document.ActiveView.ScreenDisplay;

            rasterLayer.Draw(ESRI.ArcGIS.esriSystem.esriDrawPhase.esriDPGeography, display, null);
            ArcMap.Document.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);

I'm much new to Raster manipulation in ArcObjects... Am I missing something?


texts: Problem with encoding after using ''join by location''

texts:
I used Join by location and for some reason the results I get have weird encoding, i have checks and it's UTF-8,
how can I solve it


texts:
I need to change the id (feature.id() in the python API or $id in the field calculator) of  for features in shapefile layers in qgis, and I need to do it in Python.  Is there a way?

I tried something like what was suggested in the post How to change attributes with QGIS python? , but it did not work, because apparently id is not a field.

In any case, is there a way of changing it? If not, is there a way to create a geographic feature and specify its id?


texts: Find nearest road distance between two points for over 1000 points

texts:
I'm extremely new to QGIS and am learning the material on my own.

I have two CSV files with latitudes and longitudes, one has school address information and the other has fast food restaurant address information.

I would like to find the distances between the two and the distances between the two points. (If that makes sense)I don't want to use the Hub Line process since I need road distances and PGRouting isn't working for me for some reason.

I'm not sure even after downloading all the information, it will not open up.


texts: How to handle URLs longer that 2048 chars in JSAPI v2.7 and ArcGIS 10.2

texts:
In ArcGIS Server 9.3 and JavaScript API v2.4 there was need to set proxy.config in ASP.NET in order to handle requests to REST map services having more than 2048 characters in the URL as parameters.

Is there any change in ArcGIS 10.2 and JS API v2.7 (or higher)?
How the URLs longer than 2048 characters are handled in ArcGIS Server 10.2?

Thanks.


texts: My question might be simple but can someone explain to me the importance of STATION_ID to satellite images?If the sensor is the same(e.g landsat TM) for 2 images but the  STATION_ID is different (MLK and XXXO1) is there a problem?


texts: wms layer not shown on geoserver while wfs works fine

texts:
I have a really strange problem which I don't know how to solve.
I have shp file I've import into PostGIS using PostGIS Loader (made sure the srs is 4326 same is shp file) .

In geoserver (2.6.1) I've created a postgres store and published the table I've imported , set it SRS (WGS84) and style (default Polygon).

Now this is where things go weird and I have no idea how to approach this problem:

If I Preview the layer via WFS (KML/GeoJson/CSV etc...) I get the txt files with all features inside.
If I try to preview via openlayers or any other WMS (like geotiff) either I see empty map or get error
When I create a store of shp files with the data I've imported , it shows fine as wms.

Here is example that I do see features via wfs (csv) but error in wms.

Any idea ?!

EDIT 1:
It was pointed out in comments that "width=78450&height=330" is a strange size (although this is what geoserver auto generate in preview) so I've manually edited the request to :

http://localhost:8080/geoserver/Oakland/wms?service=WMS&version=1.1.0&request=GetMap&layers=Oakland:oakland180110&styles=&bbox=-122.502975463867,37.3532028198242,-121.66429901123,37.9185791015625&width=512&height=345&srs=EPSG:4326&format=image/png

and now I get empty image:

Since I do see the data in the shp files preview :

http://localhost:8080/geoserver/Oakland/wms?service=WMS&version=1.1.0&request=GetMap&layers=Oakland:Oakland180110&styles=&bbox=-122.491314021,37.379831195000065,-121.71847960399995,37.89508712800005&width=512&height=341&srs=EPSG:4326&format=image%2Fpng

I tend to think that the problem is somewhere from reading the data from PostGIS.

Last thing I did is comparing the shp layer settings to the postgis layer settings but I don't see anything that might hint on the problem I have:

Update 2:

I've checked geoserver log and noticed that the following query returns null:

SELECT encode(ST_AsBinary(ST_Simplify(ST_Force_2D("the_geom"), 0.002246433788820923)),'base64') as "the_geom" FROM datatable

Now , the_geom column is geometry type and is not null .
When running ST_Simplify it brings back null :

This is working :

SELECT ST_Force_2D("the_geom") as "the_geom" FROM "public"."datatable"

This brings the nulls :

SELECT ST_Simplify(ST_Force_2D("the_geom"), 0.002246433788820923) as "the_geom" FROM "public"."datatable"

Any idea why ?


texts:
How do I install ArcView 3 on 64bit Windows?

There are numerous threads on the Esri forums for how to accomplish this, but the solutions are scattered, inconsistent and disjointed.

This is a request to post integrated and "cleaned-up" solutions, don't just copy and paste. Please indicate if the method is specific to x64 XP, Vista, or 7 (and post seperately, e.g. win7 method in one answer, vista in another).


texts: GRASS GIS temporal raster individual layer statistical summary

texts: I have created a temporal raster in GRASS GIS which has 90 layers. I would like to extract the mean of each raster layer and export it as text file. Right now I have to export the rasters as GeoTiffs and stack them in R to calculate the mean. Is there an equivalent function in GRASS to extract mean, sd etc for each raster layer in a GRASS GIS time-space raster?


texts: Is there a way to get Z value from 3D multipoint shapefile in QGIS?

texts:
Is there a way to get Z value/height/altitude from 3D multipoint shapefile in QGIS? All I found is way through SpatiaLite or PostGIS as explained here:

http://faunaliagis.wordpress.com/2013/08/14/transfer-3d-shapefiles-z-values-to-the-table-of-attributes/

But conversion multipoint to point using Vector/Geometry tools/Multipart to singlepart drops the Z value. I opened DB manager, select DB and run SQL command in SQL window:

update tablename set columnname = st_z(st_pointn(geom,1)

In my case:

update lidar_pts set z= st_z(st_pointn(GEOMETRY,1))

First there was missing ")" at the end, second: no such column: geom. So I changed it to "GEOMETRY" which end up running but all z values become Null.

Is there a better/other way in QGIS 2? Or at least is there a way to convert multipoint to point directly in SpatiaLite so it will keep z geometry?


texts: "RasterioIOError: This is a BigTIFF file. BigTIFF is not supported by this version of GDAL and libtiff" error message

texts:
I am trying to read a raster ".tif" file with rasterio:

import rasterio
raster_path = r'.........\file.tif'
raster = rasterio.open(raster_path)

but I am getting the following error message:

"RasterioIOError: This is a BigTIFF file.  BigTIFF is not supported by this version of GDAL and libtiff"

Apparently, the raster file I am trying to open with rasterio is a BIGTIFF (which I  had no idea about since I cannot see anything in the properties of the file when being opened with ArcMap that suggests such a thing, plus it's not a particularly big file -less than 1GB-).

I have seen similar questions posted here more than a year ago, but they don't really offer any solution.

I have:

GDAL     =>  2.4.1
libtiff  =>  4.0.10
rasterio =>  1.0.21


texts: Converting Lat/Lot from OSG36 to Lat/Lot in WG84?

texts:
I have a csv file wich contains three columns: ID, latitude and longitude. These latitudes and longitudes are taken from a projection in OSGB36.

How can I possibly convert these latitudes and longitudes in this OSGB36 projection to latitudes and longitudes in WG84?


texts: How to get power lines and substations data for Mexico

texts: I am looking for an electric lines shapefile for Mexico and other Central and South American countries. Do you have any idea where I can get this data?


texts: QGIS 2.2.0 Creating all extension of MapInfo from a ArcMap ShapeFile

texts:
I have a road centerline shapefile that I would like to create all files associated with a MapInfo file (.tab, .id, .map, .dat).  I've looked through the plugins and don't see a tool that helps with this process.

I'm very new to QGIS.


texts: FME - Can I write back into my original file geodatabase

texts:
I have a gas pipeline network which I have stored in an File Geodatabase as polylines.  I've created an FME workspace to split the pipelines at fittings (valves, reducers, tees, etc) which are stored as point features.  This effectively creates smaller line segments when a fitting overlaps a pipe.

My question is: can I have FME remove my original pipes and replace them with my split lines?  Or do I have to write to another geodatabase and then cut/paste back into the original file?  Please note, I am using a tester to query out only a certain area, so I don't want to replace all of the pipes, just the area I'm working on.

I'm relatively new to FME and appreciate any input.

Thanks,

Rob


texts: Creating polygons around extent of similar points using ArcGIS Desktop?

texts:
I've millions of points collected for lithology layer.

They have used a coding for different types of rocks.

I need to create a polygon around the extent of similar points.

What is the easiest way to get the polygon rather than digitising manually.

I was searching for tools that convert points to polygons but looks like there arent any.

I've seen tools for converting line to polygons, polygons to lines and points but not for points to polygons.


texts: How can I export the current map composer extent to a layer?

texts: In QGIS, I am trying to use the Create Grid for Indexing plugin more efficiently. I would like to know if it is possible to export a map composer extent to a layer (a layer with one rectangle polygon) in order to use it as the layer extent in the Create Grid for Indexing plugin.


texts: Create GeoTIFF images from TIFF image using the coordinates of the four corners

texts:
I have several TIFF images which were taken from an aircraft. The images are tilted.  Hence, the orientation of the images are not in parallel to the grid system.
Please do refer to the below image:
(Image borders are in blue color, while bounding box is  in green color)
According to the image, what I have are following values:

coordinate values with respect to the four corners of the image: (a1,b1),  (a2,b2),  (a3,b3),  and (a4,b4).
from the values I can get the bounding box of the image and that would be (a2, b1), (a2, b3), (a4, b3) and (a4, b1).

I'd like to perform geo-referencing of the images using a tool like GeoTools or JAI. In GeoTools, I noted the ReferenceEnvelop class which offers the constructor that takes lower left, lower right, upper left and upper right values of the image. Thus, I reckon it works only for images which the orientation of the image as same as the orientation of the grid system.
I'd like to know how can I create GeoTIFF images from images that are not in same orientation of the grid lines. Instead, for each image, I have the corner coordinates.
I'm looking for a Java or Python technique. (Java is more favored).


texts: Storing geolocation in tabular Oracle without using Oracle Spatial or Locator

texts:
I'm working on a project to link existing entities in an Oracle  database with their geolocation, but the database is a tabular not spatial. Is there a compatible type that can store the geolocation or another  way to serialize the geodata and store it in a column with a suitable datatype?

I did search for suitable datatypes but all say that its SDO_GEOMETRY which is not found in the tabular Oracle.


texts: Update database row with points that fall within polygons

texts: I have a PostGIS/Postgresql DB that has two tables in it. One with point geometries and the other that represents country boundaries as polygons. I would like to add the country name that each point intersects with to each row in my point table. Maybe as one big update query. I think this is possible to do using straight SQL but I don't know where to begin. Any advice on this would be greatly appreciated...


texts:
I have a need to be able to connect to and edit ArcSDE data in QGIS.
This question has been asked before as:

Is it possible to connect to ArcSDE using QGIS?

https://hub.qgis.org/wiki/17/Connecting_to_ArcSDE_databases
and apparently is possible, but the instructions are just not specific enough for me to follow...

I was able to get the sde-9.3/ogr_SDE.dll from the MapServer zip download and place it in C:\OSGeo4W64\bin\gdalplugins, but then what?
I've read I need to compile it, but how and with what?
I've read I need to create a vrt file.
Is there a tool that creates a vrt file or should I just open notepad and write one?
Then how do I add the vrt file to QGIS?


texts: Calculating acreage using ArcGIS Field Calculator?

texts:
What is the expression to calculate an acreage in USA ? I am aware that there is a geometry calculate but when you convert raster to polygon it doesn't do it's job and I have to use the field calculator to manual it.

I am writing a model builder and in it I have tools for Add field and calculate  them for 83 datasets.


texts: Checking if Terrain Model has pyramids or data sources using ArcPy/Python?

texts:
I asked this question in the ESRI forums and got nothing but a lesson on LAS point cloud classifications — not even remotely what I had asked.

I’m hoping someone here can point me in the right direction for this answer. I’ve scoured the internet looking for a solution and the closest I’ve found is from the arcpy.Mapping help page:

  There are a few specialized layers and datasets that don't fall into one of these three categories: annotation subclasses, dimension features, network datasets, terrain datasets, topology datasets, and so on.

But, of course, it doesn’t tell you how to handle these specialized layers.

This is my question:

How do I check, with python, if a Terrain Model has pyramids? If it does, then how do I check, with python, if the Terrain Model has data sources already added to build the terrain? Basically, how do I access the Terrain Model Properties to check for... anything really... so that I can verify that they exist or not?

Now for the background:

We are collecting new statewide LiDAR and one of the derived products we distribute is countywide Terrain Models. I have 40 of these to run now and 40 more to run later, all of which have to match the specs of the 20 that have already been run. The less manual hands on time I have to devote to these, the better. So, I've written a script to create these terrain models for me. The intent is to fire this off on 5 computers and walk away for a couple of days.

The script:

Creates a file geodatabase
Creates a feature dataset and populates it with a hydro breakline layer and a clipping boundary
Performs a LAS to Multipoint on QL2 LiDAR
Creates a Terrain
Adds pyramids to terrain
Adds data sources to terrain (hydro line, clip bounds, multipoints (embedded))
Changes the terrain resolution (for hydro breaklines)
Build terrains.

There are two processes that take a VERY long time: LASToMultipoint_3d and BuildTerrain_3d.

The first time I ran the script, it failed after 18 hours. It had completed the LAS to Multipoint, created the terrain and added pyramids. It then gave me the following error upon adding data sources to the terrain model.

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000800: The value is not a member of <None> | Shape_Length | Shape_Area.
Failed to execute (AddFeatureClassToTerrain).

I stripped the code of everything but the arcpy.AddFeatureClassToTerrain_3d command and it ran without issue, so I’m not sure what happened there.

The problem is, now I have a terrain that is halfway through the construction process and I don't want to go through the 18 hour LAStoMultipoint->CreateTerrain->AddPyramids all over again.

Yes, I can simply finish the process manually, but I would rather have python check if each step has been completed so I can troubleshoot from where the script broke instead of the beginning. So, for instance, I want python to check for pyramids. If the terrain has pyramids, the script advances to adding data sources. If the terrain model has data sources, the script changes the terrain resolution. And so on.

It is easy to check if something exists with/in feature layers, folders, rasters, and so on—if not arcpy.Exists or arcpy.Describe usually does the trick. What is the equivalent for Terrain Model properties?


texts: Using both POI and Routes layers for ArcGIS Address Locator?

texts:
I want to create an address locator in ArcGIS. I have a POI Layer and Routes Layer. The Address locator should be use both Street names and POI distance. For example "X" Ave near the "Y" Gas station.I Created an address Locator with One Range Style and another Address Locator for POI with Single Field Style. But i want to merge these locators in one locator
Is it possible to use POI layer to show the proximity of a POI for users in Address Locator?


texts: How to suppress advanced digitizing tool window

texts: I'm using QGis for years but suddenly I stuck with something that I'm sure it's an easy fix. Every time I start to create a new feature, the Advanced Digitizing tool window pops up. Do you know how to suppress it?


texts: Unexpected result from Oracle SDO_AGGR_UNION

texts:
I'm getting a result that looks incorrect from the Oracle Spatial SDO_AGGR_UNION function.  I'm hoping someone has seen this and can confirm it's a bug or explain why this is expected behavior.  Following the example C-5 in the docs (https://docs.oracle.com/cd/B28359_01/appdev.111/b28400/sdo_complex_queries.htm#SPATL1285) I wrote the following statement to buffer and union a set of polygons:

    select SDO_AGGR_UNION(SDOAGGRTYPE(BUFFS, 0.001)) as BUFFS from
        (select SDO_AGGR_UNION(SDOAGGRTYPE(BUFFS, 0.001)) as BUFFS from
            (select SDO_AGGR_UNION(SDOAGGRTYPE(BUFFS, 0.001)) as BUFFS from
                (select SDO_AGGR_UNION(SDOAGGRTYPE(BUFFS, 0.001)) as BUFFS from
                        (
                        select
                        SDO_AGGR_UNION(SDOAGGRTYPE(SUBQRY.BUFFS, 0.001)) as BUFFS
                        from
                                (
                                select SDO_GEOM.SDO_BUFFER(MDSYS.SDO_CS.TRANSFORM(SF_PROJ.SHAPE,0.005,1000105),500,0.001)
                                as BUFFS
                                from SF_PROJ
                                left outer join SF
                                on SF_PROJ.SF_ID = SF.SF_ID
                                where SF.ES_ID = 'A'
                                ) SUBQRY
                group by mod (rownum, 128))
            group by mod (rownum, 32))
        group by mod (rownum, 8))
    group by mod (rownum, 2));

The result looks as expected except for one area where it looks like the areas of overlap between several polys has been clipped out of the result.  The multi colored picture shows the un-aggregated buffers.

The next image (blue) shows the result that was a problem.

I was able to get the expected result, (shown below in green) by removing the first two levels of nested aggregation as follows but I'd like to be able to figure why this happened so I can prevent it for use with larger numbers of polygons for which I understand that the extra levels of nesting will be necessary for decent performance.  The group in this example contains 790 features to be buffered and aggregated but other groups contain several thousand.  How can this behavior be explained?

Script that produces expected result:

    select SDO_AGGR_UNION(SDOAGGRTYPE(BUFFS, 0.001)) as BUFFS from
        (select SDO_AGGR_UNION(SDOAGGRTYPE(BUFFS, 0.001)) as BUFFS from
                        (
                        select
                        SDO_AGGR_UNION(SDOAGGRTYPE(SUBQRY.BUFFS, 0.001)) as BUFFS
                        from
                                (
                                select SDO_GEOM.SDO_BUFFER(MDSYS.SDO_CS.TRANSFORM(SF_PROJ.SHAPE,0.005,1000105),500,0.001)
                                as BUFFS
                                from SF_PROJ
                                left outer join SF
                                on SF_PROJ.SF_ID = SF.SF_ID
                                where SF.ES_ID = 'A'
                                ) SUBQRY
        group by mod (rownum, 8))
    group by mod (rownum, 2));

This is the expected result:


texts: How/Where can I find vector data for building footprints in Texas?

texts:
I've done a lot of research on this topic over the past 8 or 9 months, but I'm a GIS newb, so I may have overlooked some possibilities for finding/extracting this data.

A short list of resources I have researched (an exhaustive list would be very long):

Tax Net USA - Text data on properties is free. You have to pay to get footprint images. I don't mind paying, but their search interface is cumbersome, and the images they provide are small raster PNGs with 'cruft' that I don't need, such as dimensions. Additionally, each image is 'divorced' from the real world - there is no lat/lon or compass orientation information in the images. On the plus side, the images are detailed and are often accurate to within a foot or so.
ArcGIS - The Texas maps seem to have acceptable coverage and reasonably accurate building footprint polygons, but I have no idea how I would go from a street address to a vector graphic of the building(s) at the address using ArcGIS (or whether that's even feasible).
OpenStreetMap - Very sparse coverage of buildings in the central Texas area, the area I'm most interested in.

I'm not frightened by a highly technical solution. I'm a software developer, so I'm willing to install, write and/or interface with software to do the job.

Requirements in order of importance: Vector representation, accuracy, "queryability" (publicly available API would be great), lat/lon & compass orientation info.

I'm OK with querying each address individually, on an as-needed basis, but a bulk dataset would also be interesting.


texts:
I want to create wind maps. There is an introduction for ArcGIS and for QGIS. As I don't have access to the Spatial Analyst, I gave the QGIS-version a try. However, I don't know how to interpolate degree data.

For example wind direction could be 359° at one point and 1° at the second point. Values between this point should probably be 359°, 0°, or 1°.

As the interpolation doesn't know that it is degree data it looks like interpolated values are around 180°.

How I can interpolate degree data using QGIS?


texts:
I am using OpenLayers Tile layer fot my map application. I have WMS layers on map like this:

Parcels,
Streets,
Buildings,
Gas Pipes,

I zoom to somewhere on map that all layers are visible. I want to select a region within a rectangle and get view as an image. After get image, I want to put it to PDF. How can I do this?


texts: How to compute angle of circular buffer' segments around a point in PostGIS?

texts:
I have a point feature and using ST_Buffer() command, I created a circular buffer of 200 meters with 3 segments in quarter of the circle around this point:

Select ST_Buffer(my_point.geom, 200, 'quad_segs=3') As geom from my_point

Now, I would like to compute angles of each segment w.r.t to the reference point. PostGIS command ST_Azimuth() works for computing azimuth for point geometries. Could anyone suggest me how to compute the angles of each segment?


texts: Setting pixels of a all raster layers in a raster stack to NA based on the pixel values of corresponding raster layers of another raster stack

texts:
I have MODIS NDVI product (MOD13A2) for 10 years in HDF file format. Here i have 230 of such HDFs. For a single HDF, I want to set NDVI pixel values to NA with respect to Quality values in another Quality band.
I got 230 NDVI HDFs in one folder and corresponding 230 Quality HDFs in another folder.
E.g. for quality band pixel values of 1,2 and 3 i want to set NDVI values to NA.

How can i perform this work on all 230 hdfs.

I am using R and here is the code i tried:

library(raster)
# read all files with .hdf extension in R
NDVI_data<-list.files(path, pattern= "\\.hdf$", all.files=FALSE, full.names=TRUE,recursive=FALSE)
NDVI_reliability_data<-list.files(path, pattern= "\\.hdf$", all.files=FALSE, full.names=TRUE,recursive=FALSE)
s_NDVI <- stack(NDVI_data)
s_NDVI_reliability = stack(NDVI_reliability_data)

I want one on one comparison of 1,2,...230 layers of s_NDVI to the corresponding 1,2,...230 of s_NDVI_reliability so that pixels of s_NDVI layers set to NA based on pixels values of s_NDVI_reliability layers.


texts: Labeling by specific field using ArcPy in ArcGIS Pro

texts:
I have seen Specifying Resource Field For Labeling in ArcPy with ArcMap but it refers to ArcMap and arcpy.mapping whereas I am using arcpy.mp with ArcGIS Pro.
I have a polygon feature class called "Python_fc" in a layer of the same name on my map called "Map" and this feature class (and layer) has a few fields, among them "Id" and "Ratio"
I want to write a code that makes labels on each polygon using the field "Ratio"
but when I use the code below it labels by the "Id" field:
for m in aprx.listMaps("Map"):
for lyr in m.listLayers("python_FC"):
        lyr.showLabels = True

How do I get labels to come from the "Ratio" field instead?


texts: Customizing the Preview Expression of a Form View using Python

texts:
In Attribute Table, there is a form view instead of the table view and the label of listing on the left side can be customized using preview expression. So the user will notice a friendly and meaningful listing. I can customize it manually but I'm creating an automation plugin to load and configure from my datasets.

I observed, it gets stored as <previewExpression> of the layer in the .qgs file. However I don't see any related methods in QgsVectorLayer python class.

How can I customize the preview expression in Python?


texts: Shoehorning hierarchial data into ArcSDE for MS SQL Server?

texts:
I've been tasked with creating a set of tables to store hierarchical data within an ArcSDE.

This is in reference to utility data, i.e, a set of valves, control panels, actuators, etc (each potentially having their own attributes) belong to a pump, the pump belongs to a process (also having its own attributes), which belongs to a pumpstation (which can have its own attributes) etc etc.

The only way I can think of to do this is to basically have a table for each asset (a table each for valves, control panels, actuators, pumps, process, pumpstation) and a relationship class for each one to link to the table higher up in the hierarchy for it, all the way to the top, and then a final relationship class to link the pump station table to an already existing pump station point feature class.

I've already googled some to find examples of using hierarchical data in ArcGIS and i'm not having much luck. Anyone have any suggestions if there's a better way of doing this?


texts:
I have 3 datasets with GPS points. Two of those are GPS points that represent boating activities (two different types) and the third represents turtle observations. I would like to perform Kernel density estimation on all of them, with the goal to produce three density maps to show their spatial distribution. As the end goal, I would like to create two maps that show the overlap of turtle distribution and boating activities, one for each type of activity.

Can the Kernel density "Search radius" for each data set be different or does it have to be the same, in order to be able to compare the output rasters and then create and compare the 2 overlap maps?

Of course, the cell size will be the same in all Kernel density analyses.

To make a bit more general, my main issue is that I have trouble understanding how to choose the best search radius for my data.

Does it depend on the "nature" of my data?

For example, can I choose a different radius for the 2 boat datasets or does it have to be the same, because they are both "boat data"?

Can I have a different radius for the turtle data, since they are animals and so they move differently than the boats or this has nothing to do with the Search radius?


texts: How to solve 'ImageCollection (Error) Collection query aborted after accumulating over 5000 elements.'?

texts:
I am having an error that:
ImageCollection (Error)
  Collection query aborted after accumulating over 5000 elements

Can anyone help me with this with a reason that I'm getting this?
var data = ee.ImageCollection("MODIS/006/MOD11A1");
           data.select('LST_Day_1km');
           data.filterDate('2020-04-01', '2020-05-01');
           data.filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE',50));
           data.filterBounds(ee.Geometry.Polygon(
        [[[-105.69039417492381, 26.415054995716197],
          [-105.69039417492381, 20.944574100188213],
          [-99.45015979992381, 20.944574100188213],
          [-99.45015979992381, 26.415054995716197]]], null, false));
print(data);

Link to the code:
https://code.earthengine.google.com/e2d9c897f4602466c1bb14a863ec2262


texts: QGIS 3.4 - Print composer export to image error

texts:
In QGIS 3.4.4.1 when exporting Print composer layout to image (.png, .jpeg) I get the following error message:
"Cannot write to C:\xxxxx.png. This file may be open in another application".
This file does not yet exist so is not open in another application. Exporting to .pdf and .svg works but export to image doesn't. Any ideas?


texts: Spatial Analyst tools adding extra column of NoData

texts:
I've got a script tool in ArcGIS that runs Curvature and Aspect from Spatial Analyst, and the outputs of both contain an extra column. I've attempted to set the extent in the both the tool and the script to be the same as the input file, but still the extra column appears. The same snap raster is used for all process steps, and is a statewide grid of 20-foot cells, the same size as the cells in these rasters.

I could add a tool to extract the area using the original raster, but I'd rather understand the problem.

Here are what I believe to be the relevant lines of code:

fel= glob.glob(inDir+"\\"+"*_fel.tif")[0]

# Set Geoprocessing environments
arcpy.env.compression = "NONE"
arcpy.env.rasterStatistics = "STATISTICS 1 1"
# arcpy.env.resamplingMethod = "NEAREST"
arcpy.env.snapRaster = "[path deleted]"
arcpy.env.tileSize = "128 128"
arcpy.env.pyramid = "PYRAMIDS -1 NEAREST DEFAULT 75 NO_SKIP"
arcpy.env.extent = fel
arcpy.env.nodata = "NONE"

# Process: Curvature
arcpy.gp.Curvature_sa(fel, Curv, "1", Prof, Plan)

# Process: Aspect
arcpy.gp.Aspect_sa(fel, asp)

I'm using ArcGIS 10.3.1 with foreground processing.

This size mismatch makes it so the rest of the script cannot run, and I should also note, it doesn't always happen. Some outputs are the same size.


texts: Math domain error in slippy tiles generator

texts:
I'm running Alexander Hajnal's Python module (http://alephnull.net/software/gis/tile_writer.shtml) in QGIS (2.14.3, Win10 64) and I'm using the EPSG:3857 as crs.

I got this error:

"Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "c:/users/gregor~1/appdata/local/temp/tmpqgu4ow.py", line 107, in <module>
    mx_min, my_min = gm.LatLonToMeters(lat, lon)
  File "C:/Users/gregordavid/.qgis2/python/plugins\globalmercator.py", line 178, in LatLonToMeters
    my = math.log( math.tan((90 + lat) * math.pi / 360.0 )) / (math.pi / 180.0)
ValueError: math domain error"

Can I solve the problem?


texts: Using ArcGIS ModelBuilder with a "While" Iterator

texts:
I am struggling to get the ArcGIS ModelBuilder "While" Iterator to work as I would expect it.  I have a hunch it's user error, but even reading the help hasn't seemed to get it working for me.

I have a simple model that calls a Python script that simple does a time.sleep(15) and then sends back the conditional parameter of "TRUE" or "FALSE" using arcpy.SetParameterAsText(1, "FALSE") or similar for True statements in an if/else statement.  I've also tried every combination of TRUE, True, and true, as outputs from my Python script without success.

I can see in the results that my conditions are being set correctly:

Executing (While): IterateCondition FALSE TRUE
Start Time: Tue Nov 20 16:10:06 2012
Succeeded at Tue Nov 20 16:10:06 2012 (Elapsed Time: 0.00 seconds)

and

Executing (While): IterateCondition TRUE TRUE
Start Time: Tue Nov 20 16:26:41 2012
Succeeded at Tue Nov 20 16:26:41 2012 (Elapsed Time: 0.00 seconds)

but the WHILE Iterator continues to fire the sleep script, even if I change the output parameter of my script.  Any ideas on why I cannot seem to get the sleep script to stop firing?  What should I be passing from my SetParametersAsText() in order to get the While Iterator to stop firing the Sleep script?


texts: How to invoke a WFS service from command line?

texts:
I've the following WFS GetFeature request...

http://map.sitr.regione.sicilia.it/ArcGIS/services/CART_2000/Numeri_Civici/GeoDataServer/WFSServer?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=CART_2000:NumeriCivici_88006_Modica&SRSNAME=EPSG:3004&

... and the response (that you can try ....),  give me a GML response that I can use in a GIS Desktop.

I need to invoke this, and several other services like it, from command line and save the responses in files: any suggestions (curl? wget? other?) and samples on how to do it?


texts: Mathematics behind converting scale to resolution?

texts:
I have a ArcGIS service configured as shown in this  pastbin.  Specifically, the first LOD looks like this:

{
  "level": 0,
  "resolution": 222.2222222222222,
  "scale": 256000
}

I determined how to convert from the scale of 256000 to arrive at a resolution of 222.222:

var dotsPerInch = 96.0;
var inchesPerFoot = 12.0;
var dotsPerUnit = dotsPerInch * inchesPerFoot;
var scale = 256000;
var resolution = scale / dotsPerUnit;

But the associated WMTS service reports a "ScaleDenominator" value of 241904.7619047619:

<TileMatrix>
  <ows:Identifier>0</ows:Identifier>
  <ScaleDenominator>241904.7619047619</ScaleDenominator>
  <TopLeftCorner>-1.77905E7 4.643889999999999E7</TopLeftCorner>
  <TileWidth>256</TileWidth>
  <TileHeight>256</TileHeight>
  <MatrixWidth>3</MatrixWidth>
  <MatrixHeight>3</MatrixHeight>
</TileMatrix>

What are the mathematics behind this value?  That is, given a scale of 256000 how did ESRI arrive at a ScaleDenominator of 241904.7619?


texts: Kriging method vs. IDW in soil moisture interpolation

texts:
I have XY coordinates and soil moisture values for a grid of 10m and I used add XY data to import my excel data to ArcMap 10.5.
I applied both IDW and kriging methods for interpolation. The results are very different and after studying a bit about the differences, I still cannot say which one is more accurate?
My second problem is that kriging gives the min and max value of 5-44, while IDW gives the range between 3-62 and my actual soil moisture values are closer to the values of IDW.
I did not change any default while processing these two methods and I do not know why kriging just deletes some of the most important soil moisture values after 44 m3.m-3.

I attach the two images for comparison if anybody can help.

]2


texts: Converting non-simple geometries to simple so ArcGIS Pro can display and process them

texts:
In SQL Server 2016 I'm using GEOMETRY::UnionAggregate to dissolve some polygons into larger ones. Here is a simplified example of my select:
select ta.TRANUM, GEOMETRY::UnionAggregate(pp.SHAPE) SHAPE into PARCELS_DERIVED from Parcels pp
left join TAX_RATE_AREA ta
on
pp.Centroid.STIntersects(ta.Shape) = 1
group by ta.TRANUM

This works fine in SQL Server but when the resulting data is used in ArcMap it gives geometry errors and can't use the data. I've tracked the problem down to the UnionAggregate creating non-simple geometries:
select shape.STIsSimple() IsSimple, shape.IsValidDetailed() IsValid, SHAPE.STGeometryType() SHAPE from T.PARCELS_DERIVED

IsSimple    IsValid SHAPE
1   24400: Valid    MultiPolygon
0   24400: Valid    MultiPolygon
0   24400: Valid    MultiPolygon
0   24400: Valid    MultiPolygon
1   24400: Valid    Polygon
1   24400: Valid    Polygon
1   24400: Valid    MultiPolygon

I can add polys that are simple without a problem but if I include Non-simple ones ArcMap throws it's warnings.
Is there anyway to convert/alter the data so that is is usable in ArcGIS Pro?


texts: Using field-to-RGB mapping for symbology in QGIS?

texts:
Using QGIS version 1.7.

I have a plain text file that lists a set of rgb values against a code. I want to use this colour table to colour a polygon layer by mapping one of its attribute fields ('map_symb') to a code in the text file.

the colour table is very long, and looks like this:

$ head gsv1Msymbology.txt
MAPCODE RED GREEN   BLUE
Oc  143 255 255
WAT 255 255 255
Qa  244 250 202
Qdl 195 239 218
Na  248 255 238
Qd2 227 255 190
Qxw 248 255 238
Qns 255 148 83
Qn  255 202 190
....

I want to match my 'map_symb' attribute to a value in MAPCODE, and use the corresponding RGB values to colour the polygons.

Is there a gui way to do this?


texts: Counting points in polygons by weight and class in QGIS

texts:
I have seen a similar question to Counting points in polygon using weight and class simultaneously, but I was unable to operationalize the answer that I found so far.
I have a point layer with attribute values by groups that I would like to assign to the cells of a grid layer as sums of the different groups.
Ideally, I would receive one column for each group with the summed values of the group that are contained within the grid cells. How can achieve that?
I was going to try a suggestion involving virtual layers, but didn't fully understand which specific parts of the suggested code would need to be replaced with my layer names.


texts: Get variable from eachfeature function to php?

texts:
I have get the variable from onEachFeature function and set on a HTML tag, like this

function onEachFeature(feature, layer) {
  layer.bindPopup(feature.properties.TenCty);
  layer.on("click", function(e)
  {
    var popup = e.target.getPopup();
    var content = popup.getContent();
    document.getElementById('test').textContent = content;
   }
};

This is my PHP

My Map

I have get the value to show on HTML but I want the variable to get to PHP? Exactly is the content from popup (content variable) to echo to PHP?


texts: Concerning Mountains chain (in Wikipedia https://en.wikipedia.org/wiki/List_of_mountain_ranges) where can I find any maps with Montains chain and also geometry for those?


texts: One-To-Many Spatial Join With Tabular Output Only?

texts:
I need to run a "one-to-many" spatial join between two large and complex polygon layers.  The problem is that the output saved to a file GeoDB results in a layer that is almost 1 TB in size and it takes hours to run.  However, the only thing I really care about is the output of that attribute table itself, which has a separate row for each record in the join layer that each record in the target layer intersects with, and that is the only thing I need to generate various tabular summaries I need to run.

Does anyone know if there's a way to basically run a one-to-many spatial join, but only have it write the tabular results in the output, without any shapes?  The shapes in this output are not useful for anything, and just take up a massive amount of space and probably add a lot to the processing time to write them all (hundreds of thousands).


texts: OpenLayers/Geoserver cross domain problem

texts:
I'm using OpenLayers and OpenGeo Suite with WMS requests.The tiles load fine, but when I try to load a getFeatureInfo I get a cross domain error. I read about including crossdomain.xml in the Geoserver folder structure but I'm not sure where that is on OpenGeo Suite and couldn't get it to work.

I've also read about setting up a proxy but don't completely understand it. How would I set that up on IIS?


texts: Extract metadata from features on a WMS source

texts:
I need to extract metadata from all features from a WMS source.
So far I've managed to get them "manually" specifying coordinates for each feature using Python and OWSlib like this:
from owslib.wms import WebMapService
wms = WebMapService(<WMS URL>)

fInfo = wms.getfeatureinfo(
                     layers=['0'],
                     styles=['default'],
                     srs='EPSG:4326',
                     bbox=(-68.68876,-23.09997,-67.82525,-21.12957), # manually set feature coordinates
                     size=(500,500),
                     format='image/jpeg',
                     query_layers=['0'],
                     info_format='application/geojson',
                     xy=(250,250)
                     )
out = open(wms['0'].title.replace(" ", "_")+".json", "wb")
out.write(fInfo.read())
out.close()

So my problem is exatly that: I need to know beforehand where are all the features and specify a bounding box inside them.
Is there a way to list all features or objects from a WMS and download their metadata?


texts: Why does query table return more records than expected?

texts:
I need to join one feature class and one table. This is a one to multiple join, therefore, my only option seems to be by creating a query table. My problem is that the fields I want to join do not seem to be matched properly when I run the query table tool. I've tried using the following expression in the query table expression field to indicate that these are the fields to be joined:

'FishingAreaGroundFishNafoUnit.Code' = 'FishArea_Code_homeports_TotalValue.Code'

However instead of returning a table with just a few hundred records, I get one with 42,000 records which makes no sense at all.

I think I may be doing something wrong (perhaps the problem is with my query), but I'm not sure what. When I verify my query in the query builder window, I keep getting a message saying

  The expression was verified successfully but no records were returned

which does not make any sense as there should definitely be some matches.

I've also been using his thread (bottom post) to guide myself in creating the query table
http://forums.esri.com/Thread.asp?c=93&f=1728&t=172344in


texts: Grabbing the portal sign-on Username in WebAppBuilder and filtering records based on the user logged in

texts:
We have Arcgis Portal 10.7.1 set up with WebAppbuilder 2.51  Users sign in using their Enterprise logins.
We also have a large Feature Service dataset (over 1 million records) with multiple account managers and one of the fields contains their login usernames.

We were trying to implement a way to be able to pull their portal usernames into possibly the filter Widget and filter the dataset based on which user is logged in.

I already did a search of StackExchange and found this article, but we could not implement it to function properly.
Use single sign-on username in Web AppBuilder filter widget?

I was hoping that someone else has run into this and implemented a possible solution, even if it is not using the Filter widget.

To be specific, I am getting the error when implementing the code in the link above, and receiving this error, although I followed all the instructions.

Cannot read property 'getPortal' of undefined


texts: Why maps package adding straight lines in North America using mercator projection in r?

texts:
Why is this code creating a bunch of lines crossing the map?

map(database = "world",
    proj="mercator",
    fill=FALSE,
    bg="white",
    resolution=0)

How can I remove it without changing the projection?

map(database = "world",
    proj="albers",param=c(39, 45),
    fill=FALSE,
    bg="white",
    resolution=0)


texts: is there a way find all coordinates inside a polygon and use each points to get their value (radiance)

texts:
I have this GeoTIFF file that I acquired in NOAA ( Tarball contains the TIFF file VIIRS ) that has a light intensity in each area in the world. Its categorize per tile. I used the one that covers Asian countries (Am from Philippines). I successfully import it to PostgreSQL with PostGIS extension using raster2pgsql.

sudo raster2pgsql -s 4326 -c -b 1 -R -N -3.40282346638529e+038 -I -M NOAAMapLight/2019/SVDNB_npp_20190101-20190131_75N060E_vcmcfg_v10_c201905201300/SVDNB_npp_20190101-20190131_75N060E_vcmcfg_v10_c201905201300.avg_rade9h.tif -F -t  256x256 public.viirs_2019_01 | psql -h localhost -d CarlPostGIS -U carl

So the issue is that I have points that creates a polygon of each community in a City (Mandaluyong City its from the Philippines). Some of these polygon is too small to actually get the value inside of it. So i was thinking if there's a way to find each coordinates inside the polygon and get their respective value. Because I tried using these query

SELECT ST_SummaryStatsAgg(ST_Clip(rast,
ST_SetSRID(ST_GeomFromText('POLYGON((coord))'),4326),-3.40282346638529e+038, TRUE), 1, TRUE, 1) as values
FROM public.viirs_2019_01 WHERE
ST_Intersects(ST_SetSRID(ST_GeomFromText('POLYGON((coord))'),4326), rast)

and as I said there are some polygons that are just too small to find its value.


texts: drainage basin for whole lake QGIS 2.18.7

texts:
I am currently facing a problem. Over the past week, I have been initiated to hydrology within the GIS environment and have finally successfully generated water basins (using the GRASS r.water.outlet) by selecting a pixel in my Flow direction raster generated from a DEM with r.stream.extract

My problem is as follows: I would like to be able to select any pixel (with or without a geoalgorithm) and obtain the whole water basin complex leading to this lake. I know the lake retains water and it's odd because the information generated through my DEM says otherwise. Where a wall should hold the water in, the DEM and all the treatments claim that water goes out through there.

Perhaps the precision of my DEM is lacking, but I can see the wall with a generated Hillshade so I doubt it...

Is there a way to manually modify the DEM for my treatments to detect there is a wall there and the lake is all at the same level? Or is there an existing geoalgorithm that can detect such a lake in the creation of watersheds and water basins? the GRASS commands seem limited in this topic to simply giving me the basins partially through lines.

Mainly though, I would like to be able to do the water basin request from a polygon or a general area in the raster.


texts: QField offline working with PostGIS database in a local network

texts:
I am using a QGIS project connecting to PostGIS as the database where the network has no access to the internet. When I export the data using QFieldSync, a gpkg file is created in addition to the qgs file. However, when I move the two files to the Android device, the layers are not loaded and the following error occurs.[
]1
The save paths in the project properties is set to relative.
Has anybody any ideas what the problem is?


texts: Selecting predefined ArcMap template using ArcPy?

texts:
i have managed to create script for search cursor which will replace the text element in one of the template from help provided from my previous question https://gis.stackexchange.com/questions/172544/replacing-text-element-from-feature-class-value-using-arcpy I would like to know how i can specify the predefined template in the script below so that the script automatically load the template..

Currently i am change the template manually. the template is located in my Map template folder inside Arcgis installation directory.

note: this script is used in creating a map printout which also has select by attribute > zoom to selected feature, change view to layout view > update text element > print.

import arcpy
mxd = arcpy.mapping.MapDocument(r"Current")
table = r"C:\Users\name\Documents\ArcGIS\DATA.gdb\\Layer" # lyr from which data will be pulled
value = arcpy.GetParameterAsText(0)# enter UNIQUE_REC from layer
query = "\"UNIQUE_REC\" = %s" % (value) # string conversion via str() prior to formatting
theseRows = arcpy.SearchCursor(table, query)

for row in theseRows:
if theseRows:
    print(row.getValue("LOT"))
else:
       print "CORRECT UNIQUE_REC"
for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):
   if elm.text == "text7":
     elm.text = (row.getValue("LOT"))
arcpy.RefreshActiveView()
del mxd


texts:
I've created a function in my model to insert row in a table I've created. The problem is if it runs the InsertCursor function before the end of my program. My model executes incorrectly. I believe it's because the InsertCursor doesn't actually output anything. I get this message: "The process did not execute because the precondition is false." if I manually try to step through it. The message I get initially upon running model is: "All the inputs are not current." If I remove the precondition, it executes properly except it wants to run the function last, after it's already created the excel document that I'm trying to add the appended table to. I've already attempted this fix.

Here's the function:

import arcpy, inspect, os

fc = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + "\ProposedDesignDB.mdb\AnodeEquipment"
fields = ['MATERIALNUMBER','MATERIALNUMBERTEXT']

def AnodeUpdate(y):
 cursor = arcpy.da.InsertCursor(fc, fields)
 for x in xrange (0, y):
  newRow = ["100212","ANODE 1 LB 3 FT LEAD 12 WHITE COPPER"]
  cursor.insertRow(newRow)
 del newRow
 del cursor

Has anyone else ever had this issue?


texts: Finding vertex in comon with most polygons in PostGIS?

texts:
I have a table with polygon geometry, in this case representing counties. I'm trying to figure out how to write a query that returns vertices sorted by the number of polygons that share that vertex. For example, think of the Four Corners ares of the United States where Arizona, Utah, Colorado, and New Mexico share a common corner.That corner would likely be at the top of the list, unless five states share a common vertex.

One thought I had, apply a 5' buffer to every vertex and return the polygons the buffer intersects. The logic seems like it would work but I suspect there is a better way.

I'm using PostgreSQL 9.5 Beta 1 with PostGIS 2.2.0 on Windows.


texts: Normalizing raster data: getting a range of output values as opposed to a Boolean output

texts:
I converted a polygon shapefile which defined ED boundaries to raster. The value i based the raster surface on was a population count for each ED. The values ranged from 568 and 18160, as expected, and was automatically displayed using a color ramp.

However, these values must be normalized to the range of [0,1] for an MCE, but i am not getting the results i want. I have been using the following formula in the raster calculator to normalize:

("Louth_EDs"/17592) + 1

...17592 being the input range of values, and the formula inverted because i want the EDs with the lowest population to have a higher value in the MCE. The results are as below:

The inversion seems to have worked: the ED with the highest population is ranked lowest at 0, but every value outside this area has a value of 1 and nothing lower. I was hoping to make this criteria a factor in the MCE i.e. i wanted a true range of values between 0 and 1 rather than a a simply yes/no output - this criteria is to determine degrees of suitability.

How would i introduce a range of values to the normalization for the MCE?
I am not adept at programming languages.


texts:
I have a large DXF format three dimensional DTM triangulation file from a LiDAR survey (about 3.5 GB file). I wish to extract part of it from inside a polygon.  I was impressed that GRASS successfully imported the DTM using the GRASS import menu (v.in.dxf) as several other tools I have tried failed to do this. I have also imported the polygon which I intend to use to clip the DTM using the same menu.

Could someone provide guidance by means a simple example, as to how I achieve the clipping to the boundary, prepare contours of the clipped region to a desired interval, and then export clipped DTM and contours as 3D .dxf file so I can use these results in other software packages such as QGIS?


texts: WFS Service - doesn't show any layer on QGIS

texts:
This service has 36 layers. I can connect to the service from QGIS but any layer show up when it is selected.

Could any one help me out?

Link for the WFS Service:
http://local.pentago.com.br:8090/arcgis/services/IDAF/DADOS_INSTITUCIONAL/MapServer/WFSServer

Previous I did some tests in a web browser to get KML response with success.


texts: ChangeDetector Tool in ArcGIS by Bruce Harold

texts:
I have downloaded the tool "ChangeDetector." by Bruce Harold for ArcGIS. I´m using arcGIS 10.2. Unfortunately I´m getting all the time some errors:

<'type 'exceptions:unicodeError'> ascii' codec can't encode character u'\xf6' in position 1: ordinal not in range(128)

by choosing shape as the only search field I´m getting the following error:

<'type 'exceptions:Runtime:Error'>: Object: CreateObject cannot create geometry from Inputs.


texts: Sending value in Entry widget to Feature Class via ArcPy insertCursor?

texts:
I have a python script that is adding a record to a feature class and it is working correctly. However, I now want to allow the user to enter the record details via Entry boxes. The record is being created but instead of the text from the Entry box, I'm getting numbers; .101463104.101464424

 def new_record():
    import arcpy
    arcpy.env.workspace = r'F:\MyProject\mygdb.gdb'
    myPath = r'F:\MyProject\mygdb.gdb'
    editRows = arcpy.da.InsertCursor('records', '*')
    print editRows.fields
    OID = 1
    ptShape = arcpy.Point(0,0)
    county = text_search_county
    rec_year = int(text_search_story_year)
    newRecord = [OID, ptShape, county, rec_year]
    editRows.insertRow(newRecord)
    del editRows

label_search_county = Label (toplevel, text="County", font="none 12 bold")
label_search_county.grid(row=2, column=0, sticky=W)

text_search_county = Entry(toplevel, width=20)
text_search_county.grid(row=2, column=1, sticky=W)

label_search_story_year = Label (toplevel, text="Story Year", font="none 12 bold")
label_search_story_year.grid(row=6, column=0, sticky=W)

text_search_story_year = Entry(toplevel, width=20)
text_search_story_year.grid(row=6, column=1, sticky=W)

insert_record = Button(toplevel, text="Insert", width=8, command=new_record)
insert_record.grid(row=7, column=1, sticky=W)

If tried doing county = str(text_search_county) but that doesn't work.


texts: Spatial join without operation on the variable of interest

texts:
I have a simple problem: I've got to spatially join records of an epidemic in forests to some plot coordinates I have gathered. Problem is, I cannot obtain the records for each year on each plot, I can either get the first record for each plot (not enough, since it's only one year) or get all those records but only after they've been transformed through either mean, min, max, median operation through the attribute summary choice I make, resulting in a single line but with data I can't exploit for my work.

I'd rather have duplicates of my rows (each corresponding to the state of the plot for a given year) so I can analyse the epidemic data year by year.

I am a first time user of QGIS: my data is stored in shapefiles, all of it (I created one out of my plot coordinates for a simple Excel sheet, and the rest was downloaded from here directly, shapefiles as well: http://www.donnees.gouv.qc.ca/?node=/donnees-details&id=2eed323f-e3fd-40cf-98c4-d0d25c52c404#meta_telechargement ; it's in French)


texts: How to create a new Shapefile with the same attributes as an existing one?

texts:
It is quite a frequent occurrence that I want the data I'm about to add to a new shapefile, to have all the same attribute fields as one I created in a previous project.

For example, I might have previously mapped all the fence lines in a filed and recorded their attributes - fence type, condition, wire, length, height, etc.

I then want to produce the same sort of survey for a different client. I just want my 'fence' layer to look exactly the same as the 'fence' layer on the previous project, same style, same labels, same fields, but the only thing I can save seems to be the style.

Could anyone help with the best way to do this?


texts: Is there a sample ArcGIS Server service for US zip codes?

texts:
Esri provide a sample ArcGIS Server instance which contains states, block groups, etc.

Is there a similar publicly-accessible ArcGIS Server instance anywhere which contains US zip codes?


texts: Rotating Features in ArcGIS for Desktop using ArcPy?

texts:
I have a series of polygons that I want to rotate.

Each polygon has a rotate angle and an anchor point (xy coordinate) stored as field values.

As it happens, all anchor points are on a vertex of the polygon.

What is the best way to do this using ArcGIS for Desktop and ArcPy?

I know we can rotate them when in editing mode, but I don't want to do them all manually since they are all different.

I would prefer a Python answer so I can automate it and build it into my work flow.


texts: Percentile Composite of Collection in Google Earth Engine

texts: I know how to find percentiles within a single image, but is there a way that I can make an output image that is a percentile composite of an entire collection? E.g. a composite image where each pixel value is the 90th percentile value at its respective location given an input collection.


texts: ArcGIS for server install guides documentation PDF?

texts:
ESRI has install guides online which I would like to print and keep on file as a PDF.  I could create a PDF from each step then bind these together but it seems like a lengthy and cumbersome process.

Any ideas where I can obtain a PDF of the install guides?


texts:
I have a dataset of type citygml (*.gml). It includes information about buildings and their rooftypes.

you can find a sample file here: https://www.opengeodata.nrw.de/produkte/geobasis/3d-gm/3d-gm_lod2/

The information about the roof is given as the attribute roofType. CAD-Software is able to visualize the buildings from the *.gml-files including their roofs. I successfully opend the data with this freeware tool:

https://www.iai.kit.edu/downloads/Informatik_fuer_die_Energiesystemanalyse/FZKViewer-4.9_Build-956.zip

If i load the file in QGIS (3.0 Girona) i see the footprints of the files.

aim:

I want to convert this data into a raster DEM (digital elevation model). This could be for example the  *.xyz-format where for each x/y coordinate there is information about the height of the building including the roof (z):

x;y;z
20;15;1
15;15;1
15;0;2
20;0;2

It has to be a raster format because the DEM will go as input data to a software that only understand raster-formats.

I have come so far:
I rasterize the gml-file in QGIS using the building height from the attribute table. Then I get a DEM with cuboids with flat roofs.

here I get stuck:
I don't have any idea how to do something similar including the heigths of the roof. Somehow I need to transform the roofType into information about the altering roof height over the building footprint. Also I don't know how i access  information about the roof height in this data set. I'm sure it must be there. There is an attribute named consistsOfBuildingPart/BuildingPart/measuredHeight (sample value: 2:11.788,7.645) As I understand the information of the roof is saved as a BuildingPart for each Building.

alternatives?:
I know how to convert the *.gml-data to *.stl or *.ifc format which are  widely used for models of buildings e.g. in CAD-software. So if somebody knows how to rasterize those data-types instead of *.gml, hints would also be usefull.

prefered software:
any freeware:

R, QGIS

Does anybody know how to rasterize the buildings in *.gml-format in QGIS?
To me it seems like the web is full of descriptions convertig raster-dem to *.gml or different 3D-formats...


texts: Map automation using open source Python modules

texts: I have a shapefile with 3000 parcels. I am going to generate a map for each parcel. The map should be the same as the following paper map. I know that arcpy.mapping can be used for this purpose. I was wondering that if there is any open sources to generate these maps in Python.


texts: Calculating different features' counts with L.esri.Query

texts:
I have been using the L.esri.Query (Esri Leaflet) method "count" to add up the total amount of features falling within a given area. That works fine when using individual features classes at a time (so querying within one file/feature class only), but if I want to add the total features falling within my area regardless of feature class (e.g., points and polygons), I can't seem to get a correct output. Maybe my JavaScript code is wrong... Here is what I have so far:

var stops_count = L.esri.query({
    url: stopsUrl
}).within(neigh_match);

var parks_count = L.esri.query({
    url: parksUrl
}).within(neigh_match);

var count1 = stops_count.count(function(error, count){
});

var count2 = parks_count.count(function(error, count){
});

var total_counts = count1 + count2;
console.log("counts = " + total_counts);

But what the console actually shows is:   counts = [object XMLHttpRequest][object XMLHttpRequest]

So I assume I am not using correct code to add up these counts from the two features classes, one being light rail stops and the other parks. Again, if I run the functions independently I get individual totals (2 for the stops and 14 for parks), but I want to be able to get a summary count of 16 for all the contained features in my area.

I got these examples for querying counts from https://esri.github.io/esri-leaflet/api-reference/tasks/query.html.

Any ideas?


texts: Prevent some layers being modified via WFS? - Geoserver

texts:
I have a workspace in Geoserver and I have some layers on it. I have enabled Complete WFS in that worskpace.

Now I want just some specific layers from there prevented from being edited via WFS because those layers are managed throught a web application and are stored in PostgreSQL/PostGIS.

Is there another way to achieve this without publishing those layers in a new workspace and disabling WFS Service in this new workspace?


texts: Are degree based length/area measures comparable across regions?

texts:
I have global shp files of basins (polygons) and rivers (lines). I wish to calculate a measure of stream length per basin area. It should be comparable across world regions, e.g. I wish to compare basins in China to basins in Brazil.

I wonder if using $length and $area in a geographic WGS84 reference system to calculate the ratio as described above is comparable between regions?

I have made an attempt to compare to remote regions using the following workflow:

  For each region:

  A) Use spatial join to get sum(river.length) in each basin.

  B) Calculate ratio = sum(river.length) / $area

  C) Re-project river / basin data to corresponding UTM and repeat A - B

I expected to get ratio == ratio.UTM for each basin, yet the results show non-linear differences between them. See results below (red indicates negative values):

Following this example I became skeptic; now i'm wondering if I can simply use the data referenced to WGS 84 to calculate the ratio, or should I re project it beforehand? Note that projecting the data will be time consuming and complex, since it requires to slice the data according to UTM zones.

I am using QGIS 2.14, and may switch to arcmap 10.3, or grass 7. I have read Measure areas, lenghts in specific regions (Australia, Sout East Asia), but answers given there do not satisfy my query.


texts: What's the difference between Processing GRASS and the GRASS toolbar?

texts: Preparing a QGIS-course for my colleagues I stumbled over the following question: What is the difference between the GRASS commands in the processing toolbar and the GRASS Tools, that you access via the GRASS toolbar?


texts: Changing raster plot break values text using R

texts:
I have the following R code that generates a plot.
b <- c(0,30,60,90,120,150,180)
rast <- raster("study.area.accessibility.tif")
r <- clamp(rast, 0, 180)

plot(r,
     col=topo.colors(length(b)),
     breaks = b
     )

I want that last break's text to be technically accurate.
That is, instead of 180, I want it to be 180+ or >180.


texts: ArcGIS Focal Statistics Circular Radius Bug Work-Around

texts:
I am attempting to run focal statistics on a Raster with a circular neighborhood of 3 cells (600m radius), using the statistics type "maximum". Focal statistics calculates a seemingly nonsensical value for each pixel value. For example, most pixels have a value ~3.4, when all pixel in the radius have a value greater than 3000. I am running ArcGIS 10.4.1.

When a rectangular radius is used, the correct maximum value is selected by the focal statistics tool. Is this related to the known bug:

http://support.esri.com/en/bugs/nimbus/TklNMDU5NzI2

Any ideas on a work-around?


texts: What is unit of shapely length attribute?

texts:
I'm doing a very simple calculation of the length of a polyline using shapely:

from shapely.geometry import LineString
...
xy_list = [map(float,e) for e in xy_intm]
line = LineString(xy_list)
s = '%s,%s,%s' % (fr,to,line.length)

My coordinates are in WGS84. I can't seem to find any information about shapely's length attribute. What is the unit of the length attribute? Is there an easy way to convert to to km or meters?


texts: Having Issue on Setting ArcGIS Web Adapter On Multi-tiered Deployment

texts:
I am trying to install ArcGIS Enterprise 10.5.1 on two separate physical machines called GISSV01 and GISSV02. This means that there is a separate machine for each of the following:

ArcGIS Server (GISSV01)
Portal for ArcGIS (GISSV02)

The portal will be in charge of authentication process. Now my questions are:

1 - Where should I Install the Web Adaptor on GISSV01 or GISSV02 only or both?
2 - I need to install Portal only Portal for ArcGIS on GISSV02. From the point of Enterpise level, do I have to have the `ArcGIS for Server to be installed at that machine?


texts: Change CRS, but the image position also changing

texts:
I have 2 overlapped image, one is an aerial photo in CRS EPSG (4326) WGS 84, and one is a satellite image, in CRS EPSG:32648 WGS 84/UTM zone 48N.

I need to georeference the aerial photo compare to satellite image, and to do so I need them in same CRS. However, when I change/save as the aerial photo CRS to UTM zone 48, it moves somewhere else, not overlapped anymore with the satellite image like below (when I zoom full, satellite image is in the right upper corner, meanwhile the aerial photo is somewhere else)

I tried the other way around, change the satellite CRS, also they not overlapped anymore.
Is there is any way to resolve this issue so when i change the CRS they kees overlapped?


texts: How to make a multi color map with one shapefile layer in QGIS?

texts:
I am working with a shapefile layer of the world. All the countries are in the Attribute table each one in a different row.
I tried to make each polygon in a different color so the countries will be in a different color, but it did not work.

In the Africa map I save each polygon separately and upload into a new QGIS. This method takes a lot of time. What would a better and faster method be?


texts: Is there a QGIS version of CHSPACE (AutoCAD command)? Transfer objects from print layout to main workspace

texts:
I want to see which parts of my map I've covered in print layout. In AutoCAD I draw a rectangle to the extents of the viewport and then CHSPACE (which transfers the rectangle to the modelspace scaling accordingly. That way I can see (in the main workspace) what is covered by a print layout and what isn't.

I'm trying to show a route along multiple print layout views (so I can plot at a usable scale). Currently I'm just eyeballing where one print layout frame starts and the preceding one ends.

I've tried google but as you can tell I'm having trouble making it clear what I'm asking.

I'd quite like to crop everything not covered by a print layout. Hopefully it'll speed up the drawing a bit.

Also is there a repository of sample drawing frames/templates? I can't seem to find anything online. Only this: https://github.com/nationalparkservice/nps-qgis-map-templates/blob/master/README.md


texts: Alternative to ST_ClosestPoint, one which returns a vertex of the geometry

texts:
ST_ClosestPoint returns the closest point on a geometry, as in the example at

http://postgis.net/docs/ST_ClosestPoint.html

What I need is to get the closest point which is already a part of the geometry.

Example:

geometry = [1,2,3,4]
Point = any position

ST_ClosestPoint(geometry,point) returns something like [2.5] which is between existing vertexes.

How can I get a result without interpolation (so it should be 1,2,3 or 4 and nothing else possible)?

Thanks!


texts: How to select points with point ids from external list

texts:
I have a point shp and list of point IDs in CSV file which match with point IDs in the shape. Points in SHP have location while points in the external file don´t.
How can I select points in the shp according to the external list of points?
Simple question but not easy to find an answer in QGIS 2.18.


texts: Getting forest area (km2) of a region after the classification by RF considering the >10% tree cover and 0.5Ha?

texts:
I am trying to make a yearly image collection using Landsat images, then trying to make a classification using Random forest for the image of the years 1990, 1995, 2000, 2005, 2010, 2015 and 2020.
I would like to know if it is possible to compute the area class (forest class) of each of them considering the forest definition  >10% of tree cover and 0.5Ha. I have tried to write the script but I got 0 km2 for all of them as a result (see script below).
I am still a beginner in GEE.
Here is the code: https://code.earthengine.google.com/?scriptPath=users%2Frorohambi%2FRo20%3AManakara_sorona


texts: 500 Internal Server Error:System.InvalidOperationException: Missing parameter: settlementlocationcode

texts:
Here I'm trying to bind the data from database to table for selected features within the user entered buffer distance. This is working for simple query, but it doesn't work for query using PostGIS function it shows the error:

  likeSystem.InvalidOperationException:
  Missing parameter: settlementlocationcode`

 function Gettable(settlementlocationcode, bufferdistance)
    {
        $.ajax({
            url: "drop.asmx/GetSchoolData",
            method: "POST",
            dataType: "json",

            data: "{'settlementlocationcode':" + settlementlocationcode + ",'bufferdistance':" + bufferdistance + "}",
            success: function (data) {
                //alert("success");
                $('#dt').dataTable({
                    data: data,
                    // 'paging': true,
                    // 'scrollY': 200,
                    columns: [
                       { 'data': 'districtcode' },
                       { 'data': 'talukcode'},
                       { 'data':'schoolcode' },
                       { 'data': 'schoolname' },
                        { 'data': 'longitude' },
                       { 'data': 'latitude' },
                    ]
                });
            }
        });
    }


texts: Export/Convert .tif + tfw into GeoTiff with tagged Metadata (coordinates)

texts:
What is the correct command line for using warp_management in Python (ArcGIS 10.1),  to convert several georeferenced .tif's (or folders) with XML world files to GeoTIFF's with permanently written Metainfo (Georeference, Projection)?

Export data, warp tool, Raster to other format, QGIS conversion did not work.
I am working with ArcGIS 10.1 and QGIS 2.12.