texts: Improving speed on pgRouting on table update with many rows: faster to loop on each row than a table update call?

texts:
I am updating thousands of rows in a survey table finding shortest path from each place a survey respondent visits.  My code below is the query I use to update the blank route column.  The function "pgr_fromAtoPO" is the same as the "pgr_fromAtoB" listed on the pgr tutorial, except the name of the tables have been changed.  I initially tried to run the querry to update my entire table, with 90,000 rows of start and end points.  This ran for 2 days and crashed my 8GB RAM 2.0GHZ quad core macbook pro, so I have since changed my querry to limit the rows to 5,000.  This querry took below took 112 minutes on 5000 routes.

update analysis.po_routing
set route = (select st_multi(st_union(geom)) from pgr_fromAtoPO('osm2po_routing',x1,y1,x2,y2))
where uniqueid <    605300515
and uniqueid >=     604479116
and route is null and x1 is not null;

My question is:  Are these functions optimized for single calls (i.e. what a website might get), so would I be better off looping through each individual row separately rather than a call to update 5,000 rows, and is there some sort of memory limit, such that I would be better off updating a smaller chunk of rows at a time, say 500 or 1000 to improve the speed?  Thanks for your help.


texts: What does the "Standard Distance" output from the spatial point pattern analysis in QGIS 2 represent?

texts:
I have a cluster of points and I am using the Spatial point pattern analysis tool from the processing toolbox in QGIS 2. I am having trouble understanding what the "Standard Distance" output is?

It looks to me like it represents two standard deviations from the mean as it covers about 84% of my data, but this is only a guess. I clicked on the help tab of the tool but there were no details there.

Any one know exactly what the "Standard Distance" layer (dotted circle) is showing?

Thanks

Ando


texts: Making arcpy.ApplySymbologyFromLayer_management() work on CURRENT project of ArcGIS Pro

texts:
I cannot make the ApplySymbologyFromLayer_management work on ArcGIS Pro by any means. The following code runs smoothly but does not give any results:
import arcpy

aprx = arcpy.mp.ArcGISProject("CURRENT")
aprxMap = aprx.activeMap
layer = aprxMap.listLayers()[0]
symblayer = r"C:\referencelayer.lyrx"
arcpy.ApplySymbologyFromLayer_management(layers, symblayer)
aprx.save()

Any ideas?


texts: Taking draw features as GeoJSON after completed drawing?

texts:
this is source code which ı have copied from openlayers documents.
https://openlayers.org/en/latest/examples/draw-features.html

     <!DOCTYPE html>

        <title>Draw Features</title>
        <link rel="stylesheet" href="https://openlayers.org/en/v4.5.0/css/ol.css" type="text/css">

        <form class="form-inline">
          Geometry type &nbsp;
          <select id="type">
            <option value="Point">Point</option>
            <option value="LineString">LineString</option>
            <option value="Polygon">Polygon</option>
            <option value="Circle">Circle</option>
            <option value="None">None</option>
          </select>
        </form>

draw.on("drawend",function(){

  //How to catch draw features as Geojson in this method.

});

How do I take draw features as GeoJson after completed drawing?


texts: World file calculation when rotation is close to 90 degrees

texts:
I am trying to calculate a world file for an image given the following information.

Pixel size
Rotation around top-left
Top-left corner

The calculation is as follows:

  var world_file =
    { A: scale[0]
    , D: -(Math.tan(source.getRotation()) * scale[0])
    , B: -(Math.tan(source.getRotation()) * scale[1])
    , E: -scale[1]
    , C: tl[0]
    , F: tl[1]
  }

There is a problem when the image is rotated nearly precisely 90 degrees. The value of Math.tan tends to infinity as the argument tends to pi/2. This makes the B and D values way too big.

For example when

scale = [0.9267397812797137, 0.9267397812797137]
source.getRotation = 1.5762954120038497 (nearly precisely pi/2 = 90 degrees)
tl = [..] (irrelevant)

both the D and B parameter get very large incorrect values.

However, I don't really see how to fix this as it seems an inevitable part of using a world file. Do my images have to already approximately rotated before positioned precisely with the world file?


texts: Invalid Geometry Error after ST_ConvexHull

texts:
I've a Postgis table of around 80,000 points and want to be able to populate a second table summarizing the data with convex hulls based on points with a common attribute.

For example, the data contains the telephone exchange which each point is associated with - I want to create a convex hull for all points in each telephone exchange. It ought to create around 1000 overlapping polygons.

I tried using the normally excellent QGis ftools convex hull plugin with the option to create hulls based on an input field but my computer spent 6-hours maximising 3 of the four cores before crashing QGis.

And I've tried doing it directly in sql:

  INSERT INTO new_table(exchange_name, the_geom)
      SELECT exchange_name, ST_ConvexHull(ST_Collect(the_geom)) As the_geom
        FROM first_table
    GROUP BY exchange_name

But this complains about invalid geometry - I've tried geometry constraints of "MULTIPOLYGON" and generic "GEOMETRY" so not sure why this should happen - the source table loads perfectly in QGis.

The Grass "v.hull" tool only creates a convex hull for all points and not based on an attribute.

Any tips or suggestions would be very welcome!


texts:
I am working on a navigation thing that show next/previous views. I am storing
the map's current zoom, center and rotation to an array object. But I want manage that history and navigation in a efficient manner.And I don't want to use the browser's history.

Is there any default methods or functionalities in Openlayers 3 to provide the prev/next thing ?


texts: How can I convert Polygon to LinearRing Geometry?

texts:
How can one convert a Polygon to LinearRing geometry using OpenLayers? I'm thinking that I can do this by getting bounds of the polygon, then use this to construct a Points array. Finally, use OpenLayers.Geometry.LinearRing(Points_Array) constructor to create the LinearRing. My attempts so far have flopped. Any code samples on how to achieve this will be highly appreciated.

UPDATE:
I've accepted @drnexgis' answer for what it taught me on converting geometry to GML format. It only partially answered the question, but it was helpful.


texts: How to handle "Mount: Access Denied" when installing QGIS on Win7?

texts:
I tried to install qgis on my laptop with Windows 7 Professional and it is a 64 bit machine. after going through the procedure described below I got the message "Mount Access Denied".
What is going on? Any help would be greatly appreciated.
Thank you.

I downloaded osgeo4w-setup
clicked on install using "Advanced Install";
Selected "Install from local directory";
Selected "C:\OSGEO4W" as the root directory for the install;
Expanded "Desktop"
Selected "qgis"
Selected "1.8.0-5"
Expanded "Libs"
Selected "GDAL"
Selected "1.9.2-2"
Clicked "NEXT"
Message: "Mount: Access Denied"


texts: What software to use as an all-around solution for mining GIS?

texts:
My employer wants me to look into constructing geology maps, modeling 3D subsurface geological formations, producing geological cross sections and other mining related products from various drill hole and survey data.

I am looking for recomendations for a software package or an ArcGIS plug-in.  I am currently looking at "Target for ArcGIS by Geosoft" and "Surpac by GEOVIA."  It seems that Target is great for the back-end data organization and the generation of cross sections but although it can visualize data in 3D it seems that it lacks there. On the other hand the Surpac software seems to focus on 3D modeling and editing.

We already have ArcGIS 10 (Editor) with 3D Analyst and Spatial Analyst so I'd prefer a recommendation for a plug-in (Add-in) that extends ArcGIS functionality to the above mentioned areas.


texts: Adding thousand separator to item variable map_scale

texts:
Using [%round(map_get(item_variables('MyMap'),'map_scale'))%] in a text field in the print composer we can retrieve scale of the targeted map item. The output of the expression is e.g. 10000 - but I would like to add a thousand separator, so the output looks like 10,000.
I am aware that I could check for length of returned string and add the separators by concatenation, but that is tedious to create, error-prone and needs an additional check for lengths above 6 digits, too.
So, using QGIS 3.10 is there an option to add the thousand separator to the returned value of the expression mentioned at the beginning?

Side note: Using the numeric scale bar is possible, but not desired, since I want to incorporate the variable into a small text item.


texts: Checking if spatial references of two layers are same using ArcObjects?

texts:
I have two layers . Now I want to say that the spatial references of these layers are same or not ..

I am using .Net technologies in arcmap.

I have successfully got spatial reference information from layers and now I want to compare these spatial references ..

Example

sp1 , sp2

if(sp1 == sp2)

       give message to user that spatial references are same;

else

     give message to user that spatial references are  not same;

How do I know if these spatial references are same?


texts: How to encrypt/decrypt the database password with FME 2011?

texts:
Is it possible to use the encryption MD5 or other for database password with FME 2011?
Link


texts: What is causing this shift in coordinates?

texts:
I'm working on taking raw GPS measurements and getting a position from them. It involves double differencing measurements from a fixed base station (with a known position) and a rover (in my case, an airplane). I'm following the procedure explained by Geoffrey Blewitt in Basics of the GPS Technique: Observation Equations, starting on page 36.

My problem is, the position I get from this solution is very consistently off by 15 meters or so, with X, Y, and Z coordinates all off by a set amount (5, 10, and 9 meters, respectively). This happens even if the plane is turning.

I've tried accounting for the ionosphere by using an ionosphere-free combination of L1 and L2 measurements. The troposphere shouldn't be an issue due to the short baseline in my case (~5km). And since the measurements are double differenced, I shouldn't have to account for satellite or receiver clock delays.

This leads me to my question: What other sources of error exist in GPS that could cause a translational shift like the one I'm experiencing? Did I miss something? And if so, how do I correct it?


texts: Issue showing multiple labels on a polygon of OpenLayers2

texts:
I am facing an issue, that I want to show multiple labels on each polygon of OpenLayers.
 I am defining styles in style editor of a layer.like

 <sld:Label>
           ogc:PropertyName>XYZ< /ogc:PropertyName>
 </sld:Label>

where xyz is one of the columns in my query. Now I want to show one more column on the polygon from query and the attribute should be one after the other on the polygon.


texts: How analyze reliability of position of new point based on point data

texts:
I am working on filter for biogeographical data. It is based on citizen science principle. People put new point data to database and I want add information about "reliability" or probability (maybe expressed by score) of added point. Please look on the picture for better understanding.

In the picture it is visualize like zones with score, but it is only one way how to get something like this. Other maybe should be use distance between points. I don't know what I should find and where I should start finding.

What should I search on the internet and books when I need explore more ways how predict probability (or some type of score) to express new added point is placed good (It can be placed there)?

I need handle it in python but for a start it is probably good idea try it in QGIS or ArcGIS, or other software.

EDIT

So I tried something like this:

It looks it works but, what do you think. Is it good approach with appropriate formula?

Then I thought about Mean of Inverse distance. What do you think about this approach?

Should I define some buffer or distance where I will take points into account for RMSE?


texts: Correcting gaps and overlapping polygon (parcels) geometry

texts:
I have come across a resource that we rely upon almost daily that is in terrible need of repair. It is not our own product and the supplier is generally not interested in fixing the problem.

We are using a polygon shapefile which contains upwards of 2000 parcel boundaries. The parcels themselves are not parcels in the general sense of the term, but nevertheless, it describes the data quite effectively. No 'parcel' shall overlap or produce gaps between parcels. However, the data quality is terribly low and it almost seems like the parcels have been drawn by hand with snapping disabled! See picture below:

