texts: OSM set up OpenLayers to connect to local TileServer

texts:
I just set up local tile server following these instructions
https://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/ and I want to deploy OpenLayers on local too, such that it communicates with the local tile server.

So I got v3.5.0.zip from here: http://openlayers.org/download

I am looking where to modify the code in OpenLayers libraries to make them contact the local tile server. I am testing on example below. Can anyone help me to figure out how to make this set up?

I've tried to modify it by myself in a couple of places, but it didn't work

<!doctype html>

    <link rel="stylesheet" href="http://127.0.0.1/osm/v3.5.0/css/ol.css" type="text/css">

    <title>OpenLayers 3 example</title>

My Map


texts: How to perform an accuracy assessment in eCognition?

texts:
How to do accuracy assessment of classified images in ecognition?

I have done the image segmentation for Worldview-2 image. Then, I have processed for classification for class names (e.g road,building,settlement,barren land) using Nearest Neighborhood.

How can I generate accuracy assessment using TTA mask using eCognition?


texts: How to extract style data from DXF when converting to geoJSON

texts:
I am using ogr2ogr (GDAL) to convert DXF files (from autoCAD) to geoJSONS for usage inside Leaflet.js
The issue is that a lot of information, like line stroke size and colors are not kept during the conversion.

I would like to extract them, so that I can use them later with the geoJSON, even if I have to implement that manually. How can I do this ?

My only option for the moment is parsing myself the DXF and look for colors but there must be a better way


texts:
I had a openlayers 3 map with EPSG:4258 as view's projection and some layers into it.
Now I would like to use Cesium and be able to switch 2D/3D map.
I follow the steps from his repository https://github.com/openlayers/ol3-cesium
but I have some problems.
Here's my maps init.

var map = new ol.Map({
  controls: ol.control.defaults({
    attribution: false // No atribución
  }).extend([mousePositionControl, // MousePosition
    //new ol.control.FullScreen(), // FullScreen
    new ol.control.LayerSwitcher({tipLabel: 'Leyenda'}), // LayerSwitcher
    new ol.control.ScaleLine(), // ScaleLine
    //new ol.control.ZoomSlider(), // ZoomSlider
  ]),
  target: 'map',
  view: new ol.View({
    projection: proj,
    zoom: 3,
    center: ol.proj.fromLonLat([-0.47343, 39.42811], 'EPSG:4258'),
    minZoom: 0,
    maxZoom: 10

  })
}),
ol3d = new olcs.OLCesium({
  map : map
}),
scene = ol3d.getCesiumScene(),
terrainProvider = new Cesium.CesiumTerrainProvider({
  url : '//assets.agi.com/stk-terrain/world'
});

ol3d.setEnabled(true);

Nothing is rendered if I enable the Cesium map.
MousePositionControl show NaN coordinates.

Also I get an error if I try to add Layers to map after ol3d.setEnable(true) is set.


texts: Saving Interpolation data in a shapefile as an alternate to Raster Output

texts:
Is there a possibility that we store our interpolation data in a shapefile instead of a raster image, so that the shapefile can be used to display the Interpolation as a replacement to the RASTER OUTPUT.

Also I intend to use such a shapefile in a HTML webpage with hover effects, so that if a hovers the mouse over some points, they can see the value at the location in a pop-up.


texts: How to Label parcels in Arcgis with label insertion point left align

texts:
Scenario: After labeling all parcels in Arcgis, using Maplex in a nice looking manner.

Need: When the programs labels, i need that the left insertion point of text to be on the left side and always inside polygon even if its overlaps in some cases when is impossible to avoid it because of high density.

This is needed because after this, i convert the labels in annotation and then exported in Autocad. But the problem is that when i check the topology in Autocad i have multiple centroids problems because the left side insertion point of the text is not within parcel all the times, bacause when Arcgis Labels it tries to calculate that the center of the label being always within parcels.


texts: Creating line between middle of polylines which are intersected using ArcPy?

texts:
I have got a river network as a feature class in a gdb.

I need to calculate the topologic attributes via the connectivity graph of the river network. A graph-theoretic representation of river networks uses rivers as vertices and river junctions as links of a connectivity graph to understand the topology of river networks (takes rivers as nodes and river intersections as links of a connectivity graph). It will give information about centrality of lines and also simplify the network.

In order to do this, I want to draw lines from the middle of each river branch to the middle of intersected higher order river.  By this way, I can calculate the topological centrality of a river branch by using from-to node.

When doing this manually, I draw a polyline from the middle of a river line to the middle of intersected higher order river line. Please help me to do this automatically by using Python in ArcGIS 10. If I do it manually it will take too long because of the drainage density.


texts: Migrating 10.0 map services to ArcGIS 10.2 for Server?

texts:
I have a few map services that I would like to move to ArcGIS for Server 10.2.  Each server is on a separate machine.  I have come across instances where people migrate the entire arcgisserver folder, (arcgisinput, arcgisoutput, cache, etc.) however my 10.0 services only maintain an input and an output.

What's the most time efficient manner in migrating single map services and not an entire instance from 10.0-10.2?


texts: Equivalent of pyproj preserve_units for Proj4js

texts:
I am attempting to convert from EPSG 4326 to State Plane NAD83 using Proj4js but the results are coming out in meters.  In python there is an option to preserve the units such as:

p1 = Proj( init="epsg:2264", preserve_units=True )

...then do the tranform

In Proj4js, I am attempting to do the same thing:

var source = new proj4.Proj("EPSG:4326");
var dest = new proj4.Proj("EPSG:2264", true);  // does not like the true param
var webWgs84Point = [longitudeg, latitudeg];
var p = new proj4.toPoint(webWgs84Point);
proj4.transform(source, dest, p);

But it does not like the true param on this line:

var dest = new proj4.Proj("EPSG:2264", true);  // does not like the true param

Does anyone know how to force the transformation to output in feet?

If I remove the param:

var dest = new proj4.Proj("EPSG:2264");

It works but, the points (in var p) are in meters instead of feet.  I need them to be in feet.


texts:
I know there has been lots of WFS assistant and I did follow this one word by word, which I found was the best in the entire gis stack but still no clue why I am unbale to render a WFS on base map.

Here is the code,

var map = new OpenLayers.Map("map-id");
            var bio = new OpenLayers.Layer.WMS(
              "bio11",
              "http://localhost:8080/geoserver/iPlant/wms",
              {layers: 'iPlant:bio11'}
            );
            var imagery = new OpenLayers.Layer.WMS(
                "Global Imagery",
                "http://maps.opengeo.org/geowebcache/service/wms",
                {layers: "bluemarble"}
            );

            /*var QuebecSpecies = new OpenLayers.Layer.WMS(
              "AllQuebecSpecies",
              "http://localhost:8080/geoserver/iPlant/wms",
              {layers: 'iPlant:AllQuebecSpecies'},
              {'opacity': 0.4, 'isBaseLayer': false, 'visibility': true}
            );*/

            var QuebecSpecies = new OpenLayers.Layer.Vector(
            "AllQuebecSpecies",
            {
                strategies: [new OpenLayers.Strategy.Fixed()]
                , projection: new OpenLayers.Projection("EPSG:4326")
                , protocol: new OpenLayers.Protocol.WFS({
                    version: "1.1.0",
                    url: "http://localhost:8080/geoserver/wfs",
                    featurePrefix: 'iPlant', //geoserver worspace name
                    featureType: "iPlant:AllQuebecSpecies", //geoserver Layer Name
                    featureNS: "http://geoserver.org/iPlant", // Edit Workspace Namespace URI
                    geometryName: "the_geom" // field in Feature Type details with type "Geometry"
                })
            });

            map.addLayers([imagery, bio, QuebecSpecies]);
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            map.addControl(new OpenLayers.Control.MousePosition({element: $('location')}));

As you can see in the code i have commented out the part where I am using the same layer as WMS, where it works perfectly fine, but then it does not overlay on the base map (meaning Quebec layer is a point shapefile had so the rest of the space is white background which covers up the base raster, that is why I have set the transparency to be 0.4).

Help me out guys, really tired of finding and trying and having no luck.

UPDATE

I moved the shapefile folder of mine to www folder and also changed the store location folder to www.

Workspace : iPlant
Store Name : SpeciesShp
FeatureLayer : AllQuebecSpecies

Is there some other way to add shapefile to Geoserver for using it as a WFS?

UPDATE 2.0

