texts: Changing the marker-line-width of pin on cartodb

texts:
I have problems changing the marker-line-width of my pin in cartodb.

I use the property marker-line-width but my marker line does not appear. Instead a bubble shows up when I increase the marker-line-width.

Here are my css code:

    /** category visualization */

    #untitled_table {
    marker-fill-opacity: 0.9;
    marker-line-color: #000000;
    marker-line-width: 3;
    marker-line-opacity: 1;
    marker-placement: point;
    marker-type: ellipse;
    marker-width: 20;
    marker-allow-overlap: true;
    }

    #untitled_table[location="Embassy of Russian Federation"] {
    marker-file: url(http://com.cartodb.users-assets.production.s3.amazonaws.com/maki-icons/marker-18.svg);
    marker-fill: #41006D;
    marker-line-color: #000000;
    marker-line-width: 3;
    marker-line-opacity: 1;
    }
    #untitled_table[location="Embassy of the United States of America"] {
    marker-file: url(http://com.cartodb.users-assets.production.s3.amazonaws.com/maki-icons/marker-18.svg);
    marker-fill: #41006D;
    marker-line-color: #000000;
    marker-line-width: 3;
    marker-line-opacity: 1;
    }
    #untitled_table[location="European Union Delegation to Bangladesh"] {
    marker-file: url(http://com.cartodb.users-assets.production.s3.amazonaws.com/maki-icons/marker-18.svg);
    marker-fill: #41006D;
    marker-line-color: #000000;
    marker-line-width: 3;
    marker-line-opacity: 1;
    }
    #untitled_table[location="French Embassy"] {
    marker-file: url(http://com.cartodb.users-assets.production.s3.amazonaws.com/maki-icons/marker-18.svg);
    marker-fill: #41006D;
    marker-line-color: #000000;
    marker-line-width: 3;
    marker-line-opacity: 1;
    }
    #untitled_table[location="Holey Artisan Bakery"] {
    marker-file: url(http://com.cartodb.users-assets.production.s3.amazonaws.com/maki-icons/star-18.svg);
    marker-fill: #E31A1C;
    marker-line-color: #000000;
    marker-line-width: 3;
    marker-line-opacity: 1;
    }
    #untitled_table[location="Netherlands Embassy"] {
    marker-file: url(http://com.cartodb.users-assets.production.s3.amazonaws.com/maki-icons/marker-18.svg);
    marker-fill: #41006D;
    marker-line-color: #000000;
    marker-line-width: 3;
    marker-line-opacity: 1;
    }


texts: How to display data at diffrent depths in ArcScene

texts:
I am looking for a way to display data at different depths in ArcScene.

I have a bathymetry layer which displays fine, and I want to overlay oil platforms in 3D over the bathymetry to show where marine growth occurs.  I have managed to display the platforms as extrusions, but I would like to display on each platform where a particular species occurs.

For example soft coral occurring between -20 and -40 meters and hard coral between -60 and -100 meters (different for each platform).


texts: cartodb.js highlight the polygons on mouse hover for Google map v3

texts: We are using cartodb.js with Google map v3. We are trying to highlight the polygons on mouse-hover. Is there a way to highlight the polygon on Google map using cartodb layer?


texts: Downloading from GPS / changing SCR / not working

texts:
I use a GARMIN GPS;

I download my points from the GPS by using GPS tool;

I "try to" change projection (SCR) by changing layer property/specify SCR

Still, it not working and I cannot view my layer on my project...

Any help?


texts: How do you get a schema report from SHP, PostGIS, or other file type?

texts:
All,

We're loading City and County data into our database, but looking to remove several fields we don't use.

Those fields we do use I'd like our users to simply highlight on a printout I give them based on a schema report from the .SHP we're getting the data from.

Is there a way to get a list of the fields in a SHP or PostGIS layer in a format such as a spreadsheet I can print off and give to users?


texts:
Is there a map projection where the Euclidean distance between any 2 points is the same as the great circle distance/real world distance between the 2 points?
I know as an image, it might look funny, but for doing calculations, it might be useful.


texts: QGIS information by clicking on a point?

texts:
How is it possible to open a window by clicking on a point of a point shapefile? This window should display particular attributes of the attribute table and, if somehow possible, geotagged photos.

Is it possible and useful with photo2shape or eVIS?


texts: How to combine two or more classifier in supervised classification in Google Earth Engine

texts:
For high accuracy of supervised classification, we always use two or several years data to training classifier as following:
var classifier = ee. Classifier.smileRandomForest(200).train({
  features: training2001a,
  classProperty: "lableID",
  inputProperties: bands2001a
});

but that just include one classifier, which one list data corresponding some bands of one year. How can combine two or more classifier? In another words, how can I use years imageCollection to create a synthetical classifier?


texts: Replacing Variable in VB-Expression-File (.cal) of ArcGIS Desktop?

texts:
I'm trying to modify a VB-Expression saved in a cal-file by ArcGIS Desktop 9.3:

dim out
if [D19830701]=-9999 then
    out= [D19830501]
else
    out= [D19830701]
end if
__esri_field_calculator_splitter__
out

with this simple script:

import os, sys
o = open("D:\\Expressionnew.cal","a") #open for append
for line in open("D:\\Expression.cal"):
    line = line.replace("D19830701","D19830801")
    o.write(line + "\n")
o.close()

but all i get is this:

d i m   o u t

 i f   [ D 1 9 8 3 0 7 0 1 ] = - 9 9 9 9   t h e n

     o u t =   [ D 1 9 8 3 0 5 0 1 ]

 e l s e

     o u t =   [ D 1 9 8 3 0 7 0 1 ]

 e n d   i f

 _ _ e s r i _ f i e l d _ c a l c u l a t o r _ s p l i t t e r _ _

 o u t

No Replacement, the script just added "spaces" between every letter.
I want to use this Replacement-Script to fit the cal-file for several calculations i need to make.

Is there maybe a problem with the encoding (unicode?) when the script opens the file?
Maybe somebody has had the same problem ;)
or a nice workaround.


texts:
Is it possible to edit the .json format, which is created by default when publishing a service on ArcGIS for Server?

For a project we have the following problem:

Our by default created .json for a Feature Service Layer looks e.g. like this.
We want to change some of these .json elements like edit the objectID name or adding another element like "api_key"?

Because there is also another group, which works simultaneously on another application, both teams should use the same data coming from an ArcGIS Server.

So....is there a way to edit the json schema?


texts: How can I force text to appear underneath other layers in QGIS?

texts:
To emphasise one particular polygon area, I have used rule-based styles (QGIS) to apply a 50% transparency white fill to every polygon but the one I am interested in. This polygon layer is above all the others in the stack, with the result that all the mapping outside the emphasised polygon is 'faded out'.

However, any and all labels attached to places and roads are not faded out, even though the text layers in question are underneath the 'fade out' polygon layer.

How can I fix this?


texts: in QGIS, while using simplify feature, slider does not appear

texts:
Using Qgis both 1.8.0 and 1.7.4, the slider does not show up after selecting features and click "simplify feature" botton.

Any special setting needed to show the slider?

Thanks.


texts: ArcGIS JavaScript PrintTask Failed to create layer from service at

texts:
I have an ASP.NET MVC application that displays a map using Esri's ArcGIS for JavaScript, 3.18.  I want to print the map and all visible layers using a Export Web Map Task  (PrintingTools Service) on our onsite ArcGIS for Server.  I am using esri/tasks/PrintTask in JavaScript to call the execute function and return a URL to an image (or PDF) of the map.

When the only layers visible are Esri's streets basemap and my client-side rendered graphics layers (drawing/highlighting a route on the map), the execute function works.  However, when I have layers visible that are dynamic map service layers or feature layers, the map will not print.  These map services are on the same server as the PrintingTools Service.  I've tried with and without using a proxy.  The error message  is as follows:

{"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool. Export Web Map Task Job ID: asdfl;kjasdf;lj : Layer \"graphicsLayer3\": Failed to create layer from service at https://[ourserver]/arcgis/rest/services/[testservice]/MapServer/6 ...

Is it possible that the FeatureLayer or MapService has security that does not allow the PrintingTools Service access?  Even when located on the same server?

This is the function in my dojo widget that I am using to test printing; nothing out of the ordinary:

testPrint: function () {
    var printParams = new PrintParameters();
    printParams.map = this.map;
    this._printTask = new PrintTask(appConfig.map.services.printTaskUrl, printParams);
    this._printTask.execute(printParams,
        function (success) {
            console.log("Print success" + JSON.stringify(success));
            window.open(success.url, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');
        }, function (err) {
            console.log("Print failed" + err.details);
        });
}


texts:
I have a table with multpart polygon geometry with coordinate system EPSG:4326. I can identify, what are geometries with more than 1 polygons in it. I want to re-order it in a way that the largest polygons comes first and then the smallest for multipart geometries.

How can I do this in PostGIS, using any query?

I have a multipart geometry e.g.

MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20)))

This geometry has three polygons,

1- ((40 40, 20 45, 45 30, 40 40))

2- ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35)

3- (30 20, 20 15, 20 25, 30 20))

These three polygons have different area e.g.

1- 10 square meters

2- 15 square meters

3- 12 Square meters

What is want is to re-order the geometry from highest area to lowest area i.e. the output should be ..

Output

MULTIPOLYGON (((20 35, 10 30, 10 10, 30 5, 45 20, 20 35)), ((30 20, 20 15, 20 25, 30 20)),  ((40 40, 20 45, 45 30, 40 40)))

Update

Please forget about ring in the polygon and just consider three polygons. This example was just to give an idea of what i am trying to achieve.


texts:
So, I am looking into raster segmentation methods and I started having a few doubts about what I know abouth their technicalities.

I was wandering if there is a way to connect raster-to-polygon functions with raster segmentation. To be more specific, if you are an R user for example there isn't a library that does raster segmentation using region growth but you can create a function that does region growth and then use the raster_to_polygon function, right?

TL;DR: Is there a connection between raster to polygon conversions and raster segmentation? Can you explain why?


texts: Using Ground Control Points in Agisoft Photoscan?

texts: I'm fairly new to the Agisoft Photoscan program, but I am trying to build several models using aerial imagery and highly accurate GCPs, with coordinates collected in the field. I align my photos and enter my GCPs, but when I build the model, the GCPs do not seem to stick. When I go to the areas that have GCPs in the model, they show different coordinates and elevations than those I measured and entered. Is there a way to get Photoscan to keep the known coordinates?


texts:
Is there any way to modify the Traveling Sales Person algorithm in pgrouting to Route inspection problem (Chinese postman problem)?
I need Route inspection problem and it seems that pgrouting does not support it.


texts: Changing the contrast (min, max) in Google Earth Engine Slip panel images

texts:
I have managed to do a split panel with GEE, but I don't manage to change the contrast. I know the good contrast for the picture are min: 150 and max: 8000.

Also, the first image (2010) I used Landsat 7, which is displaying some strange colors.

Here is my code:

var images = {
'2010': ee.ImageCollection('LANDSAT/LE07/C01/T1_SR')
                  .filterDate('2010-01-01', '2010-12-31')
                  .filter(ee.Filter.lt('CLOUD_COVER',25))
                  .select(['B3', 'B2', 'B1'])
                  .filterBounds(Uyuni)
                  .map(function(image){
                  var filled1a = image.focal_mean(1, 'square', 'pixels', 2);
                  return filled1a.blend(image)}),
'2013': ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
                  .filterDate('2013-03-01', '2013-10-31')
                  .filter(ee.Filter.lt('CLOUD_COVER',5))
                  .select(['B4', 'B3', 'B2'])
                  .filterBounds(Uyuni),
'2019': ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
                  .filterDate('2018-01-01', '2018-12-31')
                  .filter(ee.Filter.lt('CLOUD_COVER',5))
                  .select(['B4', 'B3', 'B2'])
                  .filterBounds(Uyuni),
};

/*
 * Set up the maps and control widgets
 */

// Create the left map, and have it display layer 0.
var leftMap = ui.Map();
leftMap.setControlVisibility(false);
var leftSelector = addLayerSelector(leftMap, 0, 'top-left');

// Create the right map, and have it display layer 1.
var rightMap = ui.Map();
rightMap.setControlVisibility(false);
var rightSelector = addLayerSelector(rightMap, 1, 'top-right');

// Adds a layer selection widget to the given map, to allow users to change
// which image is displayed in the associated map.
function addLayerSelector(mapToChange, defaultValue, position) {
  var label = ui.Label('Choose an image to visualize');

  // This function changes the given map to show the selected image.
  function updateMap(selection) {
    mapToChange.layers().set(0, ui.Map.Layer(images[selection]));
  }

  // Configure a selection dropdown to allow the user to choose between images,
  // and set the map to update when a user makes a selection.
  var select = ui.Select({items: Object.keys(images), onChange: updateMap});
  select.setValue(Object.keys(images)[defaultValue], true);

  var controlPanel =
      ui.Panel({widgets: [label, select], style: {position: position}});

  mapToChange.add(controlPanel);
}

/*
 * Tie everything together
 */

// Create a SplitPanel to hold the adjacent, linked maps.
var splitPanel = ui.SplitPanel({
  firstPanel: leftMap,
  secondPanel: rightMap,
  wipe: true,
  style: {stretch: 'both'}
});

// Set the SplitPanel as the only thing in the UI root.
ui.root.widgets().reset([splitPanel]);
var linker = ui.Map.Linker([leftMap, rightMap]);
leftMap.setCenter(-67.37, -20.55, 12);

Link to my GEE script:

https://code.earthengine.google.com/e563ab696ee8d27b69027824cc95f2d7?noload=1


texts: change font size of elements in dropdown menu store

texts:
I am creating of list of building names from a query, which then populates a dojo.ItemFIleReadStore.  This store then populates a dropdown menu (using dijit.Form.ComboBox), where the user makes a selection.

My problem is that I cannot change the font size of the dropdown list.  I can change the font size of the placeholder in the ComboBox, and also of the final selected result, but not the font size in the dropdown list itself.

Here is the HTML for the combo box:

<div id="list">
  <select id="menu" dojotype="dijit.form.ComboBox"
  value="autoComplete="true" placeholder="Options:" class="comboBoxClass"
  required="false" onchange="executeSelectedQuery(this)">
  </select>
</div>

and here is the basics of the JS for the store item:

 var dataItems = {
    identifier : 'name',
    label : 'name',
    items : values
};

var menuStore = new dojo.data.ItemFileReadStore({
    data : dataItems,
    clearOnClose : true
});

I can change the font-size of the placeholder with
         .dijitInputField

and change the font-size of the result string with :
        input[type="text"]

in css, but neither of these will change the font size of the stored drop down list of items.

Ideas?

(I am using ArcMap 10.0 and ArcGIS Javascript API 3.4)


texts: Can I limit the drawing size of icons when my map is scaled?

texts: I have created some custom icons that I'm using to represent points on my map. For the case in point, I'm using a skyscraper icon to indicate construction projects underway. It looks cool at certain scales, but when I zoom out farther to get the big picture, my icons just overlap into a blobby mess and all meaning is lost. So, is there a way to limit the scaling at a certain point so that when I zoom out farther than, say, a 15 zoom, my icons will no longer scale any larger?


texts: Using where clause with FeatureClassToFeatureClass?

texts:
I want to split the shapefile with a field called FULLNAME and save those records with same FULLNAME to a new shapefile, which is the split by attribute. The following code has an error for the last line.

The error is:

Traceback (most recent call last):
  File "<editor selection>", line 8, in <module>
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\conversion.py", line 1693, in FeatureClassToFeatureClass
    raise e
ExecuteError: ERROR 000258: Output C:\Users\TL\Desktop\831test\Splitbyattribute\Abilene Ln.shp already exists
Failed to execute (FeatureClassToFeatureClass).

Any suggestions?

import arcpy

def unique_values(table, field):
    with arcpy.da.SearchCursor(table, [field]) as cursor:
        return sorted({row[0] for row in cursor})

inFC = r'C:\Users\TL\Desktop\831test\SpatialJoinName_proj.shp'
StreetNames = unique_values(inFC, 'FULLNAME')

#split the shapefile by different names
arcpy.CreateFolder_management(r"C:\Users\TL\Desktop\831test", "Splitbyattribute")
outputfolder = r"C:\Users\TL\Desktop\831test\Splitbyattribute"
for name in StreetNames:
    arcpy.FeatureClassToFeatureClass_conversion(inFC, outputfolder, name, "FULLNAME = {0}".format(name))


texts: GeoExt 2 + OpenLayers 2.13.1 - Problem with 'OpenLayers.Control.SelectFeature'

texts:
I have recently started to work with GeoExt and OpenLayers to generate a web GIS application. During the development of this application I have found a problem using the object OpenLayers.Control.SelectFeature.

I have various objects OpenLayers.Layer.Vector that shows on the map as geometric points. Each point must show a popup with his features attributes.

To generates this popup I have use this function:

        function createPopup(feature) {
        var popupOpt = Ext.apply({
            title: feature.attributes.title,
            location: feature,
            html: feature.attributes.html,
            collapsible: false,
            unpinnable: false,
            maximizable: true,
            icon: feature.attributes.icon,
            border: false,
            style: {
                borderColor: 'white',
                borderStyle: 'solid'
            }
        });
        popup = Ext.create('GeoExt.window.Popup', popupOpt);
        popup.on({
            close: function() {
                selectCtrl.unselectAll();
            }
        });
        popup.show();
    }

Now, when I create a control object 'OpenLayers.Control.SelectFeature' with an array of vector object this don't work, while if I create a control object with only one vector object, this works correctly.

This works correctly:

var vectorStyle = new OpenLayers.StyleMap({'pointRadius': 4, 'externalGraphic': 'resources/images/logo.png', 'graphicWidth': 30, 'graphicHeight': 25, 'fillOpacity': 1.0, 'cursor': 'pointer'});
var vector = new OpenLayers.Layer.Vector("StationA",{styleMap: vectorStyle, visibility: false});

var selectCtrl = new OpenLayers.Control.SelectFeature(vector,{onSelect:createPopup});

mapPanel.map.addControls(selectCtrl);

selectCtrl.activate();