In some cases, it is much worse than in the photo, or the gaps/overlapping is so small that they are unidentifiable until after running spatial procedures (such as intersections).

How would one go about fixing these kinds of issues? I have attached the shapefile which represents the 8 polygons in the photo. These 8 polygons show both my gap and overlapping issue. Can the process be automated to fix my 2000+ parcels?

http://temp-share.com/show/dPf3mpihW

Note: I have explored the "fix geometry" tool in ArcMap, but this only corrects the overlapping polygons. Albeit the overlapping geometry is the worse of the two problems, I'd like to fix both if possible!


texts: Reformatting Dictionary Objects to rows and columns in Google Earth Engine

texts:
I'm new to GEE and trying to figure out how to create a table with 4 columns (month, Tmaxmin Tmaxmean, and Tmaxmax) with 444 entries for each. Any ideas on how to do this?? Here's my code.
// Load and define the region of interest

var subwatershed = ee.FeatureCollection("users/cherratc/subwatershed-polygon")

// Load the TerraClimate image collection and filter it by the date range and variable

var dataset = ee.ImageCollection('IDAHO_EPSCOR/TERRACLIMATE')
  .filterBounds(subwatershed)
  .filterDate("1979-01-01","2016-01-01")
  .select("tmmx");

// Convert dataset from ImageCollection to Image

var image = dataset.toBands();

// Divide Image to obtain results in degrees celsius

var scaledImage = image.divide(10);

//Compute mean minimum temperature across ROI for each month

var subwatershedMean = scaledImage.reduceRegion({
  reducer: ee.Reducer.mean(),
  geometry: subwatershed.geometry(),
  scale: 30,
  maxPixels: 1e11
});

print('TMaxMean',subwatershedMean);

// Compute upper bound for maximum temperature for each month

var subwatershedMax = scaledImage.reduceRegion({
  reducer: ee.Reducer.max(),
  geometry: subwatershed.geometry(),
  scale: 30,
  maxPixels: 1e12
});
print('TMaxMax',subwatershedMax);

// Compute lower bound for maximum temperature for each month

var subwatershedMin = scaledImage.reduceRegion({
  reducer: ee.Reducer.min(),
  geometry: subwatershed.geometry(),
  scale: 30,
  maxPixels: 1e12
});
print('TMaxMin',subwatershedMin)

// Create table with all three variables and export it to an excel spreadsheet

https://code.earthengine.google.com/d49bb64c187418ae7d405821c50c99a7


texts: Where is XSD file for XML found in Gdb_Items table?

texts:
I would like to be able to deserialize the xml in Gdb_items table using .NET.

The xml in an sde geodatabase appears to be the same as the xml returned using the File GDB API.

I tried using xsd.exe to generate c# code from the xsd files in C:\Program Files\ArcGIS\Pro\Resources\XmlSchema\Geodatabase.xsd.

While the classes are similar, e.g. DEFeatureclass looks a lot like the DEFeatureclassInfo from Gdb_Items xml, they don't match exactly.

Does anyone know where I can get a schema definition file I can use to generate c# code that can then be used to deserialize Gdb_items xml in .NET?


texts: Drawing horizontally/vertically aligned rectangular polygon in ArcGIS Desktop?

texts:
I am trying to draw some rectangles in a polygon layer, to be used to highlight points for checking, and will be used in Data Driven Pages.

I want these to be horizontally aligned, however the "Rectangle" Construction Tool uses the direction you start drawing.

As a result I have to select the Rectangle construction tool, click on the map to start drawing the polygon, right-click > Direction > 0 to restrict it to drawing east/west (horizontal), and then draw the rectangle.

I have many of these I need to draw, so having all these extra clicks and keypresses seems excessive when I just want to draw a rectangle!

How can I efficiently create horizontally aligned polygons in ArcMap?


texts:
It seems I can't count the number of individual points contained in multipoints geometries with

CREATE TABLE count_table
AS
  SELECT poly_table.id,
    count(multipoint_table.geom) AS count
  FROM poly_table
  LEFT JOIN multipoint_table
    ON ST_Contains(poly_table.geom, multipoint_table.geom)
  GROUP BY poly_table.id
;

but I will only count the number of multipoint geometries.

Should I ST_dump?


texts: Filtering GML data by attributes (not attr.value) on the server side for calling them with http protocol, Openlayers

texts:
Supposedely it is easy but I can't figure it out:
How to get data from server (format: gml) which contains all features but not all of the attributes?

I have really big data and it is important just to call the relevant of them on a single click, because otherwise the loading time is inacceptable.

At the moment I call the data with http protocol, like:

 var protocol = new OpenLayers.Protocol.HTTP({
                url: 'path to the gml file',
                format: gml
                });

var vectorLayer= new OpenLayers.Layer.Vector ('layer', {
        strategies: [new OpenLayers.Strategy.Fixed()],
        protocol: protocol,
        styleMap: styleMap,
        rendererOptions: {zIndexing: true}
        });

I assume that I should use the filterToParams method, however, I don't understand it exactly how it works.

It would be great if somebody could post me a fictious example. I mean what should I do, when I just want to have all features and the attribute "att1" to the features, but not any other attributes?

It would be a great help!


texts: Is possible to create a set up of the tiger geocoder in different hardrives?

texts:
I have a local setup of the geocoder, after some test, I realized that the time for the states is different. Some states have more data and the geocoding takes much more for these. E.G. for MA the average time is around 300ms but for CA the time is around 20-30 seconds. I have this on a Ubuntu machine with 8GB of ram and HDD.

My idea is to create a different DB in SSD to put the states with more data and keep the smaller ones in a HDD, is this a feasible approach to improve performance?


texts:
I am trying to set up an offline version of OpenStreetMap to use on holidays where internet can be spotty. Following https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/, I have managed to do so.