Since there were suggesstions of maybe my html file is not in the right folder, I now have my HTML file in /var/www/test.map/html as well as /var/lib/tomcat6/webapps/test.map.html. Still no luck, WFS does not show up :(

This is the error I am getting in develoepr tools,

XMLHttpRequest cannot load http://localhost:8080/geoserver/wfs. Origin http://localhost is not allowed by Access-Control-Allow-Origin.

UPDATE 3.0

Ok thanks to more suggesstions now I have my map.html in /var/lib/tomcat6/webapps/geoserver/data/www/map.html. Now I can still work with WMS but now if i try to use WFS, the error I can see in the developer tool is

Uncaught TypeError: Cannot read property 'Fixed' of undefined

Also the map container itself disappears.

HELP!!!


texts: Does anyone know what cartoDB uses for country boundaries on their standard basemaps e.g. cartodb world flat blue? A shapefile would be really useful as doing global maps (using country polygons) look awful if they don't line up nicely. I've looked in the data library but couldn't find anything


texts:
I would like to get a total count of multiple layer features (defined) within the ArcMap view extent.  The code works fine with one layer but when I add a second or third layer with an "OR" operator I only get the count of 0 because one layer may be visible within the extent but the others are not.

e.g.

If pLayer.Name = "Layer1" Or pLayer.Name = "Layer2"

Here is the code.  Any suggestion would be greatly appreciated. thx!

Dim pMxDoc As IMxDocument
Set pMxDoc = ThisDocument

Dim pAv As IActiveView
Set pAv = pMxDoc.FocusMap
Dim pMap As IMap

Dim pEnv As IEnvelope
Set pEnv = pAv.ScreenDisplay.displayTransformation.VisibleBounds

Dim pSF As ISpatialFilter
Set pSF = New SpatialFilter
Set pSF.Geometry = pEnv
pSF.GeometryField = "Shape"
pSF.SpatialRel = esriSpatialRelIntersects

Dim pEnumLayer As IEnumLayer
Dim pLayer As ILayer

Set pMap = pMxDoc.ActiveView.FocusMap

Set pEnumLayer = pMap.Layers

Dim pFLayer As IFeatureLayer
Dim pFClass As IFeatureClass
Dim pFCursor As IFeatureCursor
Dim pF As IFeature
Dim intCount As Integer

Set pLayer = pEnumLayer.Next

Do Until pLayer Is Nothing

    If pLayer.Name = "Layer1" Or pLayer.Name = "Layer2" Then '?MULITI CUR

     Set pFLayer = pLayer
     Set pFClass = pFLayer.FeatureClass
     Set pFCursor = pFClass.Search(pSF, False)

    End If
    Set pLayer = pEnumLayer.Next
Loop

   ' Loop through the cursor and count number of selected features.
Set pF = pFCursor.NextFeature
Do Until pF Is Nothing
    intCount = intCount + 1
    Set pF = pFCursor.NextFeature
Loop

If intCount = 0 Then
MsgBox "Count = 0"
Else
MsgBox ("Count = " & intCount)
End If

pAv.PartialRefresh esriViewGeoSelection, Nothing, Nothing


texts: Are there tools in ArcGIS for drawing compass bearings, and which projection should be used to create a map showing them?

texts:
I have a requirement to create a map (or multiple maps) showing four different locations with a bearing compass drawn around each one, oriented towards Grid North.

I was told that each of the original four points will need to have a circle centred on it, with ticks representing 360 degrees.  0 degrees will be pointing to Grid North.  The idea is that if one of these locations was in Toronto, Canada (let's say) the student could take a string with one end on Toronto, have the other end of the string on London, England, and be able to tell you that it's something like "The direction from Toronto to London is 19 degrees from North" (this is an example, I don't know if this is true or not).

I'm confused about how to do this on paper, but perhaps I'm just over-thinking things.

Can I use the Vertical-Perspective projection?  Gnomonic is highly distorted a large distances which is what this map will have to show.  I read that Vertical-Perspective is similar to Gnomonic, and that Gnomonic preserves true direction, but haven't come across anything saying that Vertical-Perspective preserves true direction.

Is there a tool in ArcGIS that I can use to generate the compass?  I've drawn them manually, but if there was a tool to generate it, I would be high appreciative.


texts:
Is it possible to create a map package of a network dataset (ESRI ArcGIS 10.1)? I tried publishing it as a map package, but I can't seem to insert the network itself (the "New Route" part, not the extracted layers of the stops and the route and barriers).

I found this, but the links are broken, and I can't seem to get info.

EDIT: I found this from ESRI forums, stating that "at this time(2011) the Runtime does not support the RouteTask with local resources. Routing is supported by geoprocessing model and then creating a Geoprocessing Package (gpk) with runtime support enabled from that model."  - As I understand it, I need to build a model. But I still don't understand if I can work with my data or not ( I need the tool, based on specific layers, not a general tool, and not with only route results).


texts: How to decode Google's proprietary latLon format for China?

texts:
This Google Maps link returns train stations in Shanghai, China. By appending '&output=js' it returns it in JSON format. I'm trying to decode the format Google uses for lat/lon:

latlng:{
    lat:0,
    lng:0,
    alt:{
        ll:"35122131713574191160",
        mode:2
    }
}

For all other countries, Google returns the lat lon values separated in the lat and lon . Only for China they return this strange ll value. Does anybody know how to decode it?


texts: Maximum length of text fields in shapefile and geodatabase formats?

texts:
The maximum text string for a field in a geodatabase is 320 characters.

The data I am importing has long character strings and it seems to be truncating when I convert into shapefile at the max text string and messing the fields up.

Is there a way to extend this to 700-1000 characters?


texts: PostgreSQL/PostGIS/pgRouting function (written in PL/pgSQL) not found nor run in user but can be used and gives correct result by admin

texts:
A function using pgr_dijkstra (pgRouting) is returning correct answer when run from "admin".
The same function run from a simple user returns an error (ERROR:  function pgr_dijkstra(unknown, integer, integer, boolean) does not exist).
Complementary information:
admin - mydb> select * from pgr_version();

 version │  tag   │   hash    │ branch │ boost
═════════╪════════╪═══════════╪════════╪════════

2.6.2   │ v2.6.2 │ b14f4d56b │ master │ 1.59.0
(1 row)

But from user with all privileges granted I get:
user - mydb> select * from pgr_version();

ERROR:  **function pgr_version() does not exist**

LINE 1: select * from pgr_version();

Using, \df though, the function appears (exists)...
Same search_path for both user and admin, 2 different roles though for admin and user.
But user can access all tables on the schema used (select, insert, update, delete) and can execute all functions in that schema.
I am perplexed.
Query in function:
SELECT seq, d.node, d.edge, cost,
       e.geom as edge_geom,
       n.geom as node_geom,
       n.station
FROM
    pgr_dijkstra( '
        SELECT gid AS id, source, target, length AS cost
            FROM london_tube.lines',
        ( SELECT station_id
                        FROM london_tube.stations WHERE station = 'Finchley Road'),
        (SELECT station_id
                        FROM london_tube.stations WHERE station = 'Piccadilly Circus'),
                false
        ) AS d
        LEFT JOIN london_tube.lines AS e ON d.edge = e.gid
        LEFT JOIN london_tube.stations AS n ON d.node = n.station_id
ORDER BY d.seq;


texts: I'm new to QGIS, so supect this is trivial, but it has frustrated me for the last hour or more... Last week whenever I added a csv as a layer once I'd filled in the first dialog it automatically opened a dialog where I could select the correct CRS. Today when I open a CSV file I go straight from the open CSV dialog to the map with a warning flagged at the top that the CRS was not set so it has used the default value, which is wrong. I must have somehow clicked some setting somewhere that has turned off the (very handy!) dialog and I can't find it anywhere. What have I done wrong and how can I get QGIS to automatically open the dialog again?


texts:
After making some changes to an sp object I want to save it as a shapefile using writeOGR()so that I don't have to repeat the cleaning every time.

I haven't found a way to identify the layer name of the sp object though.

boundaries <- geojson_read("http://geoportal.statistics.gov.uk/datasets/8edafbe3276d4b56aec60991cbddda50_2.geojson", what = "sp")

# irrevelant data cleaning steps

writeOGR(obj = boundaries, dsn = "tempdir", layer = "??????", driver = "ESRI Shapefile", verbose = TRUE)

I'm hesitant to use sf instead because of the need to work with some existing code that all relies on sp. But maybe it's time to rewrite that stuff.


texts:
I'm trying to plot a map, where arrows indicate information. In my specific case I have several data from commuters, from town A to town B, from town C to town B and so on. I'm missong some keywords on how to find information about that, how to plot such a map, that

The commuters path is not only a line, but maybe an arrow and also not totally straight
The thickness of the line indicates the amount of commuters

I'm normally working with QGIS and geopandas and I'm quite sure, that my idea is no rocket science, so probably there is already some plugin/tool/module out there, to create such a map.
Can anybody help me with some keywords on how to find more information about this?


texts: How are the joined results different between choosing “Only keep matching records” and “Keep all records”?

texts: I don't really understand the main difference between these two functions? What are the key differences between these two options and why are they different? Like what makes these two so different from each other? Will I get a completely different answer if I choose one or the other?


texts: Distance difference between Pyproj and Haversine

texts:
I'm measuring the distance between two points with two different methods. This results in two very different results. Please have a look:
from pyproj import Transformer
from haversine import haversine, Unit

coordinate_to_meters = Transformer.from_crs('epsg:4326', 'epsg:3857')
transformed_w = coordinate_to_meters.transform(40.7004, -74.0164)
transformed_e = coordinate_to_meters.transform(40.7004, -73.9232)

print(transformed_e[0] - transformed_w[0])
# Result: 10374.976541933604

print(haversine((40.7004, -74.0164), (40.7004, -73.9232), unit=Unit.METERS))
# Result: 7856.787789520122

The second result looks right, but I want to use the first method (pyproj). So, how can I make pyproj return the correct distance?


texts: I am trying to import a CSV file but cant seem to align the points. I made sure the csv is in UTF-8 and using the project projection but cant seem to align the points no matter after trying multiple projections. What am I missing here?


texts: My woes rendering shape files on web-based mapping application

texts:
First, I'd like to let it be known that this is my first journey into developing mapping applications with such a large set of data. So, I am in way locked into the techniques or technologies listed below...

The Overview

What I am trying to accomplish is the ability to load my company's market information for the United States onto some form of web-based mapping software. Currently I am trying to accomplish this with Google Maps JS api and GeoJSON data, but am not against other alternatives. There are roughly 163 files (ranging from 6MB to 200KB) that I have exported from ArcGIS into GeoJSON files, and then loaded into a database (currently as GeoJSON strings). We have developed a UI that loads the data based on the current map bounds and Max/Min calculations in the corresponding records.

The problem I'm running into is the render time on the map itself, which is annoying when switching between different regions, states, or zoom levels. The API calls to load the data are acceptable in regards to the size of the data being retrieved. My boss said it is great for a proof of concept, but would like to see it much, much faster.

The Questions

What suggestions could you offer to increase the render time?

Are there better options (3rd party libs, techniques, etc) for what I'm trying to accomplish?

It was suggested by a co-worker to export the map shapes and just use the images for overlaying the information based on the coords. Any input on this?

Edit #1

The shapes consist of polygons and multi-polygons.  They essentially trace around all of our markets with distinctive opaque fill and border.

The interactive ability would be nice, to be able to click on a given area and retrieve property, tract, and other data points, but is not essential to it's success.  I could overlay the data if necessary.


texts: How do I save a geodatabase from the internet that has ftp?

texts:
How do you save the geodatabase on the ftp ?

It only has the name of the geodatabase with the extension .gdb on it and when I right click on it and it just says download...

I have never done it before.

Edit : I am attaching this screenshot so you will know what it looks like


texts: OpenLayers 3 zoom to mouse location pulls off to the left in SharePoint

texts:
I am currently creating a web application using OpenLayers 3 that aims to be embedded into SharePoint using the Script Editor tool.

For the purpose of this question assume I am just using a basic map that brings in OSM data. This works fine in a standalone html file and zooms to the correct location.

However, the issue I am having is that when you zoom in (using the buttons, mouse wheel or holding the shift key and drawing a box) it pulls off to the left when it is embedded into SharePoint.

I am guessing this has something to do with a style or some function in SharePoint rather than something with Openlayers but I thought i'd ask on here to see if anyone else has had a similar issue. The interesting thing is that after setting the map to full screen and then minimizing again, all the zoom functions work correctly.


texts: Which projected coordinate system for whole China?

texts:
I want to project data of China. I'm not concerned with trying to preserve areal or directional relationships but preserving distances would be nice.

Does such a coordinate system exist?


texts: Adding suite numbers to apartment building?

texts:
I wanted to know if there is an easier way to add apartment suite numbers to an apartment property? An example workflow of what I currently do to add a 400 level apartment building is add one point for each building number at the 100 level. I then copy and paste each level from the 100 level series and change the suite field number until I get to the 400 level series. The current process that I go about this seems very archaic and time consuming.

I figure there is a python tool floating around out there that lets me select all of the 100 level series and specify how many levels there are and the tool creates multiple points over the 100 level suite with their appropriate building number.


texts: How to repair data source after moving layer files across folders? Missing data

texts: I moved some layer files from one folder to another (drag and drop on Catalog pane), but now the data source is all messed up. The layer files appear on new folder on the Catalog pane, but when I load on a map and try to repair the data source (clicked on the red exclamation mark), the files do not appear in the new folder. The files are also not in the old folder. Help please?


texts: decompression error when writing the file QtCore.pyd (QGIS)

texts:
When I try to install QGIS there is an error :

  decompression error when writing the file QtCore.pyd  (or in German:
  "dekomprimierung fehler beim schreiben der datei QtCore.pyd").

My C disc is almost full. But I would like to install it on some other disc and error is still showing up.

How do I solve this problem?


texts: 'Layer is not valid' error in QGIS for delimited text layer

texts:
I am trying to add a CSV that contains lat/long coordinates as a layer to a project in QGIS but I keep getting a 'layer is not valid' error. Here is a picture of the data preview before I click Add:

And here's the error message I'm getting:

CRITICAL    Layer is not valid : The layer file:///(path)/(name)?type=csv&detectTypes=yes&xField=Longitude%0D(Decimal%20format)&yField=Latitude%0D(Decimal%20format)&crs=EPSG:4326&spatialIndex=no&subsetIndex=no&watchFile=no is not a valid layer and can not be added to the map. Reason:

Note: I didn't include the file path and file name in the Error message because this is a work-related project. And yes, the reason is blank. It's driving me insane!


texts: Adding scaleline when using a custom projection

texts:
I have recently started working with OL3 and now I try to add ScaleLine control to my map

var scaleLineControl = new ol.control.ScaleLine({units:'metric'});
var scaleLine = ol.control.defaults({
    attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
    collapsible: false
    })
}).extend([
    scaleLineControl
]);
map.addControl(scaleLine);

When doing this I get the AssertionError: Assertion failed in Firefox

Im using proj4 and the map is using a different projection.

Isnt it possible to use scaleline with other that EPSG:4326  ?

Br
Mike


texts: FragStat metrics analysis of urban land uses

texts:
I am trying to do a  land use analysis in FRAGSTAT VERSION 4.2 for, 1995, 2005 and 2013. My land uses of interest are low density, medium density, high density residential areas, commercial, manufacturing and non urban land uses. I am using the landscape metrics and the patch metrics for my analysis. When i input my data into FRAGSTAT,the model consistency is fine for all my selected metrics. However when I run the model, during the run, I get the following message for all my land uses,

  [_Low_Density_Residential_] not present in the current landscape.
  Ignored. 08/15/16 21:09:39: Class 5 [_Medium_Density_Residential_] not
  present in the current landscape. Ignored. 08/15/16 21:09:39: Class 6
  [_High_Density_Residential_] not present in the current landscape.
  Ignored. 08/15/16 21:09:39: Class 7 [Informal Housing] not present
  in the current landscape. Ignored. 08/15/16 21:09:39: Class 8
  [_Manufacturing_Sector] not present in the current landscape. Ignored.
  08/15/16 21:09:39: Class 9 [_Commercial_Sector_] not present in the
  current landscape. Ignored.

Any ideas on what the message might mean?. I have checked my data format and it is correct.The model consistency is also reported as okay in FRAGSTAT.


texts: How to enumerate ArcGIS Server 10 map services with ArcPy

texts:
I need to connect to ArcGIS server with ArcPy and enumerate over map services. I need to:

Loop through each ArcGIS server map service
Stop/Start the service
Get the service source document (MXD/MSD) path

I am going to be running the findAndReplaceWorkspacePaths function on each service.

Can someone point me in the right direction how to do get a handle to the ArcGIS server map services please?


texts: Limit what fields can be edited GeoExplorer OpenGeoSuite

texts:
I have an issue with limiting what fields can be edited by the user. If I link my layer to my PostGIS table, the user is able to edit all the fields for a specific point.

If I create a view I can limit what they can see, however views are read only?

Any obvious solutions I am not thinking about to allow me to limit which fields they can change or fill in when modifying a layer?

Using OpenGeo Suite, GeoExplorer.


texts: Why do pgadmin III views show up as empty ArcSDE geodatabase tables in ArcCatalog?

texts:
I have an SDE geodatabase connection set up in a server with data stored in a postgres database.

I have successfully created views using pgadmin III but they show up as empty tables in ArcCatalog (10.2).

What could be causing this, and what is the solution?


texts: Copy/Migrate Services between same version ArcGIS Servers

texts:
Before marking as duplicate, please note this migration is from same version servers.

I would like to migrate 200+ services from a development environment to a test environment in ArcGIS Server. Both servers have been installed and configured the same way and are on the same 10.2.2 version.

Is there any way I can batch migrate or copy the services over?


texts: Worldwide population density data not grouped by country?

texts:
Are there any data sources available, preferably freely (but not necessarily), which show population density without regard to country or constituency boundaries of any sort?

I'd like to analyze a map which shows the human concentration as accurately as possible, without "blurring" it by country or other similarly large areas, and instead using a grid of some sort.


texts:
I am wondering how to make the GeoJSON search more efficient. I would like to get the search result from more than 1 layer in GeoJSON.

My code is (I attached one of two GeoJSON examples):

var test = [{
"type": "Feature",
             "properties": {
             "Title": "Waterbeach Church",
                 "Head": "Chapel Street",
                 "Description": "Parish community"
        },
            "geometry": {
            "type": "Point",
            "coordinates": [
            0.192763,
            52.263692
                ]
                  }
                    }];

var geojsonMarkerOptions2 = {
radius: 5,
fillColor: "#ffc34d",
color: "#1a1100",
weight: 1,
opacity: 1,
fillOpacity: 0.4
};

var church = L.geoJSON(test, {
pointToLayer: function (feature, latlng) {
    return L.circleMarker(latlng, geojsonMarkerOptions2);
},
    onEachFeature: function (feature, layer) {
        layer.bindPopup('
'+feature.properties.Title+'

Address: '+feature.properties.Head+'

'+feature.properties.Description+'
'+feature.properties.URL+'');
}

    }).addTo(map);

Afterwards, I am using Leaflet GeoJSON control search, where I want to search between both multiple geoJSON layers (already solved using this link:

L.Control.Search: Using looping for searching data on Leaflet

and for their property features. I am interested in search for more than 1 properties.

When I place another value in "propertyName", then query is redirected to this 2nd value instead of 1st or both.

L.control.search({
layer: L.layerGroup ([sitis, church]),
initial: false,
propertyName: 'Title', 'Head' // Specify which property is searched into.
  })
  .addTo(map);

Can I have something like:
    propertyName: L.GeoJSON.PropertyGroup (['Title', 'Head', 'Description]),

Or is there another reasonable solution for this issue?


texts: ENVI and Monteverdi(OTB) band selection for RGB image display

texts:
I've been using Monteverdi 2 for satellite image processing for a while. I've just started using ENVI for classification because it is easy to use for classification purpose.

My question is very simple:

I've loaded a satellite image to Monteverdi and selected bands 5,4,3 as RGB and I've get true color image as shown below:

Then I've loaded the same image to ENVI and selected same bands as RGB and the result is something like this:

Why there is such difference occurs ? Does anybody has an explanation for this?

PS : I've tried other band combinations and found that in ENVI bands 6,5,4 are true color combination. But still I don't get it, Why same image has different band combinations in this two program ?


texts:
I have hundreds of QGIS projects that have been built over years and many different QGIS versions. Now I need to move them to another server and I want to be able to edit the project files to show the new file paths.

My issue is that I cannot unzip the qgz files because my PC Administrator has not given me access to an unzipping program. Normally, if the file I want to unzip is one recognised by WinZip, then I can right click and choose Extract. But right clicking a qgz file does not give me the Extract option.

My research indicates that earlier qgs files are easy to access, but my issue is about project files created by the 3.0 series of QGIS and the most recent project file version and my IT admin's distrust of my intentions.

How else can I open the project files to access the file paths in the qgs part?


texts: How to scan large paper maps without a large format scanner?

texts: Is there a way people have used to import a paper map as a raster without using a large format scanner. I do not want to cut my map. I'm wondering how much success people have gotten using things like a regular digital camera, and what software they used to process the image to the point where I can just georeference it. I might even try something like microsofts photosynth software, or canons stitching software.


texts: Using data from table to make buttons in Mapbasic?

texts:
I have select Query that selects distinct value from a column. Is is possible to use these distinct values in my mapbasic program to make buttons and button labels?

More Info:

  SQL Query : Select vendor from table_name ;

Now the selected vendors name are used to make buttons but I don't know how to get each row from table and put it in mapbasic variable. I am used to JAVA programming but don't know how it works in mapbasic. In java program we store the table in resultset and loop through it to get the row of column. I need to know how is it done in map basic. I read the mapbasic guide but could not get information about this kind of stuff.


texts: Calculate distance between successive points along polyline where points lie on the polyline in ArcGIS for Desktop?

texts: I have multiple points (shapefile of points layer) and polyline layer. These multiple points are on the polyline layer. How can I calculate distance between multiple points along polyline in ArcGIS? I want distance between successive points from bottom right to upper left or vice versa.


texts: How to find the most spread out locations?

texts:
Probably a very simple question. I have a list of about a thousand potential geographical locations (lat lon), and of those I need to select the 200 locations that are "most spread out". I think that would be the 200 points with highest total average distance. Think of stores in a city.

Is there a defined method to do it? Maybe in an R-package?

Thanks to everyone making this the great place to learn it is!

/Chris


texts: Negative values after CHM rasterization - lidR

texts:
I don't understand why when rasterizing normalized point clouds (using lidR, R environment) with no negative value, I can get raster canopy height model with negative values?
An example based on the sample data from lidR package:
library(lidR)
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las <- readLAS(LASfile)
nlas <- normalize_height(las,tin())
summary(nlas$Z)
# > summary(nlas$Z) # NO Negative values
# Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
# 0.00    7.78   14.93   13.27   19.32   29.97

If we look at the value of the rasterized CHM, we can find negative values. The phenomenon is less clear with this dataset but with my data, these can be of several meters!
chm <- grid_canopy(nlas, res = 1, pitfree(subcircle = 0.15))
# > chm
# class      : RasterLayer
# dimensions : 236, 228, 53808  (nrow, ncol, ncell)
# resolution : 1, 1  (x, y)
# extent     : 684766, 684994, 5017772, 5018008  (xmin, xmax, ymin, ymax)
# crs        : +proj=utm +zone=17 +datum=NAD83 +units=m +no_defs
# source     : memory
# names      : Z
# values     : -0.0001215559, 28.97837  (min, max)

It also occur with dsmtin() algorithm, which is really similar than the one used for height normalization.
grid_canopy(nlas, res = 1, dsmtin())
# class      : RasterLayer
# dimensions : 235, 228, 53580  (nrow, ncol, ncell)
# resolution : 1, 1  (x, y)
# extent     : 684766, 684994, 5017773, 5018008  (xmin, xmax, ymin, ymax)
# crs        : +proj=utm +zone=17 +datum=NAD83 +units=m +no_defs
# source     : memory
# names      : Z
# values     : -0.0001546422, 29.11114  (min, max)

Could someone explain me these negative values ?


texts:
Does anyone know if I can draw georeferenced polygons in the streetview api. I'm curious to know if anyone has successfully tried this. I see that custom overlays are allowed but I'm not sure if this includes polygons, shapefiles, or tiled map caches.

https://developers.google.com/maps/documentation/javascript/streetview#StreetViewOverlays


texts: Is there a way to get the percentage of different landuse types upstream of a given point?

texts: I'm a fairly novice GIS user and know just enough to get in trouble in a lot of cases.  I am trying to look at the connection between several measured parameters at a few hundred stations along several rivers and the landuse patterns in the areas drained in ArcGIS 10.  I have created basic watershed analysis layers (flow directions, flow accumulation, catchments, etc) for the entire area of interest.  Is there a way to easily sum up the land usage for the area drained by each station (i.e. get the number of cells of each type of land use along with the total cells drained) so that I could use that for further analysis?  If so, how would be the easiest way to implement that so I don't have to do it individually for each station?  I would assume there would be a way to script it, but I don't know anything about scripting in ArcGIS 10.  Thanks so much!


texts: Convert geometry to feature with QGIS expressions

texts:
With QGIS expressions, if I have a feature, I can get the corresponding geometry with geometry (feature). How is it possible the other way round: if I have a geometry to get the feature (or feature id) of this geometry? Unfortunately, an expression like feature (geometry) does not exist. This could be useful to access attributes of this geometry.
If a feature consists of three parts: 1) feature-id, 2) attributes and 3) geometry, than you have expressions to get the corresponding feature for the first two of these three inputs: 1) get_feature_by_id(layer,feature_id)
, 2) get_feature(layer,attribute,value). There is missing something like get_feature_by_geometry (geometry).