If I use an array : ...SelectFeature([vector1,vector2,vector3],... don't work:

var vectorStyle = ....
var vector1 = ...
var vector2 = ...
var vector3 = ...

var selectCtrl = new OpenLayers.Control.SelectFeature([vector1,vector2,vector3],{onSelect:createPopup});

mapPanel.map.addControls(selectCtrl);

selectCtrl.activate();

Someone can help me?


texts: Will osm2po or other tools simplify links between nodes?

texts:
To make this clearer, I'm going to use the the word "section" to mean a length of road between two junctions/intersections.

I think it is true that osm2po (under default user options) creates a graph in which a section is sometimes made up of more than one link. I'd like to ask if it is possible to make each link equivalent to a section, either using osm2po or using a simple post-processing step.

It seems obvious that a simplified graph would be quicker to use in routing and would also correspond more neatly to other data sources (such as traffic information)

Thank you, in advance.


texts: Calculating percentage/fraction of thematic pixels with coarser resampled pixels in QGIS/GRASS

texts:
I am using QGIS 3.4.9 on Mac OS10.13.6.

How can I edit raster data type to change it from thematic to continuous/quantitative?

details:
I am trying to calculate the fractional (percentage) composition of 5-m input pixels at a 30-m output resolution. So, for example, if a given window had 2 pixels of my chosen class for the fine-scale input data, the output of the resampled would be assigned as 0.05555 (2/36). I haven't been able to locate a single tool to do this, so I converted my thematic raster into a series of byte images each assigning 1s to pixels of the given class and zero to everything else (using r.reclass). I then planned to use GDAL warp to resample to 30 m and output the average of each of my thematic categories of interest.

However, I am blocked from this due to the following message:

  Warning: Input file /QGISWork2019v3/Nica2015ShrubScrub.tif has a thematic RAT, which will likely lead to bad results when using a resampling method other than nearest neighbour or mode so we are discarding it.

I understand the basis for this; however I have not been able to find a way to edit the thematic type in the header/metadata. All help searches for topics such as RAT and thematic and raster type, were empty. I suppose a workaround might be to go into rastercalc and multiply by 1.0 (I can try are report back as a comment), but I'd prefer to stay in the 8-bit data type.


texts: Is there a history/log file for QGIS DB Manager?

texts:
When using PostGIS through psql I can look back through the commands I've run in ~/.psql_history.  Is there any equivalent log/history file for when I'm connected through QGIS DB Manager?

I've started looking at the source code But haven't yet found the answer!

For reference I'm running QGIS 3, PostGIS 2.4, PostgreSQL 10 on Ubuntu 16.04.


texts:
Is there a complete guide - example describing how to create an add-on/plugin for the GRASS GIS?

I would like to extend the GUI with extra menus and toolbars creating extra functionality.


texts: Terrain Profile starts a selected polyline-based graph in different directions

texts:
I´m trying to create some profile graphs with Terrain Profile in QGIS 2.10 Pisa, using LCP´s between a site and seven lithic deposits as polylines. When I select some of these lines, the graph starts counting distance/elevation points from the end of the line that is close to the site (right to left). I assume this a good behavior of the tool.

In other cases, the graph starts from left to right, creating an unrealistic profile, and making it difficult to compare properly these lines when exported individually into excel.

¿Is there a way to choose the start point of the graph provided by Terrain Profile, so I can have all the lines starting from the same end of the line?

Really don´t know what to do, maybe I'm missing something about the use of terrain profile.


texts:
Trying to add a data column to a simplefeatures point object using dplyr::left_join, but it appears to drop the sf class:

class(sf)
[1] "sf"        "data.frame"
class(df)
[1] "tbl_df"    "tbl"    "data.frame"

eg <- left_join(sf, df, by = 'common_col')

class(eg)
[1] "data.frame"

same thing happens when df is just a plain data frame. I can fix it easily enough with

eg <- st_as_sf(eg)

but this feels like an unnecessary extra step. Am I making poor function choices for what I'm trying to do, or is this an actual bug?


texts: Understanding how `gdalwarp` works under the hood

texts:
I try to understand how gdalwarp works.
Here is a reference to Affine GeoTransform, but I can't understand the terminology

pixel/line is it x,y coordinates of image?
does pixel width and height mean scaling of image?

Is gdalwarp just do affine transform as for example OpenCV's warpAffine?

But if we assume if it do usual affine tranform, how it work with such low values in affine matrix (it should just shrink image).
For example:

<GeoTransform>31.8262087982, -7.53176140574e-07, 3.42507371786e-06, 59.2404952064, 1.75338700993e-06, 3.86201833742e-07</GeoTransform>

Also I tried to find code part that related to warping but it's not very easy to read.

Here is main gdalwarp binary code. As I understand last function where transform performed is GDALCreateGenImgProjTransformer, but I'm not understand how GeoTransform used in this transform.

In this document

The GeoTransform is the geo-transformation matrix, which is in mathematics described as an affine
transformation from the coordinates in the pixel space (col,row) to the coordinates of the projected
space (X,Y), with col and row starting from 0 for the upper-left pixel (in pixel space, not necessarily
in projected space!)

Not sure what is meant by projected space.


texts: Splitting line into two lines with GRASS GIS?

texts:
I converted a raster to polygon, after converting polygon to lines I have one line of the channel of a river which border a river. But I need to split this line in two lines: left border and right border of the river.

How can I split this line in two lines, left border and right border?


texts: Passing in complex parameters to geoprocessing tool?

texts:
I'm currently using the Statistics geoprocessing tool (called Summary Statistics in the UI) from ArcObjects. This tool accepts two "complex" (for lack of a better term) arguments:

Case fields parameter: a list of attributes that are used for grouping the statistics
Statistics field parameter: a list of pairs of attribute and statistic type, indicating what to calculate for the given attribute

The only way I've been able to get it to work from ArcObjects so far is by passing strings in the format that you can see logged in the results window when you run it manually:

List (case fields parameter): a semicolon separating each element ("ELEMENT1;ELEMENT2")
List of pairs (statistics field parameter): the pair itself separated by a space, then each pair separated by a semicolon ("PAIR1ITEM1 PAIR1ITEM2;PAIR2ITEM1 PAIR2ITEM2")

Like this:

var statsGP = new Statistics()
{
    in_table = @"some\gdb\path\afeatureclass",
    out_table = @"some\gdb\path\outputtable",
    statistics_fields = "OBJECTID COUNT;SOME_OTHER_ATTR SUM",
    case_field = "GROUP_ATTR1;GROUP_ATTR2"
};
var GP = new Geoprocessor();
GP.Execute((IGPProcess)statsGP, null);

The Python examples show that you just pass in a list, but .NET arrays (a close equivalent) don't seem to work:

var statsGP = new Statistics()
{
    in_table = @"some\gdb\path\afeatureclass",
    out_table = @"some\gdb\path\outputtable",
    statistics_fields = new string[][] {new string[]{"OBJECTID", "COUNT"}, new string[]{"SOME_OTHER_ATTR","SUM"}},
    case_field = new string[]{"GROUP_ATTR1", "GROUP_ATTR2"}
};

I get the error System.Runtime.InteropServices.SafeArrayTypeMismatchException: Specified array was not of the expected type.. I also tried ESRI's VarArray as a wild stab in the dark after trying to figure out some example Java code:

static IVariantArray MakeVarArray(params object[] elements)
{
    var result = new VarArray();
    foreach (var e in elements)
    {
        result.Add(e);
    }

    return result;
}

...

var statsGP = new Statistics()
{
    in_table = @"some\gdb\path\afeatureclass",
    out_table = @"some\gdb\path\outputtable",
    statistics_fields = MakeVarArray(MakeVarArray("OBJECTID", "COUNT"), MakeVarArray("OBJECTID", "COUNT")),
    case_field = MakeVarArray("GROUP_ATTR1", "GROUP_ATTR2")
};

But it just gave a different error:

ERROR 000622: Failed to execute (Summary Statistics). Parameters are not valid.
ERROR 000623: Invalid value type for parameter statistics_fields.

Is there a cleaner way to pass complex arguments into a geoeprocessing tool in ArcObjects? I really don't want to litter my code with string building code.


texts: arcobjects update geometry Z values of line vertices with a given number

texts:
I am trying to develop arcgis 10.0 addin to update Z values of vertices of a selected line.
Scenario: The tool scans all features in a given shape file and populates the list of features which has at least one vertex with a Z vlaue = 0. User then selects a feature from the list and clicks a button to update Z values to a given height - this last part does not work.

I have tried the following for updating Z values of a selected polyline feature with no luck:

    Dim pFeatureSelection As IFeatureSelection
            pFeatureSelection = pFLayer
            Dim pEnumID As IEnumIDs
            pEnumID = pFeatureSelection.SelectionSet.IDs
            Dim id As Long
            id = pEnumID.Next
            Dim pPointCollection As IPointCollection
            Dim pFeature As IFeature
            Do While Not id = -1
                pFeature = pFLayer.FeatureClass.GetFeature(id)
                pPointCollection = pFeature.Shape

                For lPnt = 0 To (pPointCollection.PointCount - 1)
                     SetZValueOnPoint(pPointCollection.Point(lPnt), Convert.ToDouble(txtZValue.Text))

                Next

                id = pEnumID.Next
            Loop


texts: How to perform Shapefile to Raster with ArcMap 10.1 while preserving resolution and values?

texts:
I am new to ArcMap and I would really appreciate some help. I want to create a new raster using a value in a column of a point shapefile.
I have a point shapefile with points equally spaced and each placed at the center of each pixel of a raster layer. (I created this shapefile using 'Raster to point' tool)
Now I want to create a raster with the same resolution of the original raster but using as value the values of column in the shapefile table. How can I do that?

I tried running 'Point to raster'(black squares)but it's not doing what I am looking for.

This is what happens running 'point to raster' setting the cell size as the original raster:


texts: Surface reflectance product - do I always need it?

texts:
There is a neat Surface Reflectance product of Landsat imagery. I know the difference between SR and raw products: SR presents calculated values, that are supposed to represent state of the Earth surface, while "normal" products are disturbed by all kinds of scattering on the way from the Sun to the surface and back to the sensor.

Now, I'm performing a land classification of terrain to extract boundaries between two types of land use. I have many images and this is unsupervised classification. Do I really need SR product here? Would I need it, if it was supervised classification? I suppose it's no in both cases, as I don't directly compare any values between images. I just need to know exact position of this boundary.


texts: How to select point feature rendered by picture

texts:
I use GeoServer as my GIS service and render some points with pictures,
SLD code like this:

<PointSymbolizer>
    <Graphic>
       <ExternalGraphic>
         <OnlineResource xlink:type="simple" xlink:href="http://xxx/xxx.jpg" />
         <Format>image/jpeg</Format>
       </ExternalGraphic>
       <Size>32</Size>
    </Graphic>
</PointSymbolizer>

and in OpenLayers all work fine, I can see picture is rendered normally.

But the problem is, when I want to click(select) this picture,
it seems OpenLayers using WFS/WMS generated click bbox coordinates and send them to GeoServer, and if this bbox intersects with the Point(picture) coordinates, the point is selected only if I click very close to point coordinate. But when I click the edge
of this picture or not very close to the point (still inside this picture), the click query bbox generated by OpenLayers do not intersect with picture rendering point and this feature
will not be selected finally.

Simply said: there is a picture with 256*256 pixel size, rendered in GeoServer by PointSymbolizer.
This points coordinates are [128,128] (screen coordinate, center of picture).
When you click close to [128,128] this point can be selected, but when you click [250,250](still inside picture) this point can't be selected.

Any advice? thanks


texts: Get 3D length of line from contours (as attribute)

texts:
I have a road feature class (not currently Z enabled), and a contour feature class (which has elevations as an attribute).

How can I generate the 3d length of roads as an attribute?

Environment:

ArcGIS Desktop 10.3.1
Extensions: 3D Analyst, Network Analyst
5000 road features

For illustration purposes, I have generated a point feature class that is the intersection of the road and the contours.

For bonus points: is '3d length' the correct term?


texts: Is there a web service from ArcGIS that allows updating versioned SDE with ArcPad AXF data?

texts:
Here is my situation, currently we have a number of employees updating a copy of a checked out axf database using ArcPad on mobile devices.  Our current process is very time consuming since it involves uploading the axf file, checking in the axf to a version SDE geodatabase and then check out the axf again to get the most updated version of the axf with their edits, plus the checked in edits of other users.  Also, this is in a disconnect environment.  The users are usually in a remote location with limit internet access.  My question is this, does ArcGIS have a web service that will allow a user to “check in” their changes and then “check out” all the edits to update their personal copy of the axf with the most recent data?  I am looking for a solution to allow bi-directional updates to the data in almost real-time?  If anyone has done this or something like it, I would really like to hear your ideas on how to solve this issue or the reasons why this will not work?  Or if someone has a totally different approach I would like to your ideas as well.

Thanks.

Tim


texts: How to do segmentation of full raster image using OrfeoToolBox

texts: I want to do segmentation of raster image using OTB segmentation(mean-shift). But it is generating the ouput for only selected region or part of the raster image. So if i want to do the segmentation of full raster image using mean shift how can i do that?


texts:
I am building a community-run map of neighbourhood stories that should feature photos, text, audio and video recordings.

Ideally, I hoped I could use a powerful and relatively user-friendly CMS like Wordpress to collect the stories, attach a geolocation to a post and display them on a Leaflet map, possibly generating layers by category and be able to filter by date etc... Then having content (html) displayed in a description div. However, my initial search for a plugin that would help me do this has not been successful as of yet. Read here.

My requirements for this project is to find an open-source solution and I need to be able to tag posts with Lat/Lon exactly and not an address since many points of interest are out in the bush.

I have created a quick prototype with Google My Maps, just to test how the data could be displayed (here with an audio embed from Soundcloud), but eventually, I don't want to use Google's API.


texts: How to make raster cells with a certain value stand out in QGIS?

texts:
I would like to make my raster cells glow in QGIS. If I have a dataset where only a few pixels has a value, they can be pretty difficult to spot (unless I know where to look). Stretching helps a bit, but one pixel still occupies one pixel on the screen (or none at all if downsampling removed it), and I would like it to stand out.

Is there a method or a plugin that can do this in QGIS?


texts:
I need to convert an old-style projection file (created with Global Mapper) to a WKT format for use in my GIS program (ArcMap or GDAL or whatever).  The problem is that my old-style projection file has an additional parameter called "State plane scale factor" which does not seem to be recognized.  My old-style projection file is in the following format:

Projection     STATE_PLANE
Datum          NAD83_NEW_MEXICO_HPGN
Zunits         NO
Units          FEET
Zone           3002
Xshift         0.000000
Yshift         0.000000
Parameters
1.000210000 /* state plane scale factor

I can get GDAL (and probably ArcMap) to recognize that this file contains a New Mexico Central NAD83 projection, but neither does anything with the state plane scale factor.  I found this link that describes multiplying the false easting, northing, and scale factor by the local scale factor but this did not seem to fix the problem (though I think it's on the right track).  GlobalMapper will only save to the above format and will not convert this to a WKT format that can be used by other software programs.  The New Mexico Central projection is based on the Transverse Mercator projection, I'm trying to figure out a way to use the base parameters for this projection with Transverse Mercator and change them using the state plane scale factor.  Does anybody have any idea of the correct way to convert this old-style projection to the correct WKT?


texts: Deleting style categories in QGIS3 leads to incorrect feature count

texts:
If I use PyQGIS to delete style categories of a layer the feature count gets messed up:
Before deleting the category (style class) "3x20/15mm /VL" the featurecount shows 1 feature which is correct:

After deleting the 2nd category the featurecount of the class "3x20/15mm /VL" is incorrect:

I use following PyQGIS to delete the category:
layer=iface.activeLayer()
r = layer.renderer()
layerCategories = r.categories()
print(layerCategories)
r.deleteCategory(1)
#del layerCategories[0]
if r is not None:
    layer.setRenderer(r)
layer.dataProvider().forceReload()
if iface.mapCanvas().isCachingEnabled():
    layer.triggerRepaint()
else:
    iface.mapCanvas().refresh()
mView = iface.layerTreeView()
mView.refreshLayerSymbology(layer.id())

Some test data can be found here: https://gist.github.com/thbaumann/5af83e18ba2de95fb0f65256a85e2417
Is this a QGIS3 bug or am I doing something wrong?


texts: Configuring Python to avoid conflict with ArcGIS for Desktop (ArcPy)?

texts: I am trying to find the best way to configure a new version of python in my computer (windows) so that I do not have any problem with the python version that I have with ArcGIS. Is there anyway to have two versions of python and install/run anything on version 2 (say version 1 is my ArcGIS version)without having a conflict? I had to reinstall ArcGIS before due to this conflict. I am a beginner in programming and so please be patient if I am not making sense here.


texts: buffer and union in R without reducing to a multi-polygon

texts:
I would like to perform a spatial overlay to identify the polygon within which a set of points fall. However I first want to buffer and dissolve the polygons, such that points falling anywhere within merged polygons (but not within any holes) will be labelled similarly by the overlay procedure.

Unfortunately, the buffering and/or dissolving process I'm using is reducing the SpatialPolygons object to a multi-polygon. Using gBuffer creates a multi-polygon when byid=FALSE, but fails to union overlapping polygons when byid=TRUE. In the latter case, subsequently dissolving polygons with gUnaryUnion again creates a multi-polygon. Overlaying SpatialPoints with these multi-polygon results in all contained points being reported as falling within polygon 1.

Here's a related toy example with buffered points, where I'd like to do an overlay of the points with the buffered polygons:

library(sp)
library(rgeos)
pts <- SpatialPoints(cbind(c(1, 1, 2, 3), c(1, 2, 1.5, 2.5)))
plot(gBuffer(pts, width=0.6), lwd=2)
points(pts, pch=20, cex=2)
text(coordinates(pts), labels=seq_len(length(pts)), pos=4, font=2)

And the results of some overlays...

With byid=FALSE:

b <- gBuffer(pts, width=0.6)
over(pts, b)
# [1] 1 1 1 1

With byid=TRUE:

b2 <- gBuffer(pts, width=0.6, byid=TRUE)
over(pts, b2)
# [1] 1 2 3 4

With byid=TRUE and subsequent gUnaryUnion:

b3 <- gUnaryUnion(b2)
over(pts, b3)
# [1] 1 1 1 1

I am looking for the correct method to achieve the outcome 1 1 1 2, i.e. points 1, 2 and 3 fall within polygon 1 (previously polygons 1, 2, and 3, which have been merged), and point 4 falls within polygon 2 (originally polygon 4).

EDIT

My true data include holes, and ideally I'd like to be able to conserve them. I've updated the example data above to include a hole after buffering.

Applying @JeffreyEvans's approach to these polys:

polys <- b@polygons[[1]]@Polygons
pl <- vector("list", length(polys))
for (i in 1:length(polys)) { pl[i] <- Polygons(list(polys[[i]]), i) }
b.spolys <- SpatialPolygons(pl)
row.ids <- sapply(slot(b.spolys, "polygons"), function(i) slot(i, "ID"))
b.exploded <- SpatialPolygonsDataFrame(b.spolys, data.frame(FID=as.numeric(row.ids)))

results in:

over(pts, b.exploded)

#   FID
# 1   2
# 2   2
# 3   2
# 4   1

which is the expected outcome (I'm not too fussed about the poly order - 2,2,2,1 vs. 1,1,1,2), but b.exploded has lost the information about the hole, instead representing it as a non-hole polygon. It obviously doesn't affect the outcome for the toy example, but an overlay involving points located in the hole will be misleading, e.g.:

in_hole <- SpatialPoints(cbind(1.375, 1.5))
over(in_hole, b.exploded)
#   FID
# 1   2


texts: using a linear solver to get a "centre of gravity" of a set of points

texts:
As a programmer, if I have a linear solver available. How can I formulate the following problem as a set of constrains / decisions / goals for the linear solver?

I have a matrix of say 10*10, so 100 points (potential depots).

I randomly select 10 of those points as "Customers".

Now I would like to "solve" the point(s) totalling the shortest distance from the 10 "Customers" and I would like the coordinates of that point.

One "depot" point is so easy it doesn't need a solver, however solving the two "depot" points that combine to give the shortest distances to all the "customers" is tough, so needs a solver.

I can use the K-means to do this, however I would like to know if and how I can use a linear solver to do the same thing.


texts: How to devise the time to cross a raster's cell knowing the speed of movement?

texts: Let's assume I have a raster representing the speed of movement in Km/h, and the raster cell size is, say, 500m. Am I correct in understanding that, in order for me to calculate the time it takes to cross one cell, I can use the following formula: t=space/speed? In this case, the time would be 500 divided by the speed in Km/h. While I believe that that is generally correct, what I cannot wrap my head around is if one has to account for cell size, e.g. multiplying (or dividing) the resulting figure by the cell size of the raster. I mean, space/speed in Km/H gives the time to cross 1km. But, since my raster cell size is 500m (i.e., less than a Km, actually half), is another step needed to account for the difference?


texts:
Openlayers 3 knows the ol.control.FullScreen() control. When pressed you will get a fullscreen map.

What I would like to know is: to what event should i listen te detect the fullscreen control is pressed?

In this event I would like to do a zoom-to-extent like this:

var extent = source.getExtent();
map.getView().fitExtent(extent, map.getSize());


texts:
I am currently using Leaflet 1.6.0 stable version. Everything works fine except the page is preventing scroll on iOS phones (tested on Safari & Chrome). I have done some workarounds via this thread. Already set dragging & tap as false and still not working. Have tried other events also like scroll wheel.

Does anyone find the solution yet!


texts:
I'm looking for a way to merge Sentinel 2 jp2 band files(B02, B03, B04) and fix RGB colors. All should be done with bash or python script. For my example I work on these images. Ideally the solution will be close to this tutorial.

I'm able to merge the bands with this command

gdal_merge.py -separate -co PHOTOMETRIC=RGB -o merged.tif B04.jp2 B03.jp2 B02.jp2

But for some reason I can't fix RGB colors with imagemagic command. The output is ~700MB black image.

convert -channel B -gamma 1.05 -channel RGB -sigmoidal-contrast 20,20% -modulate 100,150 merged.tif merged-cc.tif

Eventually I would like to have geotiff file to upload it on mapbox. Explanation of how one should choose convert parameters is welcome.

I'm developing an application that should guess which part of the satellite image is agricultural land. A scene image will be cut into smaller patches(maybe 64x64) and will be classified by CNN(crop or non-crop). I use this dataset to train Inception-v3 model. The dataset contains 64x64 RGB images with 10m spatial resolution.

More info about merged.tif

Band 1 Block=10980x1 Type=UInt16, ColorInterp=Red
  Metadata:
    STATISTICS_MAXIMUM=4818
    STATISTICS_MEAN=320.61101402206
    STATISTICS_MINIMUM=0
    STATISTICS_STDDEV=536.76609312554
Band 2 Block=10980x1 Type=UInt16, ColorInterp=Green
  Metadata:
    STATISTICS_MAXIMUM=4206
    STATISTICS_MEAN=350.98505344194
    STATISTICS_MINIMUM=0
    STATISTICS_STDDEV=534.43264268631
Band 3 Block=10980x1 Type=UInt16, ColorInterp=Blue
  Metadata:
    STATISTICS_MAXIMUM=3801
    STATISTICS_MEAN=364.44611471973
    STATISTICS_MINIMUM=0
    STATISTICS_STDDEV=544.55509661709

This is merged.tif before and after applying @ben's solution


texts:
I have 3 modis tiles that I want to merge together. They were all reprojected in the same CRS (from sinusoidal to WGS84 UTM zone 32 N), but I cannot succeed. I have tried with merge and virtual raster, but as a result, I get a mismatched map.
I tried also the GRASS tool r.patch: in this way the tiles match, but the pixel values are different with respect to the original rasters. I cannot figure out what I'm doing wrong...


texts: Qfield cannot load GeoPackage raster data exported with Qgis 3.8.0.  Download vector data from the gpkg file.  The test with a single raster file in a GeoPackage also failed.


texts:
I'm asking a question which has already been touched upon in the two questions below. But from a slightly different angle.

I have one openlayers webmap produced in qgis 3.0 which I would like to display on my wordpress blog. I have seen suggestions here which suggest using cartoDB or another plugin but I am on the free version of Wordpress and don't have the funds to pay a large monthly subscription (I'm a hobby mapmaker so don't have any money coming in from the work). Other older posts here have suggested hosting the html code on google drive but that no longer works either.

Does anybody have any sugestions for this?

The map is of early-modern european witch trials so if anyone has a suggestion of a site/blog who would host it I'd be interested to know as well.

Two earlier questions with a similar topic:

Adding ArcGIS Online Webmap to QGIS?
Embedding qgis2web exports into WordPress?


texts: Getting polygons from PNG images for the QGIS Shapefiles

texts:
I would like to have ready polygons (borders) from some .PNG image and use them in QGIS as a shapefile.

My file looks like this:

which is crude raster PDF.
My goal is to execute all borders (marked orange) as a simple shepefile polygons, as we know i.e from NUTS1 division.

I converted my PNG file into the vector graphic (SVG) image, thinking that it will be easier to save it in some format.

I used for this purpose the Inkspcape, where I selected option Path -> Trace Bitmap, and then selected colour threshold in order to distinguish these borders with the background. Unfortunately the names also came through, making whole graph difficult to manage.

I started to remove the names manually, but id doesn't make sense, since some of them are sticked to the borders and binded as one layer.

So now I need to find some way to quick separation of the names from the borders, and further I can think about geotagging this SVG graph in QGIS.

However I think, that maybe some less awkward and quicker option is available?

I found something here:

Convert PNG image to Shapefile in QGIS

https://www.safe.com/convert/png/arcgis-shp/

First one doesn't help a lot, and 2nd one requires bigger involvment, which probably is not for free.

I am aware of ready shp administrative (and other) databases, but in this event I need some own.

Is someone able to help?


texts: I can see the source code of the core QGIS plugins from the repository in github. I want to use the code snippets of "information about object" tool of QGIS. I tried searching in program files but I'm having trouble finding the code. Someone could help?


texts: Arc 1960 / UTM zone 36S to Lat Long for Google Maps

texts:
I have this coordinate (778597.3125000001, 9148353). I am told this coordinate is Arc 1960 / UTM zone 36S.
When I go here: https://epsg.io/21036 and click "Get Position on Map" and enter in the above utm coordinates, it places the point in the correct place on the map (At the corner of a field).
What kind of transform/projection do I have to do to make it Lat Long, and then go to the same point in Google Maps?
I have tried various ways but seem to end up 400 - 200m diagonal offset.
The correct lat long should be: Lat: -7.699944 Long: 35.5262575 (corner of the field, see link below):
https://www.google.com/maps/place/7%C2%B041'59.8%22S+35%C2%B031'34.5%22E/@-7.6999387,35.5240688,1108m/data=!3m2!1e3!4b1!4m5!3m4!1s0x0:0x0!8m2!3d-7.699944!4d35.5262575
I am using DotSpatial.
            var Arc1960UTMZone36S = KnownCoordinateSystems.Projected.UtmOther.Arc1960UTMZone36S;
            Arc1960UTMZone36S.AuthorityCode = 21036;

            var WGS1984 = KnownCoordinateSystems.Geographic.World.WGS1984;
            //4326 google earth
            //3857 for google maps
            WGS1984.AuthorityCode = 3857;

            double[] xy = new double[2] { 778597.3125000001, 9148353 };
            double[] z = new double[1] { 0d };

            Reproject.ReprojectPoints(xy, z, Arc1960UTMZone36S, WGS1984, 0, 1);

            var latitude = xy[1];
            var longitude = xy[0];

            Debug.WriteLine($"Lat: {latitude} Long: {longitude}");

Would anybody know why it is offset?


texts: Change coordinate projection R shapefile

texts:
I'm completely new with plotting geographical data in R but I think I've come quite far already.

What I have is a data frame in R that has coordinates like this (see latitude and longitude print of subConcSumID at the end) and a hypothetical value that I want to plot as "temperature" contour plot.
Values of latitude and longitude are from GPS looking like: 44.7338 by 12.61517

I've imported a shapefile that I created with QGIS (latest version) from a coastline map of Europe, of which I successfully clipped a much smaller region. The CRS of the shapefile is set to EPSG: 4326, WGS 84
If I import this into R with readShapePoly function, I am able to plot the shapefile. It looks like this:

As you can see, the coordinates are looking like 2400000 by 4650000

As a result R can not combine the shape plot and the geompoint plot as the coordinates do not overlap.

Any suggestions how to get the coordinates of the shapefile converted to the same system as my GPS coordinates in my data frame?

I was copying the code found here:
How to clip a shapefile to an interpolated surface (contours) in R?

It all works combined with the answer giving there, except for the coordinate format issue

df$Latitude
44.93461 44.93444 44.93439 44.93343 44.93306 44.93160 44.93112 44.93392    44.93410 44.92855 44.93066 44.93146 44.93044 44.93192 44.93107 44.92988
44.93042 44.93033 44.92962 44.92703 44.92606 44.92434 44.92587 44.92727  44.90031 44.89065 44.73886 44.73962 44.73715 44.73664 44.73617 44.73544
44.73510 44.73677 44.73654 44.73722 44.74338 44.76730 44.77837 44.77568  44.77460 44.76983 44.76714 44.76444 44.75158 44.74025 44.73822 44.73979
44.73725 44.73839 44.73885 44.73471 44.73119 44.73150 44.73135 44.73221  44.73329 44.73579 44.73665 44.73333 44.72992 44.71040 44.66978 44.64047
44.61106 44.58175 44.55234 44.52230 44.49216 44.46211 44.43252 44.40293  44.37327 44.34381 44.31459 44.28541 44.25655 44.22788 44.19921 44.17162
44.14722

df$Longitude
12.61517 12.61588 12.61609 12.70083 12.70032 12.69832 12.69767 12.75989  12.75921 12.76117 12.79462 12.82265 12.82374 12.82424 12.82414 12.82387
12.84457 12.88025 12.88547 12.88555 12.88558 12.88563 12.91230 12.94371  12.88679 12.85946 12.45061 12.44542 12.44771 12.44493 12.44231 12.43971
12.43683 12.44468 12.44698 12.44857 12.45177 12.45009 12.44917 12.44919 12.44919 12.44923 12.44924 12.44926 12.44934 12.44942 12.44881 12.44186
12.45015 12.45394 12.45040 12.47730 12.50563 12.50428 12.50428 12.53437 12.56735 12.60163 12.63081 12.62973 12.62862 12.62648 12.62292 12.62134
12.61974 12.61816 12.61657 12.61541 12.61426 12.61312 12.61185 12.61058 12.60957 12.60842 12.60518 12.60230 12.59826 12.59321 12.58850 12.58288
12.57463

Dummy data to plot:

df$Counts
1472, 1984, 1794, 2614, 2768,  708, 226, 382, 352, 2196, 2324, 2882, 3026, 1864, 754, 3414, 3260, 3254, 2982, 1546, 708, 2902, 3000, 2798, 2400, 2764, 1968, 1498, 436, 1268, 1766, 1884, 1830, 2008, 1390,  942,  950,  984, 1000, 762, 952, 984, 1668, 1270, 1018, 692, 1472,  872, 1232, 1230,  848, 758, 780, 694, 1228, 1130, 938, 1362, 2658, 2306, 2724, 2602, 2538, 1978, 2126, 1678, 1578, 1454, 1498, 1320, 1434, 1134, 1048, 1022, 1056, 914, 562, 706, 1022, 1102, 560


texts: How to add png image with esri javascript api MapImageLayer Class?

texts:
I have a png image that we host that I need to resize and overlay onto a map at specific gps coordinates. Would this be an image class? I can't seem to find any examples that match up with my needs. I can find lots of examples of ArcGIS service layer examples but I don't think this is what I'm looking for. Any ideas?

EDIT

I found that what I want to do is in the MapImageLayer class.

This version works but its in the old 2.5 version

<script>var dojoConfig = { parseOnLoad: true };</script>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.5"></script>
<script>
  dojo.require("dijit.layout.BorderContainer");
  dojo.require("dijit.layout.ContentPane");
  dojo.require("esri.map");
  dojo.require("esri.layers.MapImageLayer");

  var map;
  function init() {
    var initExtent = new esri.geometry.Extent({"xmin":-9005991,"ymin":3866418,"xmax":-8620442,"ymax":4022043});
    map = new esri.Map("map",{extent:initExtent});
    var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
    map.addLayer(basemap);

    // create and add the layer
    var mil = new esri.layers.MapImageLayer({
      //'id': 'usgs_screen_overlay'
    });
    map.addLayer(mil);

    // create an add the actual image
    var mi = new esri.layers.MapImage({
      'extent': { 'xmin': -8864908, 'ymin': 3885443, 'xmax': -8762763, 'ymax': 3976997},
      'href': 'http://il.water.usgs.gov/_ags60fb0c9554ef42a58e7024d8464a2ecb.png'
    });
    mil.addImage(mi);

    dojo.connect(map, 'onLoad', function() {
      dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
    });
  }
  dojo.ready(init);
</script>

This version does not work but its the newer 3.7 version (the one I'd like to work)

<script src="http://js.arcgis.com/3.7/"></script>
  <script>
  require([
  "esri/map",
"esri/layers/MapImageLayer",
  "esri/layers/MapImage"

  ], function(
Map, MapImageLayer, MapImage
  ) {
var map = new Map("mapDiv", {
  center: [-56.049, 38.485],
  zoom: 3,
  basemap: "streets"
  });
  map.on("load", function() {
  // create and add the layer
    var mil = new MapImageLayer();
    map.addLayer(mil);

    // create an add the actual image
    var mi = new MapImage({
      'extent': { 'xmin': -8864908, 'ymin': 3885443, 'xmax': -8762763, 'ymax': 3976997},
      'href': 'http://il.water.usgs.gov/_ags60fb0c9554ef42a58e7024d8464a2ecb.png'
    });
    mil.addImage(mi);
});

});

I just can't seem to find what I'm missing or have wrong.


texts: Tool in Tool Palette as a parameter for Button

texts:
I built a simple toolbar with Tool Palette and Button.
Button should make a selection according to a global parameter which can be set by selection of Value in Palette box.

I.e. if I choose number "1", pressing the button on the right will select layer by attribute value like  for example "PAR =1".

I tried something like this:

class ONE(object):
    """Implementation for SelectNlevelTest_addin.ONE (Tool)"""
    def __init__(self):
        self.enabled = True
        self.shape = "NONE"
        global par
    def onMouseDown(self, x, y, button, shift):
        global par
        par = "par = 1"
    def onMouseDownMap(self, x, y, button, shift):
        pass
    def onMouseUp(self, x, y, button, shift):
        global par
        par = "par = 1"
    def onMouseUpMap(self, x, y, button, shift):
        pass
    def onMouseMove(self, x, y, button, shift):
        pass
    def onMouseMoveMap(self, x, y, button, shift):
        pass
    def onDblClick(self):
        pass
    def onKeyDown(self, keycode, shift):
        pass
    def onKeyUp(self, keycode, shift):
        pass
    def deactivate(self):
        pass
    def onCircle(self, circle_geometry):
        pass
    def onLine(self, line_geometry):
        pass
    def onRectangle(self, rectangle_geometry):
        pass

But setting PAR in defs onMouseUp and onMouseDown doesn't help, it tells that value 'par' is not defined.
If I set PAR in def __init__(self), it makes selection, but only by one parameter ignoring pressing other number.

Is that possible to set the parameter by pressing the button from Tool Palette?


texts: Prevent popup from appearing when clicking outside WMS layer

texts:
I am projecting a WMS layer on a map using OpenLayers and Geoserver. The next thing I want to do is to display info on any given feature in my WMS-layer in a pop up whenever a user clicks it.

This is all working fine, but my problem is that whenever I click outside the WMS layer, I get an empty pop up. However, I only want a pop up to appear when a user clicks an actual feature.

Does anyone know how to fix this?

Code:

info = new OpenLayers.Control.WMSGetFeatureInfo({
    url: 'http://../geoserver/cite/wms', title: 'Vraag informatie op over een melding door erop te klikken',
    queryVisible: true,
    eventListeners: {
    getfeatureinfo: function(event) {
        deletePopup();
        popup = new OpenLayers.Popup.FramedCloud( "chicken", map.getLonLatFromPixel(event.xy), null, event.text, null, true );
        map.addPopup(popup); } } });
map.addControl(info); info.activate();


texts: In the EPSG dataset obtained from https://epsg.org/home.html where to find the values to fill up the field of +proj =" or +zone= " (to be in proj.4 string)from the database itself? Will the data be taken from a given table or is it taken from somewhere else or is it hardcoded?


texts: Help with Draping an Image over a TIN in FME for viewing in MeshLab or Similar

texts:
I'm using FME to generate a TIN from a LiDAR point cloud, and everything is working except for draping an image over the resulting TIN.

I've read all the FME help pages, and checked out the examples that are easily googled.

I'm currently doing the following:

Selecting the last-strike from the LiDAR point  cloud
Generating a TIN
Clipping an ECW to the area of interest
Using an AppearanceStyler on the image, and then AppearanceSetter with the TIN going into the geometry port and the image into the appearance port
Writing the result out to Collada and OBJ formats, as well as viewing the results in the inspector

The TIN is visible in MeshLab, and looks fine, but I can't get a texture (draped image) to show up! I can't see it in the Collada or OBJ files, and not in the inspector, so I think something is wrong in the workspace.

Anyone got a methodology that will work?


texts: ArcMap ModelBuilder Iterator running only once and generating non-unique outputs

texts: I'm trying to generate LST from landsat tiles using modelbuilder in ArcMap. I have used Iterators and Sub-Models inside the Main Model but the problem is that whenever I run the Main Model, it only runs once. Another issue is that the "Name" string that comes with the iterator is not being imported into the main model (It is specified in the output of sub-model) Screenshots of the model shared.


texts: Mapbox choropleth map without the in-between colors?

texts:
I am new to Mapbox and love the simplicity of creating choropleth maps with stops, and while I prefer the way Mapbox colors each polygon relative to where the value falls between stops by blending the stop colors, I need to replicate maps created where colors are assigned according to value bins and have so far not found mapbox gl examples.

I mocked up a simple example of a 3-color map created in QGIS:

... and below is the same map as mapbox map with the same 3 colors and how I set the fill colors using stops.  I think I need to use a mapbox expression that says something like "case when households between 0 and 10000 then #d7191c..." rather than using stops to replicate my QGIS map, but I'm not sure how.

"paint": {
    "fill-color": {
        property: "households",
        stops: [[0, '#d7191c'],
                [10000, '#ffffbf'],
                [25000, '#2b83ba']]
    }
}


texts: prohibited: getting knowledge from GoogleEarth photos/videos, and use it for own map?

texts:
Is it prohibited to use knowledge you get from proprietary images or videos?
Example: I found a geotagged photo (ponramio) in Google Earth with a well on it. So I know: "Ah, there is a well where I can get water!". Can I use that knowledge to mark that well on my map? ...


texts: Making polygon from two distinct polygons

texts:
I need to merge 2 distinct polygons into 1 polygon. My polygons are GeoJSONs.

Let's take for example these two polygons:

The result must be a polygon type and not a multi-polygon type.

My understanding is that if I merge\concatenate\union\dissolve them, I will get 1 entity (1 polygon) as I wanted, but with two different geometries, which inevitable will create a multipolygon.

In order for me to get what I want, I must somehow connect their geometries so it will be continuous and not discrete. So I'll have to do something that will result in this picture:

I need the final area of this polygon to be minimized, so, creating, for example, a convex hull around these polygons is not a good solution.

Are there any ideas on how to implement it in Python or QGIS or anything else?


texts: Orfeo TrainClassifier tool not working in QGIS

texts:
I have been using Orfeo Toolbox with QGIS (version 2.18.0) to do image classification.

I was following this tutorial on YouTube on the SVM classifier. I have followed steps 1 and 2 as described, and obtained output. However, in step 3, my dialog box produces no output and the following message:

ERROR: Parameter -classifier.svm.m does not exist in the application.
Converting outputs
Loading resulting layers
Algorithm TrainImagesClassifier (svm) finished

Now it appears to me that this particular part of Orfeo toolbox does not seem to be installed properly. Is that so? Is there a way to fix it?

I do not have administrative privileges on my PC and cannot use this method to install the toolbox. I have downloaded binaries from the orfeo toolbox website directly and supplied the path to that folder in QGIS. Does that not work?


texts: how multiply a ranges of values for other value on python

texts:
I need multiply ranges>1.5 and <=4.5 * 9,
but I am new in this type of language.
please help me.

def CalcD(Level_water)
  if Level>1.5 and <=4,5 * 9


texts: How to update feature positions with clustering in OpenLayers?

texts:
I have an OpenLayers 2.12 map with a vector layer with a cluster strategy. All the static behavior is how I want it. Now I'd like to add the possibility to update the features' position. I do this with refresh code outside of the OL API, so I can easily add extra events, options lists and so related to the incoming data.

The problem is that the clustering strategy doesn't update the position for features inside a cluster. If they are not clustered, they are moved.

At first, the features are added to an array and then the array is stored and used to add all the features to the layer:

var myUnit = {
...
this.layer = new OpenLayers.Layer.Vector(
        "Voertuigen",
        {
            strategies: [
                new OpenLayers.Strategy.Cluster({
                    active: true,
                    autoActivate: true,
                    distance: this.clusterDistance,
                    threshold: this.clusterThreshold})
            ],
            styleMap: new OpenLayers.StyleMap({
                "default": style,
                "hover": hoverstyle
            }),
            isBaseLayer: false,
            rendererOptions: {yOrdering: true}
        }
    );
...
myUnit.layer.addFeatures(myUnit.features);

and for the update of the position I find the feature in myUnit.features array and move it

feature.move(pos_lonlat);

This works for all features not in a cluster. I tried many other things, including removing all the features from the layer and re-adding them. Strangely this also doesn't move the cluster.

How can i trigger the strategy to recluster everything?


texts: Can't find OTF (on the fly) check box in QGIS 3

texts:
Just updated to QGIS 3 and I am trying to sort out a projection issue.

I have 2 layers, same projection but hugely different scales. My research suggests that setting the OTF check box should solve this.

Sounds sensible, but I can't find the OTF check box! Any ideas?


texts: How do I find out if a given lat lon is in a KML Linear ring using shapely?

texts:
I'm a GIS basic/novice user.

I have some LinearRings in a KML file that give the areas for a bunch of different regions.  And then I (will) have some lat lons that I want to test to see if they're in any of the (about 8) different regions that I have LinearRings for.  I want to use python and shapely looks like it's a good fit, but it doesn't deal with kml data at all.

Is there a standard way to do things like load KML that I can then import into shapely?


texts: Which census geography boundaries do congressional districts preserve?

texts:
Tried searching for this information elsewhere and couldn't find a clear answer in the TIGER documentation, so I thought I'd turn to you good folks.

Obviously, congressional districts can cut across counties and 'cities', but which census geography boundaries do they preserve (if any)? Tracts? Block Groups? Blocks?

I suppose I'm most interested in learning what is the largest type of census geography whose boundaries are preserved by congressional districts in every case.

Thanks in advance!


texts:
I was wondering if it exists a way to create variable buffers where the radius is given by a process of maximization of the mean value of a raster.

I have a point vector data and I would like to create variable circular buffers around these points where the variable distance is given by a process of maximization. In particular, the variable distance has to be the one that maximize the mean population in the buffer zone (and I have a raster of the population in a given country).

In the end should be something like in the picture but the radius should be the result of the maximization process described above.

There is some plugin able to do that?


texts:
In QGIS I am trying to create a new point layer based on the mid point of a line layer (and keep all the feature attributes in the table).

For example, one line feature becomes one point, located on the mid/center point of the line. Points to lines only seems to work on nodes, and Create points along lines only seems to work at fixed distances?


texts:
I'm collecting road accidents from an API through a Python request and getting my response as JSON. The JSON response contains coordinates and general information as below.

{u'RESPONSE': {u'RESULT': [{u'Situation': [{u'Deviation':
[{u'Geometry': {u'WGS84': u'POINT (16.109539 60.9519234)'},
u'MessageCode': u'Tj\xe4lskada', u'IconId': u'frostDamage',
u'RoadNumber': u'V\xe4g 877', u'LocationDescriptor': u'V\xe4g 877 i
Falu kommun i Dalarnas l\xe4n.'}, {u'Geometry': {u'WGS84': u'POINT
(16.109539 60.9519234)'}, u'MessageCode': u'Viktbegr\xe4nsning
g\xe4ller', u'IconId': u'trafficMessage', u'RoadNumber': u'V\xe4g
877'}], u'PublicationTime': u'2019-03-13T19:45:25'}]}]}}

What I want to do is to create a shapefile with the coordinates I have in my JSON response in Python. Any tips?


texts: How can polymaps grab polygons from a database?

texts:
From my understanding polymaps uses po.features() or po.geoJson to display polygons on a map.

The former you embed your polygons in the javascript.
The latter, you embed your polygons in a .json file and load them in.

So how can I pull directly from the database?

Thanks!


texts: QGS 3x Ordnance Survey map doesn't overlay the Google Maps properly

texts:
I would like to ask you how can I fix the overlaid of the. Geotiff Ordnance Survey maps with the XYZ Google Maps.
I know, that Google uses the EPSG:4326 WGS84 ordinance system, whereas Ordnance Survey uses OSGB British National Grid EPSG 27700. I know also where to change the CRS, but if I change the CRS in my project reference it still comes with the wrong overlay.
Unfortunately, the difference is too big, over 2m. How can I make it matching to Google Maps overlay? If I can't is there a way to trim down these differences?

I have an option to transform my coordinates, but I don't know which one should be correct.

The query below shows pretty much the opposite side of my exercise

Transforming Google Maps overlay to fit Ordnance Survey projection

Thanks


texts: Losing Grass tools after openlayers installation in QGIS 2.16

texts:
QGIS 2.16 is running well until I install the openlayers plugin. Then qgis loses the grass connection.

After deactivating or uninstallation everything works fine again.


texts: Attribute table not changing when using Mosaic on rasters

texts:
I'm looking to "merge" 2 rasters together. One is the original base land cover raster with 6 classifications/land use classes. The other is a raster from converted polygons that are essentially "updates" or "improvements" on one particular class.

I thought mosaic would do the trick, and it did. My new raster has my new updated classifications, BUT, when I go into the attribute table, the COUNT for each class remains the same! For example, if 'agriculture' changed to the new updated forest, then my COUNT for agriculture should go up, while that for forest should go down.

Is there another way to "merge"/"combine" these two raster layers that updates the attribute table along with it?

I'm also planning on adding a new class to this raster. Would mosaic also work for that?

I also tried raster calculator but that seemed to do the same thing as combine, outputting only the areas of the new updated raster (so AND/intercept, while I need OR/union).


texts: Adding attachments to feature with ArcPy

texts:
I was trying  to add some pictures as attachments to my features in a feature class in a .mdb with ArcPy. I'm fairly new to this, so I was just playing with some test data and I modified the demo codes from ArcGIS tutorial like this:

# encoding: utf-8
import arcpy
import _csv
import os
import sys

arcpy.env.workspace = "F:/全国省级、地市级、县市级行政区划shp/全国省级、地市级、县市级行政区划shp/New Personal Geodatabase.mdb"
input = "F:/New Personal Geodatabase.mdb/Province"
inputField = "OBJECTID"
matchTable = r"F:\matchtable.csv"
matchField = "OBJECTID"
pathField = "Picture"
picFolder = r"F:\MGS"

writer = _csv.writer(open(matchTable, "wb"), delimiter=",")
writer.writerow([matchField, pathField])

for file in os.listdir(picFolder):
    if str(file).find(".jpg") > -1:
        writer.writerow([str(file).replace(".jpg", ""), file])

del writer

arcpy.EnableAttachments_management(input)
arcpy.AddAttachments_management(input, inputField, matchTable, matchField, pathField, picFolder)

(Because I'm Chinese, so the file name contained Chinese character. However, in other applications this file name worked with no problem)

Then I got error like this:

Traceback (most recent call last):
  File "F:/���ֿμ��͹�������/ʵϰ/ArcPy Sandbox/AutomateScript/BatchAddAttribute.py", line 29, in <module>
    arcpy.AddAttachments_management(input, inputField, matchTable, matchField, pathField, picFolder)
  File "F:\ArcGIS 10.2.1\Engine10.2\arcpy\arcpy\management.py", line 124, in AddAttachments
    raise e
arcgisscripting.ExecuteError: ERROR 000228: Cannot open the dataset.
Failed to execute (AddAttachments).

ArcGIS version is 10.2

Any idea why?


texts: Need to arrange the point features in a row or inverted triangle

texts:
Need to arrange the overlapping point features in a row or inverted triangle which are in same layer with 0.1 offset.
enter image description here
ps://i.stack.imgur.com/B8idh.png


texts: How to create and empty SpatialLinesDataFrame in R

texts:
I need to create and SpatialLinesDataFrame with a predefined structure (9 fields). I'm performing a function over a list of shp which I want to append to this empty spatiallinesdataframe.

I already know how to save each shp within a folder and then merge all, but now, I'd like to merge all the sph within the iteration to avoid save and reread steps.


texts: Importing Google My Maps Route as Google Earth Tour

texts:
The goal: I would like to create a video of a route, as it would appear if one could smoothly trace through the entire route in Google Street View. (See an example of the previous solution using Google Street View Player (GSVP).

In Google Maps, it is only necessary to designate starting and ending point, not trace along each step of the route. Unfortunately, without GSVP, there doesn't seem to be a way to create the desired route video in Google Maps anymore.

I didn't see a way to export a KML from Google Maps, so I used Google's My Maps to sketch out a route, and exported that route as KML. Then I imported the KML into Google Earth Pro (GEP). Now, in GEP, I am looking at the territory in question, with a nice blue line across it, signifying the desired route.

What I'm missing is a way to persuade GEP to treat that blue line as a path to be followed in a video tour in GEP's Street View. I'm thinking this would give me an alternative to the GSVP output.

Possibly it just won't work that way. In that case, I welcome alternate suggestions for achieving the goal.


texts: Different areas calculated for dissolved and original shapefiles?

texts:
I have a multipart feature class, with 511 features. The sum of the area is 84,083 hectares. However when I dissolve this feature class, the total area has changed to 83,467 hectares. Areas were calculated using Calculate Geometry operation. Projection and coordinate system are the same.

How could this happen?

I have used erase, intersect, clip and symmetrical difference - none of these geoprocessing tools could detect the difference.


texts: Set size of a simple marker Symbol in QGIS

texts: I am having trouble setting the size of a simple marker. My marker is a circle and I want it to have a radius of 500m. How could I possibly do this? The only options that I see are Millimeters, Points, Pixels, Meter at scale, Map Units, Inches.


texts: Adding legend icons for vector features in OpenLayers?

texts:
I am looking for ways to add legend icons for vector features in OpenLayers. I am aware that GeoExt does this and have trawled through the code - but its not at all clear to me how it functions.

Can you provide pointers to examples and/or pseudo code?


texts:
Sorry for the simple question .... but something odd is happening in ArcMap & I don't know why.

When I want to align text or features relative to each other, they are aligning relative to the layout screen instead.  For example, if I wanted my north arrow to be perfectly centered in a text box, they are perfectly centered, however, ArcMap is moving them to the center of paper space instead of moving them relatively positioned in relation to the "last" element I selected (the way the command is supposed to work).  Am I overlooking something simple here?  It's very annoying, as I have to manually move everything back where it belongs every time.


texts: How do I avoid this osm2pgsql duplicate key error in Windows?

texts:
I am attempting to load an OSM .bz2 file into a PostGIS database using osm2pgsql but am stuck at a duplicate key value in the nodes which violates a unique constraint - any suggestions? output is below:

    C:\Temp>osm2pgsql -s -C 3000 -U postgres -W -d POSTGIS -S C:\temp\default.style
    us-west-latest.osm.bz2
    osm2pgsql SVN version 0.69-21289M

  Password: Using projection SRS 900913 (Spherical Mercator) Setting up
  table: planet_osm_point NOTICE:  table "planet_osm_point" does not
  exist, skipping NOTICE:  table "planet_osm_point_tmp" does not exist,
  skipping Setting up table: planet_osm_line NOTICE:  table
  "planet_osm_line" does not exist, skipping NOTICE:  table
  "planet_osm_line_tmp" does not exist, skipping Setting up table:
  planet_osm_polygon NOTICE:  table "planet_osm_polygon" does not exist,
  skipping NOTICE:  table "planet_osm_polygon_tmp" does not exist,
  skipping Setting up table: planet_osm_roads NOTICE:  table
  "planet_osm_roads" does not exist, skipping NOTICE:  table
  "planet_osm_roads_tmp" does not exist, skipping Mid: pgsql, scale=100,
  cache=3000MB, maxblocks=384001*8192 Setting up table: planet_osm_nodes
  * WARNING: intarray contrib module not installed
  * The resulting database will not be usable for applying diffs. NOTICE:  table "planet_osm_nodes" does not exist, skipping Setting up
  table: planet_osm_ways NOTICE:  table "planet_osm_ways" does not
  exist, skipping Setting up table: planet_osm_rels NOTICE:  table
  "planet_osm_rels" does not exist, skipping

  !! You are running this on 32bit system, so at most !! 3GB of RAM can
  be used. If you encounter unexpected !! exceptions during import, you
  should try running in slim !! mode using parameter -s.

  Reading in file: us-west-latest.osm.bz2 Processing: Node(113650k)
  Way(0k) Relation(0k)COPY_END for COPY planet_osm_nodes  FROM STDIN;
  failed: ERROR:  duplicate key value violates unique constraint
  "planet_osm_node s_pkey" DETAIL:  Key (id)=(2147483647) already
  exists. CONTEXT:  COPY planet_osm_nodes, line 98676608

  Error occurred, cleaning up

Thanks!


texts: PostGIS geocoder with TIGER data. Getting county from address?

texts:
I have installed PostGIS with the geocoding extension and have loaded 2019 TIGER data for all the states.
How can I get the county for a US address? I would have the full address available. Example: 12417 Tropic Dr Jacksonville, FL 32225


texts: dist2Line - Error in dist2Line(...) could not find the function "dist2Line"

texts:
I have a csv file with points (about 20 millions georeferenced points) and a line shapefile. I want to find for each point the closest distance to the line. The line is not a straight line it's actually a border between 2 countries.
I am trying to use dist2Line function but I get the following error message : Error in dist2Line(points,line,distfun=distHaversine) : could not find the function "dist2Line"

library(sp)
library(raster)
library(rgdal)
library(rgeos)

points <- read.csv(file = "~path/points.csv", stringsAsFactors=FALSE)
    line <- reagOGR(file="~path/","line")
    d <- dist2Line(points, line, distfun=distHaversine)

Does anyone ever met this issue? Is there an alternative way to compute the closest distance matrix from each point to the line?


texts:
I am bit confused about datums used to define a localised coordinate system for a specific area. Definitions say that, datum defines how a certain well-established point (i.e., reference point) on earth is located on a reference ellipsoid used to model that area. So, it establishes latitude and longitude of that reference point on earth with GPS or other means. My question now is, with respect to which reference frame are these latitude and longitude measured? is it always wrt earth-centric WGS84 or ITRS? So, when a textbook says, the coordinate of a NAD27 reference point is 39°13′26.686″ north latitude, 98°32′30.506″ west longitude, is it measuring these values from Equator and Greenwich respectively on physical earth surface or on a reference ellipsoid? How coordinates of this point was established before GPS was in place?

On the other hand, when GPS is used to establish the coordinate of a reference point, isn't it always measuring the lat. and long. on the ellipsoid corresponding to WGS84?

I haven't found any textbooks that explain it in a simple way.


texts: Projecting OpenStreetMap data in PostGIS

texts:
I've loaded an extract of Openstreetmap data into a Postgresql database with PostGIS 1.5 using the following command withosm2pgsql.exe:

C:\Program Files (x86)\HOTOSM\bin>osm2pgsql.exe -c -s -H localhost -d osm_cloudmade -b -122.0,18.03,-64.85,46.05 -E EPSG:900913 -U postgres -P 5432 J:\DATA\OSM\usa.osm.bz2 -S J:\DATA\OSM\default.style

I understand that the Openstreetmap data is in Lat/Long WGS 84. If I inspect my table planet_osm_roads I see way geometry but no SRID.

Is there a way that I can project this to another system? Or do I first need to specify what the SRID is of this data?


texts: What are requirements for Append API on ArcGIS Server?

texts:
What are the requirements for the Append API on ArcGIS Server?

We are running ArcGIS server 10.4.0 I can access after getting a token the following services :

https://xxx/arcgis/rest/services/dev/yyy/FeatureServer/0/addFeatures
https://xxx/arcgis/rest/services/dev/yyy/FeatureServer/0/query

But the append API is not working, if I call

https://xxx/arcgis/rest/services/dev/yyy/FeatureServer/0/append

What I get is the information about my server in response


texts: How to select duplicate records based on multiple fields?

texts:
I have a feature class with two fields of interest: "name" and "identifier" (Original Data; Figure 1). Note that there are several duplicate rows in the table and the table may or may not be sorted, as it is in this example.

I'm interested in selecting, and/or removing, duplicate rows if the identifier is a duplicate within each "name" group (e.g. A, B, C...). In the example, name "C" has two identifiers "abcd", so the duplicate would need to be selected and/or removed. I'm working with ArcGIS Desktop Basic or QGIS and python. I'm thinking that referencing a dictionary or some fancy SQL expression might do the trick, but hoping there may be an easier solution. How can I find duplicate records based on multiple fields?

Figure 1


texts: OpenLayers5: GeoJSON: featureProjection vs dataProjection

texts: What's the difference between featureProjection and dataProjection in OpenLayers 5, GeoJSON class?


texts: Creating a polyline from point data that represents multiple linear features in ArcGIS 10.0

texts:
I have a problem where I have to somewhow create a polyline feature class in ArcGIS 10.0 from points that were collected in the field using a Trimble GeoXT that represent the start and end of multiple linear features such as stone walls, wire fences, etc... The Trimble GeoXT collects the date and the exact time that the point for the start and end of the linear feature was collected. The idea is I am walking a forest boundary line where sometimes there is a stone wall that starts and follows the boundary, but then stops and there is nothing for 20 feet or so and then a wire fence starts and follows the boundary and may end or transition into a stone wall, something else or nothing at all along this forest boundary line.

I need a python script that can draw a line from the start of one linear feature, such as a stone wall, to its end point and stop and then do the same thing for all the other types of linear features (stone walls, wire fences, barb wire fences and virginia rail to be exact).

Is there any way this is possible? I am not very skilled using Python scripting.

The Points To Lines tool in ArcGIS 10.0 only draws a single line through every single point regardless of what type of linear feature the point represents and continues this single line where there is no fence. The Points To Lines tool also does not cary over any of the attribute data that is associated with the original point layer.

I hope I have provided enough information. Please ask for more information if needed.


texts:
I have layers loaded from PostGIS into QGIS(2.14). Since it is a database and I try to respect the normalization rules, datas are not always stored directly into the layer table, and sometimes they exist as an ID number. With the "value relation" setting in the field properties I can display the corresponding information as a drop-down menu. But I also would like to display this information as a label into the map, for now I just can display the ID number.

Does anyone have any idea on how to display the actual information ? I can think of few workaround, of which none are entirely satisfying :

adding a field with the information into the DB table, but in order to keep a bit of DB logic I would need to set some triggers automatically updating the corresponding fields between tables. In other words, a bit painful for a rather simple process, but doable.
using a QGIS table join and display the joined data, but it seems not possible to save the table join like as a default style which would be automatically present everytime I load my layer. If it could work, I am developping a process meant to be used by many users, which nonetheless are not having any QGIS experience for now, but the idea is to automatize things and this is typically the kind of little things that are generally adding to one another and complexify a process. So I'd avoid that.


texts: Bounding Box Coordinates are given in different Projection - how do I find out which

texts:
All the layers in my application are EPSG:31466. However, if I retrieve the capabilites:

        var wms = new OpenLayers.Format.WMSCapabilities();

        OpenLayers.Request.GET({
            url: myUrl,
            success: function(e){

                var response = wms.read(e.responseText);
                var layerObj = response.capability.layers[0];
                console.log(layerObj.llbbox);

            }
        }

The BoundingBox' Coordinates are given in a totally different format.

In EPSG:31466 I would expect them to be similar to new OpenLayers.Bounds(363060,5770362,363496,5771118), but in fact they are like this: [-23.015284514192917, 48.276782941782315, -22.953739137948624, 48.29765968309495].

Looks like a different format, but why and how do I change this?

    console.log(layerObj.llbbox);
    var my_extent=new OpenLayers.Bounds(layerObj.llbbox).transform(new OpenLayers.Projection("EPSG:4326"),map.displayProjection);
    console.log(my_extent);

Console Output:

 [-23.015284514192917, 48.276782941782315, -22.953739137948624, 48.29765968309495]

Object { left=-23.015284514193, bottom=48.276782941782, right=-22.953739137949, more...}


texts: pyqgis threading - Exception when using QgsTask.fromFunction

texts:
I am trying to implement threading to some pyqgis code.

I have been trying to use QgsTask.fromFunction.

I have implemented code from this article but it isn't working. I used the first of the three methods - basically verbatim, with minor changes to the structure to make it work in my plugin and to try to pin down the source of the error.

When I call testThreading I get the error

  Exception: <[my plugin] object at 0x00000267FA2E39B0>

Why?

def test_run(task, wait_time):

    from time import sleep
    import random

    QgsMessageLog.logMessage('Started task {}'.format(task.description()),level=Qgis.Info)
    wait_time = wait_time / 100
    total = 0
    iterations = 0
    for i in range(101):
        sleep(wait_time)

        # use task.setProgress to report progress
        task.setProgress(i)

        total += random.randint(0, 100)
        iterations += 1

        # check task.isCanceled() to handle cancellation
        if task.isCanceled():
            test_stopped(task)
            return None

        # raise exceptions to abort task
        if random.randint(0, 500) == 42:
            raise Exception('bad value!')

    return {
      'total': total, 'iterations': iterations, 'task': task.description()
    }

  def test_stopped(task):
    QgsMessageLog.logMessage('This does not happen',level=Qgis.Info)

  def test_completed(exception, result=None):

    if exception is None:
        QgsMessageLog.logMessage('This does not happen',level=Qgis.Info)
    else:
        QgsMessageLog.logMessage("Exception: {}".format(exception),level=Qgis.Info)
        raise exception

  def testThreading(self):
    task1 = QgsTask.fromFunction(
      'waste cpu 1', self.test_run, on_finished=self.test_completed, wait_time=4)
    task2 = QgsTask.fromFunction(
      'waste cpu 2', self.test_run, on_finished=self.test_completed, wait_time=3)
    QgsApplication.taskManager().addTask(task1)
    QgsApplication.taskManager().addTask(task2)
    QgsMessageLog.logMessage('Getting here',level=Qgis.Info)


texts: Calculating avg distance between two non-parallet lines?

texts:
I'm currently working on creating a data model that will allow the analyst to digitize two non-parallel lines of approximately the same length. Currently the methodology is to divide the lines into 11 points and avg the distances between the two lines.

Any suggestions on how to simplify this method and or automate the process, remember I'm creating the schema so I have full range to change what is and how it is being recorded?

Attached is an example of the problem.


texts: Comparing current image in collection to previous image in collection using Google Earth Engine

texts:
I am wanting to subtract one binary raster from another, for all images in a collection. For example if I have ten images, I want to subtract image 2 from image 1, image 3 from image 2, image 4 from image 3... image 10 from image 9, to create a new binary raster for each one of these subtractions, displaying change between the two images.

I have included my code below, which applies the masks and creates the binary rasters in the first half, and then attempts this raster subtraction in the last half. I get the error "Cannot use 'in' operator to search for 'name' in undefined", which I understand but cannot figure out another way.

/* Computes collection IDs and then clips images, applies cloud and water masks, NDSI and then displays all images */
var computedIds = clip.reduceColumns(ee.Reducer.toList(), ['system:index'])
                          .get('list');
computedIds.evaluate(function(ids) {
  for (var i=0; i<ids.length; i++)
    //Mask each layer and display
    var image = ee.Image("LANDSAT/LC08/C01/T1_TOA/"+ids[i]);
    var clipped = image.clip(ee.FeatureCollection("users/rgi60_all"));
    var snow = masked(clipped)
    // Add all layers to map
    Map.addLayer(snow, {bands:'NDSI'}, ids[i], false);
    // Create for loop which subtracts image binary raster from previous image binary raster !!!!!!!!!!!! NOT WORKING !!!!!!!!!!!!!
    for (var i1=0; i<ids.length; i++) {
     if (i1===0){ // do nothing
      }
      else { // selects the 'snow' binary band from each image and subtracts to give new raster named 'change'
        var change = ids[i1-1].select('snow').subtract(ids[i1].select('snow')).selfMask()}}}
      Map.addLayer(change, {}, ids[i], false);
});