I am no wondering if there is any "easy" way to add elevation information? E.g. contour lines. My search on the internet has only revealed the guide (http://wiki.openstreetmap.org/wiki/Contours), which seems a bit outdated. For example, it recommends using XML styles and does no.
t tell me how to turn it into a carto style. Also I am unsure from it which approach is better Shapefile or PostGIS?

Does anybody know a better guide? Is there a better approach on how to add contour lines?


texts: Drawing from .dxf-import to QGIS is situated off the CRS

texts: I created a drawing (extent of an area) in Autocad LT 2021 which I want to import to QGIS. In QGIS are the boundaries of a city which should be overlayed with my drawing. My drawing is already geopositioned in AutoCAD in the CRS ETRS89.UTM33. I have set everything in the right CRS but the drawing appears beyond the extent of the worldmap. I can't just not find the mistake. Can somebody tell me what went wrong?


texts:
I am currently having some problem with the spatial reference projection on the map in Android.

Basically I have a base map which is OneMap and all the coordinates stored in database is in SVY21 format. However, I wanted to display it using GoogleMap which is in WGS84 format. I wonder is there any ways for me to convert it in Java?

Because by using OneMap Api Documentation, it has a conversion method which is in JavaScript. However, I need it to be in Java for my Android project. Any ideas?


texts:
Before I start I should mention that before this I have never worked in Python before.

I am trying to process a large fc to fc update, 3 million plus rows with 70 columns.  I tried using updatecursor with a searchcursor but performance was extremely slow, around 1 record per minute.  I switched over to using an updatecursor with a dictionary, which hugely improved performance but as I am restricted to 32bit Python I can only process around 600000 rows at a time.  To get around this I am splitting the fc into a smaller temporary fc and then running the dictionary update on these before deleting the temporary fc and dictionary and looping back through.

This works perfectly for the first iteration but then gives a memory error on the dictionary on the second iteration.  I have tried forcing garbage collection to try and clear this issue but that didn't work.

I can only guess that there are still references open to the dictionary.  Any insights and suggestions would be most welcome.

Here is the offending section of code

please excuse the print commands, they are only there for testing.

# start changes

# split changes into smaller feature classes
lyr = arcpy.mapping.Layer(sourceFc)
arcpy.SelectLayerByAttribute_management(lyr, "CLEAR_SELECTION")
fList = list()

with arcpy.da.SearchCursor(lyr, "OID@", "Change_Type = 'C'") as cursor:
    for row in cursor:
        fList.append(row[0])

listGroup = listSplit(fList, outputNum)

for x in listGroup:
    lyr.setSelectionSet("NEW", x)
    arcpy.CopyFeatures_management(lyr, outputFCName)# + str(nums))
    #process changes
    upDict = {r[0]:(r[1:]) for r in arcpy.da.SearchCursor(outputFCName, fields)}
    print "Dictionary Created"
    with arcpy.da.UpdateCursor(targetFc, fields) as updateRows:
            for updateRow in updateRows:
                keyValue = updateRow[0]
                if keyValue in upDict:
                    for n in range (1,len(fields)):
                        updateRow[n] = upDict[keyValue][n-1]
                    ucount = ucount + 1
                    updateRows.updateRow(updateRow)
    del(upDict)
    gc.collect()
    arcpy.Delete_management(outputFCName)
    print "Processed " + str(ucount) + " records."


texts:
I wish to modify a PostGIS function ST_PixelAsCentroids. What is the best way to go under-the-hood of PostgreSQL/PostGIS functions and modify and customize them as you wish?

I'm not hitting the right keywords on Google it seems to find out and it would be great to have this on GIS.Stack.


texts:
I am trying to understand the source code of the web application: NetCDF WMS with n Dimensions. I tried to run it on my own machine (Mac OS 10.10) and it is run on the Apache. However, I keep getting the error 403 (Forbidden), yet I can't find out the reason.

The application requires a proxy file. I added two lines to let the application know where is the proxy:

function init(){
 initMap();
 /* Here are the two lines code I added */
 esriConfig.defaults.io.proxyUrl = "proxy/"
 esriConfig.defaults.io.alwaysUseProxy = false;
}
//show map on load
dojo.addOnLoad(init);

The error message is:

(init.js:157)

GET http://localhost/WMSMultiDimensionalEsriViewer/proxy/?http://sampleserver6.…Dimensional_Sample/MapServer/WMSServer?request=GetCapabilities&service=WMS 403
(Forbidden)

The screenshot is here:

Can anyone please point out the issue?


texts: Calculate 2D line of site from line layer and polygon layer using ArcGIS 10

texts:
I'm trying to run an analysis where I need to clip a radiating lines layer by land features to get the maximum distance from the central point to the nearest obstacle. What I have is a large line layer containing approximately 40,000 points, each with 32 radiating lines extending out at equal intervals (e.g. 11.25 degrees) and a vector polygon file representing coastlines and reefs.

The problem I'm having is that the "Clip" and "Erase" functions remove the sections of line on land but when a line encounters a small obstacle the tool only removes the section over land and leaves the portion of line which continues on afterwards (e.g. adjacent bays, other side of peninsulas, etc). This is especially problematic in regions with complex coastal features.

What I need to do is remove the hanging lines after the nearest land.

I've looked into line of sight analyses but the only one's I can find rely on 3D surfaces. Does anyone know of a 2D version where all line fragments will be removed after reaching the nearest obstacle?

This needs to be as automated as possible as I'm dealing with large datasets (24 to be exact, each with 40,000 points).

The end goal is to produce a layer to calculate wave fetch.


texts: how to fetch the features that are making up the image of a dynamic or tiled service ?

texts:
It it possible to to know the position of the points that an image  coming from dynamic or tiled services contain.
I need this to implement a custom mouse-over event for tiled/dynamic services.


texts: Printing data driven pages takes a long time or not working

texts:
I am using arcmap 10.2.2

I have a document that has 31 data driven pages on it. Each page is in the 1:6500 scale, and I have a background map consisting of 15 different shapefiles for a county (like river, roads, builidings etc).

When I print this, it takes a very long time. I tried with 1, and that goes ok. But 5 takes like 20 minutes, and I am unsuccesful printing any more than that. On the bottom left bar in my arcmap, it says "Drawing roads.shp, Drawing buildings.shp" over and over and over. It's like it's stuck in a loop, even though it managed to print 5 pages after quite some time. I tried to read up on this, but I can't find anyone with the problem. Is there anything I do wrong? I've tried exporting the map to a pdf, but the same problem comes up there as well.


texts: Add a second click function to a selected polygon feature in Openlayers 4

texts:
I am trying to add a click function to a selected feature which will delete this selected feature in OpenLayers 4.

  var Delete = {
    init: function() {
      this.select = new ol.interaction.Select({});
      map.addInteraction(this.select);

      this.setEvents();
    },
    setEvents: function() {
      var selectedFeatures = this.select.getFeatures();
      selectedFeatures.on('add', function(event) {
        var feature = event.element;
        // delete the layer/feature on clicking again
        feature.on('click',function(e){
            vector.getSource().removeFeature(feature);
            selectedFeatures.clear();
        });
        console.log(feature);

      });
    },
    setActive: function(active) {
      this.select.setActive(active);
    }
  };
  Delete.init();

But this second click function is never triggered. Is there any other way to attach a click event handler to the selected feature in OL4 and then remove that handler if it is unselected.


texts: i have gis database called Madar in pgadmin with postgis and pgrouting extension, all the data inside gis database already inserted by shp2postgre tool , what i really need now is how to make topology table for routing ?


texts: Releasing all schema locks in ArcGIS GDB

texts:
We use ArcGIS 10.3 products (Server, Desktop) with Oracle database. Our problem is we can not make any schema changes because of shared schema locks unless we stop all services and kill all database connections. Even though we disable "Lock database schema" option for services, there are still some locks we can not figure out which user or service it belongs to. With ArcObjects we get a list ISchemaLockInfo but it only contains tablename, username and locktype properties.

When we investigate SDE schema, there is a table "TABLE_LOCKS". Is deleting all rows in this table or disconnecting all users from database (kill connections) bad idea? Or is there any other any way (manually or programmatically) for getting an exlusive lock?


texts: Displaying of flight altitude in QGIS 3.4

texts: I have seen Google Earth screen grabs of GPS bird trackers that show the altitude as a "curtain" extending down to ground level from the track. Is this possible in QGIS?


texts: Are there reference manual pages anywhere for QGIS built-in "buffer" and plugin "points2one"?

texts:
Perhaps I am missing some quick pop-up help mechanism, but as a relative newcomer to QGIS (having cut my teeth on ArcGIS 10.1), I am struggling to find reference manuals (i.e. explanations of all parameters/operations) for many of the core commands/plugins. Most of the help seems to be in the form of tutorials, which though some are remarkably well written are not in a useful format when you want to know "what does field X in this dialogue box do?"

Firstly when trying to use the built in Vector -> Geoprocessing -> Buffer tool, what does the "segments to approximate" setting actually mean? Searching the official help pages I could only comes up with the following interesting but rather discursive article:

http://docs.qgis.org/2.2/en/docs/gentle_gis_introduction/vector_spatial_analysis_buffers.html?highlight=buffer

For the Points2one plugin, I've found some quite helpful information already on StackExchange for getting it to do basically what I want, but am surprised that I'm having to scrabble round for such information long after finding the plugin itself. Does anyone know if there is manual page for it? I couldn't find anything from its homepage:

https://launchpad.net/points2one


texts:
I'm trying to render both house numbers and icons for sirens on a map in QGIS. Now I have added two layers with siren nodes and building outlines, the siren layer being above the buildings.

In the label rendering options of the house numbers, I have activated "Discourage labels from covering features", but still the house numbers are shown above the siren icons. Here is an example:

Can somebody tell me how I can give the siren icons a higher priority so that they cover the house numbers? The house number label could even be omitted entirely in this case, that would not be a problem.


texts: How to make default field in Python Scripts for Processing Framework (QGIS)

texts:
I am building a Python Scripts for Processing Framework

https://docs.qgis.org/2.14/en/docs/pyqgis_developer_cookbook/processing.html

I know how to make default value when the data type is number or boolean:

##Distance=number 50
##carry_test=boolean True

I also know how to make fields in the layer into a drop down table and let user choose from:

##input_layer=vector
##cal_field=field input_layer

Is there a way to populate a default field as well? Say the layer has the following fields:

fid, name, type, color

Normally everytime the user has to check the drop down to choose 'type'. So it is kind of trouble, is there a way to choose the 'type' everytime when the input_layer has the field 'type'?


texts: KML to Layer gives ERROR 000210 in ArcGIS Desktop?

texts:
I keep getting an error when trying to convert a KMZ file in ArcGIS Desktop. It shows up in google earth just fine, and I've never had problems using the KML to Layer tool before.

I keep getting error 000210, and an empty geodatabase is created.The help tool tells me this error could be due to data locking or limited access rights, but  author is open to modification of the file - says so on his website. I'm using this shapefile downloaded near the bottom of the page: http://ontariomap.webs.com/

What do you think the problem is?


texts: How to save/import .shp file data to a PostGIS table in Java

texts:
Ok, I've searched and at a loss as to why I cannot find anything on how to save a shapefile to PostGIS with Java. Thought GeoTools might be helpful, but doesn't seem to be there either.
So here's the scenario and functionality that I've been looking for.

User uploads a file
Java code (Spring) on the server side get the file and checks to see if it is a .shp file
If it is a .shp file, save it to a PostGIS table

It's step 3 that doesn't seem to be out there and what I'd like to find a solution for. In my case the table will have all necessary fields and a couple of other fields to record who uploaded and when etc..


texts: How to hide infoWindow while using measure tool and showing it back after using it ArcGis JavaScript API

texts:
I have an infoWinfow set on the click event of the map. I want to disable this event when I'm using the measurement tool and then enable it back after the measurement tool is used. So far I've done this code, where the click event for the infoWindow is disable when the measurement tool is used. I want to enable the click event back after the measurement tool is used. Any ideas on how this could be done? Thanks.

function initToolbar(mymap) {
var measurement = new esri.dijit.Measurement({
    map: mymap
}, dojo.byId('measurementDiv'));
measurement.startup();
measurement.setTool("area", false);

measurement.areaToggleButton = function () {
    this.clearResult();
    this.setTool("area");
    dojo.disconnect(clickHandler);
};
measurement.distanceToggleButton= function () {
    this.clearResult();
    this.setTool("distance");
    dojo.disconnect(clickHandler);
};
}


texts: Plotting points over raster pixel positions, rather than geographic coordinates in QGIS

texts:
I've been doing some image processing in OpenCV. I have a numpy array which has x1,y1 and x2,y2 coordinates as raster cell positions (so not spatially referenced). I need these coordinates marked off on a raster image, which is spatially referenced in QGIS. Is there a way to plot vector points to raster cell positions?
So to recap I have:

a raster image I can project properly in a map document
raster cell coordinates that don't have spatial information

and I want to plot vector points over the raster cell coordinates, not geographic coordinates.


texts: Help request fixing map errors in QGIS 2.4

texts:
Background:

I am currently working on a project that requires me to translate shapefiles into GeoJSON format and then upload them into MongoDB. There is a problem with MongoDB that prevents it from properly handling geometries which have overlapping/intersecting nodes (points). In many cases I was able to use QGIS to scan for, and fix, geometry errors (particularly if there were few of them since I was relying on manually fixing these with the node tool). However I now have a shapefile that doesn't actually register any errors when I use QGIS -> Vector -> Check Geometry Validity tool, yet it clearly contains points that intersect.

What I've tried:

I admit I am new to using QGIS. I am working with QGIS 2.4 on Arch Linux and I have installed the GRASS package (grass64). I have tried using v.clean command with a variety of options including break and bpol options, yet each time I run that it outputs two new layers (a Cleaned layer and an Errors layer). The Cleaned layer shows up blank, and the errors layer always just shows this single triangle geometry. (see link at bottom of post for reference)

Is there something I can do in terms of settings or different tools/plugins to achieve what I want?

Ultimately what I need to do is separate those corners/points from each other so that >< would become > <. Sorry if this wasn't explained clearly, I hope the images can provide more information to clarify.

Images for reference


texts: Raster shapes are not exactly equal after cropping

texts:
I clipped multiple rasters to the shape of a polygon shapefile.
But, the output rasters do not have exactly the same shapes. I am doing correlation analyses per pixel so I need the array shapes to match up exactly.

Half of them are size (3080, 890), and the other rasters are now (3081, 891).

There's also another problem where even rasters that are of the same shapes, do not have the same physical XY coordinates (but maybe this is less of an issue).

All of the steps I performed on the original rasters to get to this point, using: Scale all rasters to same resolution of 15.0 (some were upsampled, some were downsampled), convert to float32 dtype, crop to polygon shape.

I tried this using both rasterio and gdal, and got similar results with both methods.

Here are a few of the final rasters printed with their metadata info

1.tif
{'driver': 'GTiff', 'dtype': 'float32', 'nodata': nan, 'width': 890, 'height': 3080, 'count': 1, 'crs': CRS.from_epsg(32629),
'transform': Affine(15.0, 0.0, 232058.5,
       0.0, -15.0, 1438428.5), 'tiled': False, 'interleave': 'band'}
XY coords of (0,0) pixel: (232066.0, 1438421.0)

4.tif
{'driver': 'GTiff', 'dtype': 'float32', 'nodata': nan, 'width': 890, 'height': 3080, 'count': 1, 'crs': CRS.from_epsg(32629),
'transform': Affine(15.0, 0.0, 232060.0,
       0.0, -15.0, 1438430.0), 'tiled': False, 'interleave': 'band'}
XY coords of (0,0) pixel: (232067.5, 1438422.5)

7.tif
{'driver': 'GTiff', 'dtype': 'float32', 'nodata': nan, 'width': 891, 'height': 3081, 'count': 1, 'crs': CRS.from_epsg(32629),
'transform': Affine(15.0, 0.0, 232051.0,
       0.0, -15.0, 1438441.5), 'tiled': False, 'interleave': 'band'}
XY coords of (0,0) pixel: (232058.5, 1438434.0)

9.tif
{'driver': 'GTiff', 'dtype': 'int16', 'nodata': -1.0, 'width': 891, 'height': 3081, 'count': 1, 'crs': CRS.from_epsg(32629),
'transform': Affine(15.0, 0.0, 232053.930561042,
       0.0, -15.0, 1438436.08069127), 'tiled': False, 'interleave': 'band'}
XY coords of (0,0) pixel: (232061.430561042, 1438428.58069127)

Is there a way to make them all the same shape? I assume that clipping to the polygon has some small error which is why they are off by 1 pixel col/row.

I was thinking I could just remove the first col and row from the (3081, 891) rasters to make the sizes equal. But then, how do I update the Affine transformation such that the raster is still geographically valid?

Edit: More info
My original rasters are all in the same CRS, but they are different sizes and had different resolutions.

The gdal commands I used were

gdalwarp -tr 15.0 -15.0 orig/K.tif proc/K_resamp.tif
gdalwarp -cutline orig/outline.shp -crop_to_cutline -of GTiff  -dstnodata 255 proc/K_resamp.tif proc/K_cropped.tif


texts:
I'm using ArcGIS 10 desktop version. I have a number of polygons, let's say 300, in a layer. Each polygon contains information of schools, ranging from 100 to 250 points, in a separate point layer. For example polygon "1A" will have all its points marked "1A" in the attribute table along with all other information. Same goes for polygon "2A" and "3A" and so on.

Problem:

As the points have been marked using GPS, a number of points of "1A" actually fall in other polygons, lets say "3A". Is there any idea through which I can select the points that belong to 1A but fall outside the polygon 1A. Switch selection does not work here as it selects the points of all other polygons.


texts: IZ.InterpolateZsBetween, how to use it for multiple parts in polyline

texts:
I want to interpolate Z values for the vertexes in the polyline. Shape file contains few polylines. Polylines do have certain vertexes with correct Z value, others do not have Z value (set to ie. 0). As on the picture below.

How do I interpolate (linear interpolation) vertexes with 0 value?

I figured that IZ.InterpolateZsBetween will do that.
However, with my programming skills at this point, I am able to use basic geoprocessing tools in Python and realy have no clue how to implement ArcObject in it.
Any ideas?
Any known examples of that kind of code would be appreciated.


texts: How to enter a date into the attribute table?

texts: This may be something simple stupid but in QGIS 2.4 I have created a date column. How do I enter the date in correctly. Every time I type a date in, in whatever format it does not move that entered date into my attribute table. So I click on the table and open the form and try again but it never saves my entered data for the date.


texts: QGIS There isn't entry in geometry_columns!

texts:
In PostgreSQL v9.3 with PostGIS v2.1 extensions I created a view from two tables (sites & visits). The site table contained a point geometry column (the_geom), which was included in the created view. Checking the table view it contained the expected information.

In QGIS v2.4 running under Windows 8.1, the sites table containing the geometry column can be added as a layer. However, when looking at the created view table in the DB Manager, it states:

  PostGIS

  Column: the_geom  Geometry: GEOMETRY  Dimension: 2  Extent:
  482350.00000, 132750.00000 - 538750.00000, 177150.00000

  ￼   There isn't entry in geometry_columns!

The table tab shows the table contents as expected, and the preview shows the points which looks reasonable. The icon for the view table is shown as a question mark.

When the view was first created, it could not be added as a layer to the map. However, rebooting my computer has enabled the view to be added as a layer to the map.

Two questions:

What does the error message mean, and how I do I get rid of it?
Why did I need to reboot my computer to add the view table to the
map?


texts: Empirical Bayesian kriging - does data need to be normal?

texts:
With empirical Bayesian kriging (ebk), does the data need to be normally distributed?

If I apply a normal score transformation, my data is still not normal. Is ebk kriging thus an invalid interpolation technique for my data, or can I get around this?


texts: Compiling PostGIS fails when it can't find GDALAllRegister

texts:
I'm trying to compile the latest PostGIS 2.1.0 beta and the configure process fails at:

checking GDAL version... 1.10.0
checking for OGR enabled... yes
checking gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking ogr_api.h usability... yes
checking ogr_api.h presence... yes
checking for ogr_api.h... yes
checking cpl_conv.h usability... yes
checking cpl_conv.h presence... yes
checking for cpl_conv.h... yes
checking for library containing GDALAllRegister... no
configure: error: could not find GDAL

GDAL is installed to the normal /usr, and gdal-config is in my path, and the process still fails if I specify its location when I call ./configure.  Configuration works if I specify --without-raster, but none of the PostGIS extensions are built, only the old fasioned .sql files so I can use ALTER EXTENSION to update my PostGIS database.  Any ideas?


texts: Measuring distance between two points using GeoTools java lib?

texts:
I am using GeoTools to convert X and Y coordinates into points and get the distance between two points. I know that my coordinates are EPSG:32630 Name:WGS 84 / UTM zone 30N (https://epsg.io/32630). Then I created this small test to check the distance between two points. I am not sure if I am converting the X and Y coordinates correctly. And when I transform it to Points it throws an exception.

    Coordinate coordRad01 = new Coordinate(729664.353, 4373064.801);
    Coordinate coordRad02 = new Coordinate(730021.116, 4373070.406);
    Coordinate coordPoi01 = null;
    Coordinate coordPoi02 = null;
    MathTransform transformRadiusToPoint;
    try {
        CoordinateReferenceSystem radiusCRS = CRS.decode("EPSG:32630", true);
        CoordinateReferenceSystem pointCRS = CRS.decode("EPSG:4326", true);

        DirectPosition dp01 = JTS.toDirectPosition(coordRad01, radiusCRS);
        DirectPosition dp02 = JTS.toDirectPosition(coordRad02, radiusCRS);
        System.out.println("DirectPosition dp01: " + dp01 + " dp02: " + dp02);

        Double distance = JTS.orthodromicDistance(coordRad01, coordRad02, radiusCRS);
        System.out.println("Distance: " + distance + " meters");

        transformRadiusToPoint = CRS.findMathTransform(pointCRS, radiusCRS);
        coordPoi01 = JTS.transform(coordRad01, coordPoi01, transformRadiusToPoint);
        coordPoi02 = JTS.transform(coordRad02, coordPoi02, transformRadiusToPoint);

        distance = JTS.orthodromicDistance(coordPoi01, coordPoi02, pointCRS);
        System.out.println("Distance: " + distance + " meters");
    } catch (NoSuchAuthorityCodeException e) {
        e.printStackTrace();
    } catch (FactoryException e) {
        e.printStackTrace();
    } catch (TransformException e) {
        e.printStackTrace();
    }

error:

DirectPosition dp01: JTS.[729664.353, 4373064.801] dp02: JTS.[730021.116, 4373070.406]
Distance: 356.7176800591084 meters
Jul 23, 2019 12:40:26 PM org.geotools.referencing.operation.projection.TransverseMercator transform
WARNING: Possible use of "Transverse_Mercator" projection outside its valid area.
Longitude 729304°21.2'E is out of range (±180°).
Latitude 4372704°48.0'N is out of range (±90°).
Exception in thread "main" java.lang.IllegalArgumentException: Longitude 5449761°17.2'E is out of range (±180°).
    at org.geotools.referencing.GeodeticCalculator.checkLongitude(GeodeticCalculator.java:406)
    at org.geotools.referencing.GeodeticCalculator.setStartingGeographicPoint(GeodeticCalculator.java:549)
    at org.geotools.referencing.GeodeticCalculator.setStartingPosition(GeodeticCalculator.java:591)
    at org.geotools.geometry.jts.JTS.orthodromicDistance(JTS.java:635)
    at org.sense.flink.pojo.Point.main(Point.java:105)


texts: v.clean with rmarea and lat-long projection

texts:
The documentation for v.clean in GRASS 7 says of tool rmarea (which absorbs polygons below a certain area into a larger neighbour):

Threshold must always be in square meters, also for latitude-longitude
locations or locations with units other than meters.

I have a location in EPSG:4283 (GDA94). Running v.clean with the rmarea option prints the following warning to the console:

Note: In latitude-longitude coordinate system specify threshold in degree
unit

These warnings contradict each other. Which is correct? I've been getting the same results on my test dataset using threshold 2500 (assuming square meters) and threshold 0.00000025 (assuming 'square decimal degrees' which I know is dodgy). In both cases, small polygons do disappear, but so do a number of larger ones that shouldn't be caught by either threshold.

edit:

I've traced back through the source code: vector/v.clean/main.c line 438 calls Vect_remove_small_areas, which lives in lib/vector/vlib/remove_areas.c. For a native GRASS-format dataset that uses Vect_remove_small_areas_nat, which on line 240 calls Vect_get_area_area, which lives in lib/vector/vlib/area.c. That function in turn uses G_area_of_polygon, which lives in lib/gis/area.c. That in turn calls G_ellipsoid_polygon_area for lat-long data. That function is in lib/gis/area_poly1.c and does the actual calculation (cripes!).

The documentation for that last function indicates that a threshold in meters is fine. This means my real question is why v.clean is removing polygons that it shouldn't. All I could think of is that some vertices might be too close together for the math in G_ellipsoid_polygon_area to work, as there are comments in the code referencing that as an issue. I can't see any obvious candidates in my data, though. Are there any other possible confounding factors I'm missing?


texts: Displaying BSQ file in ArcGIS ESRI GRID format?

texts:
I have a bsq file and I was able to produce the header from the metadata.

What steps do I take to display this BSQ file in ArcGIS ESRI GRID format?


texts: How to validate Personal Geodatabase against XML schema?

texts: Is there a tool in ArcGIS ModelBuilder which can validate a personal geodatabase and an XML schema to give out an report saying if the gdb is validated or not?


texts: How to code Data Driven Process using ArcPy?

texts:
I need to come up with a Python code to automate a map creation process but I am a little bit of lack of python knowledge. Any help would be much appreciated.
My problem is that I have a 20 mxd file which need an update process in timely manner(this is just one project) and pdf creation for each mxd then appended pdfs. At the moment, I have a tool which creates map index shape file for at the layout view for each mxd.

I want to :

Loop through the index shape file's attribute (first one in the table of contents)
Select or zoom into first row then

 -get mxd name from attribute table(its available in attribute table)

 -specify the destinatin folder to save the mxd(i think that I can get that in attribute table as well) or specify it in the code.

 -save mxd to specified location

 -specify the destinatin folder to save the pdf file

 -save pdf to specified location

Move to next row and do the same process in step 2
When reached the last row append all pdf files created into same locaition as pdfs
Close


texts: R: ggplotting st_cast("MULTILINESTRING") lines: ends points connected to starts, undesirably, why?

texts:
I have the lat-lon positions of various individuals. When I plot multiple individuals at the same time, I see odd lines over land, and have been investigating why. It transpires that plotting multilinestrings in ggplot causes the end points to be connected to their starts, even though I haven't set that anywhere, nor is the connecting point in the data (i.e. the last point isn't a duplicate of the first). Graphically: The entire track of 1 individual:

Note connecting diagonal line. Only for the year 2012:

Note endpoint (leftmost) now connects to updated start point. By month, 2012 only:

Note all months are now loops. Briefly the code I'm using (starting with a data object with individuals & lat & lon & others) is:
data %<>%
  sf::st_as_sf(coords = c("lon","lat")) %>%
  sf::st_set_crs(4326) %>% # these are now sf points with geometry
  dplyr::group_by(IndividualID) %>% # and year, month, etc as needed
  dplyr::summarise(do_union = FALSE) %>%
  sf::st_cast("MULTILINESTRING") # are now lines

ggplot() + annotation_spatial(data)

But if I make a simple csv with 1 individual with 2 points and another with 3, the second individual's start & end points are not connected (i.e. the image looks as it should):

Probing into the data, I looked at the 4th month in the monthly image above:
data$geometry[4][[1]]

MULTILINESTRING ((-83.79274 24.62453, ... , -96.15296 27.13187))

I.e. confirming the last point isn't the same as the first, i.e.
annotation_spatial isn't just doing what it's told. For what it's worth, using "LINESTRING" has the same effect.
If anyone has any ideas why this might be, I'd be very grateful to learn! Thanks.
Edit: confounding the issue, most individuals plot just fine:

So I'm especially perplexed as to why some loop back (and continue to do so when split in different ways) whereas most don't, since they're all created from the same processes.


texts:
I am embarking on a new project and hoping for some pointers. I am reasonably tech savvy but definitely in the "advanced beginner" category for coding... but keen to test myself.

I am trying to find a way to integrate Google Earth Pro in to out Land Surveying database. Our MS Access 2007 database contains circa 2500 old jobs, each with fields representing the Lot, Block and Plan that they are contained within. (A Plan is made up of blocks, a Block made up of lots - each property in the city has, in the most part, a unique Lot/Block/Plan).

The local government has a data warehouse with downloadable KMZ/Shapefiles depicting all Lot/Block/Pans in the city, which can be imported in to Google Earth Pro.

I would like to create an access macro which, on inputting a new job, allows the user to view in Google Earth the new job while highlighting any old jobs within the same block and plan.

Would anyone be able to tell me a suitable method for conducting this. Workflow would be as follows:

New job entry in access including the property's Lot/Block/Plan
Access database searched for previous jobs in Block/Plan of above
(Lots are unique)
Latest KMZ/Shapefile either manually or automatically downloaded
from government data warehouse (these files change frequently so
cannot have them saved locally) in to Google Earth Pro.
Lot/Block/Plan info from KMZ/Shapefile datatables cross-referenced
with Access info.
All polygons in Blocks/Plan highlighted as normal, but Lots in
common with old jobs highlighted in different colour

Can anyone recommend a program which can siphon out the Lot/Block/Plan details from Access and a KMZ or Shapefile, cross-reference them, and then display in Google Earth?


texts:
I've recently setup Geoserver with GDAL/ECW support. I can create a store in Geoserver which allows me to reference one .ecw file. I can serve this one file over WMS and it works great.

Now i need to serve all 1700 .ecw files as a single layer. I believe this is a function of the ImageMosaic option. However it only seems to allow me to attach one file.

Is there some preparation I need to do to the 1700 files to be able to use them as an ImageMosaic?


texts:
I upgraded from QGIS 1.7.0 to 1.8.0, including updating GRASS to version 6.4.3. Since then, GRASS isn't any longer listed in the Fetch Python plugins. I uninstalled and re-installed the whole package without any results.
Any tips how to reactivate GRASS in my system (OSX 10.6.8)?
Thanks

EDIT: Apparently Sextante has to be activated to be able to load the GRASS plugin. However, the "importlib" Python module is lacking to activate Sextante. Any suggestions on how to install this module?


texts: Can I use the bounding coordinates of a coordinate system to determine the coordinate system for undefined coordinate values?

texts: I have a table with coordinates that are undefined, but I know they could be in several different state plane zones/datums. I am thinking I can possibly use coordinate ranges to assign the coordinate system to each record. The state plane zones are based on county boundaries, and so I created several different layers of the counties in the the different zones and datums (and units), then calculated the X and Y max and min. I tried to use these values to see if the X and Y values in the table fell within these ranges but many seem to overlap and I am not getting correct results. I think it is mainly an issue when comparing systems in different units. I am wondering if there is another, better way to do this. Does anyone have suggestions?


texts:
I noticed that xxx.qgz~ (BackupVersion) is no longer saved with this version. My research found that a backup file is still being created. All of my projects with this version did not create any.
Is there a setting that I have wrong or what is the reason that the file no longer appears?


texts: Difficulty with Scaled Visibility for Labels in QGIS 3.4.9

texts:
I am having great fun getting to grips with QGIS (fantastic). I have set myself a "project" to try to learn the techniques.

This project refers to 2 Layers (geographic areas for Telephone Exchanges in UK) - I was donated a shapefile. I am now trying to overlay with Cities/Towns/Village names. Pulled from a CSV from Ordnance Survey. The Names/symbols for the Places works fine, also. I need to set Scale Based visibility for the differing place types (Cities/Towns/villages and Hamlets).

My problem is this: When I check the Scale Dependent Visibility, my Labels disappear from view, regardless of any setting I put into Min/Max (I have put the max scale into the min and tried "Set to current canvas") yet once I apply the labels are gone - regardless of how much more I zoom in.

The other thing I notice is that the max Scale 1:1000000 is way lower (too zoomed in) for a normal view - I'm not sure if this is related to the problem above, as the Min/Max boxes only seem to accept  scales within the range in the "Scale" Box. I tried adding a larger value in Settings, but this is not possible.
I also considered re-setting the Scale of the project, but cannot find a method to achieve this.


texts: Editing Related Tables in ArcGIS Online?

texts:
Is it possible to edit a related table via the browser in ArcGIS Online?

The last update I heard in February was only available via ArcGIS Collector.

I was wondering if ArcGIS Online supports this process through an online web map or web mapping application.  We are currently using 10.3.1.


texts: Convert Indonesian datum .prj file, so it can be used for Mapinfo

texts:
This is the projection file information:

PROJCS["TM3 49.1 by gistutorial.net",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",
SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",200000.0],PARAMETER["False_Northing",1500000.0],
PARAMETER["Central_Meridian",109.5],PARAMETER["Scale_Factor",0.9999],
PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

How can I convert it for Mapinfo so that I can use the CRS?


texts: I have port positions and need to generate distance matrixes in nautical miles. I am using Proximity tool of ArcGIS for obtaining distances but in this case it doesnt work as I have restrictions i.e. I dont want the linear distance between two ports crossing land....what is the best way to do this.


texts: Counting number of Raster Cells satisfying a criteria within a Polygon

texts:
I have a USA raster dataset, which assigns to each cell a value from 0-100. I also happen to have a USA county shapefile. I simply want a count of the number of pixels/cells in the raster data with values >50 that lie within a county polygon, as given in the county shapefile.

1) How may I go about doing this? Also, how does one deal with cells/pixels that overlap with polygon boundaries?

2) This is my first time using Raster data, so I am not aware of all the intricacies of it. Do I need to be worried about projection stuff etc.? I have a hunch that I do not have to worry about this: Raster properties state that Spatial Reference is GCS_WGS_1984, with angular unit of degrees and Datum D_WGS_1984. The shapefile states the Geo coordinate system to be GCS_WGS_1984, with angular unit of degrees and Datum D_WGS_1984. The raster file, however, does not specify Prime Meridian which is Greenwich for my shapefile.