Just to illustrate a use case (the question is not about this example: it should just help to understand what this could be used for). I have a point- and a line layer, both in red on the screenshot. To each point, I want to assign the id (or any other attribute)  of the nearest line.
I can easily get the geometry of the nearest line: the black dotted copy of the original red line, created with geometry generator on the point layer: array_first ( overlay_nearest ( 'line', $geometry ) ). To access the attributes of the line, there is the function attribute ( feature , attribute_name ) . But I first should be able to get the feature-id of the geometry to be able to paste it as first arguement.
QGIS does not accept to input a geometry for the feature part of the expression, I get an Evaluation error: Cannot convert to feature.


texts: Problem with Python code to visualize a map in the geospatial analysis

texts:
You can download relevant files to execute my python code as below:
https://drive.google.com/drive/folders/1WmkZ9t3RnAsd4Dy83TRdjWIsAdby4IwI

I want to visualize data at the postal code level with Python code. Although I tried to make a map by using my code, this map is somewhat ambiguous. Hence, I would like know how I can construct code to show this map more clearly.
Specifically, there are two datasets: TL_KODIS_BAS_11.shp is a set of geographical data such as latitudes, longitudes, and postal codes, which is saved as the dataframe of "gdf_admin_postal_pg". And rad100_2_seoul_postal is a dataset that I organize a place where people go based on its postal code.
#1. Python Code
import pandas as pd
import geopandas as gpd

