texts: How to make river lines intact between confluences in QGIS？

texts:
I got a river shapefile below,

and I found that there are many fragmental lines in this line shapefile, like,

and,

Most of these are located around the confluence(node), and how can I do to efficiently merge them into the nearby large line object, making whole shapefile containing only intact line segments between confluences(nodes)？


texts:
I have a shapefile containing some US sections from the Public Land Survey System.
I would like to display the labels in the middle of the sections.

I found the "Placement" option in the "Label" sheet of the layer.

However, I am not succeeding in centering the labels. As you can see on the snapshot below, some labels are not centered properly :

Do you know how to fix this issue?

Thanks


texts: Fast editing in raster calculator -- adding lots of images together

texts:
I need to add pictures together to make one raster.

In one session there are about 150 - 200 images (named randomly - see syntax example)
There are about 50 sessions (named randomly)

Is there any way to use a configuration of raster calculator instead of clicking on img1 and then img2 and so on... In the map algebra window the syntax looks like:

  "A201200A.jpg" + "A201200L.jpg" + "A201200W.jpg" + "A201201I.jpg" + "A201201S.jpg" + "A201202F.jpg" + "A201202Q.jpg" + "A201203C.jpg" + "A201203M.jpg" + "A201203W.jpg" + "A201204I.jpg" + "A201204S.jpg" + "A201205F.jpg"

and so on...

Is there a fast way to prepare a command without clicking on an image and then + and clicking again on an image and then + and so on???


texts: Tile error and Parameter 'left' is required. in subtract function of Google Earth Engine

texts:
I am getting an error trying to subtract one property from another in GEE:

Tile error: Error in map(ID=null):
Number.subtract: Parameter 'left' is required.

here is my code:

var urb=ee.FeatureCollection('users/data');

//print(urb);

// This function computes the feature's UHI
var getUHI = function(feature) {
//  print(ee.Number.parse(feature.get('LST_urb_day_CT')));
  var urban = ee.Number(feature.get('LST_urb_day_CT'));
  var UHI = urban.subtract(ee.Number(feature.getNumber('LST_rur_day')));
  return feature.set({UHI: UHI});
};

// Map the area getting function over the FeatureCollection.
var UHIAdded = urb.map(getUHI);


texts:
I am trying to create a script to create suitability indexes for various urbanized areas. I know that esri has a tool that does this but it doesnt perform the way we are looking to utilize it.
The issue is with the rasters. Some of the rasters are not squares but triangles. When you open a triangular raster in Numpy it is a square. I need a way to mask out the area that is added to the triangular area created from opening it in Numpy. The issue is the dead space is represented by 0 which is the same number class as water.
Below is an example of what i am talking about:
00000000000000000000000000000
00011111111111111100000000000
00011111111111111110000000000
01111111111111111000000000000
00000000111111111111111100000
00000000000111111000011111000
00000000000111111111111111000
00000000000000000000000000000

The zeros both represent the border and water.
Would someone know how to change this when importing in to Numpy?


texts:
I have a square polygon with 4 sides, but the starting point is in the middle of a line between two corners of the square. If I count the vertices with the Python script !shape!.pointcount I get the answer 6 points
(start and ending point is counted double). How can I simplify the polygon that the result is 5. or count corners that have an angle of 90 degrees?


texts: Generating histograms of multiple fields using ArcPy?

texts:
I have a large shapefile and I'm trying to automate a process to generate histograms of several fields with the MakeGraph tool, but I'm receiving the following error.

  class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters
  are not valid. ERROR 001020: Input series error. Incompatible
  parameter list. Click 'Always reset parameters...' check-box to reset
  parameters. Failed to execute (MakeGraph).

Any idea why this is happening? My inputs are as follows...

input table = shapefile,
fieldList is generated by input,
workspace = output folder,
input_template = a .grf or .tee (tried both),
run is just a boolean true or false

Here's my code:

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")

input_table = arcpy.GetParameterAsText(0)

fieldList = arcpy.GetParameterAsText(1)

workspace = arcpy.GetParameterAsText(2)
arcpy.env.workspace = workspace

input_template = arcpy.GetParameterAsText(3)

run = arcpy.GetParameterAsText(4)

countBin = 10

# Boolean selection
if run == 'true':

    # Iterate over selected field names
    for fieldName in fieldList.split(';'):

        out_graph_name = "histogram"
        out_graph_jpg = fieldName + "_histogram.jpg"

        # Create the graph
        graph = arcpy.Graph()

        # Add a histogram series to the graph
        graph.addSeriesHistogram(input_table, fieldName, countBin)

        # Specify the title of the left axis
        graph.graphAxis[0].title = "Count"

        # Specify the title of the bottom axis
        graph.graphAxis[2].title = fieldName

        # Specify the title of the Graph
        graph.graphPropsGeneral.title = fieldName + " Histogram"

        # Output a graph, which is created in-memory
        arcpy.MakeGraph_management(input_template, graph, out_graph_name)

        # Save the graph as an image
        arcpy.SaveGraph_management(out_graph_name, out_graph_jpg, "MAINTAIN_ASPECT_RATIO", 600, 375)

else:
    print "done"


texts: How do I programmatically access a feature's symbol property in a schematic layer?

texts:
I am building a simple app that changes the size of the symbol of the selected feature. Is this possible? Here is a simple case for a selected feature:

public void onClick(){

IFeature spliceClosure = _app.splice.load(OID);

// access the symbology

// change the size

//refresh the active view
}

In reality this app is going to be used with schematic features. How do I access their symbology and change the size of it? I am trying to scale and rotate the symbols.


texts: error in downloading subarea using gdal.Warp (SystemError: error return without exception set)

texts:
I'm trying to use the example in the Planet API documentation to retrieve an area (a 0.5km x 0.5km box) around an area of interest. I was able to activate the asset and get a download URL.

However I'm getting this error:

SystemError                               Traceback (most recent call last)
<ipython-input-250-d7d32f39048d> in <module>()
      4     dstSRS='EPSG:4326',
      5     cutlineDSName='myaoi.json',
----> 6     cropToCutline=True)

/usr/lib/python2.7/dist-packages/osgeo/gdal.pyc in Warp(destNameOrDestDS, srcDSOrSrcDSTab, **kwargs)
    547
    548     if _is_str_or_unicode(destNameOrDestDS):
--> 549         return wrapper_GDALWarpDestName(destNameOrDestDS, srcDSTab, opts, callback, callback_data)
    550     else:
    551         return wrapper_GDALWarpDestDS(destNameOrDestDS, srcDSTab, opts, callback, callback_data)

SystemError: error return without exception set

My code is below:

aoi = {"coordinates": [[[-117.7070372256684, 34.08932328386836], [-117.69617937433158, 34.08932328386836], [-117.69617937433158, 34.08033071613165], [-117.7070372256684, 34.08033071613165], [-117.7070372256684, 34.08932328386836]]], "type": "Polygon"}

url = u'https://api.planet.com/data/v1/download?token=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJLejhoN0NEU2ZCN08rZldwOXFnVTBEYStUN2RyM2hja1NEYUNmRVFISUlhUTczT3lydmFsUEU2WktHYzRRNFhhRVV6cGdXbXJRaVBPdURkM3Z0bzJPUT09IiwiaXRlbV90eXBlX2lkIjoiUkVPcnRob1RpbGUiLCJ0b2tlbl90eXBlIjoidHlwZWQtaXRlbSIsImV4cCI6MTQ5MzQ4ODM2MCwiaXRlbV9pZCI6IjIwMTQwMzEzXzE5Mjk1Nl8xMTU0ODEyX1JhcGlkRXllLTMiLCJhc3NldF90eXBlIjoiYW5hbHl0aWMifQ.m7N_9vIqzOgctguz00MUZqvAJos0bJNdPv7S08ms4udb5hSamMhaRODKgE05-x6QNScYkFtb7p42nRbwLiX7Nw'

vsicurl_url = '/vsicurl/' + url

dat = gdal.Warp("out.tif", vsicurl_url,
    dstSRS='EPSG:4326',
    cutlineDSName=aoi,
    cropToCutline=True)

What am I doing wrong?

Edit with more info:

item ID = '20140313_192956_1154812_RapidEye-3'

item type = 'REOrthoTile'

asset type = 'analytic'

gdal version = '2.1.0'

I've tried both saving my AOI polygon to a json file and passing the filename to cutlineDSName in gdal.Warp, and still get the same error.


texts: Lat Lon not metres map Coordinates at mouse cursor position

texts:
I'm using QGIS 2.14.10 LTR, my project crs is EPSG:27700 but the coordinates shown at the bottom of the QGIS window are in lat lon not metres. The odd thing is if I toggle the button to show extent instead of cursor position the figures are presented in metres. I've included a couple of screenshots.

Does anyone have any idea how I can change things to show the cursor location in metres?


texts: Projecting from custom spatial reference?

texts:
I have a shapefile with a WKT spatial reference below:

PROJCS["Prj_suplic",GEOGCS["Geo_suplic",DATUM["",SPHEROID["",1.0,0.0]],PRIMEM["",0.0],UNIT["",1.0]],PROJECTION["Aitoff"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],UNIT["Meter",1.0]]

How can I project from it to another standard spatial reference such as epsg:3857?

details

the data and spatial reference comes from this website
.

I can export arcgis json file from this website, however,when i try to converse it to a shpaefile through ArcMap -> ArcToolbox -> Conversion Tools -> JSON TO Features, it fail. A error message" coordinates out of bounds" showed. Although I search on the google .It seems that no one has faced a problem like that.

In order to make sure that the problem is lead by the spatial reference.Firstly, I create a custom spatial reference the same as it in the arcgis. Secondly, I created a shapefile with this spatial reference, and add some features to it. Thirdly, I export the shapefile to json with the json to features tool. In the end, I try to convert the output json file back to shp and it fail and show the same error message.

So can any one give me some solutions. It won't be restricted to projecting. Any other solution that can adjust the data to  normal position is welcome.


texts: Clipping a raster by polygon and getting the sum of pixel values in webapplication

texts:
I am loading a layer with points and a raster one in an OL2 map. The layers come from a geoserver. What I want to do is to apply some buffers to the points and based on the buffer to get the sum of the values of the raster.

I think I could do use rasterio or fiona for something like that. Or another alternative would be to run the analysis on postgres. But I was wondering if there is some javascript library for doing these kind of analysis.


texts: Making profile graph in ArcGIS Pro with 2 Rasters

texts:
I am trying to compare 2 bathymetric elevation rasters collected using different methods. I am using ArcGIS Pro 2.5.2 and I have 3D and spatial analyst extensions. All data is in WGS 1984.
I have tried to use the Profile and Stack Profile tools to create profile graphs.
Profile issue
I loaded both rasters into the contents pane with the same coordinate/projections, all that jazz. One raster covers a larger area than the other. I drew the profile lines I want to compare (pic A) and my output chart (pic B, in meters) does not match the actual values in the raster... The 4 profile lines 1.) do not compare both and 2.) do not show the actual elevational changes in either raster.

What am I doing wrong?
Why are they not appearing correctly and showing both raster profiles?
Can this tool be used to compare 2 raster profiles?
Stack Profile issue
I inserted the same lines I drew from above, inserted my two rasters that I am trying to profile, and named the output table. In my resulting graph (pic C, we can refer to them as Grey vs Blue, this one in ft) there is no difference between the 4 line segments that I am trying to compare and I do not see the odd fluctuation jumps in the actual rasters...
What can I do to compare these profiles lines between these 2 rasters?
Is there another tool, or am I using these tools wrong?