texts:
Im trying to convert lat/long into UTM, but have some problems in it.
First I get my coordinates in lat and long

latitude_wgs84_radians: 0.924593
longitude_wgs84_radians: 0.176054

Then Im trying to convert it with GeographicLib and get

latitude: 185532
longitude: 102251

which is false, 'cause it should be near

575983.09
5869562.84

Then I was trying to correct my code and get after converting to UTM

latitude: 568000
longitud: 5.866e+06 //this one is not correct

at least, my code

double lat = latitude_wgs84_radians * 180 / M_PI;
double lon = longitude_wgs84_radians * 180 / M_PI;
int zone;
bool northp;
double x, y;
UTMUPS::Forward(lat, lon, zone, northp, x, y);


texts: ARCPAD - VBscript to update values in attribute table

texts:
I am working on an automating tool for ArcPad for inventory issues on our mobile GIS machine (Trimble GeoXH - Geoexplorer 2008 series - Windows mobile 6.1 and Arcdap 10.0.3). I have developed  the tool in VBscript. Short description what the tool must do:
We have a point shapefile in Arcpad. Everytime when we manually add a point, it automaticaly counts the new ID by clicking on a button in the toolbar. The new ID is the last ID + 1. I succeeded already in looping through the attributes, finding the last ID and calculating a new ID. However, I can't add the new calculated ID for the added point in the attribute table. It's like I can't open the recordset in edit mode. Below you find my source code. Do you know what I'm doing wrong?