## postal data (source: https://www.juso.go.kr/addrlink/addressBuildDevNew.do?menu=bsin)
gdf_admin_postal_pg = gpd.read_file('./postal_data/TL_KODIS_BAS_11.shp', encoding='euc-kr')
gdf_admin_postal_pg['BAS_ID'] = gdf_admin_postal_pg['BAS_ID'].astype(int)

rad100_2_seoul_postal = pd.read_csv('rad100_2_seoul_postal.csv')
## remove postal code not in my dataset
gdf_seoul_postal = pd.merge(gdf_admin_postal_pg, rad100_2_seoul_postal, how='left', left_on='BAS_ID', right_on='postal')
mpl.rc('font', family='NanumGothic')
#plt.rcParams["figure.figsize"] = (23,13)

fig, ax = plt.subplots(1)

divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.1)

column = 'count'
gdf_seoul_postal.plot(column, ax=ax, legend=True, cax=cax, cmap='OrRd')
#gdf_seoul_postal.apply(lambda x: ax.annotate(s=x.SIG_KOR_NM, xy=x.geometry.centroid.coords[0], ha='center'),axis=1); ##label each polygon (county) in the map
ax.set_title("Spatial Distribution (total)")
ax.set_axis_off()
plt.show()

#2. The Map that I made by this code

The map is not as clear as above. I would like to ask for advice on how to make the map clearer by changing the color or drawing heatmap, and how to implement it with code.


texts: Creating a view in PostGIS - Having issue with view keeping my query

texts:
I'm trying to make a view from a table without a geometry column.  My first issue is when I click on "New View" and then put the query in and click 'OK'.  The query statement is replaced with some other statement for the view.  It doesn't give me an error.  Is there a permission issue when you create a view?  I'm using pgAdmin III. Database version 9.6.

Update.  I saw that everything stopped at the ";" in the query.  I removed the ; in the query and now it's giving me a syntax error.

Here is the query that I want in the view.

SELECT j.speed, j.level, j.length, j.delay, j.city, j.street, j.line,
j.pub_utc_date at time zone 'utc' at time zone 'america/denver',j.id
from waze.jams j
ORDER BY j.pub_utc_date DESC
WITH
 lines AS(
 SELECT id,
       ST_MakeLine(
         ST_MakePoint(
           (line -> n ->> 'x')::NUMERIC,
           (line -> n ->> 'y')::NUMERIC
         )
       ) AS geom
FROM waze.wazejams
CROSS JOIN generate_series(0, jsonb_array_length(line)) AS n
GROUP BY id)

UPDATE waze.wazejams AS a
SET geom_line = ST_SetSRID(b.geom, 4326)
FROM lines AS b
WHERE a.id = b.id


texts: Change Detection using Raster Calculator

texts:
I'm currently analyzing the change detection for urban expansion over a decade starting from 2006-2016.
How can I use raster calculator in order to know the changes?
For example, from agriculture to urban area and etc. I already classified the images into 4 classes, urban area,vegetation,water bodies and barren land.


texts: Is brightness temperature from GEE USGS Landsat 7 Surface Reflectance Tier 1, top of atmosphere brightness temperature?

texts: I was wondering if the brightness temperature from band 6 of USGS Landsat 7 Surface Reflectance Tier 1 product in Google Earth Engine Top of Atmosphere Brightness Temperature?


texts:
I am trying to trim each polyline in a shapefile down to the first 15 feet of each line. The segmentAlongLine method was suggested to me, but this code is getting the AttributeError: 'list' object has no attribute 'segmentAlongLine'.
SHAPE@ in this case is a polyline object... Why is it calling it a list and why isn't segmentAlongLine working? I have found questions about this error but none of the answers seem to apply to my issue.
with arcpy.da.UpdateCursor(fc,"SHAPE@") as cursor:
    for row in cursor:
        row.segmentAlongLine(0,15)


texts:
Does anyone have a working code example of how to toggle 3D buildings on/off in Cesium?
Since the 3D OSM buildings in Cesium are solid, everything beneath them is obscured so I would like to add an option to toggle them on/off.
So far using this to display 3D buildings:
var tileset = viewer.scene.primitives.add(
  new Cesium.Cesium3DTileset({
    url: Cesium.IonResource.fromAssetId(97388),
  })
);

Idea is to have a checkbox to on/off 3D buildings.


texts:
I am trying to create my first script in QGIS.

##Double attribute selection=name
##Vector=group
##Selection_layer=vector
##First_field=field Selection_layer
##expression=string
##Second_field=field Selection_layer

from qgis.core import *
from PyQt4.QtCore import *

layer = Selection_layer
exp = QgsExpression("expression")
query_1 = "First_field" + expression
selection = layer.getFeatures(QgsFeatureRequest().setFilterExpression(query_1))
selected_ids = [k[Second_field] for k in selection]

ids = [] for feat in layer.getFeatures():
    if feat[Second_field] in selected_ids:
        ids.append(feat.id())
layer.setSelectedFeatures([l for l in ids])

Now i got error like that:

And I would like to have my inputs to look like that:

The script is related to my previous question: Selecting new records using values inside previous selected rows in QGIS?. Now I would like to change it to run in as a script. What I am trying to do is to select 2 fields from current layer. For the first field, I need to create a selection query. For the second one, I need to select only records which have the same number as the records from first field.

Can you help me?


texts: Trying to export table from mxd using arcpy Copy Rows but get cannot create output error?

texts:
I am trying to export a table from a mxd using arcpy.  I need a comma delimited .txt file.  I believe the CopyRows_management function should work, however I always get a cannot create output error number 000210.

# new 6_ export script
import arcpy, os

finalFolder = r"C:\workspace\CRAI_outside_finalDeliv\SectionA"

# intermediate variables:
GISMXD = os.path.join(finalFolder, "4_ArcGIS_Map_Documents\SectionA.mxd")
folder6_hvl = os.path.join(finalFolder, "6_GPS_Horizontal_Vertical_Location")
txtFilePath = os.path.join(folder6_hvl, "SectionA_SiteMarker_WGS84_DD.txt")

GISMapDoc = arcpy.mapping.MapDocument(GISMXD)
DF = arcpy.mapping.ListDataFrames(GISMapDoc)[0]
GsMPLay = arcpy.mapping.ListLayers(DF)[0]
# I consistently get an error 000210 cannot create output on the next line.  Can't figure out why.
arcpy.CopyRows_management(GsMPLay, txtFilePath)

del DF
del GISMapDoc

Ultimately I want to be able to do something like what is done in this question: Copy, not export, a table from Arcmap but using arcpy.
The full error message is:

Runtime error  Traceback (most recent call last):   File "<string>", line 15, in <module>   File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 15215, in CopyRows     raise e ExecuteError: ERROR 000210: Cannot create output C:\workspace\CRAI_outside_finalDeliv\SectionA\6_GPS_Horizontal_Vertical_Location\SectionA_SiteMarker_WGS84_DD.txt Failed to execute (CopyRows).

I'm using Arc 10.3, python 2.7.


texts: Removing duplicate rows created by ST_Intersects in PostGIS?

texts:
I want to basically take one spatial table of polygons and determine if any of the polygons interest with another table of polygons and save the results in a new table with a new column saving the result as true or false. The script below works:

CREATE TABLE test_table AS
SELECT parcels.*, COALESCE(ST_Intersects(parcels.wkb_geometry, flood.wkb_geometry), false) AS intersects
FROM parcels LEFT OUTER JOIN flood ON ST_Intersects(parcels.wkb_geometry, flood.wkb_geometry);

However I do get duplicates when a polygon from the first table is intersected by multiple polygons from the second table. As seen below:

I would like to only have one entry per polygon, even if it has been intersected multiple times. I have been removing duplicate rows as a work around, but I wanted to know if there is a more elegant way of doing this.


texts: Data Interoperability Tools appear not to be licensed?