texts:
I have an ArcPy code that I am using to find various characteristics about certain watersheds in Indiana. I start with a shapefile of all 800 watersheds and go through it row by row and perform a bunch of calculations on each one. Right now the way it is set up I have one large loop to go through all of these calculations and get all of the outputs into lists to get the output as an excel file. This process takes an extremely long time, and I am new to Python and do not know how to improve the code so that it will be faster.

    #search cursor through each row of county subwatersheds file
rows = arcpy.SearchCursor(all_subwatersheds)

for row in rows:
    subwatershed_number = row.getValue("HUC12")

    subwatershed_list.append(subwatershed_number)

    print(subwatershed_number, " is the subwatershed to be worked on")

    #select subwatershed from shapefile with all of them
    subwatershed_selection = arcpy.SelectLayerByAttribute_management(all_subwatersheds, "NEW_SELECTION",
                                                                     "HUC12 = " + "'"+subwatershed_number+"'")

    #copy selected subwatershed to it's own file
    subwatershed = arcpy.CopyFeatures_management(subwatershed_selection, "subwatershed")

    #clip dem to subwatershed area
    dem_clip = arcpy.Clip_management(dem_Indiana, "#", "dem_clip.tif", subwatershed, "#" , "ClippingGeometry", "NO_MAINTAIN_EXTENT")
    print("clipped dem to subwatershed area")

    #calculate area of subwatershed
    arcpy.AddField_management(subwatershed, "AREA", "DOUBLE")

    area = arcpy.CalculateGeometryAttributes_management(subwatershed, "AREA AREA_GEODESIC", '',
                                                        "SQUARE_KILOMETERS",
                                                        None)

    #print area
    rows = arcpy.SearchCursor(area)

    for row in rows:
        area = row.getValue("AREA")

    area_list.append(area)
    print(area, " square kilometers")

    #calculate perimeter of subwatershed
    arcpy.AddField_management(subwatershed, "PERIMETER", "DOUBLE")
    perimeter = arcpy.CalculateGeometryAttributes_management(subwatershed, "PERIMETER PERIMETER_LENGTH_GEODESIC",
                                                             "KILOMETERS")

    print("perimeter calculated")

    #print perimeter
    rows = arcpy.SearchCursor(perimeter)

    for row in rows:
        perimeter = row.getValue("PERIMETER")

    perimeter_list.append(perimeter)
    print(perimeter, " kilometers")

    #get average slope using zonal statistics from slope dem
    avg_slope = arcpy.sa.ZonalStatistics(subwatershed, "FID", dem_slope, "MEAN")

    #get slope value
    avg_slope_result = arcpy.GetRasterProperties_management(avg_slope, "MAXIMUM")

    avg_slope_value = avg_slope_result.getOutput(0)

    avg_slope_list.append(avg_slope_value)

    print(avg_slope_value, " = avg slope (%)")


texts: Machine Learning Algorithms for Land Cover Classification

texts:
I am interested in learning what software exists for land classification using machine learning algorithms (e.g. k-NN, Random Forest, decision trees, etc.)  I am aware of the randomForest package in R and MILK and SPy in Python.

What open-source or commercial machine learning algorithms exist that are suited for land cover classification?


texts: Measuring in Print composer and main layer window in QGIS 2.12.3 does not match

texts: I work on the municipality level and I am composing print maps with scalebar. I noticed, that length (or scale of my maps) is presented different when items are measured in my main QGIS 2.12.3 layer window and within Print composer. If I measure the football field in my main window, it is 105 m long, which is correct. If I add a scalebar on my map in Print Composer, it shows me that the field is about 112m long. I think, if I had set CRS wrong, my readings would be weird in my main window, but that is not the case. Does anybody has a solution or explanation for noticed difference?


texts:
Is QGIS (2.16) multi-threaded?

I do not see multiple processes on the console while running it on Ubuntu.

It only uses one CPU.

Is there anything to do to enable it?


texts: How to join data from a CSV to a shapefile using QGIS

texts:
I'm new to GIS and new to StackedExchange.

I need help joining a CSV of Accessibility data to a LSOA shapefile in QGIS.

The process explained here does not work for me and I don't know why. The mmqgis plugin and the Joins feature in QGIS both provide me with either an empty Shapefile or an empty CSV file.

I'm trying to map statistics related to accessibility to hospitals from the Department for Transport. The data can be downloaded from here and is in CSV format and is georeferenced by Lower Super Output Area (LSOA), with one column of LSOA codes and the rest are the separate statistics (time taken to get to nearest hospital, for example).

I also have a LSOA shapefile from here, which obviously has the exact same list of LSOA codes.

How can I join the two datasets so that I can map the accessibility stats for each LSOA with a range of colours? I've tried using the 'Join' feature but I can't seem to get it to work.

Any help would be much appreciated.

The first image shows the Accessibility data, note the LSOA data in the first column which matches the LSOA data in the Shapefile and the last column is what I want to map/Join. The second image shows the data associated with the LSOA shapefile, note the LSOA data matches that in the Accessibility data. As far as I know the data type in each file matches. What I want to do is map the data in, say, column 5 of the Accessibility data onto the LSOA shapefile.


texts: Simplify polylines by eliminating short lines?

texts: I have a river network, extracted from a DEM. Then I split it to shorter segments. The split adds some points (as shown in figure) too near to each other. I wonder how I should remove those small lines and simplify the segments?


texts: Merging polygons interactively in ArcMap using less clicks than Merge tool?

texts:
I am looking for an interactive tool which simply merges two polygon geometries by clicking on each polygon and nothing else. I need a workflow for a particular project-step which cannot be automated due to the need to make visual checks of particular polygons.

I am in need of a way to merge 2 polygons together without having to do the following in ArcGIS:

Select two Polygons
open the Editing Toolbar
initiate the Merge Tool
Confirm which Polygon needs to be merged
Press "Start"

This process in itself may only take 30 seconds, but is very inefficient if repeated 1000 times. I would simply like to know if there is a tool which can merge 2 polygons with only 2 mouse clicks. One click on the first polygon, one click on the second.


texts:
I have tried this several different ways and get lots of NaN.

I need to specify that in my raster 'test1', I want a certain set of values to equal 1 and the rest to equal zero. For instance, I want 1, 42, and 102 to equal 1 and the rest to equal zero.

I have tried:

"test1@1" = 1 OR "test1@1" = 42 OR "test1@1" = 102

as well a few other options.

Unfortunately, there seem to be no existing syntax guidelines for the raster calculator (if you know of some, please send me a link).

How do I make this work?


texts:
Trying to convert my geoJSON file into topoJSON so

I downloaded topojson from npm and
followed the instructions on gis.stackexchange Convert GeoJSON to TopoJSON
basically the same as the topoJSON GitHub page

However, I got an error message:

> topojson -o prTopo.json prCounties.json
quantization: bounds NaN NaN NaN NaN (spherical)
quantization: maximum error 0.00m (0.00°)
prune: retained 0 / 0 arcs (NaN%)

The original output I have is all the municipalities of Puerto Rico which I collected on GitHub (Municipios).  Here is an abridged version:

{"type": "FeatureCollection",
"properties": {"kind": "state", "state": "PR"},
"features": [[
    {"geometry": {
        "type": "MultiPolygon",
        "coordinates": [[[[-65.4406, 18.1541], [-65.2763, 18.1322], [-65.4515, 18.0884], [-65.5775, 18.1048]]]]},
        "type": "Feature", "properties": {"kind": "county", "name": "Vieques", "state": "PR"}}]]
}

The output I got was

{"type":"Topology",
"transform":{"scale":[null,null],"translate":[null,null]},
"objects":{"prCounties":{"type":null,"properties":{"kind":"state","state":"PR"}}},
"arcs":[]}

I don't really understand the geoJSON or topoJSON specs, but it looks like the transform data comes out null and the arc data is null is empty.


texts: QGIS 2.14 - Saving Lat/Long csv file to ESRI Shapefile Error

texts:
I have a csv file that I bring into QGIS 2.14 with standard lat and long formatting. The file displays fine but when I try to save it as an ESRI shapefile I get an error:

Export to vector file failed.

  Error: Feature write errors:
  Feature creation error (OGR error: Error in psSHP->sHooks.FSeek() while writing object to .shp file.)

I have tried many other files including examples from various sites on the internet and get the same error. In other words, I cannot get this functionality to work at all and I do not think it is file specific.

Note the below has been ruled out as a cause of the problem, but I am leaving it in for future reference:
I will also note that when I try to start QGIS 2.14 Desktop I get an error as follows:

  Runtime Error!
  Program: C:\PROGRA~1\QGIS Essen\bin\qgis-bin.exe
  R6034
  An application has made an attempt to load the C runtime library incorrectly.

I suspect that is probably the problem although it hasn't affected any functionality up to this point.


texts: Create DEM from stereo pairs using ArcGIS for Desktop or Open Source GIS?

texts:
Does ArcGIS Desktop or any of its native extensions allow me to create DEMs from stereo pairs (acquired by satellite, GeoEye 1)?

If the answer is a clear no, brownie points will go to an answer that proposes a viable alternative using OpenSource.


texts: Search yields no results in plugins menu

texts:
I can't manage to figure out why I can't download any plugins. I have an Internet connection, but it seems like QGIS can't access the online repository of plugins.

As an example, I'd like to download the OpenStreetMaps plugin. When I type anything into the search bar (even a single letter), no hits come back. Any ideas about what to do here?

Also, the version I am using is 3.10.10 - A Coruña. Using 64 bit on Mac OS.

UPDATE:

Issue has been solved by updating my mac OS as QGIS only supports OS above 10.13 (High Sierra I believe?)


texts:
I am using QGIS 2.18.21. The attribute table of my shapefile has 88 features but after creating the Voronoi, only 86 are in the attribute table and all the points are showing inside the Voronoi diagram.

Please, what could be wrong?


texts: Trouble using XYZ Tiles in QGIS 3 on Mac

texts:
I am trying to load background map from OSM and having problems.  The data source browser->XYZ Tile comes 'pre loaded' with a link for standard OSM and this works fine.  When I try to add a new source (right click -> new connection...) and fill out the dialogue with the Tile url from OSM the item appears in the menu but when I click on it I get a legend entry but no layer is displayed.

I have looked through the message but could not find anything relevant.

I have also tried Thunderforest links with api key but got the same result.


texts:
I am running a GetFeature request against a WFS server which does not support to download all data at once. Can I use ogc:PropertyIsGreaterThanOrEqualTo to split the dataset into chunks at download them step by step? I wonder how I can construct the actual URL to include the paging filter. Here is what I tried:

http://example.com/wfs.aspx?request=GetFeature&service=WFS&version=1.1.0 \
&typeName=example:example&maxFeatures=50000 \
&FILTER=<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> \
<ogc:PropertyIsGreaterThanOrEqualTo><ogc:PropertyName>OBJECTID</ogc:PropertyName> \
<ogc:Literal>50000</ogc:Literal></ogc:PropertyIsGreaterThanOrEqualTo></ogc:Filter>

This is not a valid URI though... That's why uri-encoded the filter part:

http://example.com/wfs.aspx?request=GetFeature&service=WFS&version=1.1.0 \
&typeName=example:example&maxFeatures=50000 \
&FILTER=%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net \
%2Fogc%22%3E%3Cogc%3APropertyIsGreaterThanOrEqualTo%3E%3Cogc%3APropertyName%3EOBJECTID \
%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E50000%3C%2Fogc%3ALiteral \
%3E%3C%2Fogc%3APropertyIsGreaterThanOrEqualTo%3E%3C%2Fogc%3AFilter%3E