Thanks for helping!

Sourcecode

Sub Test

Dim objDBF, strLaatstePaalID, NewPaalNR, NewPaalID, Nummer, PaalCode

Numbre = 0

Set objLyr = Map.Layers("Palen")
Set objDBF = objLyr.Records
'Look for record with the highest ID
'ID is text format like 'P_00450'
objDBF.MoveFirst
Do Until objDBF.EOF
    PaalCode = objDBF.Fields("PAAL_ID").Value
    If PaalCode <> "" Then 'the new added point (which is the last) has no value in the ID
        If Int(Right(PaalCode,(Len(PaalCode)-2)))>Numbre Then
            'Make an integer of the text code
            Numbre = Int(Right(PaalCode,(Len(PaalCode)-2)))
        End If
    End If
    objDBF.MoveNext
Loop

NewPaalNR = Numbre + 1

'Maak een nieuw text ID with the new numbre
If NewPaalNR < 10 Then
    NewPaalID = "P_0000" & CStr(NewPaalNR)

ElseIf NewPaalNR < 100 Then
    NewPaalID = "P_000" & CStr(NewPaalNR)

ElseIf NewPaalNR < 1000 Then
    NewPaalID = "P_00" & CStr(NewPaalNR)

ElseIf NewPaalNR < 10000 Then
    NewPaalID = "P_0" & CStr(NewPaalNR)

Else
    NewPaalID = "P_" & CStr(NewPaalNR)

End If

MsgBox ("New Id: " & NewPaalID)

'go to the new added point
objDBF.MoveLast

if objDBF.Fields("PAAL_ID").Value ="" Then
    'add the new value
    objDBF.Fields("PAAL_ID").Value = NewPaalID
    objDBF.Update
    MsgBox("Paal_ID " & NewPaalID & " added in Palen.shp")
Else
    MsgBox("No empty feature added")
End If

Set objDBF = Nothing
End Sub


texts: Using Leaflet WMS Layer from ArcGIS Server?

texts:
I am very new to GIS.

I am trying to display a map on a website using leaflet.

The map I want to display is hosted from an arcGIS server here:

http://ags.gis.iastate.edu/ArcGISServer/rest/services/Ortho/andreas/ImageServer

This page lists a number of different interfaces, including WMS. The link to WMS info on the site has an error in it, but can be retrieved here:
http://ags.gis.iastate.edu/ArcGISServer/services/Ortho/andreas/ImageServer/WMSServer?request=GetCapabilities&service=WMS

I have a web page set up on the model of the leaflet quickstart guide
(leafletjs.com/examples/quick-start.html)
And that was displaying the map of London as expected.

I then found documentation on the leaflet L.tileLayer.wms function which gave this example

var nexrad = L.tileLayer.wms("http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi", {
    layers: 'nexrad-n0r-900913',
    format: 'image/png',
    transparent: true,
    attribution: "Weather data © 2012 IEM Nexrad"
});

based on this, I substituted information from the ags.gis.iastate.edu wms capabilities sheet (linked above) and added the addTo(map) as below