texts:
I am having problems with Data Interoperability tools in ArcMap 10.2,When i try to use a quick import or a quick export in Data Interoperability Tools , i can not , i click but i dont have any result.

what is exactly the problem , for other arctoolbox work very well.

Solved: I added it from ArcGIS folder's setup. this extension was not installed.


texts:
I wanted to make a map of the world that shows all continents at once, Antarctica included, with as little distortion as possible on the continents and for that purpose, I noticed 2 opposite points on the earth (namely 30S 15W in the south Atlantic Ocean and 30N 165E, around 20 degrees off the coasts of Japan and Kamchatka) that could play the roles of north and south poles on my map so that most of the distortion happen in the oceans (south Atlantic and North Pacific).
After around one week of work with QGIS, I managed to make a somewhat satisfying map, that you can see details of here (don't pay attention to the top banner : it is an unrelated website that I own) :
https://vannier-editions.fr/le-monde-vu-autrement
It is an oblique Mercator projection, which is not exactly what I want, but I had to choose this for reasons I'll explain later. Here is the proj string used to create it :
+proj=omerc  +lat_2=0 +lon_2=75 +lat_1=-60 +lon_1=165

When you use this proj string, Argentina and Chile get split in two parts : the south side on the right, and the north side on the left. Thus, whenever I add a vector layer that crosses Argentina, I get tons of lines across the map which I tediously cut using the "split features" tool. Then, once my map was done, I edited the image with gimp and copy/pasted the left part of Argentina on the right and, since the projection is Mercator, they correspond.
However, this trick works only because I use Mercator, and I was lucky enough that only Argentina is split - in other projections I tried, the split is much worse and requires a lot of work.
I'd like to make a different projection (for example, an elliptical projection such as the Mollweide, but with a south pole at 20S 15W), to reduce the amount of distortion in Japan.
I won't be able to copy-paste a part of the map if I don't use a cylindrical projection. So I see two solutions to my problem :

Is there a parameter of proj +omerc to make sure that Argentina doesn't get split in 2 parts (I'd prefer the split to occur between the southern tip of Chile and Antarctica). I tried to play with the lat_0 parameter, the false northing or easting parameters, but never got anything to work the way I want. I also tried other ways to use Oblique Mercator, but had the same problems :
+proj=omerc +lat_0=75 +lonc=-15 +alpha=-65

I think my problems would be solved if I could display some features twice. For example, I'd like to display the features of Argentina both in the left part of the map and the right part to avoid having lines across the map.

This is a picture of the results I usually get, with Argentina on the other side of the map.


texts: Using QgsVectorFileWriter to write several layers on same Spatialite file?

texts:
Does anybody knows how to write several QGIS layers on a same spatialite file using QgsVectorFileWriter or another way to add several same layers type to a Spatiallite specific table using QgsVectorFileWriter?

I tried this

lyrList = [layer for layer in QgsMapLayerRegistry.instance().mapLayers().values()]

crs = QgsCoordinateReferenceSystem('EPSG:22181')

for lyr in lyrList:
   QgsVectorFileWriter.writeAsVectorFormat(lyr, 'p1.sqlite',"utf-8", crs, "SQLite", False, None ,["SPATIALITE=YES"])

But it only write the last layer in the same db.

I am not sure where specify the destination table name or specify I want to add new data to same table.


texts: How to display some Ushahidi's layers (WFS) in my Web portal?

texts:
I'm working on a VGI Web portal. I'm using OpenLayers and the application is running through the TomCat server. I would like to know if it's possible to display layers from Ushahidi or others VGI tools using OGC services (Web Feature Service).

If it is possible, how could I do it?


texts: preparing GPS coordinates for processing in gis

texts:
I'm currently working on a masters in archaeology, using QGIS to examine some palaeolithic sites. I created a database with the site coordinates, which I collected from looking at bibliographies of site reports, emailing scholars, a couple of university databases and good old google earth. As I used a variety of sources, my coordinates are in a variety of formats so for example;

Grotte de Fees; Chatelperron 46°24'42''N 03°38'18''E,
La Ferrassie                 44,955 0,941
Grotte du Trou de la Chevre  45.325239  0.588272
Aranbaltza                   503017.16, 4805322.50 (in UTM 30N)
Grotte de la Verpilliere II  632908mE, 5185383mN   (31T)
Dzeraza Skala                554026,73; Y: 1243588,633 (S-JTSK_Krovak_East_North)

So basically it looks like a complete mess.

I've also noticed that entering the coordinates into google earth can give different locations if I separate the x and y with a comma or a full stop. I want to convert everything to WGS84 before starting my analysis. WHat is the best way of doing this?


texts: Automatically download and merge webmap tiles into one big image?

texts:
Is there an easy way to download a bunch of web map tiles (in /z/x/y.png format) and stitch them together into a single large image? I could probably script this using ImageMagick, but would prefer not to invent another wheel.

(The tiles in question are made by me in TileMill. I'm having serious problems with TileMill's export feature, and thought this might be a workaround.)

Mac or Linux only.


texts:
I am looking for a possibility to create line charts in QGIS:
I have production data with a Field Name or ID, a date (year) and a value. I would like to be able to show a line graph of this data for individual polygons.

Is there a way to do this?


texts: CSV export undesirably rounding text-coded unique identifier

texts:
I am extremely new to QGIS and to GIS software generally, so apologies in advance if the answer here is obvious.

I have used QGIS to create intersection percentages and maps based on two different types of geographies for a city: Census blocks and city council districts. I have followed the excellent Q&A here (Percentage of polygon in one shapefile within polygon of another) to execute the necessary intersection and calculate the proportional allocations for each resulting geography. I have also used the unique identifiers from each table to create a variable that assigns a unique identifier to each Block-District pairing.

I need to use the resulting data in a statistical analysis using R. When I export the attribute table for the Intersection layer to a CSV file, my unique identifier variable--a 17-digit TEXT variable created in QGIS--imports as numeric and changes some of its values on R import, with no discernible explanation why. (Meaning it comes in with different values for the last two digits.) When opening the same file in Excel, all of the values for the identifier variable round to the hundredths place, replacing the last two digits with 00.

Can anyone provide guidance for how to export from QGIS to open in R and Excel while maintaining the correct values? Does anyone have some insight as to why this is happening?

I'm not sure how to provide "code" demonstrating what's going on, but I've listed out the difference in observations between programs below.

First Entry

QGIS

Block ID: 480219503001036
District ID: 02
Correct Unique ID: 48021950300103602 (populates correctly in QGIS)

RStudio (incorrect)

Block ID: 480219503001036
District ID: 02
Unique ID: 48021950300103600 (INCORRECT)

Excel (incorrect)

Block ID: 480219503001036
District ID: 02
Unique ID: 48021950300103600 (INCORRECT)

Second Entry

QGIS

Block ID: 482090109011000
District ID: 08
Correct Unique ID: 48209010901100008 (populates correctly in QGIS)

RStudio

Block ID: 482090109011000
District ID: 08
Unique ID: 48209010901100008 (populates correctly in RStudio, but classified as numeric)

Excel

Block ID: 482090109011000
District ID: 08
Unique ID: 48209010901100000 (INCORRECT)

Fourth Entry

QGIS

Block ID: 482090109011009
District ID: 08
Unique ID: 48209010901100908

RStudio

Block ID: 482090109011009
District ID: 08
Unique ID: 48209010901100912 (INCORRECT)

Excel

Block ID: 482090109011009
District ID: 08
Unique ID: 48209010901100900 (INCORRECT)


texts: How to add close action to buttonpad and dialog?

texts: I am making mapinfo addon and I am having problem with close action of buttonpads. How to add close action to dialog and buttonpad so that we can execute certain action on close of buttonpad or dialog?


texts: Trouble matching SRTM data clip to slippy tile extents

texts:
I'm trying to extract the SRTM data for some slippy tile in QGIS, and it doesn't seem clipping to the right extents.

Here are some of the data for the tiles that I'm using to test (this data comes from a python program I wrote that uses the math and code from OSM's wiki described here) :

tileX: 710 tileY: 1618 zoom: 12

(xmin,xmax,ymin,ymax) -117.59765625 , -117.509765625 , 35.24561909420682 , 35.31736632923787

tileX: 710 tileY: 1619 zoom: 12

(xmin,xmax,ymin,ymax) -117.59765625 , -117.509765625 , 35.17380831799958 , 35.24561909420682

tileX: 711 tileY: 1618 zoom: 12

(xmin,xmax,ymin,ymax) -117.509765625 , -117.421875 , 35.24561909420682 , 35.31736632923787

tileX: 711 tileY: 1619 zoom: 12

(xmin,xmax,ymin,ymax) -117.509765625 , -117.421875 , 35.17380831799958 , 35.24561909420682