texts: How can I merge multiple .h5 files while I just want to extract one single band in output in Google Colab using gdal?

texts: I have 366 .h5 files in a drive over Google Colab. I can read single .h5 file using 'gdalinfo'. But I have to extract only a same  single layer (subdataset) from all of those .h5 files and extract as a 'tiff' file. Can you suggest a way to do that with GDAL?


texts: Can not run grass:r.to.vect in Qgis console

texts:
I call using processing.alghelp("grass:r.to.vect")

I looked input:

 <ParameterRaster>
feature <ParameterSelection>
-s <ParameterBoolean>
GRASS_REGION_PARAMETER <ParameterExtent>
GRASS_OUTPUT_TYPE_PARAMETER <ParameterSelection>
output <OutputVector>

feature(Feature type)
    0 - line
    1 - point
    2 - area
GRASS_OUTPUT_TYPE_PARAMETER(v.out.ogr output type)
    0 - auto
    1 - point
    2 - line
    3 - area

then I try to do ,
processing.runalg("grass:r.to.vect" , iface.activeLayer,2, True, None,3,r"C:\Users\user2\Desktop\1\temp\drfsg\zhopa.shp")")
but it returns an error, what I did wrong? the project is only one raster layer


texts: Sorting points based on Northing and Easting

texts:
I have around 1320 point/centroid features in a shapefile for my research plots. Each point/centroid has X and Y coordinate associated with them which were calculated using Field Calculator > Geometry > $X $Y in QGIS. At present the reference IDs are in no particular order. But eventually I would like to create a new attribute column by the order shown in the below image.
 .