This actually works. Is there a "nicer" way to do this?


texts: re: Grid Issue with environmental data-frame in R

texts:
So I am trying to use the package ppmLasso to create species distribution models. Before I can run my models I need to put my environmental data into a data frame instead of as a raster. I have done the conversion using the following code for all the variables in the ClimateTreeStack Raster:

class       : RasterStack

dimensions  : 4746, 5858, 27802068, 6  (nrow, ncol, ncell, nlayers)

resolution  : 0.008333333, 0.008333333  (x, y)

extent      : 92.19167, 141.0083, -11, 28.55  (xmin, xmax, ymin, ymax)

coord. ref. : +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs

names       : bio_1, bio_2, bio_3, bio_12, bio_15, Allsea1

min values  :   -45,    45,    34,    581,      5,       0

max values  :   289,   132,    96,   7008,    126,      89

  bio1_FRAME<-as.data.frame(ClimateTreeStack$bio_1, xy=TRUE)

  FrameOmit1<-na.omit(bio1_FRAME)

  X<-FrameOmit1$x

  Y<-FrameOmit1$y

  BIO_1<-FrameOmit1$bio_1*

Which yields the following data frame:

  head(frame)

  X        Y BIO_1 BIO_2 BIO_3 BIO_12 BIO_15 tree

  1 97.55417 28.54583     8   114    44    698     85    8

  2 97.56250 28.54583    -2   115    44    688     86    5

  3 97.57083 28.54583    -1   115    44    688     86    1

  4 97.55417 28.53750     2   115    44    692     86    4

  5 97.56250 28.53750     2   115    44    692     86    5

  6 97.57083 28.53750    11   114    44    703     86    4

I then try to use this environmental data frame but the ppmlasso package fails. I have figured out that an issue may be that the environmental data frame doesn't represent a true grid as seen using the diff() function:

  varX = sort(unique(frame$X))

  varY = sort(unique(frame$Y))

  X.step = diff(varX)

  Y.step = diff(varY)

  table(X.step)

X.step

0.00833333333332575 0.00833333333333997 0.00833333333335418

           3177                2261                 419

  table(Y.step)

Y.step

0.00833333333332931 0.00833333333333286 0.00833333333333464 0.00833333333333641 0.00833333333333997

              1                4107                 110                 457                  60

0.0250000000000057    0.05833333333333

   1                    1

When using the diff() function data appropriate for ppmlasso should look like this:

  BM.X = sort(unique(BlueMountains$env$X))

  BM.Y = sort(unique(BlueMountains$env$Y))

  BM.X.step = diff(BM.X)

  BM.Y.step = diff(BM.Y)

  table(BM.X.step)

BM.X.step

0.5

200

  table(BM.Y.step)

BM.Y.step

0.5

300

So I know what my problem probably is. But I do not know how to fix it. Can someone please suggest the easiest way to coerce my data frame (or raster) so that it has equal grid cells and can be run through ppmlasso?


texts: Manually add lat and lon to ArcGIS Interactive Rematch

texts:
I have a spreadsheet full of addresses to geocode in ArcMap 10.  I've added the spreadsheet to the map, then started to geocode them via the context menu's "Geocode addresses" item.  Many were matched automatically, and most of the unmatched I've been able to resolve within the Interactive Rematch dialog. But I have a handful of addresses where I get no result at all.

I can, however, locate these points on Google Maps, and I can get the latitude and longitude that way.  How can I enter that data into the table to locate the missing points?  I have tried editing the data and putting the lat/lon values into the X and Y columns, (via Edit Features -> Start Editing, then Open Attribute Table on the context menu).  But when I Flash the point, I don't see it.  The lat & lon are consistent with the other data points on the map (i.e., not swapped, and using the correct sign).

How can I add the points to the table?


texts: Why are the polygons in my GML not rendered?

texts:
I tried to view GML files from download services ( http://services.cuzk.cz/gml/inspire/cp/epsg-5514/ ) and I have a problem with viewing of polygons from layer "CP:CadastralParcel". This Layer contains reference point and polygon of parcel, but I see only reference point.

Boundaries from layer "CP:CadastralBoundary" I see fine.

Could you help me?
Thanks


texts: Using QGIS Histogram & Bars for import as GeoJSON polygons

texts:
I am trying to visualize data as histograms in Mapbox. The way that QGIS displays the same data is perfect, but I can't figure out how to export a file that would render the same effect with JavaScript.
Any ideas?


texts: Seeking Tutorial for Boundless Web App Builder?

texts:
Anyone know where is I can get tutorial for Boundless Web App Builder with QGIS for Open Geo Suite? (in video or pdf format).

I had tried to search on Google, and tutorial mostly for ArcGIS.


texts: Obtaining something like NDVI value from Sentinel-1 product

texts:
Is there a way to get the some data about biomass from sentinel-1 product? Then try to convert it to NDVI value.
Maybe have some way to get RGB value?


texts: How to get the total km of route using Leaflet Routing Machine API?

texts:
I'm using machine leaflet route to draw routes I can get the total route miles? How can I do this?

I know the class IRouteSummary, but I am unable to access it.
Just wanted an example so that I can access the returns of classes leaflet machine route
This is my code:

L.Routing.control ({
waypoints: [
L.latLng (-30.050390, -51.198338)
L.latLng (-30.024472, -51.219392)
]

}) addTo (map).;

var router = L.Routing.osrm ()
     waypoints = [],
     line;

map.on ('click', function (e) {
     waypoints.push ({latLng: e.latlng});
     if (waypoints.length> = 2) {
         router.route (waypoints, function (err, routes) {
             if (line) {
                 map.removeLayer (line);
             }

             if (err) {
                 alert (err);
             } Else {
                 line = L.Routing.line (routes [0]) addTo (map).;
             }
         });
     }
});


texts: Is it possible to drive one mxd (pan) using a different mxd with python?

texts:
I have 2 mxd's.

mxdA and mxdB

They both show different data, but are both in the same coordinate system.

I want to be able to sync mxdB with mxdA, so that if I pan / zoom in mxdA, I can then, with a single button press, view the same extent in mxdB.

I know that this is possible using a Viewer window (where a 2nd data frame is used rather than a 2nd mxd), however there is a memory leak present where a Viewer window is used alongside an editing session with snapping turned on (NIM103256) which causes our session to crash after <1 hour of editing.

I know that another option could be to use production mapping views, but these seem to be limited to both mxd's having the same datasets, and once you have opened mxdB and linked it to a view, you are then unable to update the view file using mxdA because it is locked by mxdB.  This is not practical for us as it would mean closing and re-opening mxdB many times every day (50+)

I'm hoping that there is a way using python where I can calculate the center point of the active dataframe in mxdA and then pan/zoom mxdB (which is already open) to the same location.  I can then create a button as an ESRI Add-in.

Calculating the center point is simple enough

    mxd = arcpy.mapping.MapDocument("Current")
    df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
    # Calculate the centre X coordinate
    x = (df.extent.XMax + df.extent.XMin)/2
    #Calculate the centre Y coordinate
    y = (df.extent.YMax + df.extent.YMin)/2

But I'm struggling with passing this center point information to mxdB to get it to pan.
Is this even possible without using ArcObjects?

I am using ArcGIS (Advanced) 10.2.2

EDIT:  I have seen this post, unfortunately it doesn't answer my question.

I have written some code that can be run in mxdB which will update mxdB based on the extent of mxdA.  However, I need to be able to run the code in mxdA and for it to update the extent of mxdB (as mxdB is a fixed mxd, whereas the name of mxdA could change).

import arcpy
#define mxdA
mxd = arcpy.mapping.MapDocument(r"C:\Testing\Scratch\mxdA.mxd")
#define the dataframe from mxdA
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
#define mxdB
mxd2 = arcpy.mapping.MapDocument("Current")
#define the dataframe from mxdB
df2 = arcpy.mapping.ListDataFrames(mxd2,"Layers")[0]
#set 'newextent' to be the extent of the dataframe in mxdA
newextent = df.extent
#set the extent of the dataframe in mxdB to be the same as that of mxdA
df2.extent = newextent
#refresh the view in mxdB
arcpy.RefreshActiveView()


texts: How to programmatically get a reference to an ICommand inside ArcGIS?

texts:
I'm having problems trying to get a ICommand using the method ICommandBars.Find. The ICommand is there, but it's returning null to me.

Any ideas?

    public static ICommandItem GetCommandItemByName(string progId)
    {
        UID uid = new UIDClass();
        uid.Value = progId;

        Type t = Type.GetTypeFromProgID("esriFramework.AppRef");
        object o = Activator.CreateInstance(t);

        IApplication application = o as IApplication;
        ICommandBars commandBars = application.Document.CommandBars;
        ICommandItem commandItem = commandBars.Find(uid,false,true);

        return commandItem;
    }

The result is always null :(.

I need to get a reference to this specific command because it contains some fields and properties that I specified (a IWorkspace object, if it matters)

Thanks for your help!


texts: How Do I configure PostGIS 2.0 on windows to use ST_GeomFromGeoJSON?

texts:
I have installed PostGIS 2.0 on a Postgres 9.1 database on a Windows 2012 Server.

I need to write an insert query, which uses ST_GeomFromGeoJSON(). The Docs for this query say that I need - JSON-C >= 0.9, and very helpfully give a link on how to configure PostGIS for that.

Unfortunately, the article which talks about configuration, only shows how you configure PostGIS on a Linux system.

What steps do I need, to configure PostGIS 2.0 on windows to use ST_GeomFromGeoJSON?


texts: Adjoint catchments missing in Arc Hydro?

texts:
I am using ArcGIS Desktop 10.4.

I have to calculate the upstream river catchments of all my small river catchments. As you can see in the picture below, there are catchments missing in a weird looking shape. Created with Arc Hydro tool "Adjoint Catchment Processing" after I created the catchments following the usual way from a DEM.

Do you have any idea why there are no adjoint catchments included at these white strips?

The white stripes seem to follow some, but not all, of the channel network. I add a picture of the stream network here below.

I don't really know the size of the river. It is a whole catchment, so the widths will vary a lot between the main stem and smaller tributaries.
The polygons have a size of a few hundret sqm to maximum 2.5 sqkm.
The DEM has a resolution of 25m*25m.

We are looking at the full catchment in the picture, its roughly 132km x 64km.


texts: Changing snap tolerance on ArcMap layout view in batch?

texts:
I have many (60+) .mxd files and I want to change an option on all of them. The option is about setting the snap tolerance (Arcmap > Options > Snap Tolerance). See pic. These are all template mxd's which is why I want to change this setting on multiple, already existing mxd's.

Running ArcGIS 10.3 for Desktop.

A python option or something similar would be a good option.


texts: Creating DateSlider for whole image collection in Earth Engine

texts:
I am need to create DateSlider for whole Sentinel-NDVI collection during given period. Is there any way to do so? https://developers.google.com/earth-engine/ui_widgets, here I found an example, but I was not able adjust it to my case.

var Start_period = ee.Date('2020-01-01');
var End_period = ee.Date(now);

var sentinel_dataset = ee.ImageCollection("COPERNICUS/S2_SR")
    .filterBounds(subset)
    .filterDate(Start_period, End_period)
    .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20))
    .map(maskS2clouds);