The trouble I'm having is that as the data above clearly shows the tiles should form a perfect square, but when I run the conversion in QGIS (as shown below), there is a one-pixel space in between each of the tiles.  I hadn't touched the SRTM data at all besides combining some SRTM tiles (although this happened before when I didn't combine them).

An example of what gdal_translate call that QGIS is using is this (in this case it generates the clip of the top left tile shown below):

gdal_translate -projwin -117.59765625 35.31736632923787 -117.509765625 35.24561909420682 -of GTiff C:/Users/MyName/AppData/Local/Temp/processing_ae12691e47564eee9da900e8b6630ef7/7915b60331804d34b1cc3bbd7090bc16/OUTPUT.tif C:/Users/MyName/AppData/Local/Temp/processing_ae12691e47564eee9da900e8b6630ef7/286195c76a1047d897385114a284dba2/OUTPUT.tif

Does anyone know what the cause of this space is?


texts: QGIS Distance Matrix Output is always consists of zeros?

texts:
I have a shapefile with 35 points and I try to have the distance matrix showing the distance of each pixel with each other.
I choose the input and the target file the same and the unique ID fields are the names of these points. I try different combinations of output matrix type and number of nearest target points but every time I got the matrix that I intended but all values are zeros.
My shapefiles CRS is EPSG: 4326, WGS84.
I'm just sharing one of the attempts screenshot:

I can not figure out what if there is something wrong or something missing.

I've also tried the same procedure with changing the CRS to WGS84 UTM zone 36 and ED50 UTM zone 36 but I did not succeed in getting any numbers. I've also tried enabling the on the fly with the same CRS (WGS84) and my projects Measurements Ellipsoid was the same CRS (WGS84). The results are the same table with all zeros.


texts: I have a point layer with soil values. How can I get a raster layer with different classes of values, since there are areas without point sampling, what´s the best way to have a regular cover of the total area, given the sampling points??


texts: Leaflet layer tree plugin - overlays unvisible after base layer switch

texts:
having the same problem as Leaflet layer tree plugin - order layers, i installed the solution but that does not work for me:

added zIndex:10 to the base layers

            code: "base",
            name: "Base Layers",
            active: true,
            selectedByDefault: false,
            openByDefault: true,
            childLayers: [
                {
                    code: "osm",
                    name: "OpenStreetMap.org",
                    active: true,
                    selectedByDefault: true,
                    openByDefault: true,
                    childLayers: [],
                    selectType: "NONE",
                    serviceType: "OSM",
                    params: {
                        url: osmOrgUrl,
                        attribution: osmTiles,
                        zIndex:10,
                        maxNativeZoom:19,
                        maxZoom:20
                    }
                },
                {
                    code: "osm_gray",
                    name: "OpenstreetMap.org gray",
                    active: true,
                    selectedByDefault: false,
                    openByDefault: true,
                    childLayers: [],
                    selectType: "NONE",
                    serviceType: "OSM_GRAY",
                    params: {
                        zIndex: 10
                    }
                }

...

and zIndex:10000 to the overlays

                        {
                           code: "fire_hydrants",
                           name: "Hydrants",
                           active: true,
                           selectedByDefault: false,
                           openByDefault: true,
                           childLayers: [],
                           selectType: "MULTIPLE",
                           serviceType: "WMS",
                           coordinateSystem: "EPSG:4326",
                           onPopup: function (layer) {
                               return buildContentFromLayer(layer);
                           },
                           params: {
                               request: "getMap",
                               service: "WMS",
                               layers:  "osm:Hydrants",
                               name: "Hydrants",
                               version: "1.1.0",
                               url: geosWMS,
                               format: "image/png8",
                               transparent: true,
                               zIndex: 10000,
                               maxFeatures: "1000"
                           },
                        },

...

but nothing changed :(

page is online: https://wambachers-osm.website/emergency/idx400.jsp

select Hydrants as overlay and then switch base layers.


texts: Network Analyst "No route for 'X' between all valid stops"

texts:
I created a network dataset for a county by downloading their shapefile, editing a couple fields, and creating a geodatabase feature class. I'm able to get a route solution if two stops are along the same line but if stops are on different lines I get the error "No route for 'X' for all valid stops. No solution found."

It seems like my turns are not set up correctly. Here is a sample of a segment from the network identify tool.

The below also shows I have edges and intersections and no turns.

I did run the integrated tool and feature to line per some other site recommendations but the network appears to not have any coincident problems.
I've also tried changing my connectivity from endpoints to vertices.
I set this up very simply with global turns, no elevation, attributes (time, length, oneways), and directions ready. For the time attribute, I changed turn type to 'global turn delay and planned to use the defaults for now until I have time to create my road hierarchy. What have I missed in setting up my network that has resulted in no turns to have been built in?


texts:
I can't seem to add a picture to my composition using PyQGIS in Windows 8. My code is based on the example I found in this question. I've tried using .setPicturePath and .setPictureFile but none seem to work for me. Instead, my map shows a red 'x' where the arrow should appear. Since the question was answered 2 years ago, has this method been superseded?

My code is:

#Add north arrow
arrow = QgsComposerPicture(c)
arrow.setPicturePath("C:\Program Files\QGIS 2.18\apps\qgis\svg\arrows\Arrow_03")
arrow.setSceneRect(QRectF(0,0,10,10)) #Resize
arrow.setItemPosition(20,20)
c.addItem(arrow)

Ideally, I want to replace the path with QgsApplication.svgPaths()[0] + "\Arrow_03"but I figured I should get it working with a hard coded path first


texts: I have two raster datasets of Antarctica, however, they do not match spatially as one of the raster should be rotates 90 degrees. Is there a way to do this in QGIS?


texts: GeoServer parametric SQL view. ERROR: function key(boolean) does not exist

texts:
I have been had a task: to allow a single WFS request to return two different responses depending on zoom: return usual

SELECT * FROM table

if zoom level >n, and return

SELECT ST_SimplifyPreserveTopology(geom, x) FROM table

if zoom level <=n.

I tried to do it by this definition like in advice from there:

SELECT wkb_geometry, ogc_fid, key
  (CASE
  WHEN %zoom_lvl% > CAST ('8' as smallint)
    THEN wkb_geometry=ST_SimplifyPreserveTopology(wkb_geometry, 49::double precision)
  WHEN %zoom_lvl% <= CAST ('8' as smallint)
    THEN wkb_geometry = wkb_geometry
END)

from input.admin_centers_and_districts

But when I try to do it I face this

  ERROR: function key(boolean) does not exist Hint: No function matches
  the given name and argument types. You might need to add explicit type
  casts. Position: 46

What is wrong? cast('8'smallint) is useless.


texts: How variabilizing a part of the name of the data table used by QGIS ? I would like to use the same QGIS project for each year I'm studying

texts:
I created a map and a page layout for year 2018:

It relies on data of the table temp_desendettement_communes_2018 (from a PostGIS database).

I wish using the same QGIS project for other years, and change only a parameter to choose temp_desenttement_communes_<year> as data table name for source. (and then use this parameter to correct the title of the map too).
(note: things would been simpler if year was a column of a table temp_desendettement_communes, but it's not the case)
How to declare and use a parameter in a QGIS project that applies on a table name?


texts: Removing decimal digits in symbology using ArcPy in ArcGIS Pro?

texts:
Whenever I perform the Summarize Within tool in ArcGIS Pro and use the graduated colors symbology on the resulting feature class, I end up with something that looks like this:

Is there a way to remove all those zeros i.e. can I set the results to zero decimal places using Arcpy for ArcGIS Pro?

I know how to do it manually without arcpy but I would like to be able to do it using python so that I can implement it into a larger piece of script.


texts: Consuming Google Maps as background map through ArcGIS Server?

texts:
I am doing a (non commercial) project where the client doesn't have the budget for purchasing map data like that provided by TeleAtlas.

They only need map data for a background map, and they'd like to use Google Maps as provider.

However, the solution has to integrate with their existing ArcGIS Server based solution.

Is it possible out of the box with ArcGIS Server (9.3.1) or perhaps through an extension (commercial or otherwise)?


texts: How to set empty date field with arcpy.CalculateField_Management?

texts:
I want to simply set my date field to empty i.e "". No problem directly in ArcGIS , but with arcpy I can´t seem to get the syntax right. When I try with a date this is no problem e.g '22.06.2015' But with '' it doesn´t work.

arcpy.CalculateField_management(fc, item, '',"PYTHON")


texts: QGIS: spatialite error: no such function: st_functionname() in specific qgis project

texts:
From one day to another I can't import any queryresults that contain a spatialite function as layer from DB manager anymore despite the query concluding successfully in DB manager.
select * from table

works, can be loaded as layer.
select *, st_area(geom) as area from table

works, when to be loaded it throws:
OGR[3] error 1: In ExecuteSQL(): sqlite3_prepare_v2(select *,st_area(geom) from clusteroverlapp               no such function: st_area
Data source is invalid (In ExecuteSQL(): sqlite3_prepare_v2(select *,st_area(geom) from clusteroverlapp               no such function: st_area)

Interestingly the issue only occurs in a specific qgis project (containing a lot of layers). What could be a reason for this strange behaviour?
QGIS 3.14.16-Pi on Win 10 1607, SpatiaLite 4.3.0


texts: Does OpenLayers3 support feature editing?

texts:
For OpenLayers2, there are nice examples which show how to create vector features and edit them (adding vertices, moving them, ...), e.g. http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/modify-feature.html

Is it possible to reproduce this functionality in OpenLayers3? On the official website, I was only able to find an example which shows how to create vector features but not how to edit them: http://ol3js.org/en/master/examples/draw-features.html


texts: Running script within QGIS action crashes

texts:
I am running the following script (got it from QTDesigner and just slightly modified it) in a QGIS action which makes it crash altough the script runs totally fine within sublime for example.
Any ideas why the action isn't working?
import pdfplumber
from PyQt5 import QtCore, QtGui, QtWidgets

if not hasattr(sys, 'argv'): #had issues with this module
    sys.argv  = ['']

pdf = pdfplumber.open(r'[%PDFpath%]')
page = pdf.pages[[%PDFpage%]]
text = page.extract_text()

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 600)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.scrollbar = QtWidgets.QScrollBar(self.centralwidget)
        self.scrollbar.setGeometry(QtCore.QRect(770, 10, 21, 541))
        self.scrollbar.setOrientation(QtCore.Qt.Vertical)
        self.scrollbar.setObjectName("scrollbar")
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(20, 20, 741, 521))
        self.label.setObjectName("label")
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "NamePDF"))
        self.label.setText(_translate("MainWindow", text))

if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec())


texts: Simplify geometries but keep them contiguous

texts:
I have several detailed contiguous areas. I need to turn each one into KML, but when I do so, the end result is too large (in terms of memory). Using PostGIS I need to simplify these geometries but keep them contiguous.
I have tried calling ST_SimplifyPreserveTopology with a GEOMETRYCOLLECTION created by ST_Collect, but the areas are no longer contiguous.
Previously I think I have succeeded in simplifying areas while at the same time keeping shared borders in line with each other by using desktop applications. However, I am looking for a way to do the same using PostGIS.


texts:
I'm new to Carto and trying to connect with an external Oracle database. I have created the installed new PostgreSQL 13 server and created Oracle FDW. from the postgres admin tool I can access the Oracle database. But when I execute the following command:
curl -X POST -H "Content-Type: application/json" "https://<my-user-name>.carto.com/api/v4/federated_servers?api_key=<my-api-key>"

I'm getting an error

"errors":"Federated Tables not enabled","errors_cause":null}

Am I doing something wrong?
I'm using the free account


texts: QGIS 3x - categorized style customization based on a part of the string

texts:
I have a problem.
I am digitizing the map and I want to distinguish one group of polygons from the other group.
The basic difference between them lies in their ID (string). One of them has the ID starting from SE-1-... and the other ones start from SE-2-...
I found some hints here:
How to select features containing specific text string using an expression in QGIS
which unfortunately doesn't work in my example.
Once I write down the function, next press the "Add" (plus) button I am getting the box allocated for "All other values".

Is there any way to separate these 2 groups by this part of the string?
Categorizing by ID doesn't make sense, because all polygon get their unique color, which makes a terrible mess.
UPDATE:
Function is not valid, the details are in the box below:


texts: Unable to add/edit a Server Object Extension

texts:
I have a C# project that creates a SOE for ArcGIS Server 10.2.2.  I build it in Visual Studio Express 2010 and am rewarded with MyPitaExtension.soe.  The contents of that file are what I expect (Config.xml alongside an "Install" folder containing MyPitaExtension.dll & MyPitaExtension.pdb).

I go to the ArcGIS Server Manager > Sites > Extensions, and try to add/edit the SOE (in some instances it is already installed; in others it is not).
In the dialog, I choose MyPitaExtension.soe and click Add or Save.  The dialog remains open and displays text below the Save/Cancel buttons that fits the format:

  fjsontoken[Big ugly thing that runs off the available space]

Clicking Add or Save again adds an identical string to the bottom of the dialog.
I've tried googling various combinations of 'fjsontoken', 'esri', 'soe', etc... but all I've found was this very recent post about Portal.
 I am a member of the Administrator role.