var andreas = L.tileLayer.wms("http://ags.gis.iastate.edu/arcgisserver/services/Ortho/andreas/ImageServer/WMSServer", {
    layers: '0',
    format: 'image/png',
    transparent: true,
    attribution: "Andreas atlas © Iowa DNR"
}).addTo(map);

[note I also tried transparent: false]

Result: nothing.

Can anyone point out what is probably a very obvious error, or lack of understanding on my part?


texts: Starting QGIS after install on windows XP home?

texts:
New to QGIS and installed 2.6.1 on Windows XP desktop home edition. No errors received during install. When I launch QGIS Brighton from Start - Programs the qgis-bin.exe - Entry Point Not Found pops up.

  The procedure entry point xmlSchemaNewDocParserCtxt could not be
  located in the dynamic link library libxml2.dll.

The same error shows when launching QGIS Browser 2.6.1 as QGIS Desktop 2.6.1.


texts: Creating definition query from selected features using ArcGIS Pro

texts:
I have a layer with 2000 or so points, and I selected 50 of them (with no attributes in common, they were randomly chosen). Now I want to make a definition query, so should I will only visualize these 50 points from now.
What is the most practical way to turn the selected features into a definition query filter?


texts: QGIS 2.18 Commit error in updatable view with PostGIS

texts:
I am working in a database with PostgreSQL9.5/PostGIS2.3.

I am working with updatable views, which systematically include a set of rules to make them updatable. Everything works fine with 2.14, but when I try the same with 2.18 I get an error that says (this is a rough translation since my softwares are in french) :

Impossible to validate the changements for the layer_name
Errors: 1 attribute not added
Error of the data provider :
PostGIS error while adding entity : cannot execute INSERT RETURNING on the "layer_name" relation
HINT: You need a rule ON INSERT DO INSTEAD without condition and a RETURNING clause

I insist on the fact that everything works fine with 2.14, does anyone have any idea on what is happening? I really would prefer to go to 2.18, first because it will soon be the new LTR and so it would make sense to switch to this version then, and second the possibility to graphically move rule based labels is really a plus.


texts: Leaflet, how to update popup content on geojson layer with feature.properties?

texts:
I want to update the content of my popup (it appears when clicking on a geojson-layer, and individuel for each feature).
Therefore I have to change "just" my variable of one column in the geojson.
Like this:
var co2= feature.properties.jahr1
and after updating it should be like this: co2 = feature.properties.jahr2

my initial onEachFeature from the layer looks like this:

onEachFeature: function(feature, layer ){

    var name = feature.properties.name;
    var co2 = feature.properties.__2013_1;

    layer.bindPopup('
' +
                    '
' + name + '
' +
                    '
CO2-Emission: ' + co2 + ' %
' +
                    '
' )
}

And this is my function (without the variables it's working):

function change_popup(){

    worldbankLayer.eachLayer(function (layer) {
        layer._popup.setContent('
' +
                                '
' + name + '
' +
                                '
CO2-Emission: ' + co2 + ' %
' +
                                '
')
    })
};

I call the function with click on a button. And like I said, without the try to call

feature.properties.mygeojsoncolumn

it's working just fine

I tried the

 layer.setPopupContent(newContent);

too, and it's working just like the function before just without the properties...
I also tried to declare the variables again, but the debugger always tells me, that 'feature is not defined'...

the code looks like this now:

function change_popup(){

var name = feature.properties.name;
var co2 = feature.properties.__2010_1;

worldbankLayer.eachLayer(function (layer) {
    layer.setPopupContent('
' +
                            '
' + name + '
' +
                            '
CO2-Emission: ' + co2 + ' %
' +
                            '
')
})};


texts: Configure Postgres for geocoding on amazon EC2

texts:
I have an Amazon r3.large instance I'll use for geocoding.
I'm using the TIGER geocoder with and have downloaded two states already.
Texas and California, but I'm getting poor results on this.
For CA, the average time is around 13s, which is really high considering the specifications of the machine: 15GB of RAM and SSD.

E.G.

For this address:

84 HARRIET ST San Francisco CA

Coordinates I got are:

37.778199   -122.406455

Geocoding time is:

13.32 s

Current values on postgresql.conf  are:

#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------

# - Memory -

shared_buffers = 11GB                   # min 128kB
                                        # (change requires restart)
#huge_pages = try                       # on, off, or try
                                        # (change requires restart)
#temp_buffers = 8MB                     # min 800kB
#max_prepared_transactions = 0          # zero disables the feature
                                        # (change requires restart)
# Caution: it is not advisable to set max_prepared_transactions nonzero unless
# you actively intend to use prepared transactions.
work_mem = 16MB                         # min 64kB
maintenance_work_mem = 128MB            # min 1MB
#autovacuum_work_mem = -1               # min 1MB, or -1 to use maintenance_work_mem
#max_stack_depth = 2MB                  # min 100kB
dynamic_shared_memory_type = posix      # the default is the first option
                                        # supported by the operating system:
                                        #   posix
                                        #   sysv
                                        #   windows
                                        #   mmap
                                        # use none to disable dynamic shared memory

EDIT:

After fixing index:

SELECT install_missing_indexes();
vacuum analyze verbose tiger.addr;
vacuum analyze verbose tiger.edges;
vacuum analyze verbose tiger.faces;
vacuum analyze verbose tiger.featnames;
vacuum analyze verbose tiger.place;
vacuum analyze verbose tiger.cousub;
vacuum analyze verbose tiger.county;
vacuum analyze verbose tiger.state;
vacuum analyze verbose tiger.zip_lookup_base;
vacuum analyze verbose tiger.zip_state;
vacuum analyze verbose tiger.zip_state_loc;

I'm getting 40ms on average.


texts:
I have a DEM that am reclassifying into two classes. One areas less than or equal to 1000 and the other areas greater than 1000.
Am accomplishing this using the reclassify Tool in ArcMap 10.1.

The results are a range that I don't understand,what could be the problem

The reclassify tool


texts:
After running features through a transformer that does uses a Group By, is there a simple way to determine which destination features came from which source features? The best I could come up with is some combination of SpatialRelator and FeatureMerger, to do a spatial join on the result.

Edit: For example, I have a source dataset that feeds into a BUFFERER, that I set a group-by attribute on. For each BUFFERER output feature, I wish to associate it somehow with the subset of original features that donated themselves to it. Unfortunately I don't believe the BUFFERER has a List attribute in FME Desktop 2011. How would I do this?

Edit edit: bufferer, not dissolver.


texts: Query Builder Expression using NOW () function

texts:
I have a date field named "TermDate'.  I would like an expression in Query Builder to only show features where termination date is in the future.  My date field displays as '2017-09-27 09:59:01' I'm using Enterprise Geodatabase with SQL server. I thought I could just use the NOW() function but I'm having no luck. I am using arcGIS 10.2.

I have a polygon feature class that is symbolized with shading for parcels that have a recovery agreement. After a certain period of time, the recovery agreements expire and I would like those to no longer be visible, so that only those with termination dates in the future appear on the map.


texts: Calculate distance of points - SpatialPoints object - along a path - SpatialLines object - using R

texts:
I have a SpatialPoints object and a SpatialLines object. I want to calculate all the distances from the start point (first coordinate of the SpatialLines object) to every point in the SpatialPoints object along the line.

Here is a code example:

# Load packages
library('sp')

# Define projection
epsg.32721 <- "+proj=utm +zone=21 +south +datum=WGS84 +units=m +no_defs"

# Load data points
x <- c(788690, 788722, 788824, 788833)
y <- c(6193235, 6193202, 6193217, 6193224)

# Create SpatialPoints object
spatialPointsObject <- SpatialPoints(coords = cbind(x,y), proj4string = CRS(epsg.32721))

# Load data lines
x2 <- c(788665.0, 788671.0, 788671.0, 788677.0, 788687.0, 788697.0, 788699.0, 788720.0, 788717.7, 788714.0, 788721.6, 788731.0, 788731.4, 788745.0, 788755.0, 788755.7, 788764.0, 788765.6, 788774.0, 788774.6, 788784.0, 788784.4, 788796.0, 788796.9, 788803.6, 788805.0, 788815.0, 788820.9, 788829.0, 788842.0)
y2 <- c(6193252, 6193244, 6193244, 6193236, 6193235, 6193235, 6193235, 6193230, 6193224, 6193215, 6193202, 6193202, 6193202, 6193216, 6193217, 6193217, 6193217, 6193216, 6193212, 6193212, 6193212, 6193212, 6193197, 6193198, 6193205, 6193207, 6193211, 6193215, 6193221, 6193230)

# Create SpatialLines object
spatialLinesObject <- SpatialLines(LinesList = list(Lines(slinelist = list(Line(coords = cbind(x2,y2))), ID = "1")), proj4string = CRS(epsg.32721))

# Plot SpatialPoints + SpatialLines
plot(spatialLinesObject, xlab = "Longitude", ylab = "Latitude", main = "SpatialPoints + SpatialLines")
plot(spatialPointsObject, col = "blue", pch = 19, add = TRUE)
plot(SpatialPoints(as.data.frame(coordinates(spatialLinesObject))[1,]), pch = 19, col = "red", add = TRUE)
text(as.data.frame(coordinates(spatialLinesObject))[1,], labels = "Start", cex = 0.75, pos = 3)
text(coordinates(spatialPointsObject), labels = seq_along(spatialPointsObject), cex = 0.75, pos = 3)
box()

Is there a more efficient function in terms of RAM memory usage to use with a big data set?


texts: I did calculate Hydrology with Spatial Analysis tools==> Hydrology and now, I have streams and Watershed. In each watershed, I need to extract the longest Flow as a polyline for calculate slope. What should I do?


texts: Land cover data for British Columbia, Canada

texts:
I am hoping to map vegetated (trees and open veg) for the lower mainland in BC, Canada.

I guess what I want is a Land Cover map.

Does this exist for download anywhere or will I need to user Landsat to create an NDVI and do it myself.

~30m resolution is adequate. Currency is not a huge issue.


texts: Is it possible to write a pyQt5 plugin for QGIS 2.8?

texts:
I have just installed QGIS 2.8 and the changelog says Qt5 is now supported in QGIS 2.8.

Can anyone tell me if is it possible to write a pyQt5 plugin for QGIS 2.8?

Has anyone tried to do this?


texts: QGIS 2.18 + Mac OSX sierra crashes and slow

texts:
I've been using QGis for quite a few years on Mac OSX, never had a problem.
Now with the current configuration of OSX Sierra + QGIS 2.18.1 many project files that ones were opening nice and smooth became quite a problem to manage.

Opening project files takes quite some time and the software crashes all the time in two conditions: when I switch on some layer or while zoomin in or out. I also tried to downgreade to QGIS 2.14.10-1 but I still experienced the same.

The problem occours on different machines (MacBook Pro, iMac) and different users. We also tried different project files of different sizes. Is anybody else experiencing the same?


texts: Resampling methodology when projecting a raster

texts: When projecting an SRTM raster with "Project Raster" tool in ArcGIS10.2, what is the best resampling methodology, bilinear ot cubic convolution?


texts:
Win7 x64, QGIS 3.4 installed through OSGeo4W with 'Advanced Install'

Here's my workflow:

Get the template directory from PluginBuilder3
Navigate to this folder in the OSGeo4W Shell
Use call "C:\OSGeo4W64\bin\qt5_env.bat" otherwise pyrcc5 is unavailable
Use pyrcc5 -o resources.py resources.qrc  as suggested in pluginbuilder3 help - note that a resources.qrc file already exists. This steps does not produce an error but does not seem to produce anything either.
Use make - this gives the following message:

  make: Nothing to be done for 'defaults'.

Use make test - this gives the following message:

  chmod: cannot acces 'scripts/compile-strings.sh': No such file or directory
  make: *** [transcompile] Error 1

I try to copy the plugin directory at C:\Users\xxx\AppData\Roaming\QGIS\QIS3\profiles\default\python\plugins but it is not seen by QGIS or Plugin Reloader

UPDATE:
- there is no sub-directory in the plugin folder - isn't a i18n folder expected ?
- at step 4 resources.py is updated but resources.qrc is left unchanged


texts: visualisation of asymmetric Directed acyclic graph

texts:
I have got a data set, it represents the time take taken to get between different nodes on a graph, I have a valid X/Y pair for each node location.  The cost of getting between each node is asymmetric,  i.e. the cost off getting from A to B is different from getting from B to A.

I am trying to find a way of visualising this data set.
I did think of trying to draw a contour map, but the only methods I have found require a set of spot heights at given locations, when my data set is more like a series of gradients at different locations.


texts:
I am a news user with QGIS API C++. In order to feel good with it I try some little program to explore class.

I have download the tutorial 4 of the QGIS and adapted it to the 2.8 version but when I call the connect addlayer, I have an error message like layer is not valid.

Here is the code I use:

QString myRasterFileName = "SR_50M_alaska_nad.tif";
QString MyRasterPath = "/home/flodev/cartes/";

QString MyRaster = MyRasterPath + myRasterFileName;

QFileInfo myRasterFileInfo(MyRasterPath+myRasterFileName);

QString myBaseNameQString = myRasterFileInfo.baseName();

QgsRasterLayer * myRasterLayer = new QgsRasterLayer(MyRaster,myBaseNameQString);

qDebug() << "RasterLayer type =" << myRasterLayer->rasterType();

if (myRasterLayer->isValid())
{
  qDebug("Layer is valid");
}
else
{
  qDebug("Layer is NOT valid");
  return;
}

I don't know what's wrong.
If you have any idea?
The raster file is the file given in the tutorial directory
and code is adapted from tutorial4.html.


texts: Greater than or equal to in graduated colors label - ArcGIS Pro

texts:
The default symbol when using the Graduated Colors symbology in ArcGIS Pro seems to be “less than or equal to” (≤). I was wondering if there was a way to change it to “greater than or equal to” (≥)? Someone had a similar question for ArcMap here. And the solution to their question was to past ≥ into the label. I tried doing this in Pro, but it would not accept it.

Does anyone know if it is possible to change the symbology labels from ≤ to ≥ in ArcGIS Pro?


texts: problem using qgis spatial join in a python script or modeler : no results

texts:
I'm trying to create polygons from points layers. Each layer contains one point to avoid troubles due to superposition of polygons. I detailed the context here : How can I add output vector to a list to loop a geoprocessing on it?

The problem is, the solution proposed in the previous question worked well, but the context has changed a bit and now the sectors of my buffers need to be irregular but following a specific pattern, so i can't use voronoi polygons anymore.

I found a solution by customizing just a little the "create points along line" algorithm, creating hub lines to connect these points to the buffer's centroid and polygonizing.

This works great as far as the geometry is concerned, but the last step (polygonize) deletes the attributes.

I tried to set back the attributes with the spatial join algorithm, but it doesn't work : there is no error, it's just like if the algorithm did not run. Thought, it gives the expected result when used independently, outside of a script or modeler.

What am i doing wrong, and is there a solution ? Doesn't have to use the spatial join if there is a better way to do it

Here is my code :

##creatio_rose_vent_v3=name
##buffwind=output vector
##output_folder=folder

import glob, os, processing

os.chdir("H:/donnees_geo/points")

for points in glob.glob("*.shp"):
    outputs_QGISFIXEDDISTANCEBUFFER_1=processing.runalg('qgis:fixeddistancebuffer', points,1000.0,20.0,False,None)
    outputs_QGISFIXEDDISTANCEBUFFER_2=processing.runalg('qgis:fixeddistancebuffer', points,1100.0,20.0,False,None)
    outputs_SAGACONVERTPOLYGONSTOLINES_1=processing.runalg('saga:convertpolygonstolines',     outputs_QGISFIXEDDISTANCEBUFFER_1['OUTPUT'],None)
    outputs_SAGACONVERTPOLYGONSTOLINES_2=processing.runalg('saga:convertpolygonstolines', outputs_QGISFIXEDDISTANCEBUFFER_2['OUTPUT'],None)
    outputs_SCRIPTCREATEPOINTSALONGLINESCUSTOM_1=processing.runalg('script:createpointsalonglinescustom', outputs_SAGACONVERTPOLYGONSTOLINES_2['LINES'],959.44,767.55,383.77,6524.22,None)
    outputs_QGISDISTANCETONEARESTHUB_1=processing.runalg('qgis:distancetonearesthub', outputs_SCRIPTCREATEPOINTSALONGLINESCUSTOM_1['output'],points,'ID5_35',1,0,None)
    outputs_QGISMERGEVECTORLAYERS_1=processing.runalg('qgis:mergevectorlayers', [outputs_SAGACONVERTPOLYGONSTOLINES_1['LINES'],outputs_QGISDISTANCETONEARESTHUB_1['OUTPUT']],None)
    outputs_QGISPOLYGONIZE_1=processing.runalg('qgis:polygonize', outputs_QGISMERGEVECTORLAYERS_1['OUTPUT'],False,False,None)
    outputs_QGISJOINATTRIBUTESBYLOCATION_1=processing.runalg('qgis:joinattributesbylocation',     outputs_QGISPOLYGONIZE_1['OUTPUT'],  outputs_QGISFIXEDDISTANCEBUFFER_1['OUTPUT'],['intersects'],0.0,1,'sum,mean,min,max,median',1,output_folder + "/buffwind_" + points)

os.chdir(output_folder)
output = glob.glob('*.shp')
processing.runalg("saga:mergelayers", ";".join(output), False, False, buffwind)

Finally works with the above code, i have no idea what was wrong the first time...


texts: Display changes in map layer while editing attribute table in qgis

texts:
I am new to qgis.

I would like to see changes on the map in real time while I am editing the associated attribute file.  Currently, I have the poly id field labels turned on.  I cannot see the changes to the poly id on the map unless I refresh the screen.  It would be really helpful to see the changes on the map as I enter them in the attribute table.


texts:
I've successfully imported all data for Sweden to my PostGIS database. Right now I'm designing my map in Tilemill with OSM Bright as base.

But I've got a major problem: where is the coastline? Right now all the roads and buildings are on the water. I've looked through all three landusages tables, and the only relevant geometry types are land and island, but they aren't what I expected.

I'm a GIS rookie, so any help is appreciated. :-)


texts: How can I crop a raster layer to a hemisphere?

texts:
I have a raster layer that I want to crop to a hemisphere centered on 30°N, 100°W, to use in an orthographic projection map. What is the best way to do this?

There doesn't seem to be an easy way to generate a hemisphere polygon to mask it by (which I'd think would be the obvious solution).

(Note that, unlike the question this is marked a duplicate of, this is asking about raster layers; the solutions presented in that question are for vector layers and do not work here.)


texts:
I've a multiline in Postgis.

The multiline represents a wall, and I need to transform it to a polygon given the thickness of the wall itself, so I need to create offset lines, join them and create the polygon.

In practice, I need to retrieve the yellow polygon from the black line and the thickness as numeric value:

How can I obtain the polygon?

From a Stackoverflow question I understand that I can obtain offset lines with a query similar to the following one:

SELECT
f.gid,
ST_Union(
    ST_OffsetCurve(ST_LineMerge(f.geom), 6.0, 'quad_segs=4 join=round'),
    ST_OffsetCurve(ST_LineMerge(f.geom), -6.0, 'quad_segs=4 join=round')
    ) as track
FROM
wall f;

But I obtain only the parallel lines (the ones in brown):

Ho can I create the polygon from them?

If the implementation is simpler, it's not necessary the cap of the line in the first image, the cap itself can be zero like in the second one.


texts: Connecting two individual long/lat points using CartoDB?

texts:
I've created maps using CartoDB before, but my newest project is a little more advanced.

I've imported a dataset of tornado tracks on a particular day using Storm Prediction Center data. --> http://www.spc.noaa.gov/gis/svrgis/

What I've accomplished so far is showing the tornado touchdown points from the lat/long columns (see attached photo).

The table also contains the liftoff points from two additional lat/long columns. The problem is, I cannot seem how to display both points on the map and connect them by a line.


texts: How to handle adding a PostGIS layer in pyQgis without saving password?

texts:
I'm writing python plugin and trying to find the right way to add PostGIS layer on the map without storing user password.
After adding layer on the map, I strip out the password from uri like this:

vlayer.dataProvider().setDataSourceUri(uri.removePassword(uri.uri()))

However, when user saves the project, full connection string stays including password string.

I know that QGIS can popup user name/password dialog for me if I don't put these data on uri, but then I need to get somehow entered data, since I need to know user name and password anyway.


texts: Get distance after path distance allocation

texts:
I use ArcGIS 10.1 in Windows XP.

I have a two point feature data sets One containing a single point P1 and another containing multiple points Pm. I computed the minimum-distance path from P1 to each of the points from Pm using path distance (I have also cost and elevation rasters).

This first step worked fine, and I got an output raster Path_rast containing the paths of interest. However, I would like to know the length in km of each of these paths and I can't seem to find a solution for this.
I tried converting the raster to polyline and use linear referencing tools but I can't find any tool to compute the distances I am looking for.
Any suggestions?


texts: Determining distance between point feature and nearest point feature in same layer

texts:
I have one layer which contains school locations. What I want to do is find the nearest distance between these point features. Keep in mind it's one layer.
Any solution?
I'm using ArcGIS Desktop.


texts: Calculate mean and std for 1 field in feature class Table (ArcGIS 10.4, arcpy)

texts:
I would like to calculate a mean and STD for one field in my feature class. I am python beginner.

I have found great source calcualting mean and STD for multiple fields, however, the STD calculation seems not correct: Is it possible to calculate statistics across multiple fields in arcpy?
After applying the code, my STD is "None" which is not true for real data.

My code:

import math, itertools, arcpy

FC = arcpy.GetParameterAsText(0)
field = "RASTERVALU"

#Flatten a list of lists       # do I even need this if I have just one field? How to replace this?
def flatten(list_lists):
    return list(itertools.chain.from_iterable(list_lists))

#Definition of standard deviation, seems not working...
def std(x):
    pass

#read values from fields and flatten
vals = flatten([r for r in row] for row in arcpy.da.SearchCursor(FC, field))

# print results
print "mean is " + str(sum(vals) / len(vals))
print "std is" + str(std(vals))     # STD gives back None

How to correctly calculate my STD? I need it to save as a value, which I can use further in the code.


texts:
Is it possible to duplicate an item in the print composer?

I have two maps, and I'd like to add an attribute table to each map. It took me quite a while to set up the attribute table for the first map, and I'd rather not have to repeat the whole process for the second table. Is there a way to simply make a copy of the table?

Here are the things I've tried (unsuccessfully) so far:

Copy and paste by selecting the table and hitting ctrl-C then ctrl-V. Ditto, using the copy and paste commands from the Edit menu.
Duplicating the entire print composer, then dragging the table from the copy to the original. Turns out you can't drag an item from one print composer to another.
Copy the table in the duplicate print composer, then paste into the original print composer.


texts: Converting symbology from ArcInfo Workstation to ArcGIS Desktop?

texts:
I was using UNIX based ArcInfo Workstation software and I have many Data in a coverage file.

I need this files to change to shapes to use in ArcGIS Desktop software.

By exporting it brings only the data.

How can I bring those symbols for all (.txt, .lin, .shd and .mrk) which are created in ArcInfo Workstation to use them in ArcGIS Desktop 9.3?


texts:
I am wondering, if there is a possibility to unit test own code using the ArcGIs Pro 2.0 SDK. I did not find any until now, because there are plenty of static functions, classes, etc. and no interfaces, that allows faking.
Comming from ArcObject I used so far NUnit as testing framework and NSubstitute to fake com interfaces, that worked fine.


texts: How can I crawl directory tree and change Mxd relativePaths to true?

texts:
I have a large number of project folders where each project folder can have many subfolders.  These subfolders can contain mxds, shapefiles, personal gdb's and fgdb's.  In many cases the user forgot to check the "Use Relative Paths" before saving the mxds, so when the folder gets copied, datasource links become broken.

I would like to write a standalone arcpy script that crawls through the directories, opens each mxd, sets the relativePaths to true, then saves the mxd.  Is there a script that does this somewhere?

The relativePaths property on the MapDocument object is readonly.  Is there some other way to change this?


texts:
I have a raster file for India which is a cropland map with following information:

Columns and rows: 7015, 6582
Cell size: 0.0041666667, 0.0041666667

Each grid of this cropland has a value of either 1 (cropland, green) or 0 (no cropland, brown)

I have another raster file of India at a coarser resolution.

Columns and rows: 167, 160
Cell size: 0.16666668, 0.16666668

I want to calculate for each of the coarser grid, how many cropland grids are present. Presumably I could do this using zonal sum by setting coarse map to input rasterand cropland map as the input value raster. But this is not working and it gives me a map at coarser resolution but the values are just 1 and 2. I was wondering what issue is there.


texts: How can I list version name in my silverlight application?

texts:
I need to populate combobox with arcsde version name in my silverlight 5 application.
Please give me some suggestions.


texts: How to select all unique values in a column and put it in multilist box?

texts: I wanted to collect all unique values in a column and show it in multilist box.


texts: Displaying LiDAR data with RGB values in ArcGIS Desktop?

texts:
I have been able to display LiDAR data with RGB values out of aerial photos with SAFE FME and also POTREE.

Is there any way to do this with ArcGIS 10.3?


texts: Geocoding failure on concurrent requests with arcgis-10.0

texts:
I've created a small python synchronous geoprocessing script (ctagc) that runs on AGS. The script accepts a table (GPRecordSet) as an input parameter. The script then calls arcpy.GeocodeAddresses_geocoding() to submit the table to a specified geocoding service running on the same server. The script then generates an output feature class "in_memory" to send back to the caller.

When my silverlight client submits multiple http requests (4 threads of 100 records) of JSON batches of data through the generated REST interface on the server, the script INconsistently fails on the same data being submitted. On different runs of the test data, different batches fail each time (and a different number fail). This happens with different geocoding services on the server.

I think that there may be problems with the geocoding service accessing the single locator file. I've tried changing pooling and isolation parameters. Still crashes. Does anyone know have suggestions for handling multiple requests hitting a geocoding service? I thought ArcGIS server could handle thousands of requests, blah, blah per hour?

System Info:
Running AGS 10.03 and have installed geocoding patch Gis10sp3-SGIS-GGM-Patch.msp from 1/3/2012 on virtual Win 2008 R2. Pooling services, low isolation.

Error message returned to client:

example 1

Error Executing Task. Error executing tool.: \u003cclass 'arcgisscripting.ExecuteError'\u003e: ERROR 000464: Cannot get exclusive schema lock.  Either being edited or in use by another application.\nFailed to execute (GeocodeAddresses).\n\nFailed to execute (ctagc).

example error 2

Error Executing Task. Error executing tool.: \u003cclass 'arcgisscripting.ExecuteError'\u003e: ERROR 000010: Geocode addresses failed.\nFailed to execute (GeocodeAddresses).\n\nFailed to execute (ctagc).

Server Log File Messages:
<Msg time='2012-02-09T12:12:44' type='INFO3' code='20022' target='cta/ctagc.GPServerSync' methodName='GPServerSync.Execute.ctagc' machine='VAGS10B' process='20336' thread='3152' elapsed='3.02319'>Execute job j769cfe004d6c4152a5357f7a9c318f7b</Msg>
<Msg time='2012-02-09T12:12:44' type='ERROR' code='20010' target='cta/ctagc.GPServerSync' methodName='GPServerSync.CheckMessages' machine='VAGS10B' process='20336' thread='3152'>Executing (ctagc): ctagc &quot;Record Set&quot; 0 0 2 12 Start Time: Thu Feb 09 12:12:41 2012 Running script ctagc... \\VAGS10B\ArcGIS\cta\ctagc_ags_connection\cta\comp_parcels_streets.GeocodeServer &lt;class &apos;arcgisscripting.ExecuteError&apos;&gt;: ERROR 000010: Geocode addresses failed. Failed to execute (GeocodeAddresses).  Failed to execute (ctagc). Failed at Thu Feb 09 12:12:44 2012 (Elapsed Time: 3.00 seconds)</Msg>
<Msg time='2012-02-09T12:12:44' type='ERROR' code='20010' target='cta/ctagc.GPServerSync' methodName='GPServerSync.CheckMessages' machine='VAGS10B' process='20336' thread='3152'>Error executing tool.: &lt;class &apos;arcgisscripting.ExecuteError&apos;&gt;: ERROR 000010: Geocode addresses failed. Failed to execute (GeocodeAddresses).  Failed to execute (ctagc).</Msg>
<Msg time='2012-02-09T12:12:44' type='INFO3' code='20024' target='cta/ctagc.GPServerSync' methodName='GPServerSync.Save.ctagc' machine='VAGS10B' process='20336' thread='3152' elapsed='0.00056'>Save job j769cfe004d6c4152a5357f7a9c318f7b message type SOAP message size 534</Msg>


texts: ArcObjects SQL Server Connection not recognizing instance

texts:
I am trying to make a connection to a SQL Server database with SdeWorkspaceFactory.  This is from my Windows 7 x64 Desktop to a Network database.

If I use this:

SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)
connectionString = "server=SQLServer;" + \
                    "instance=hbffcacqsql01;" + \
                    "database=ACQ_HBED_PROD;" + \
                    "authentication_mode=OSA"

result = SDEWorkspace.OpenFromString(connectionString, 0)

or this:

connectionProperties = NewObj(esriSystem.PropertySet, esriSystem.IPropertySet)
connectionProperties.SetProperty("SERVER", "SQLServer")
connectionProperties.SetProperty("INSTANCE", "hbffcacqsql01")
connectionProperties.SetProperty("DATABASE", "ACQ_HBED_PROD")
connectionProperties.SetProperty("AUTHENTICATION_MODE", "OSA")

SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)

result = SDEWorkspace.Open(connectionProperties, 0)

I get this error:

Traceback (most recent call last):
  File "C:/Users/tstanley/Downloads/ArcMap_Python/FirstTry.py", line 88, in <module>
    result = SDEWorkspace.OpenFromString(connectionString, 0)
_ctypes.COMError: (-2147216021, None, (u'Entry for SDE instance not found in services file', u'esriDataSourcesGDB.SqlWorkspace.1', u'esri_csGeoDatabase.hlp', 0, None))

If I leave out the instance parameter, the connection window pops up and if I put the same value into the window, I get a connection.

Can someone tell me what I'm missing?

I have read a bunch of other posts of people with this error and they mention replacing the instance with a service number, 5151.  It seems that they are trying to connect to an SDE database, which this isn't.  I'm really new to ArcObjects so I have just about everything still to learn.


texts:
I have two shapes, one called bike_stations and another one called quite_streets, both contains geographic information about elements in Madrid, Spain and each one come from two different sources.
The coordinates in quite_streets are like this: 431376.8435674606589600,4464668.6104000005871058
and the coordinates in bike_stations are like this: -3.7246532000000001,40.3914722000000026
So, if I put them together in QGIS with OSM base map I have the folloging result:

Bike_stations appears in the Guinea Gulf and quite_streets at the north of Algeria, when they should be located at the X.
Does anyone know any method in QGIS, PostGIS or maybe Java to transform the coordinates in order to be equal to the coordinates of the other shape?


texts: Calculating Min and Max Across fields while skipping Zeros

texts:
I am using ArcGIS Desktop 10.5 here. I have a streets layer that has address ranges in the fields FromLeft, ToLeft, FromRight, and ToRight. I am trying to create a street index csv that has the low and high values for each street. I'm trying to calculate the min and max values across the 4 fields and calculate those into 2 new fields called MIN and MAX.
I used min( !FromLeft!, !FromRight!, !ToLeft!, !ToRight!) to get the minimum values.
The only thing is that some streets have 0 in one or more of these 4 fields. I would like to skip the value 0 from this calculation and only consider non-zero numbers.
Can this be done using the field calculator?
All my fields are LONGs.


texts:
I am upgrading some QGIS 2 plugins to QGIS 3 and need to do some debugging.  It appears that the canvas does not update until the code stops running, regardless of any calls to self.iface.mapCanvas().refresh().

Is there a way to update the QGIS canvas while stepping through code in PyCharm?
I am using QGIS 3.6 and PyCharm 2019.1


texts: Python GDAL/OGR: retrieved feature is NoneType

texts:
I'm doing some scripts in Python to deal with shapefiles, and I have an issue I don't understand. I'm looping over a shapefile, and I want to retrieve the geometry of each feature, but very often I get an error saying:

    pointGeo = pointFeat.GetGeometryRef()
AttributeError: 'NoneType' object has no attribute 'GetGeometryRef'

Here's the way I did it:

        for j in range(pointsLayer.GetFeatureCount()):
                pointFeat = pointsLayer.GetNextFeature()
                pointGeo = pointFeat.GetGeometryRef()
                if pointGeo.Within(whatever):
                    ...

I don't think my shapefile is corrupted or damaged, as I tried with several... and I often get this error, but for some features I don't get it.
Any idea how to solve this?

Thanks


texts: Ordnance Survey Northern Ireland OSNI .qml file for large scale vector data?

texts:
I am a new QGIS user, having moved across from Arc. I have access to OSNI (Ordnance Survey Northern Ireland) data and to .lyr files associated with them, but has anyone created a .qml file for the large scale vector layers?

I am reluctant to go through the process of creating a style from scratch if it's already been done!