var collection = sentinel_dataset.map(function(image) {
  return image.select().addBands(image.normalizedDifference(['B8', 'B4'])).rename('NDVI');
});

print(collection);

var vis = {min: 0, max: 1, palette: [
  'FFFFFF', 'CE7E45', 'FCD163', '66A000', '207401',
  '056201', '004C00', '023B01', '012E01', '011301'
]};


texts: JSON to features not working while performing ST_Buffer

texts:
My objective is to create a buffer of 1000 m for enode.
I used the following query.

CREATE external table enodebuffer (shape binary);
INSERT OVERWRITE TABLE enodebuffer
    SELECT ST_Buffer(enodeaggregate.shape,100) FROM enodeaggregate;

I am able to retrieve the columns and their values (in binary) on hive and also able to get an accurate count of the features. I am also able to get a json fil after using copu from HDFGS (esri git hubtool for hadoop)

However when I use Json to features tool of github I get the following error:

I get the same error whenevr I use the ST_Buffer geometry query. I also tried creating multiple columns with the shape column but to no use.

I took into account all your suggestions but I am not able to get the desired result when I want to create a buffer for 1000's of points.
1) SO for the table, as you had suggested

  create external table enodebuffer1 (EnodeBStatus string,shape binary)
  ROW FORMAT SERDE 'com.esri.hadoop.hive.serde.JsonSerde'
  STORED AS INPUTFORMAT 'com.esri.json.hadoop.UnenclosedJsonInputFormat'
  OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat';

2) Then I inserted the values in the table enodebuffer1  using the select query as below

  Insert into table enodebuffer1 select enodeaggregate.EnodeBStatus,ST_Buffer(enodeaggregate.shape,1000)from enodeaggregate;

3) I got the result showing that the data has been loaded into the table succesfully, and am also able to retrieve the values using select and limit query.

4) Now the main part is I want to able to see the above results in ArcMap. So I used the esri github tools for hadoop COPY FROM HDFS and JSON TO FEATURES.
Copy from HDFS was successful, no error. But json to features it shows the following error (I hope you can see the images)

5) So as Evil Genius had suggested I had tested it with 100 points and it worked fine.Possibly the error is it cannot handle too many vertices.
But there has to be a solution because we are planning to migrate terabytes of data into HDFS and using multiple geometry queries to retrieve the desired results.


texts: Joined attribute not visible in categorized symbology

texts: I am having an issue selecting a joined layer in the 'value' dropdown under graduated symbology to create a choropleth map. I joined originally the data from a csv file, but after I encountered this issue I redid it using the Add Delimited Text Layer option. I thought the issue could be  occurring due to incorrect data type (string vs. numeric), so I used the to_real() function within the attribute table to change the data type of the particular attribute. I have referenced this post on the same subject. However, even after completing the change of data type, the attribute still does not show up as an option under graduated symbology. There is one NULL entry, could this have an effect? I am not sure what is going wrong.


texts: Finding duplicates in two fields using ArcGIS Desktop?

texts:
I am using ArcMap 10.2 and I want to find duplicates in 2 columns.

For example,  Street_Name, HSN and ID are my columns.

Street_Name:Pyxis--HSN:24--ID:2356

Street_Name:Pyxis--HSN:24--ID:4234

As you can see in example I want to find same HSN on Same street.

How can I do that? Any ideas?


texts: Exporting joined table fields to new shapefile using ArcMap converts text fields to numbers

texts:
I have a problem when exporting to new shapefile by ArcMap 10.5. I use "add join" to join attribute from table (dbf file) to shapefile. Afterword, I need to export it to a new shapefile. It seemed to export successfully except every field contained character (text) in attribute table have been changed to number. However, this problem has not occurred in some computers with same version of ArcMap (10.5). I am not sure that this needs to be technically fixed outside ArcGIS environment or not.
Can anyone help me to solve this problem?


texts: GIS applications used in Civil Engineering & sources for acquiring more GIS knowledge

texts:
I have finished my masters in GIS in August 2009. Since then I have been working full time. My background is in Civil engineering. I do not know many people from similar background getting into this field. I truly want to learn GIS applications used in my field. I have been listening to few podcasts (Esri, Geospatial) that barely keeps me up with rapidly changing GIS technology. I hoping one day I could start a consulting business of mine own.

Anyway, the question that I want to ask is where can acquire more knowledge related to my field? Do most us acquire GIS knowledge by attending seminars, online courses, webniars, and carrying out projects at work? I would love to get some responses.


texts:
I've vector which looks something like this

My question is how I can make it smoother/straighter with less points and curves.

Note: I've tried using simplify api from Shapely, but no luck.

Update:
I'm actually creating a given line from polygon (using CenterLine python lib), and polygon is created using rasterio.features.shapes method which reads this bitmap.

Code:

bin_closing = ... # cleaned bitmap (https://drive.google.com/file/d/0BxZWwp6ZizJEVTBzVlEwc2lKeVE/view)
results = ({'geometry':s, 'properties': {'id': v}}
               for i, (s, v) in enumerate(shapes(bin_closing.astype(rasterio.uint8), mask=None, connectivity=8, transform=src.transform)))
    geoms = list(results)
    schema= {
      'geometry': 'LineString',
      'properties': {'id': 'int'}
    }
    with fiona.open('out-bin-closing.shp', 'w', crs=src.crs, driver='ESRI Shapefile', schema=schema) as output:
        for i, g in enumerate(geoms):
            poly = shape(g['geometry'])

            # id 1 is actually masked (black part) of bitmap, dont consider it
            if g['properties']['id'] == 1.0 and poly.is_valid:

                # dont process small polygons
                if len(poly.exterior.coords) < 10:
                    continue

                newline = {}

                # try smoothing polygon
                fx = poly.buffer(50, 2).buffer(-50, 3)

                if fx.is_empty:
                    continue

                # create centerline from smoothen polygon
                geo = Centerline(fx, 10).createCenterline()

                if geo.is_empty:
                    continue

                newline['geometry'] = mapping(geo)
                newline['properties'] = {'id': i + 1}
                output.write(newline)


texts: qgis2web - How to export webmap with defined actions for shapefile?

texts:
I have a huge request for help. I need export webmap using OpenLayers or Leaflet included shapefile (type: point/multipoint) in such a way that clicking on it opens the website (URL). I created the action that uses Python script to open website in new window:
from PyQt5.QtCore import QUrl; from PyQt5.QtWebKitWidgets import QWebView;  myWV = QWebView(None);myWV.load(QUrl('[%URL%]')); myWV.show()

Exported files do not treat points as active objects. The files do not save Python script to start action in browser.
I would like to point out that I need to open the website directly but not pop up window with data after hover over the point.
The image shows the qgis window view:

The same after exported using Leaflet (but the point is not active):

Is it possible to make it in that way? Perhaps there are different options to modify exported files to make it work?


texts: How does one export the list of stored WMS-servers in QGis?

texts:
Could anyone point me as to where QGis stores the list of WMS-servers you added?

I have built a fairly large list of WMS-server on one computer, but the QGis-project file which gets accessed by my collegues doesn't load ALL of the layers (to keep startup quick).

Occasionally though, a wms layer is required for which I have the needed url info saved, but they cannot acces it. Therefor, I'd like to make local duplicates of the WMS server list I have in my setup onto the other computers.

So far the idea, the problem is I'm clueless as to where to find the stored list, and if I can just copy/paste that into the matching folder on another computer