Has anyone had any luck diagnosing & fixing this?

UPDATE 1: A coworker (also in an Admin) gets the same results as I do.

UPDATE 2: I get the same results when adding NetSimpleRESTSOE.soe pre-packaged with the ArcObjects SDK. I'm now confident that this is a problem with our server configuration rather than a problem with the SOE itself.


texts:
When i run Sort geometry + data table in ArcGIS with Permanently Sort Records (PSR) v1.0 the algorithm gives an error:

Order_ ASCENDING # # # #
Start Time: Fri Mar 01 17:06:33 2013
000576 ERROR: Script Associated with this tool does not exist.
Failed to execute (sortrecords).
End Time: Fri Mar 01 17:06:33 2013 (Elapsed Time: 0.00 seconds)

Do you know why?


texts: How to export a Shapefiles of an OpenStreetMap relation?

texts: Given I have a relation such as this example. I have installed JOSM and QGIS as well as GDAL tools for the shell. I am aware of Overpass-Turbo. What is the best way to export geometry data from OpenStreetMap into Shapefiles?


texts: QGIS print composer atlas shortcut next feature

texts:
I have 25 features in the atlas of the print composer and I need to check every feature before exporting. It's quite annoying to always click the field in the status bar, so I wanted to use the shortcut Ctrl + + for showing the next feature. But it doesn't work since when I press Ctrl + + it already starts zooming in the present feature.

Is there a way to avoid this?

Or better, is there a way to quickly show a certain feature, like a field where I can fill in 23 and then the composer shows me map 23?


texts: How to apply bounding box filter in leaflet WMS?

texts:
There is a working example in leaflet site for adding WMS Layer in leaflet map at : http://leafletjs.com/reference.html#tilelayer-wms. But I don't see methods to provide the filter for bounding box.

Is there a way to provide bounding box filters for Leaflet WMS ?


texts: using ZonalStatisticsAsTable in python script

texts:
I use a python script in which the function ZonalStatisticsAsTable is called. In ArcGIS9.3 it all worked fine. Our company just went to ArcGIS 10.1 and now it doesn't work anymore.
When looking inside the resulting temporary tables it seemed the name of column number 2 was changed from "VALUE" to "NR". I changed it in the script and it all seemed to work fine. But, the results are very different from these in 9.3.

As input I use a rastermap with cellsize of 1x1km and a Polygon feature. I guess the polygon is converted to a raster first before the comparison is made. Whenever I first use "polygon to raster" to created a raster and use "Zonal Statistics as Table" with these two rasters as input the results are fine.
What goes wrong using then function ZonalStatisticsAsTable in the Pythonscript?
Regards, Wilco.


texts:
Is there a way to get an average polygon of unioned stack of polygons in ArcGIS 10.0?
I would like to get an average polygon that would be centroid (but polygon) of whole stack of polygons.


texts: Convert vector file to raster with text information on QGIS

texts:
I would like to convert a vector file to raster with "Field to use for a burn-in value" = VAL11 and keep "LITOTIPO" = 11 as text data.
In the final raster map I would like to have VAL 11 and LITOTIPO 11.


texts: Produce RGB image of satellite image mosaic or merge images with negative dimensions

texts:
I am new to image processing with python and would like some help with a particular problem.
I am trying to create a mosaic of raster satellite images using the code extracted from this link https://automating-gis-processes.github.io/CSC18/lessons/L6/raster-mosaic.html, the code works fine when I merge images with a uint16 data type however when I convert the images to uint8 and try to merge them the following error appears:
    src_files_to_mosaic = []
    for fp in Im_fps:
      src = rasterio.open(fp)
      src_files_to_mosaic.append(src)
      src_files_to_mosaic

   In [8]:

   mosaic, results = merge(src_files_to_mosaic)
   results
   ---------------------------------------------------------------------------
   ValueError                                Traceback (most recent call last)
   <ipython-input-8-b81f0f4272f5> in <module>
   ----> 1 mosaic, results = merge(src_files_to_mosaic)
   2 results

   C:\ProgramData\Anaconda3\lib\site-packages\rasterio\merge.py in merge(datasets, bounds, res,
   nodata, dtype, precision, indexes, output_count, method)
   158
   159     # create destination array
   --> 160     dest = np.zeros((output_count, output_height, output_width), dtype=dt)
   161
   162     if nodata is not None:
   ValueError: negative dimensions are not allowed

In order to convert the uint16 images to uint8 I am using the following code which produces the image displayed below:
  image = [band2.read(1), band3.read(1), band4.read(1)]

  image = np.array(image)

  image.shape

  Out[59]:
   (3, 10980, 10980)

   rgb=np.zeros((10980,10980,3))
   rgb[...,0] = band4.read(1)
   rgb[...,1] = band3.read(1)
   rgb[...,2] = band2.read(1)

   rgb2 = np.clip(np.array((rgb - np.min(rgb))/(np.max(rgb) - np.min(rgb))*255).astype(np.uint8)*4,
   0,
   255)
   #Reverse Red-Blue Channels as open cv will reverse again upon writing image on disk
   cv2.imwrite('C:/Users/student/Documents/Output/Sardinia -
   1.08.2020/Sardinia24.jpg',rgb2[...,::-1])

Is there a possibility to try and apply the above code to the image mosaic, since when I tried to extract the bands of the image mosaic and convert the data type I obtained the following result instead since the values of the bands were arrays of zero and if I try to merge the converted images I get the error mentioned above that negative dimensions are not allowed:


texts:
I have rasters in 1 band 64bits float that represent real data values and for which I can set min and max using the stretch to min and max option in QGIS.

I would like to convert these rasters to RGB 8 bits with a greyscale and with the min and max that I have set.

It is easy to do in ArcGIS as it can be seen in this other subject:

Is there a way to programatically force RGB (3 bands) in a raster with arcpy?

I am looking for a way to do the same thing in QGIS. I do not need a script, I just need to be able to do the conversion.

Does anyone know a way to dot it in QGIS?

Thank you very much. I have found this plugin and tried to install it. I edited my first post but when I finished, it gave me a message saying the edit had to be reviewed and it has not been updated yet. I am having an error message when I try to execute the plugin related to the Python code

    An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:/Users/user/.qgis//python/plugins\bccAddRColor\bccAddRColor.py", line 140, in DoWork
    cplArray, nod )
  File "C:/Users/user/.qgis//python/plugins\bccAddRColor\qml2gdal.py", line 599, in rasterOPal
    tif_ds.GetRasterBand(1).SetRasterColorTable( ct )
AttributeError: 'NoneType' object has no attribute 'GetRasterBand'

Python version:
2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]

QGIS version:
1.8.0-Lisboa Lisboa, 6416f38