At first I tried to sort my points by X and Y (selecting 10 consecutive points at a time) but due to fact that all points in a single row don't lie on the same northing or easting line, the plot order was not proper.

So I would like to know if there is a neat way to sort these points spatially (X and Y) and then assign a sequence ID in the order as shown in the image.


texts: Error while publishing a mxd as service uing python

texts:
I have created an Excel file with Lat/lon values. I added this data tas a layer in the ArcMap. And I "used Display XY data" otion available  on right click. I selected the GCS_WCS_1984 co-ordinate system. I then saved it as ArcMap document(.mxd).

I get this error when I am trying to publish my MXD file(created above) as service using python script:

Layer's data source has a different projection [GCS_WGS_1984] than the data frame's projection   (Code 10001)

Any pointers will be helpful.

I fixed it.
For the benefit of others the problem was due to the wrong option which I chose suring creation of shape file. I changed the option to "the data frame" and bingo the error was gone.Cheers !


texts:
I'm new in this community. In my job, I started working on a CSW 3.0 catalog implementation (read-only). CSW (Catalogue Service Web) is an API allowing users to request content (geo in my case) with filtering, pagination, etc...
The most common CSW version is the 2.0, but as this is a new project, I decided to start working on the latest (3.0)

I didn't find any useful resources about the difference between CSW 2 and 3. All I found is that:

CSW 2.0 uses the namespace http://schemas.opengis.net/ows/1.1.0/
CSW 3.0 uses the namespace http://schemas.opengis.net/ows/2.0/

If I understood correctly, the ows 2.0 adds support for some additional parameters, while keeping the backward compatibility.
But is this the only difference ?

I'm sorry I can't be more specific, because the subject is already foggy.


texts: QGIS showing decimal degree coordinates in map/layout composer display

texts:
I am using QGIS (2.18 or 3.0) to create nautical charts drawing upon NOAA raster tiles and other info (e.g., lines showing magnetic north). I now want to save PDF files for different subareas using map composer. The subareas are quite varied but at times overlap slightly -- not a set of touching rectangles that could be done using the altas option.

To do this systematically, when completing a map composition I need to record the decimal degree coordinate for each corner of each map.  I was hoping that the "coordinate capture" plugin worked in the map composer, but I don't see that as being an option (e.g., icon).  If the coordinates in map composer showed as long/lat units, that would be sufficient, but clumsy.  However, MM are the units on the composer window even when the corresponding QGIS window shows long/lat coordinates.

Can you suggest methods to capture the long/lat coordinates of the corners of maps in composer?

Even better, any suggestions on how to easily transfer the coordinate data to a spreadsheet?


texts: OpenLayers2 - Get LayerName from GML Response object