(Using QGis 2.0.1 still on most computers, fiddling around with 2.2 locally before I go and upgrade on all (~12) PC's.


texts:
When I right-click inside a clear area of ArcToolbox and select Environments, the Environments Setting dialogue box is blank.

The only items available are the buttons on the bottom to close, etc.

I am running Windows 7, ArcInfo with SP2 installed, MSMXL 4.0 SP3.

I have done a clean uninstall and a reinstall of ArcInfo w/SP2.

I have contaced ESRI Tech Support, but no solution yet.


texts: Calculating fields if Null with Field Calculator

texts:
I have a script that runs every seven minutes and would like to calculate only rows that are Null.

How should this be done?

This is my initial script which calculates all fields each time.

    import arcpy
    calcExpression =  "!ORIGDTDATE!+\" \"+ !ORIGDTTIME!"
    arcpy.CalculateField_management(fc,"emergency_overdue",calcExpression,"PYTHON_9.3")
    arcpy.CalculateField_management(fc,"emergency_overdue",calcExpression,"PYTHON_9.3")


texts: PostGIS equivalent to ArcGIS Select by Location "Are within"

texts:
I am trying to select polygons that are within a larger polygon in PostGIS but those who share boundaries with the larger polygon are not being returned.

If I use ArcGIS Select By Location I get the result I need, 17 features. But if I use PostGIS I get only 4 features, the same as if I use ArcGIS "are completely within".

Queries that I have tried, but without success:

select count(a.cd_geocodi)
from t_ibge_setor_censitario a, t_ibge_municipio_2015 b
where b.nm_municip = 'PARAÍSO DAS ÁGUAS'

cand ST_Intersects(a.geom,b.geom);
Result: 34

select count(a.cd_geocodi)
from t_ibge_setor_censitario a, t_ibge_municipio_2015 b
where b.nm_municip = 'PARAÍSO DAS ÁGUAS'
and ST_Within(a.geom,b.geom);

Result: 4

select count(a.cd_geocodi)
from t_ibge_setor_censitario a, t_ibge_municipio_2015 b
where b.nm_municip = 'PARAÍSO DAS ÁGUAS'
and ST_Contains(b.geom,a.geom);

Result: 4

select count(a.cd_geocodi)
from t_ibge_setor_censitario a, t_ibge_municipio_2015 b
where b.nm_municip = 'PARAÍSO DAS ÁGUAS'
and ST_Coveredby(a.geom,b.geom);

Result: 4

select count(a.cd_geocodi)
from t_ibge_setor_censitario a, t_ibge_municipio_2015 b
where b.nm_municip = 'PARAÍSO DAS ÁGUAS'
and ST_Covers(b.geom,a.geom);

Result: 4

Is there a way to get all those 17 features in PostGIS?


texts: Overpass API AROUND filter doesn't work with small distances

texts:
Given the coordinates (55.8141015,26.8400810) I need to check if this location is inside a cemetery. My initial idea was that I would easily make such request:

(
    way[landuse=cemetery]
    (around:1,55.8141015,26.8400810);
);
out geom meta;

If this query returns me the cemetery, then these coordinates are inside it. But the problem, to my surprise, was that the query starts to return cemeteries only after increasing radius to 20 meters. And it returns 2 cemeteries!

How can I make an exact query by coordinates and list all areas that enclose this location?


texts: Tagging and adding attributes on OSM road layer in QGIS

texts: I have downloaded an OSM road layer and I want to add attributes and tag specific line segments. I have another layer of centroids from a polygon layer of cities which will be the basis for my nodes. How can I tag/ select specific line segments based on the nodes layer (route from point A to point B) and is it possible to do this in batch processing? I want to add attributes (i.e. funding agency) to these specific segments. Do you know a tool/ plug-in in QGIS or GRASS that can do this?


texts: gdal_retile projection system not defined properly in GeoTIF metadata

texts:
I struggle to create a ImagePyramid using gdal to be used in geoserver. Geoserver does not recognize the native proj system.
I have been playing around a lot but I am not sure where the source of the error is.

I think something is wrong with the meta data because I have to specify the projection system for QGIS to load the raster, so it is not specific to geoserver I suppose. The gdal command I use to create the pyramid is as below.

gdal_retile.bat -v -r bilinear -of GTiff -levels 4 -ps 2048 2048 -s_srs "+proj=longlat +datum=WGS84 +no_defs" -co "TILED=YES" -co "COMPRESS=JPEG" -targetDir outputfolder raster.tif

For some reason I cannot use the ESPG number as -s_srs param so I am using proj4.

Output

Driver: GTiff/GeoTIFF
Files: orto_1_1.tif
Size is 2048, 2048
Coordinate System is:
PROJCS["UTM Zone 32, Northern Hemisphere",
    GEOGCS["GRS 1980(IUGG, 1980)",
        DATUM["unknown",
            SPHEROID["GRS80",6378137,298.257222101],
            TOWGS84[0,0,0,0,0,0,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",9],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]

Working example

Coordinate System is:
PROJCS["NUTM32",
    GEOGCS["ETRS89",
        DATUM["European_Terrestrial_Reference_System_1989",
            SPHEROID["GRS 1980",6378137,298.2572221010042,
                AUTHORITY["EPSG","7019"]],
            AUTHORITY["EPSG","6258"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4258"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",9],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]

Since I know the projection system I can set it myself when I load the file i QGIS and it is positioned in the right location. In geoserver native is "UNKNOWN" but I can set a declared projection to my known projection and use force declared as SRS handling option. But I want to reproject my raster and to do that native must be picked up by geoserver so i can reproject to declared..

I am not sure where things go wrong and how I can solve it?
If I use QGIS and export my file and set the projection system of the exported file it is picked up correctly, but my files are large so I want to avoid duplication and would like to solve it programatically using gdal. What am I doing wrong? Is my syntax wrong?

EDIT
Picture showing geoserver when GeoTiff file has it coordinate system badly formatted


texts: Four band raster - ColorInterp of the InfraRed band

texts:
I have a four band aerial photography raster. The bands contain Red, Green, Blue, and IR data.

Using GDALInfo we get something like this currently:

Band 1 Block=2933x1 Type=UInt16, ColorInterp=Undefined
Band 2 Block=2933x1 Type=UInt16, ColorInterp=Undefined
Band 3 Block=2933x1 Type=UInt16, ColorInterp=Undefined
Band 4 Block=2933x1 Type=UInt16, ColorInterp=Undefined

The first three bands can be set to have a colour Interpretation of RGB respectively (GIS' get flaky if they're not set it seems).

But what should the ColorInterp be for the fourth, InfraRed band? Left Undefined? Or is there a setting for IR?


texts: Multi-part ST_GEOMETRY: Does the feature-part array start at 1 or 0?

texts:
Oracle 18c; ArcGIS 10.7.1
I have an SDE.ST_GEOMETRY polyline FC that has multi-part features.

Question:
What method does ArcGIS use to assign numbers to the feature-parts in the array?

Do the part numbers start at 1 or 0?


texts:
I'm working on an engineering project in which the customer wants a CAD and GIS deliverable. The customer sent detailed examples of the schema for all line, point and polygon files delivered in their GIS component.

CAD doesn't attribute their features, so when I pull it into ArcMap it's schema is essentially blank. How do I take a line, polygon, point, etc. pulled into ArcMap from CAD and force a schema on it so I can begin filling in the attribute data? It would take extremely long if I had to create the features with correct schema and trace the linework.


texts: SQL Make Table (from .mdb) to Point Shapefile

texts:
For my school assignment, I must compose an SQL statement which retrieves data from a database in .mdb format.  I have no problem developing the SQL statement.  It is a requirement that we have an actual .sql file included in the submission of the assignment.  The thing that I am unsure about is how to go from this SQL file to a point shapefile.

I'll give a little bit of context that may help answering this question.  The point of the assignment is creating a web map in the end.  Because the performance of web mapping increases when there is less data, certain data (the data to be displayed online) must be extracted from the database.  So I get the whole web mapping concept, where before I can start, I need an actual map (.mxd) document.  In order to complete the map document, I need this point shapefile, which must be derived from an SQL statement. Going from SQL file to point shapefile is where I'm lost.


texts: Removing leading zeroes (0) when labelling in ArcGIS Desktop?

texts:
I am trying to do a simple labelling exercise however bit confused how to on how to remove unwanted '0' values.
I have field with road number displayed like: 0000647, 000652, 0000000236

I would like to have field road number without zeros: 647,652,236


texts:
I am new to QGIS and still exploring the basics.
I want to drag my polygon beyond the window of the map. In Mapinfo they have the autoscroll option , so if the region of the map is outside the current view, the map will automatically move upward/ downward with the mouse direction.

How can I accomplish the same thing in QGIS?

MapInfo Pro 12.5 Pan Control not going upward when measuring a distance


texts:
I have a layer that I want to disappear or be transparent in beyond 1:24,000. However, I have a label that I dont want to display out beyond 1:10,000.

Since I have the layer disappearing in beyond 1:24,000 is there anyway to still have that label pop up?


texts: How do I set the fillcolor of polygons in Leaflet.js dynamically?

texts:
I'm using the interactive chloropath example for leaflet.js

I figured out how to make each of my polygons add a running tally of values to the bottom of the page after each polygon is clicked.

Upon clicking a selected polygon a second time it removes it's value from the running tally.

I'd like to visually represent this as a fillcolor change of the polygons on the map.

Here's my code so far (javascript with PHP included): (I've included comments within my code to explain what I'm trying to do. Again any help would be greatly appreciated)

function addUp(num, x)
{
    <?php
    // begin php code

    $places = $db->query("SELECT boundary_id, boundary_name FROM boundaries WHERE
    boundary_state= '$thatstate'");

    while($row = $places->fetch_object()) {
       //end php code ?>
       //begin javascript
       if (x == "List<?php echo $row->boundary_name ?>" && List<?php echo $row->boundary_name  ?> == 1) {

           temp = document.theForm.ttl.value;
           tempo = parseInt(temp);
           numo = parseInt(num);
           nwTemp = tempo + numo;
           document.theForm.ttl.value = nwTemp;
           geojson.setStyle({fillColor: 'blue'}); // I want to set color to blue to show  highlighted

           List<?php echo $row->boundary_name ?> = 0;

           return List<?php echo $row->boundary_name ?>;
    }

    if (x == "List<?php echo $row->boundary_name ?>" && List<?php echo $row->boundary_name  ?> == 0) {

        temp = document.theForm.ttl.value;
        tempo = parseInt(temp);
        numo = parseInt(num);
        nwTemp = tempo - numo;
        document.theForm.ttl.value = nwTemp;

        // I want to reset color of polygon if deselected (this would be   the default)
        geojson.resetStyle;

        List<?php echo $row->boundary_name ?> = 1;
    }
}


texts:
I created a photomerged aerial image in Photoshop and i need to update a small section but, don't want to georeference the entire thing all over again.

How can i replace the imagery?

I am not changing the overall size or anything other than swapping out an bad area.


texts:
Using QGIS, I want to take a EPSG 4326 (WGS84 LatLong) shapefile of Countries the world and "rotate" it such that Australia or some other area is at the north pole. The new map would now still be in Lat Long, only the positions of the countries will have changed/distorted appropriately. How the heck would I do that? I'll want to run this through modelbuilder in order to move other data such as rivers, lakes, etc through the same rotation (LatLong translation?).

The attached photo roughly describes what I'm trying to do.  In the left globe, north is up (not modified).  In the right globe, I've rotated the UVW mapping around the sphere arbitrarily.  Now, I'd like to "unwrap" this back to a EPSG 4326 (WGS84 LatLong) projection with the landforms in their new positions.

How can this be done?


texts: Where does QGIS get it's default transformations? The reason I am asking is that the default transformation between NAD83 (3735 in this case) and WGS84 in QGIS differs from Esri products. This is really causing me a headache as I constantly move data back and forth between these two projections and also move between these two software platforms. I want to determine to root cause instead of simply adding a custom transformation to QGIS as a workaround.


texts: Calculating minimal distance between point and polygons for multiple categories in QGIS

texts:
I have set up about 45 camera traps for monitoring hares. The GPS-positions of those are shown in a point layer in QGIS. Based on satellite images, I digitized a map of the research area, with all the fields, streets, villages and so on. Basically, I have a complete map of my research area. I record the type of vegetation and its estimated height in the research area on a weekly basis and add this data to my map.
Every polygon of the map has a unique ID. For every polygon, I have landuse categories on three levels (1E, 2E, 3E in the table below), with every level getting more detailed, as well as the estimated height of the vegetation (H) and the height as a categorie (HK). These values exist for multiple weeks and are entered in one line of the attribute table, as indicated by the suffix "week1" or "week2".
The data looks like this:
ID  1E_week1    2E_week1    3E_week1  H_week1  HK_week1  1E_week2     2E_week2  (...)

1   field       stubble     corn      20-30    low       field        black fallow
                field       stubble

2   settlement  settlement  village   0        none      settlement   settlement

I would now like to calculate the minimal distance from my camera positions (points) to every landuse categorie of level 2 (2E) for every week. The number of categories in 2E will be something between 15 and 20. My desired output would be something like the table below:
cameraID   landuse_type   minimal_distance[m]
Cam_1      stubble field  20
Cam_1      settlement     220
Cam_1      fallow         96
Cam_2      stubble field  0
Cam_2      settlement     150
Cam_2      fallow         72

I already tried to make this work using NNJoin-Plugin and GRASS function v.distance, but I don't get any useful results from this.
With NNJoin, I can only calculate the distance from the camera traps to the nearest polygon, which gives me only 45 results (Input layer: Camera trap positions, Join layer: Map of research area). These distances are all 0, because every camera trap is located inside a polygon. If I change input and join layer, the plugin calculates which camera trap is the nearest to every single polygon. This is also not helpful.
Using v.distance, I don't get any distances with the camera traps as "from" and the map as "to". The output is just the attribute table of the camera traps. I left maximum and minimum distance at -1, and set "upload" to dist. Maybe I am using the function wrong, I have difficulties understanding the exact operating mode of the function.
I hope someone can give me advice.


texts: Plotting simple xyz 3d surface map in ArcMap GIS?

texts:
I'm a newbie in Arcmap and would like to map coordinates of X(Eastings) and Y(Northings) (eg, X=534911 Y=168822) against a Z-value (elevation).

I am trying to map a simple 3D surface to look at the location of the houses and understand the change in house price value (i.e. Z-value).

Example:

I tried plotting this in Surface from Golden Software but I am unable to find out how to map it against a real time geographic map (e.g. Australia). Therefore I would like to ask if I can do something similar in ArcMap.


texts: Comparing 2 polygon shapefiles for differences

texts:
I have 7 shapefiles, each representing a year, all containing lots of polygons (c. 500,000). My aim is to take any 2 of them and compare how they have changed in terms of size and shape of polygon. (i am willing to split into much smaller tiles of course)

Also, each polygon has an ID so I want to see over the years how the geometry has changed for a particular polygon.

I've tried quite a few tools, intersections, duplications etc etc but nothing seems to quite work (or simply produces errors)

any ideas?


texts: In ArcMap, why does "Reclassify Raster" tool provide different result than when reclassifying the original raster symbology?

texts:
I was reviewing the results of a string of tools I created in ModelBuilder and I noticed that the results seemed off. I was masking multiple rasters to the same boundary, then reclassifying those rasters to the same scale - quintiles with new values from 1 to 5.

When I pull up the reclassify tool in the ModelBuilder I see a reclassification scheme such as the following:

But when taking the same, original raster in the table of contents and reclassifying the symbology, I see the following result:

If you look closely at those screenshots, you will notice that the breaks for each quintile are different. Does anyone know why the ranges for each quintile are different?

I am confused as to why there would be a difference seeing as I used the same raster, and same quintile classification scheme. I am 100% sure I used the same rasters and that I did not cross any streams in the model I built.


texts:
I tried to find some online platform-independent GIS services that could be called by any programming language and doing various GIS operations - like intersection, data format conversion, transformation and so on. WPS standard is a hot candidate for that (like in case of wps-grass-bridge) but unfortunately I cannot find such (or similar) services online - published by some provider. Most of WPS that is possible to find are just for testing purposes or are not working anymore (like from this post: Looking for a Public WPS Service).

I am aware that some operations may be very time and processor consuming but still there are many simple operations that could be managed and offered by this way - but they are not. Does anybody know why? There are many libraries that allows to publish WPS... Can be the problem in difficulty of using WPS for end users? Or people just don't want to use such operations online? Anyway it is a pity because it would offer a creation of various new services over existing applications (like Google Maps) without complicated programming and with possibility of services orchestration...

So my question is: Why it is still not common to publish and use WPS?


texts:
I am trying to create 3D maps. I am using QGis2threejs. I know I can also create a 3D map using 'New 3D Map View', but I want to try QGis2threejs.

However I have two questions.

When I install the QGis2threejs plugin. It only allows me to access 'QGis2threejs Eplorer'. Is this the same as 'QGis2threejs' because from looking at tutorials it seems a completely different tool to what I want to be using.
where Has my icon for 'QGis2threejs' gone in my tool bar. An icon for 'QGis2threejs Explorer' appear but once again this layout is different to all the tutorials I am following.

I am using QGIS V3.4


texts: Performing viewshed analysis with ArcGIS Desktop Standard License?

texts:
Is there a way to perform a Viewshed Analysis with the Standard license of ArcGIS 10.1 for Desktop?

If not, what is the difference (if any) between:

Viewshed with (Spatial Analyst)-
http://resources.arcgis.com/en/help/main/10.1/index.html#/Viewshed/009z000000v3000000/

and

Viewshed with (3D Analyst)-
http://resources.arcgis.com/en/help/main/10.1/index.html#//00q900000033000000


texts:
I have installed the traceDigitize tool from the experimental repository in QGIS 1.9.0 Lisboa. My understanding of the tool is that you have to:

Add 2 layers to QGIS Desktop. My empty shapefile to which I will edit and a polygon file of an object I want to trace.
Set Snapping Options on the polygon file
Activate the 'trace Edit' tool and move my cursor to the polygon I created until it snaps
Hold ctrl button and begin tracing.

It seems to be tracing along the polygon, but when I right click to end the edit I get an error message:

I'm not sure what this means. I know this plugin is experimental, but the one thread I found about this tool implies it works. Am I doing something wrong?

Thanks,
Mike


texts: Upgrading from PostGIS 2.5 to PostGIS 3.1 - calling two set returning functions in a UDF is 7x slower

texts:
I'm migrating our PostGIS 2.5 stack to PostGIS 3.1. In general it's been really smooth - a few of our operations on larger geometries are much faster, and the rest of our performance is about the same. The one snag is that one of our user-defined functions is now taking 11 seconds to run, when it previously took 1.5 seconds. Here's an MWE:

-- create initial geom table of a large rectangle over Kansas & Nebraska in the US
create table _tmp1 as
select st_setsrid(st_geomfromgeojson('{"type":"Polygon","coordinates":[[[-104.4140625,37.78808138412046],[-94.74609375,37.78808138412046],[-94.74609375,42.09822241118974],[-104.4140625,42.09822241118974],[-104.4140625,37.78808138412046]]]}
'), 4326) as geom;

-- duplicate this geom into a bunch of additional rows to better compare performance
insert into _tmp1 (geom)
SELECT geom FROM _tmp1 CROSS JOIN generate_series(1,1000) as x;

-- create our MWE function- much simpler than the actual code
create or replace function st_dump_mwe(geom geometry)
  returns geometry
  language sql immutable as
$func$
      select (ST_DumpRings((ST_Dump(geom)).geom)).geom;
$func$;

When I call this function in PostGIS 3.1 via select st_dump_mwe(geom) from _tmp1;, it takes ~11 seconds. In PostGIS 2.5, it takes 1.5 seconds.
PostGIS 3.1 full version:
 POSTGIS="3.1.0 5e2af69" [EXTENSION] PGSQL="130" GEOS="3.8.0-CAPI-1.13.1 " PROJ="6.3.1" LIBXML="2.9.10" LIBJSON="0.13.1" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)"

PostGIS 2.5 full version:
 POSTGIS="2.5.5" [EXTENSION] PGSQL="130" GEOS="3.8.0-CAPI-1.13.1 " PROJ="Rel. 6.3.1, February 10th, 2020" GDAL="GDAL 3.0.4, released 2020/01/28" LIBXML="2.9.10" LIBJSON="0.13.1" LIBPROTOBUF="1.3.3" RASTER

Both versions are running locally on my machine in Docker and were installed with the standard postgresql-13-postgis-3 and postgresql-13-postgis-2.5 ubuntu packages.
Any idea what's going on here? Are these changes expected?
Finally, are there any external resources that cover potential pitfalls associated with this upgrade? I've read the v3.0 changelog but haven't been able to identify where this might originate.


texts:
Is there a transformer to create a index file for my shapefile output?

As a .qix file on QGIS.


texts: Changing the generated CRS to WGS84 in QGIS

texts: I have a shapefile from the county tax authority that defines land parcel boundaries and want to use it to plan hikes that stay on public property.  However the file loads in QGIS with a generated CRS.  How do I get the file to work accurately in QGIS with my kml and gpx tracks?


texts: Performing multiple calculations in ArcGIS Attribute Table?

texts:
I have an existing Excel spreadsheet developed to track specific fire hydrant data, this is periodically updated and joined to the spatial hydrant data in ArcGIS. In the spreadsheet there is a number of columns to enter data related to Static Pressure, Residual Pressure, and Flow Rate.

Utilizing the Rated Capacity at 20 PSI in a  Fire Flow Test formula to calculate fire flow, the spreadsheet automatically calculates. The calculation is as follows.

Fire Flow = Flow * ((Static - 20)/(Static - Residual))^0.54

I am not sure the best way to attack this and am looking for suggestions. Based upon the results of the calculation, I have an additional column with an IF statement that indicates the appropriate fire flow color the hydrant should be painted. For those that do not know, the hydrant color is an indicator to fire personnel in an emergency the fire flow conditions. I hav e done some research and developed the following python script:

def Reclass !Bon_Color!:
     if ( !Fire_Flow! <= 0):
       return Black
     elif ( !Fire_Flow! >= 1 and !Fire_Flow! <= 499):
       return  Red
     elif ([Fire_Flow] > 499 and [Fire_Flow] <= 999):
       return Orange
     elif ( !Fire_Flow! > 999 and !Fire_Flow! <= 1499):
         return Green
     elif ( !Fire_Flow! > 1499):
         return Blue
  end if

I would like to know if the calculations mentioned above, used in the Excel spreadsheet could be replicated in the database attribute table utilizing the field calculator and the python-parser?  Rather than relying on the Excel spreadsheet and the need to rejoin the data.


texts: Empty result when geocoding address in Sweden using MMQGIS

texts:
I am trying to geocode an address in QGIS. I am aware of the MMQGIS Plugin and I have been trying to use that.
The dialogue window appears as though it is catered to US addresses as it contains a column for "State". The address that I want to geocode is Swedish. The CSV file in which I have the address is formatted in UTF-8. I also have the Google API Key.
When the geocoding is done a new layer is added in the panel but it doesn't contain any information and nothing appears on the map. You can see some screenshots below.
A CSV file:

My empty result after Geocoding:


texts: Optimize the code for one command with only one different parameter

texts:
I am not too familiar with ArcPy/Python, but since some commands are only available in ArcGIS, I try to implement my idea using ArcPy. I want to use a command several times, but each time only with a small change of a variable (distance) and the resulting output name.

arcpy.SpatialJoin_analysis(outSP, outSP, inLAS[:-4] + '_D100.shp', "JOIN_ONE_TO_ONE", "KEEP_ALL","#", "WITHIN_A_DISTANCE_3D", "10 Meters", "DIST_100")
arcpy.SpatialJoin_analysis(outSP, outSP, inLAS[:-4] + '_D050.shp', "JOIN_ONE_TO_ONE", "KEEP_ALL","#", "WITHIN_A_DISTANCE_3D", "5 Meters", "DIST_050")
arcpy.SpatialJoin_analysis(outSP, outSP, inLAS[:-4] + '_D040.shp', "JOIN_ONE_TO_ONE", "KEEP_ALL","#", "WITHIN_A_DISTANCE_3D", "4 Meters", "DIST_040")
arcpy.SpatialJoin_analysis(outSP, outSP, inLAS[:-4] + '_D030.shp', "JOIN_ONE_TO_ONE", "KEEP_ALL","#", "WITHIN_A_DISTANCE_3D", "3 Meters", "DIST_030")
arcpy.SpatialJoin_analysis(outSP, outSP, inLAS[:-4] + '_D020.shp', "JOIN_ONE_TO_ONE", "KEEP_ALL","#", "WITHIN_A_DISTANCE_3D", "2 Meters", "DIST_020")
arcpy.SpatialJoin_analysis(outSP, outSP, inLAS[:-4] + '_D010.shp', "JOIN_ONE_TO_ONE", "KEEP_ALL","#", "WITHIN_A_DISTANCE_3D", "1 Meters", "DIST_010")
arcpy.SpatialJoin_analysis(outSP, outSP, inLAS[:-4] + '_D005.shp', "JOIN_ONE_TO_ONE", "KEEP_ALL","#", "WITHIN_A_DISTANCE_3D", "0.5 Meters", "DIST_005")

Since this does not look very nice in the code, I would like to optimize/compact the code. My idea was to do this with a list:

dist_list = (0.5, 1, 2, 3, 4, 5, 10)
    for n in dist_list:
    expression = "outSP, outSP, inLAS[:-4] + '_D' + str(int(n * 10) + '.shp', 'JOIN_ONE_TO_ONE', 'KEEP_ALL','#', 'WITHIN_A_DISTANCE_3D', n ' Meters', 'DIST_' + int(n * 10)"

Unfortunately I only get error messages that my command is not correct. I suppose it is related to the composition of the expression in which I combine the list items with the remaining strings.

I multiply the list item by 10 so that I don't get a second dot in the file name.

Is there someone who can tell me how to fix this problem?


texts: Convert multipoint polygon boundary to line

texts:
In relation to this question here as the image below.
I have a multipolygon geometry (red lines) that i want to turn into lines so i can use it to split another multipoint polygon (black blocks) using ST_Split. .

Is there a function equivalent to ST_ExteriorRing that works on multipolygons?
I've tried:

SELECT ST_Split(bldgs.geom, ST_Boundary(admin_boundary))
FROM admin_boundary, bldgs
WHERE admin_boundary.borders = 'N4 2';

  ERROR:  Splitting a Polygon by a MultiLineString is unsupported

ST_ExteriorRing can't be used because it won't work on multipolygons


texts: Stacked bar chart in Google Earth Engine

texts:
How can I make a stacked bar chart in Google Earth Engine?

Earth Engine's docs for ui.chart() refers to Google Visualization API for customization options. That API suggests to set isStacked = true in the charts options. I tried, but it still plots the bars individually (doesn't stack them). What am I missing?

Link to code. Code also pasted below for reference.

var dataTable = {
  cols: [{id: 'name', label: 'Classes', type: 'string'},
         {id: 'percentage', label: '(%)', type: 'number'}],

  rows: [{c: [{v: 'A'}, {v: 60}]},
        {c: [{v: 'B'}, {v: 40}]}]
  };
// Define a dictionary of customization options.
var options = {
  legend: {position: 'none'},
  padding:0,
  hAxis: {
    minValue:0,
    maxValue:100
  },
  height:'80px',
  isStacked: true //<=following google's recommendations.
};
// Make a BarChart from the table and the options.
var chart = new ui.Chart(dataTable, 'BarChart', options);
print(chart)


texts: Exporting feature class in one shapefile to new shapefile using ArcMap

texts:
In ArcMap, how can you export the feature class of one shapefile to a new shapefile?

I want everything in the old shapefile to go into the new shapefile.


texts: registry Setting for ArcGIS 931 on Windows 7 PC

texts:
I am having some issues with ArcGIS 9.3.1 instalation on Windows 7 PC. After installation, when I checked the regsitry setting, it shows: ArcInfo as entry (I chose the option of Arcview during install). it doesn't create other entries as well.

I have an installer that looks for LOCAL_MACHINE\SOFTWARE\ESRI\ArcGIS\InstallDir and it doesnt find these settings.

Is it possible that these entries have been removed and if that is the case, where does it save these settings in Windows 7 environment. Looking for some feedback.

Thanks
jay


texts:
I have a line on map ( actualy is a polyline ) and need to move the camera or an entity model along it.

The examples I've seen uses only path with czml but I need something more simple like divide the line in points at equal distance.

How can I do this?


texts: Invalid GeoJSON when inserting data to a CartoDB (PostGIS) table from Leaflet

texts:
I've been following along to this tutorial from CartoDB.

I create the GeoJSON using:

var drawing = "'"+JSON.stringify(layer.toGeoJSON())+"'";

and then inserting using a custom SQL function which includes:

_the_geom := ST_SetSRID(ST_GeomFromGeoJSON(_geojson),4326);

I get the error: Invalid GeoJSON representation. I've tried entering the sql my javascript produces directly into the CartoDB console and get the same error. Example below.

SELECT insert_data(
'{"type":"Feature","properties":{},
"geometry":{"type":"Point",
"coordinates":[-71.11295700073242,42.37896312335581]}}')

Reading the documentation on the function I read "ST_GeomFromGeoJSON works only for JSON Geometry fragments. It throws an error if you try to use it on a whole JSON document." Could the error I get be because of the empty properties object?


texts: OpenLayers forEachFeatureAtPixel finds point when clicking in the lower part or below the symbol

texts:
I have OpenLayers 3.0 map with vector layer (geojson data) and try to add tooltip, when the point on map is clicked. I use the forEachFeatureAtPixel (edit: was allFeaturesAtPixel) function for finding the points.

Points are symbolized as simple circles, radius ca 10px.

The problem is, that clicking in the upper part of the circle gives no results. Clicking in the lower part or BELOW the circle, finds the point. It seems also that the bigger the radius of circle, the bigger the search area is, but it is just too low.

Coordinate system is 3857.

Any ideas, how to fix it?

Edit: Yes, sorry ofcourse it is forEachFeatureAtPixel.

Some code snippets:

var vectorLayer1 = new ol.layer.Vector({
    source: new ol.source.GeoJSON({
    projection: "EPSG:3857",
    url: "XXX"
    })
    style: new ol.style.Style({
       image: new ol.style.Circle({
       radius: 10,
       fill: new ol.style.Fill({color: 'red'})
       })
   })
});

.. layer is added to map etc

map.on('singleclick', function(evt) {
   var place = null;
   allFeaturesAtPixel = [];
   map.forEachFeatureAtPixel(evt.pixel, function(feature, layer) {
   allFeaturesAtPixel.push(feature);
   place = feature;
   });
   if (place) {
      var i;
      for (i = 0; i < allFeaturesAtPixel.length; ++i) {
         console.log(allFeaturesAtPixel[i].get('name'));
      }
   }
   else{
       console.log("No feature");
   }

}

Sorry for extra logging here. When clicking the upper part of circle, the "No feature" text will be printed to log.


texts:
While trying to import a table containing raster data in QGIS , Raster column is not being imported ... I am getting following messages:

Database connection was successful , but the accessible tables could not be determined.
The view 'public.raster_columns' has no column suitable for use as a unique key.
Quantum GIS requires that the view has a column that can be used as a unique key. Such a column should be derived from a table column of type int4 and be a primary key, have a unique constraint on it, or be a PostgreSQL oid column. To improve performance the column should also be indexed.

Please help.

Table Used:

CREATE TABLE everest
(
  rid serial NOT NULL,
  rast raster,
  filename text,
)

After adding primary key constraint also , I am getting same error message.
I use raster2pgsql command to create a sql file corresponding to the raster tif file.
And thereafter  pgadmin to create table in postgis from the sql file ,
Here ,   rid is primary key and of type serial .


texts: Convert st_make_grid object to shapefile

texts:
I've created the following grid:
my_grid_geom = st_make_grid(CLC18, cellsize = 0.4)
my_grid = st_sf(geom = my_grid_geom)
plot(my_grid)

I would like to convert this grid now into a shapefile for further processing in ArcMap. How would I proceed with the conversion of such a polygon object? Seems trivial, but I'm stuck. Thanks!


texts: Color Fluctuation when moving vector data over raster background in ArcMap

texts:
My ArcMap view has a raster background. When moving vector polygons, there is a colour fluctuation inside the polygon. If I change the polygon's symbology to hollow, the effect disappears and there is no color fluctuation.

Is there any way to move the polygons without the color fluctuation, without changing the symbology to hollow?


texts:
In the below code time band doesn't create for merged collection. I don't know why but it returns metadata error:

code link: https://code.earthengine.google.com/3827c156af430c2485aedf28f9273206
Map.centerObject(geometry);

var temporalCollection = function(collection, start, count, interval, units){

  var sequences = ee.List.sequence(0,ee.Number(count).subtract(1.0));
  var originDate = ee.Date(start);

  return ee.ImageCollection(sequences.map(function(i){

    var startDate = originDate.advance(ee.Number(interval).multiply(i),units);
    var endDate = originDate.advance(ee.Number(interval).multiply(ee.Number(i).add(1)),units);

    return collection.filterDate(startDate, endDate).mean().clip(geometry)
    .set('systam:time_start',startDate.millis())
    .set('system:time_end', endDate.millis());
  }));
};

var AOD = function(img){
  var bands = img.select('Optical_Depth_055').multiply(0.001).clip(geometry);
  return bands.copyProperties(img,['system:time_start','system:time_end']);
};

var TIME = function(img){
  var time = ee.Image(img.metadata('system:time_start'));
  return img.addBands(time).copyProperties(img,['system:time_start','system:time_end']);
};

var modisAOD1 = ee.ImageCollection("MODIS/006/MCD19A2_GRANULES")
.filterDate('2000-01-01','2011-01-01')
.filterBounds(geometry)
.map(AOD);

var modisAOD16DAYS1 = temporalCollection(modisAOD1, '2001-01-01', 228, 16, 'days');

print('MODIS AOD 16DAYS 2001-2010:',modisAOD16DAYS1);

var modisAOD2 = ee.ImageCollection("MODIS/006/MCD19A2_GRANULES")
.filterDate('2011-01-01','2021-01-01')
.filterBounds(geometry)
.map(AOD);

var modisAOD16DAYS2 = temporalCollection(modisAOD2, '2011-01-01', 228, 16, 'days');

print('MODIS AOD 16DAYS 2011-2020:',modisAOD16DAYS2);

var modisAOD16DAYS = modisAOD16DAYS1.merge(modisAOD16DAYS2);

print('MODIS AOD 16 DAYS 2001-2020:',modisAOD16DAYS);

var modisAodChange = modisAOD16DAYS.map(TIME);

print(modisAodChange);


texts: What is the difference between area solar radiation and sun shadow volume?

texts: What is the difference between area solar radiation(spatial analysis) and sun shadow volume (3D analysis). Are they both used to show sunlight volume?


texts: Difference between ALOS median and average DEM version?

texts: Downloading DEM from ALOS gives you a Median and an Average version. Which one is to be used for which purpose? In my case, I want to produce an R-Index map using QGis (Slope & Aspect algorithm + some Raster Calculation).


texts: QGIS change legend symbol size independent of map

texts:
I'm using QGIS 2.18. The screenshot below shows the print composer.

At the moment, the only way I can reduce the size of symbols in the print composer is to reduce the size of the symbol on the map.

In the attached, the green star symbol in the print composer legend is huge. How can I reduce the size of the green star symbol in the print composer legend, but keep the size of the green star the same on the map?


texts: Automatic add/load raster layer within selected polygon

texts: Is it possible to automatic load/add georeferenced raster by selecting a polygon in a grid or by making a selection in a map. Perhaps it is possible to make at tool with modelbuilding?


texts:
I'm trying to use jython with GDAL on Windows. Python and GDAL are installed through MS4W and work perfectly together. Jython is installed manually, but I can not import GDAL. I tried to update sys.path on Jython to point to all python sys.path.

But it displays the following error message:

> Traceback (most recent call last):
> File "C: \ myjythonscript.py",
> line 38, in <module>
>      OSGeo import    File "C: \ OSGeo4W \ apps \ Python25 \ lib \ site-packages \ OSGeo \ __init__.py", line 24, in <module>
>      _gdal import ImportError: No module named _gdal

How do I import GDAL to Jython?


texts: SNAPSHOT mode of Feature Layer in ArcGIS JavaScript API 4.x

texts:
Is there any posibility to set Feature Layer in "SNAPSHOT mode", as it was in ArcGIS JS API 3.x?
The main goal is to fetch features once to the client and avoid additional queries at each map pan/zoom for those layers which are static by their nature and have not many features.


texts: Has anyone found a workaround the IMemoryBlobStream.LoadFromFile() error

texts:
As far as I am aware, you will get an error if you try to load large file sizes using the function IMemoryBlobStream.LoadFromFile().

Has anyone found some workaround code to load a file into a IMemoryBlobStream?

What I am trying to do is just insert a PDF document file into a BLOB in an Oracle database, but I am not, and do not want to use Oracle API's.  I am just using ArcOjects for this one.

My code looks like:

public void LoadReport(string fileName)
{
    try
    {
        if (File.Exists(fileName))
        {
            IMemoryBlobStream2 memoryBlobStream = new MemoryBlobStreamClass();
            memoryBlobStream.LoadFromFile(fileName);

            report = memoryBlobStream;
        }
    }
    catch (Exception ex) {
                throw ex;
    }
}

UPDATE

This is the code I have put to finally get the file in the database, now just need to check reading out the file from the BLOB - hopefully it should work.

fs = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);

byte[] bytes = new byte[fs.Length];

int chunkSize = 2 << 17;

int pos = 0;

for (pos = 0; pos < (fs.Length - chunkSize); pos += chunkSize)
{
    fs.Read(bytes, pos, chunkSize);
}
long modResult = (fs.Length % chunkSize);
fs.Read(bytes, pos,Convert.ToInt32(modResult));

IMemoryBlobStream2 memoryBlobStream = new MemoryBlobStreamClass();
memoryBlobStream.ImportFromMemory(ref bytes[0], (uint)bytes.Length);

fs.Close();


texts: What detail of GPX route or track invokes turn alert on Garmin navigation device?

texts:
I have a route that includes many zigzags in single track trails, and my Garmin is alerting me to "turn" on said single tracks.
How can I edit the points on the route to indicate when it is that an alert to turn is actually needed?


texts: Using OSGeo4W program on Windows to convert Sweref99 to WGS84 and get the result in a file

texts:
I will use cs2cs to convert between Sweref99 and WGS84. It works fine, but I want the result table in a file and not just in a DOS window on the screen. How ??

Hans Johansson


texts: Using 'if' function to set field value based on various other field values gives ERROR 999999?

texts:
I am trying to populate a field with a value from another field in the same row, the condition I have set for this to take place is if a third field is equal to 0. In order to achieve this I have written a python script utilizing an 'if' statement and the getValue and setValue functions. I haven't used these functions before and I am having difficulty getting them to work properly. I tried various different lines of syntax but keep getting the same error:

  Runtime error : ERROR 999999: Error executing function.

This has left me a little baffled as I am not sure where the problem lies. Anyway, here's the script:

import arcpy

joinFC = "C:\MyArcGIS\Link_tool\Join22.shp"

rows = arcpy.UpdateCursor(joinFC)
for row in rows:
    if row.getValue("Input") == 0:
        edrn_value = row.getValue("LCC_DRN_3")
        row.setValue("DRN_input", edrn_value)
        rows.updateRow(row)

del row, rows

In case it is not obvious I am using ArcGIS 10.0. The field types for the three fields are:

LCC_DRN_3 = String

Input = Long

DRN_input = String

Does anyone have any idea why this script is not working?


texts:
I have a 6 band Landsat image, RGB and 3 NIF bands. As far as the Band Interleaved by Line (BIL) method goes, the resulting image should have, and I quote ENVI manual:

  the first line of the first band followed by the first line of
  the second band, followed by the first line of the third band,
  interleaved up to the number of bands. Subsequent lines for each band
  are interleaved in similar fashion. This format provides a compromise
  in performance between spatial and spectral processing and is the
  recommended file format for most ENVI processing tasks.

So with 6 bands, I should get something like this:

With the resulting image "streched" with the same row number from each of the band in sequential order, or 6 rowed blocks per the whole image.

However, the result ended up like this:

and with 800*800 pixels, each segment is clearly more than just 6 rows.

I am at lost as to why it's displayed this way.

Appreciate any help in regards to the matter.


texts: GDAL - Resize a image to a specific dimension, while maintaining ratio

texts: I want to resize an RGBA geospatial image to a specified smaller height and width using GDAL tools while maintaining the image ratio and centering the original image content. Specifying the height and width together is important, and will required add "padding pixels".  A Python solution is ok.


texts: OpenLayer2 - center map based on lon/lat of POI

texts:
Is it possible to center the map to the coordinates of a POI, imported by using a text file? (OpenLayers.Layer.Text)

var pois = new OpenLayers.Layer.Text( "My Points",
                { location:"./textfile.txt",
                  projection: toProjection
                });
map.addLayer(pois);

map.setCenter (????, zoom);


texts: Why can't I access my ArcGIS Server externally?

texts:
I have Windows 2012 Server x64 with SQL Server 2012.
I'm also using IIS 8 as a web server on the same machine.
I've installed ArcGIS for Server 10.1 SP1 and ArcSDE 10.1 both on the
same server.
I've also installed the Web Adapter 10.1 SP1.

I configured the Web Adapter's GIS Server URL to MyServer:6080
The Web Adapter returned:

Status: The following GIS servers are registered to your Web Adaptor
MyServer

The firewall on the server is currently off.
Port 80 on the router has been forwarded.
I want to be able to access the rest services off network via
External IP/arcgis/rest/services
Do I need to set certain settings in IIS for the Web Adapater?


texts: Select by Location using first points of polyline

texts:
I am trying to select a point from a point layer that intersect a polyline layers firstpoint and using arcpy.  I am getting an error "ExecuteError: ERROR 000622: Failed to execute (Select Layer By Location). Parameters are not valid. ERROR 000623: Invalid value type for parameter select_features."

import arcpy

def main():

    arcpy.env.workspace = r'D:\My Documents\SR91_FeasibilityStudy\GISData\SR-91.gdb'

    arcpy.MakeFeatureLayer_management('Build2035', 'plLayer') #polyline Layer
    arcpy.MakeFeatureLayer_management('Build2035_pts_CollectEvents', 'ptLayer') #point Layer

    with arcpy.da.SearchCursor('plLayer',("Shape@","OID@")) as cursor:
        for row in cursor:
           arcpy.SelectLayerByLocation_management('ptLayer','intersect',row[0].firstPoint)
           result = arcpy.GetCount_management('ptLayer')
           print result


texts: ArcSDE/ST_Geometry: Can I store polygon and point geometries in same row?

texts:
In the system I'm building, we've got a facility that can be represented as either a point, or a point within a polygon (the point in the polygon may or may not be the polygon's centroid).

I'm using Oracle/ArcSDE with the ST_Geometry storage type. Is it possible to store both point and polygon data for a single feature? Or does each require its own record?


texts: How to rasterize geojson polygons such that the contour of the polygons appear?

texts: I know I can use raterio rasterize to have the outside of polygons as 0's and the inside as 1's, but I Would also like to have the boundaries (as 2's?) so I can separate the different polygons.


texts:
I have geolocated imagery which I would like to plot in Google Earth. I have the 4 corner points of each image, and I am currently laying the images down using GroundOverlay and gx:LatLonQuad.

My problem is that I have a lot of images (they are in sets of 20-25, and I have 10 or 20 of these sets to lay down), and these KMLs will be ingested into another program. I would like to have all the images in each set of 20-25 in a single KML file.

The images in a set are close together (in fact, they are contiguous) and about 200 yards wide. Although the individual images in a set are contiguous and quadrilaterals, the overall shape (of all the contiguous images in a set) does not form a rectangle or quadrilateral, but more of a zigzag path.

Is there a feature that works like MultiGeometry for shapes which I can use with GroundOverlay and gx:LatLonQuad to put multiple ground overlaid images in one KML?

My individual KMLs look like this:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"
 xmlns:gx="http://www.google.com/kml/ext/2.2">
<GroundOverlay>
  <Icon>
    <href>files\image1.jpg</href>
  </Icon>
  <altitudeMode>clampToGround</altitudeMode>
  <gx:LatLonQuad>
    <coordinates>
       ...image 1 coordinates here...
    </coordinates>
  </gx:LatLonQuad>
</GroundOverlay>
</kml>

I would like to have a single KML file with multiple ground overlays, with all the images in the same "files" folder. Is there a way to do this, or something equivalent?


texts: Find maximum extent out of list of shapefiles (in projected coordinate system) in R

texts:
I have a script where I crop a list of rasters by the extent of one of many shapefiles. So far all of by shapefiles have been such that I could manually select the one with the largest extent (i.e. all others fit within the largest one). But I'm trying to make my script automated (and robust) so that it generates the largest extent considering a list of shapefiles that may overlap (i.e. one has greatest x_max, another greatest x_min).

Here's a (mostly) reproducible example (even though birds is within cities, it's a start). The output of my code would ideally generate something with the same as the extent of cities (a better example would be one with mixed values, but this is the best I could find).

library(rgdal)
library(raster)

dsn <- system.file('vectors', package = 'rgdal')[1]
cities <- readOGR(dsn = dsn, layer = 'cities')
birds <- readOGR(dsn=dsn, layer = "trin_inca_pl03")

shapefile_vector <- c(cities, birds)
shapefile_plots <- lapply(X = shapefile_vector, FUN = plot)

extent(cities)
extent(birds)

find_extent <- function(shapefile){
  as.matrix(extent(shapefile))
}

shapefile_extents <- lapply(X = shapefile_vector, FUN = find_extent)
shapefile_extents

I can't figure out how to go from a list of matrices (shapefile_extents) to a list of absolute max coordinates to use in something like (taken from Crop a raster file in R):

e <- as(extent(-16, -7.25, 4, 12.75), 'SpatialPolygons')
crs(e) <- "+proj=longlat +datum=WGS84 +no_defs"
r <- crop(worldpopcount, e)


texts:
I wish to draw a shape that looks like the following shape:

I have very exact widths of each of the arcs in mind, and a constant spacing between the arcs.

How can I draw this in AutoCAD?


texts: Identify Features tool - selecting multiple features unless I really zoom in. Way to adjust selection radius

texts:
Identify Features tool - it selects multiple features unless I really zoom in. Is there any way to adjust the "selection radius" of the Identify Features tool so its "point sharp". I want to keep the map zoomed out (to have many features shown) yet still be able to pinpoint a tiny feature, point and click on it, then have  my QT Designer UI pop up.

Update

Answer below was very helpful. Just wondering if the Identify Features Tool can go any "sharper" than 0 MM? Or can the Identify Features Tool icon be swapped out for cross hairs?

Before the click:

After the click

Two features are selected. I believe the arrow icon is is actually a rectangle. Ideally it would only be the tip of the arrow that was "hot". Or, any way to swap that tool out for a cross hair?


texts: Show a kml (which uses longitude and latitude EPSG:4326) in "google/OSM" projection (EPSG:3857) in open street map

texts:
I am showing a kml layer, over OSM. The points in the kml are latitude/longitude (EPSG:4326).

I don't have to convert any points or anything, it all just works. Great!

Now, the client also wants to be able to see the kml by itself (without any background map).

If I try to set the kml as the base layer, the country (England) looks squashed (at least, it is squashed compared to OSM). This doesn't surprise me, but I need it to look exactly the same regardless if OSM is the base layer or not.

Here is what I have at the moment:

var lon = 0;
var lat = 54;
var zoom = 6;
var kmlPath = 'E92000001.kml';
var map;
var projection4326 = new OpenLayers.Projection('EPSG:4326');
var projectionGoogle = new OpenLayers.Projection('EPSG:3857');

function init(){
    map = new OpenLayers.Map({
        projection: projectionGoogle,
        div: "map",
        layers: [
            new OpenLayers.Layer.Vector("KML", {
                strategies: [new OpenLayers.Strategy.Fixed()],
                isBaseLayer: true,
                //sphericalMercator: true,
                projection: projection4326,
                protocol: new OpenLayers.Protocol.HTTP({
                    url: kmlPath,
                    format: new OpenLayers.Format.KML()
                })
            })
        ]
    });

    map.setCenter(new OpenLayers.LonLat(lon, lat).transform(projection4326, projectionGoogle), zoom);

    console.log(map.baseLayer.projection);
}

I have tried variations on this (setting the map projection to 3857, and the kml's to 3857 as well) but usually the kml doesn't render at all, or renders off screen (and still squashed).


texts: How to permanently join MDB database (access) table with spatial data in ArcGIS for Desktop?

texts:
I have an Access file (*.mdb), and I want to join between this attribute data with its spatial data ? But other than (join & relate way) .

And I need it to be permanent .


texts: Checking if z values of contour lines are correct using ArcGIS Desktop?

texts:
What is the easiest way to check if z values of contour lines are correct in ArcGIS?

I need just to look at the values, to see if equidistance between them is correct and unchanged.