Python path: ['C:\\Users\\user\\.qgis\\python\\plugins\\GeoCoding', 'C:\\Users\\user\\.qgis\\python\\plugins\\GeoCoding', 'C:/OSGeo4W/apps/qgis/./python', 'C:/Users/user/.qgis//python', 'C:/Users/user/.qgis//python/plugins', 'C:/OSGeo4W/apps/qgis/./python/plugins', 'C:\\Windows\\system32\\python27.zip', 'C:\\OSGeo4W\\apps\\Python27\\DLLs', 'C:\\OSGeo4W\\apps\\Python27\\lib', 'C:\\OSGeo4W\\apps\\Python27\\lib\\plat-win', 'C:\\OSGeo4W\\apps\\Python27\\lib\\lib-tk', 'C:\\OSGeo4W\\apps\\qgis\\bin', 'C:\\OSGeo4W\\apps\\Python27', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\PIL', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\win32', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', 'C:\\Users\\user\\.qgis\\python\\plugins\\mmqgis/forms', '/usr/share/qgis/python', 'C:\\OSGeo4W\\apps\\qgis\\python\\plugins\\fTools\\tools',

I have tried to reinstall it and I checked the repository but there is no change. I documented the problem sending it to the user-list specified on the plugin's webpage and I am waiting for the answer.


texts: Calculate the distance between two contours

texts: I have two contour polylines (single shapefile) and I would like to calculate the mean, min and max distances between the two lines. Is there a function in ArcMap 10 (ArcInfo license, incl. Spatial Analyst) that will do this for me without have to use the measurement tool manually? The measurement should account for the curvature of the earth.


texts: Feature doesn't display on map using PyQGIS?

texts:
I want to create a layer using PyQGIS, then draw a point in a specific place on a map and add some data to the attribute table. Everything went fine, the script below works but no point seems to be displayed on a map canvas.
 The code below is from the PuQGIS Developer Cookbook (http://docs.qgis.org/2.18/en/docs/pyqgis_developer_cookbook/vector.html#id8) but nonetheless the point is not visible.

What can be the ploblem?

 def create_layer(self, point, values):
    vl = QgsVectorLayer("Point", "Temporary point layer", "memory")
    pr = vl.dataProvider()

    vl.startEditing()

    pr.addAttributes( [ QgsField("ID", QVariant.Int),
                        QgsField("R",  QVariant.Int),
                        QgsField("G", QVariant.Int),
                        QgsField("B", QVariant.Int),
                        QgsField("Class", QVariant.String)] )
    vl.updateFields()

    feat = QgsFeature()
    feat.setGeometry( QgsGeometry.fromPoint(QgsPoint(500253, 8180778)))
    feat.setAttributes([0, int(values[0]), int(values[1]), int(values[2])])
    pr.addFeatures([feat])

    vl.updateExtents()
    vl.commitChanges()
    QgsMapLayerRegistry.instance().addMapLayer(vl)
    layer = iface.setActiveLayer(vl)
    if not layer:
        self.dlg.l_status.setText("Error: Layer failed to load!")
    else:
        QgsMapCanvas().setLayerSet( [ QgsMapCanvasLayer(vl) ] )
        iface.zoomToActiveLayer()

Here is a screenshot. I zoomed to a temporary layer with a point.


texts: Where can I find a national MLS boundary dataset for the US?

texts:
Every 6 months or so I continue to revisit a topic I have never found an answer for. What I am looking for is some type (ANY TYPE) of national map which outlines the boundaries of each of the 1000+ MLS (Multiple Listing Services).

I have no idea why, but for some reason the National Association of Realtors will not release this data and it kinda drives me a little nuts.

If ANYONE has any type of source for this info, even if it's just the exact zip codes covered by each MLS, then I would greatly appreciate if you could share the info with me.

Thanks!


texts: Anyone have an idea on an ArcGIS 10.2 release date? I wans't even aware of it until stumbling upon this article: UC Agenda Sneak Peek: Part I


texts: How do I open an mxdbk file? My ArcMap froze and saved the mxdbk files. I would like to know how to open them up rather having to re-do the work.


texts:
I have a geotiff, whose gdalinfo gives the following information about the georeferencing:

WGS 84 / UTM zone 32N
AUTHORITY["EPSG","32632"]

Now, I apply a simple gdalwarp for testing purposes:

gdalwarp -of GTiff -cutline subset.geojson InputImage.tif OutputImage.tif

The geojson subset is exactly the size of the geotiff, as I have extracted the corresponding subset before and the InputImage.tif already results from that extraction. Only thing I need to mention is that the .geojson is given in Lat-Long coordinates.

The output GeoTiff gives exactly the same gdalinfo georeferencing information!

The problem, however, now is that this operation, which actually should not do anything, changes the image: It basically slightly rotates the scene content and adds noData values around it to make for a rectangular image matrix again. Why is that? Actually, this is pretty annoying since my goal is to create subset images without any noData frames for further mathematical image processing operations. Can this be avoided somehow? In the end the task I am aiming to achieve is to extract subsets from the 10m bands of Sentinel-2 images and to store them as RGB geotiffs.


texts: How to plot points from a CSV file into a country polygon in Arcmap?

texts:
I am trying to import points, which contain longitude and latitude data, to a geographic area (polygon) in ArcMap but they are not overlapping. I have added a point layer (.csv) to my table of contents and then a polygon that represents the geographic area of Sri Lanka.

When trying to export the points as an excel file it says that ' Failed to connect to the database. An underlying database error occurred. Class not registered'.

I have tried doing it the other way around, by first adding the country of Sri Lanka into the table of contents, first with and then without the .prj., then I inserted the points which contain latitude and longitude. After displaying XY data, the new layer does not contain the attribute information and again does not allow me to export it into a new layer. It says 'There was an error exporting the layer'. (The layer has no OID field. If this is the problem how can I add one?)
When checking the coordinate system under data frame properties, both, points and polygon seem to have the same coordinate (Kandawaal_sri_Langa_Grid).


texts: Using a DXF file to make a 3D map in QGIS

texts:
This might be a long shot but I'm trying to make 3D map to render from a DXF file in QGIS (3.14). The options I get when I press (View>New 3D map view>configure>terrain) is following: Flat terrain, DEM (raster layer), online and mesh.
The only one that can render for me is flat terrain. I suspect that I need to convert my DXF file to DEM but DEM is raster based while my DXF file seems to be vector based?
I tried to to use the vector to raster tool (Raster>Conversion>Rasterize(vector to raster)) and then to use that file to make a 3D file. The challenge is that my newly created raster file is invisible and I can't see it. Is there some other way or am I doing something wrong?
If I use the QGis2threejs plugin I get the following export:

It is a model of a quarry


texts: Creating multiple folders named by a list in python

texts:
I am trying to make a python code to create folders named by a list of int and strings, the code below is returning an error, it works when the list is made of strings only, can anybody help ?

import os
root_path = 'C:\Users\AHemeda\Desktop'
folders = [123, 34, 'Oslo', 'Berlin']
gh = folders
print gh
for folder in gh:
    os.mkdir(os.path.join(root_path,folder))


texts: How to open GPKG layer fo processing in QGIS

texts:
I am making a model with QGIS 3.4 graphical modeler that should open and process a layer from the GPKG located in the project folder.

Since the folder path may be changed, and QGIS does not allow using relative paths in the processing tools, I decided to write a script that will open a specific GPKG layer from the project folder without any requests to the user for the GPKG path .

Summarize, in the tool, I want to specify the name of the layer and the script opens it from the GPKG in the project folder and outputs it for further processing.

I am new to Pyqgis and Python in general, so the script ends with an unknown error.
Here is my code:

from PyQt5.QtCore import QCoreApplication
from qgis.core import (QgsProcessing,
                   QgsFeatureSink,
                   QgsProcessingException,
                   QgsProcessingAlgorithm,
                   QgsProcessingParameterFeatureSource,
                   QgsProcessingParameterFeatureSink,
                   QgsProcessingParameterString,
                   QgsProject,
                   QgsVectorLayer)
import processing

class OpenGpkgLayer(QgsProcessingAlgorithm):

    LAYERNAME = 'LAYERNAME'
    OUTPUT = 'OUTPUT'

    def tr(self, string):

        return QCoreApplication.translate('Processing', string)

    def createInstance(self):
        return OpenGpkgLayer()

    def name(self):

        return 'OpenGpkgLayer'

    def displayName(self):

        return self.tr('Open GPKG Layer')

    def group(self):

        return self.tr('GPZU')

    def groupId(self):

        return 'GPZU'

    def shortHelpString(self):

        return self.tr("Open provided layer from GPZU gpkg")

    def initAlgorithm(self, config=None):

        self.addParameter(
            QgsProcessingParameterString(
                self.LAYERNAME,
                self.tr('Input layer name')
            )
        )

        self.addParameter(
            QgsProcessingParameterFeatureSink(
                self.OUTPUT,
                self.tr('Output layer')
            )
        )

    def processAlgorithm(self, parameters, context, feedback):

        #a temporary layer name
        lnameTranslated='test_test'
        #open  promted gpkg layer
        layer = QgsVectorLayer(QgsProject.instance().readPath("./") +'/GPZU.gpkg|layername='+self.LAYERNAME,lnameTranslated,"ogr")

        source = layer

        (sink, dest_id) = self.parameterAsSink(
            parameters,
            self.OUTPUT,
            context,
            source.fields(),
            source.wkbType(),
            source.sourceCrs()
        )

        if sink is None:
            raise QgsProcessingException(self.invalidSinkError(parameters, self.OUTPUT))

        total = 100.0 / source.featureCount() if source.featureCount() else 0

        features = source.getFeatures()

        for current, feature in enumerate(features):
            # Stop the algorithm if cancel button has been clicked
            if feedback.isCanceled():
                break

            # Add a feature in the sink
            sink.addFeature(feature, QgsFeatureSink.FastInsert)

            # Update the progress bar
            feedback.setProgress(int(current * total))

        return {self.OUTPUT: dest_id}

I'm pretty sure I am doing it wrong. I tried a lot of variants (mainly random :-/)
But script still fails with unknown error


texts: Extracting line segments by points (in ArcGIS)

texts:
I have a feature containing line objects. In addition, I have the file with the approximate start- and endpoints of the segments I want to extract. Each start- and endpoint pair share the same ID.

As an output, I'd like to have the full line feature split into segments / parts by the point feature. Ideally, an additional column in the line feature shows the ID of the according point segment. I've added a sketch to illustrate.

The tool "Split Line at Points" does not suffice, since it simply results in a cut up line with no information of the segments.

Can anybody point me in the right direction without using ArcPy?


texts: What causes MetaSearch plugin Search error "Record serialization failed"?

texts:
I'm trying to use QGIS MetaSearch plugin to search data stored in our pyCSW catalog.
Metasearch will get the correct service info and the GetCapabilities response however, when I try to search the catalog, I get:

Search error: "Record serialization failed: Argument must be bytes or unicode, got 'SpatialRepresentationType'"

Any idea what could be wrong? I'm using the pyCSW server that came with GeoNode.
The catalogue url is http://geoinfo.cnpm.embrapa.br/catalogue/csw


texts: Calculate date difference (days) with expressions (QGIS)

texts:
I would like to calculate the number of days between two dates. The first date is written in attribute table [YYYY-MM-DD] (creation date) and the second is today [now()]. The goal is, to get the age of every feature.
I need it as QGIS expression to create a virtual field.

date1 (attribute in table) - now() = age (as virt. field)


texts: How to speed up ogr2ogr process on giant geodatabase

texts:
I have a geodatabase that has over 193 million polygons.

I have a process that gets a small subset of this .gdb based on an inputs' extent, for thousands of inputs, using ogr2ogr.

I am looking for ways to speed this up. I am testing for one input right now, and the ogr2ogr step has taken over 25 minutes and counting, which means my entire process will take far longer than I need it to. I am hoping there has to be a way to speed this up.

Here is my test command that took almost 30 minutes to run:
ogr2ogr -clipsrc -102.38428516 54.5384116051 -102.031403056 54.7529375968 -spat -102.38428516 54.5384116051 -102.031403056 54.7529375968 -f "ESRI Shapefile"   -t_srs EPSG:32613

I found this thread, but it seems that they already implemented PG_USE_COPY=YES as the default.

Some system info:

236 GB RAM / 16 CPUs: Intel Core Processor (Skylake, IBRS)

Despite the impression I got from the thread I linked, adding --config PG_USE_COPY YES sped the process up from ~30 minutes to < 15. I would like to speed this up even more by utilizing PostGIS or something similar but have no idea what I'm doing with that, so for now I guess this will do.


texts: merging shapefiles . an error occured during the merge operation

texts: i am trying to merge multiple polygons of a feature. i select them via select features by polygon and use the advanced digitalizing toolbar " merge selected features" option. it worked for some but mostly i get: error occurred during merging operation.


texts: Regarding processing of GNSS data heights

texts:
I have a TRIMBLE GPS receiver and in its data, I am able to derive the ECEF xyz coordinates. My objective is to obtain the orthometric heights, which I could do using the equation h = H + N.

My question is: Is this way of computing the orthometric height accurate? Are there corrections that I need to perform? Or any errors that I need to take into account?

For example, Geoid model inaccuracies, xyz positioning errors etc.


texts: Shapefiles being saved to my documents folder

texts: Apparently, after a recent upgrade to windows 10, QGIS started to save new shape files to my documents folder ignoring my project folder. I reinstalled/updated QGIS 3.12.3 and problem remained. Are there Windows/QGIS environmental settings that have changed?


texts: Importing updated CSV values to feature class fields?

texts:
Some time back I had a requirement to develop an automated method (Python) to update field values for a spatial points dataset in an Oracle 11g SDE database (exported to GDB for testing). Im Using Win 7, ArcGIS 10.2, Python 2.7.5.
The requirement was to create a selection of duplicated records and distribute the export to other offices for recipients to mark the rows as either KEEP or RETIRE and return the extract (csv) to me.

The idea was that I could then use csv.dictreader to import the results from the 2 required columns ('book_id' and 'book_ref') in the csv, keeping only results that met the criteria = 'KEEP'.
I then wanted to pass those results to my feature class with further refinement only updating the existing values where the csv file 'book_id' number matched the feature class 'book_id'.

I ended up doing the task manually as i couldnt get a result from code despite researching the ArcGIS help section, hundreds and hundreds of posts on this site, geonet, arcpy cafe etc, etc.

Eventually though I cobbled enough bits together to make it work oustide of work then thought I would post the solution in case others had similar needs.


texts:
I have a data layer (cities) and I've created a 25-mile buffer.
Based on the buffer hospitals are selected.
In the dashboard,

how do I create a toggle to turn on/off a specific city (ex. Baltimore),
and thus the buffer and the buffered hospitals also turn off/on?


texts: Accidently deleted layer from Layers panel of QGIS?

texts: I accidently deleted a raster layer from my layers Panel (i used georeferencer to add it to my map) and i want to know if is there a way to get it back on my Layers panel without re-doing the whole "georeferencer" thing.