texts:
I am using the WMGetFeatureInfo control in OpenLayers to select items from my layers and return GML.

I use this to get an attribute from the GML;

 var val = evt.features[0].attributes.UID;
//Where evt is the object returned from "getfeatureinfo" event.

But the GML also contains a whole bunch of other good stuff in between the " wfs:FeatureCollection", and "gml:featureMembers" sections.

How can I iterate through the wfs:FeatureCollection or  gml:featureMembers because I cannot figure out the syntax.

Also, would it be easier to parse the info I need from the XML that's returned?


texts:
I have the coordinates of a lot of points in a table.  In pgadmin I want to make a line that passes on these points. I already have my Coordinate point im my table. I want to make line with those cooirdinate point that already have in my table. In the same table I want to INSERT geom line in the geom geometry column

Description of the table: ID,X,Y, description column, length, description column.
I want to make the line that passes on this point.

I have done this query:

SELECT AddGeometryColumn('MyTable', 'geom', 32634, 'LINESTRING', 2);
UPDATE "MyTable"
SET geom = ST_SetSRID(ST_MakeLINE((ST_MakePOINT1("X", "Y"), ST_MakePOINT2("X", "Y")), 32634));

but it doesn't work.
Can anyone help me please?


texts: Outputting mean value when multiple input points fall within cell using QGIS Rasterize?

texts:
Using QGIS 3.8.2, I rasterize a Geopackage vector point layer using the Raster > Conversion > Rasterize tool, with output to a .tif file.

However, where multiple input points are within a single output cell, the tool will only output the value of one point.  I need the average of all points within each cell.

Rasterizing point layer with multiple features falling inside raster cell using GDAL? describes how to sum multiple input points into one output raster cell.  In this case, the solution was to incorporate the option MERGE_ALG=ADD.  However, a review of the current gdal_rasterize documentation makes no mention of MERGE_ALG.  Furthermore, that was done within the context of Python, which I know nothing about.