texts: Single sided buffers gives not only buffer on one side

texts:
I have tried to use single sided buffers to make buffer on one side of of a line. But the buffer is sometimes changing sides as shown below:

Must mention that the line is straight:

What is the reason for this and how can I fix it?


texts: Adding a space in the "draw coordinates" "decimal with suffix" in QGIS v2.18.7

texts:
I am using QGIS v2.18.7. In the Print Composer I have turned on the "Draw coodinates" option "Decimal with suffix" to add these to my map.

However, I need to add a space between the degrees symbol and the suffix.

For example, the default for "Decimal with suffix" is 10°S while I would like (due to journal requirements) to have: 10° S.

I see there is a custom option, but it I can't figure out how to get this output?


texts: PostGIS dissolve geometries from shapefiles

texts:
I have a municipal polygon shapefile of 380 municipal records with receptor(schools, hospitals etc..) sums for each municipality. I am trying to use Postgres/PostGIS to dissolve this municipal polygon shapefile layer to county polygon shapefile that contains the sums of the receptors by county

I know I can use the ArcGIS dissolve tool but i want to learn it in postgres

I know how to do the qry where it just returns the records summed but i do not know how to include the geometry for the new county polygon shapefile.

select distinct county as county, sum(schools) as schools,
sum(childcare), sum(respopint) as rez, etc... into countyreport
from munsumreport
group by county;

when I include the geom field, it just returns the the municipal amount of records. when I do sum(geom) as geom in the select and include in the groupby clause it gives me an error - do i have to sum the shape area? not sure what to do


texts: Visualizing Google Fusion Table Map using JavaScript?

texts:
When you create a google Fusion Map with geographic data, Google provides you with an iframe link to display the Map on your website. But I need to display that information through Javascript for customization etc.

How do I go about it?


texts:
Is it possible to add a simple show/hide button on the leaflet map which will allow the user to see the legend on choice?

Here is my code for the legend:

    var legend0 = L.control({});
        legend0.onAdd = function (map) {
    var div = L.DomUtil.create('div', 'info legend'),
    grades = ["Localisation", "Orientation"],
    labels = ["icon-gamze/location1-zoom1.png", "icon-gamze/location2-zoom1.png"];
     div.innerHTML += 'Localisation
'
for (var i = 0; i < grades.length; i++) {
       div.innerHTML +=
       (" ") + grades[i] +'
';
}

       return div;
      };

       legend0.addTo(map);


texts: How to include pixels excluded by MASK in GRASS GIS?

texts:
I have a 150km x 150km raster layer of elevation. I'm running a cell-by-cell PyGRASS script, with one step that considers all neighboring cells within a fairly large circular radius (25km). To account for edge effects, I've sub-divided my large region into four 50x50km raster tiles - each created with a raster MASK - factoring out the outer most 25km in each cardinal direction.

I'm trying to figure out a way to include pixels outside of these MASKs created in GRASS GIS. Basically, I'd like to use the MASK as a processing extent, but I don't want to nullify the values in the factored out 25km. They should be included in each neighborhood calculation for cells along the inner border of my mask.

I have quite a number of these 150x150 raster tiles, so I haven't just run my script across the entire region simply to save computational time. Any ideas as to how I can run my script on a subset of this larger raster, without losing values outside the MASKed region?


texts: QGIS Rule-Based Labeling: Can you Load a label style

texts:
QGIS 3.2

I want to use Rule-Based Labeling and load a label style to those features. Whenever I try to load a style it defaults to single based labeling and I can't find a style button in the rule based dialog box.

Is it possible to Load a label style into Rule Based Labeling in QGIS 3.2?


texts:
I made an addin for arcmap and want to deploy it using setup file.

By double clicking the setup file anyone can install it in his machine and through installation it will check all dependencies and license issues.

After the installation, the addin can be accessed from ArcMap.

I used visual studio setup file to do the first portion of the setup, but I couldn't access the addin from ArcMap.

Is there any other procedure or any special step to do this?


texts: How do I create proportionate inner buffers which reduce in size based on a percentage, to a specific point

texts:
I am working in ArcGIS and I have a 75 basin polygons and a point feature (called origin point) within each polygon.  (Not necessarily in the centre of the polygons).  I want to create 100 polygons inside the basin polygons ranging in distance from the origin from 1%, 2% etc through to 100% of the basin polygon.  So the 1% polygon would have a boundary 1% of the way from the origin point. 100% polygon would be the original basin polygon.

I feel like there should be a function for this.

Inner buffers do not work as they are based on a distance rather than a percentage and do not take into account that I would like to 'shrink' the polygons back to the origin point.

I have seen people suggest QGIS but would this work if I want the polygons to 'shrink proportionately' back to a specific point?

I have tried:

converting basin polygons to vertices.
performing a near analysis to calculate distance of vertices to origin point and adding in X/Y coordinates
Creating xy lines from origin to each vertice creating star    like patterns.
I have then split the lines by 100% and was going to convert to vertices and join the vertices to create new lines.

The issue is that because the basin polygons are not regular the lines sometimes exit the polygon and reenter making this method not work.

I am hoping to do this without coding.


texts: Improves performance on R working with raster files

texts:
I´m trying this code to look for NA and negative pixel values and replace it for 0. But it´s too slow. Any tip for improve the performance of it?

"all.files" is a list of address of the images. "r1" is the stack of Landsat images and "e" is the extents of some region of interest.

 for (i in 1:length(all.files)){
    r1<-raster(all.files[i])
    re1<-crop(r1,e)
    re1<-re1/10000
    re2<-as.matrix(t(re1))
    re1[which(is.na(re2))]<-0
  for (j in 1:length(re1)){
    if (re1[j]<0)
   (re1[j]<-0)}
writeRaster(re1,filename=paste(substr(all.files[i],80,86),"_crop2.tif",sep=""),format="GTiff",overwrite=TRUE)
}


texts: Applying style change to other layers using .qml-file in QGIS

texts:
I have a similar question as @drnextgis in this post: I made a change to the symbol colour of one value out of four categorised values and aim to automatically apply it to other layers in the same QGIS project using the same symbology of the same .qml.
I'm working in one QGIS project with about 40 layers (landparcels, 1.8 GB in total) that all have the same attributes and therefore share the same .qml-file. The .qml-file is set as default for each layer. If I change the symbol colour of a value in one of the 40 layers and select 'Save Style...' and then overwrite the existing .qml, the change only applies to this particular layer. It neither makes a difference if I select 'Save as Default'.
Checking out related posts: This question is talking about a .qml which is used in several projects and this one is about layers having the same name but I don't think they cover my issue.
I use the LTR version of QGIS (3.10.9.).


texts: Deleting duplicating edges while creating grids from centroid points

texts:
I am creating a edge table (edges) from some centroid points table(centroids). The distances between the centroids are 0.25 horizontally and vertically. The query I used to create the edge table as follows:

CREATE TABLE edges AS
SELECT a.*,gid,nextval('seq') AS edge_gid,
        ST_SetSRID(ST_MakeLine(a.geom_c, b.geom_c),4326) AS geom_line
FROM centroids a, centroids b
WHERE ST_Distance(a.geom_c, b.geom_c) < 0.26;

Remember that the edges table has the centroid points as well.The above method will create 4 edge lines for each centroid point. Hence, to delete the duplicate edge lines, I have used the following query:

DELETE FROM  edges
WHERE edge_gid IN (
    SELECT e1.edge_gid
    FROM edges e1, edges e2
    WHERE st_equals(e1.geom_line, e2.geom_line)
    AND e1.edge_gid < e2.edge_gid
);

But this one resulted in certain centroids are deleted in a pattern. Any help on how to delete the duplicate edge lines without the above issue? I understand that deleting based on the gid causes this one.

The techniques I have used are from the approached discussed here:
Is it possible to make a routable graph from Polygons?

Centroids (All the points are there)

Edges table (Edges table has centroids and lines, and this plot shows the lines)

After the deleting query, centroid points in edges table

The edge lines in edges table will be same as 2 visually


texts:
I have a points layer arround which I created a buffer of 10m. What I want to do is merge the buffers which intersects each other and the point layer.

I did this to be able to create polygon arround the points which are within 10 m.

CREATE OR REPLACE FUNCTION getbuffered() RETURNS SETOF sige.buffer AS
$BODY$
DECLARE
    poly record;
    pts record;
    intersects boolean;
    geom_poly geometry(MultiPolygon,32628);
    geom_fusion geometry(MultiPolygon,32628);
BEGIN
    FOR pts IN SELECT * FROM sige.object_elevation LOOP
        FOR poly IN SELECT * FROM sige.buffer LOOP
            intersects := (select true from sige.buffer,sige.object_elevation
                            where poly.id<>pts.id and st_intersects(poly.geom,pts.geom));
                if true then
                geom_poly := (select geom from sige.buffer where orig_fid = pts.id);
                end if;
         END LOOP;
    END LOOP;

END
$BODY$
LANGUAGE 'plpgsql' ;

In this function I am iterating in points layer, then in buffer layer. then I select the features from buffer  which have a different id from the points ones and intersect them.
If the result is true I want to merge them.

I executed my function that I'm presuming correct but I get this :

ERROR: more than one line returned by a subquery used as an expression
CONTEXT: SELECT SQL statement (select true from sige.buffer, sige.object_elevation
             where poly.id <> pts.id and st_intersects (poly.geom, pts.geom))
PL / pgsql function getbuffered (), line 10 to assignment

What am I'm missing?


texts:
In my website, I wish to display a map with few markers of historicals points from a geoJson file.
I start with openlayers 3 api and all is ok, it works.
For the moment I use the OpenStreepMap map that I define like this :

`new ol.layer.Tile
    ({
     title: 'OSM',
     type: 'base',
     visible: true,
     source: new ol.source.OSM()
    })`

Now I want to replace the OSM map with the openTopoMap (openTopoMap) but I don't know how (can't find parameter)?

Is this possible ?

With what kind of source parameter ?


texts: I have a geocoded address table for High Rise buildings in New York. If i'm trying to map delivery routes to a number of these locations, what would be the best and most clear way to display the routes between different floors?


texts:
I have a shapefile. The coordinates (Lat/Long) are projected as decimal degrees. But, I want to re-project it to meters.

How can I do it with ArcMap?


texts: Mapbasic cycle through directory of tab files

texts:
I want to cycle through a directory of .tab files and then run a process on the files. I found https://groups.google.com/forum/#!topic/mapinfo-l/reYENsRRziM but can't figure out how to define the path properly.

Once this is done I need it to alter and pack the tables.

Include "MapBasic.def"

Declare Sub Main

Sub Main
path_to_temp_tables = "Z:\projects\1_DSC24_Contours\Working\live_environment\5m\data\scratch"

'Run the Dos Command
Run program "Cmd.exe /c dir """+path_to_temp_tables+"*.TAB"" /b /w  > """+path_to_temp_tables+"Liste.txt"""

'Registering a text file in MIpro
Register Table path_to_temp_tables+"Liste.txt"  TYPE ASCII Delimiter 9 Charset "WindowsLatin1" Into path_to_temp_tables+"Liste.TAB"

'Opening the new TAB file based on your text file
Open Table path_to_temp_tables+"Liste.TAB" as Liste
'Alter Table "Liste" ( modify elev_text Char(4) ) Interactive
'Pack Table Liste.TAB Graphic Data
End Sub

Liste above should be the original name of the input file.

I get

I have tried a trailing slash and putting the files in the same directory and then

path_to_temp_tables = ""

...but I get the same issue.

===== UPDATED SCRIPT ====

The dim removes the error but I only see the .txt file being created. How do I get it to cycle through the files and then on each file it should alter the table and pack it? See updated script.

Include "MapBasic.def"

Declare Sub Main

Sub Main
Dim path_to_temp_tables As String
path_to_temp_tables = "Z:\projects\1_DSC24_Contours\Working\live_environment\5m\data\scratch\"

'Run the Dos Command
Run program "Cmd.exe /c dir """+path_to_temp_tables+"*.TAB"" /b /w  > """+path_to_temp_tables+"List.txt"""

'OPEN first file in List.txt
 'Alter Table "XXX" ( modify elev_text Char(4) ) Interactive
 'Pack Table XXX.TAB Graphic Data
'CONTINUE on next file
End Sub


texts: Script for Editing TIN in Arcgis: modelbuilder works, when exported as script gives an error

texts:
Arcgis can give such a headache!
I want to automate loads of small tasks, and so I need to edit empty TIN with python in order to create a full TIN.
My srcript is giving errors, so I tried by hand to make it work with ModelBuilder AND EditTIN IT WORKS FINE!!!!

Exported the same Model (that just worked) as python script gives errors!

# Local variables...
raster = "F:\\...\\mClip_1"
raster_InterpolateShape = "F:\\...\\mClip_1_InterpolateShape"
# Process: Edit TIN...
gp.EditTin_3d(raster, "raster_InterpolateShape Shape <None> softline true")

and the error message:

    Traceback (most recent call last):
  File "F:\....\test_editTin.py", line 26, in <module>
    gp.EditTin_3d(raster, "raster_InterpolateShape Shape <None> softline true")
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000800: The value is not a member of <None>.
ERROR 000800: The value is not a member of %s.
ERROR 000800: The value is not a member of %s.
ERROR 000800: The value is not a member of %s.
Failed to execute (EditTin).

All extensions and everything is checked since it is exported from model builder.
I suppose something wrong is just with first shp input

In ArcgisHelp ex for the input 3d shp name it shows the name with extension

..."masspntz.shp Shape <None> masspoints true"

And so I tried both, with extension and without, but the same errors come.

Any ideas, how can I get that TIN from feature automatically.. ???


texts:
When I access Earth Explorer, I have the option for downloading images for both Landsat 8 Collection Level-1 and Level-2.

For Level-2 I have a brief description that refers to "Surface Reflectance".

I have some troubles on understanding the procedures for image correction and need the images with less need for corrections (dark object subtraction, surface reflectance, etc.)

I need this data for mining mapping.

What is the advisable Level for download?


texts:
I'm developing an application for a client based on Vue and NodeJS.

Earlier MS Access database was used and I have migrated it to MongoDB and also to PostgreSQL in case I don't find any plugin for MongoDB.

I would like to know is there any recently updated plugin of QGIS for MongoDB or I need to use PostGIS with PostgreSQL?

I found 1 plugin but it was last updated in 2016.


texts: Updating null values in appended feature class

texts:
I am creating a customized script tool that first clips out a line feature from one feature class, dissolves the fields of the clipped feature class so that just one feature is in it, appends the dissolved feature to another feature class, and then updates certain fields with default values for this newly appended feature.

When I run either of the codes below, no errors are thrown, and everything through the appending step works as expected (Note: 'NO_TEST' is passed for schema type with the result being that the appended feature is 'Null' for all fields.) However, I can't get the fields to update; they stay as 'Null' for all fields.

At first, I was including a where clause to instruct the tool to update only those rows with null values in the LOC_UNCERT field to prevent the tool from updating every row every time and instead just the newly added feature. In the properties of the tool, I set the default for the strSQL (where clause) to LOC_UNCERT IS NULL. The code for this attempt looked like the following (with adjusted sys.argv numbering due to leaving out the first 3 steps):

fcAppend = sys.argv[1]
strSQL = sys.argv[2]
lstFields = ["LOC_UNCERT", "CONC_FEAT_", "UH_EX"]
try:
    with arcpy.da.UpdateCursor(fcAppend, lstFields, strSQL) as cursor:
        for row in cursor:
            row[0] = "Linear"
            row[1] = "Point"
            row[2] = "N"
            cursor.updateRow(row)
except:
    print arcpy.GetMessages(2)

What I expected was that the LOC_UNCERT field would be updated to 'Linear', the CONC_FEAT_ field to 'Point', and the UH_EX field to 'N'. However, no fields are updated with this code.

So, I did some searching and saw this thread and tried taking out the where clause altogether and instead trying this:

fcAppend = sys.argv[1]
lstFields = ["LOC_UNCERT", "CONC_FEAT_", "UH_EX"]
try:
    with arcpy.da.UpdateCursor(fcAppend, lstFields) as cursor:
        for row in cursor:
            if row[0] == None:
                row[0] = "Linear"
                row[1] = "Point"
                row[2] = "N"
                cursor.updateRow(row)
except:
    print arcpy.GetMessages(2)

Again, I get no errors, but all fields are still blank after running this.

Here is an image of the resulting attribute table:

I am using ArcMap 10.3.


texts: Can I use multiple version of ArcGIS desktop on same computer with one EDN license?

texts:
If I have an EDN license, then can I use multiple versions of ArcMap on the same computer?
For example, I want to install ArcMap 10.0 and 10.4 with my EDN license. Now is it possible to install these two versions on the same computer? If not, then can I install 10.0 on computer_1 and 10.4 on computer_2 (another computer).
I have read from here : [http://www.esri.com/legal/pdfs/mla_e204_e300/english#AGOL_Data][1]

and
  http://www.esri.com/software/arcgis/edn/what-you-get

but they are not clear to me.


texts: Why GeoJSON is gotten by Leaflet, but does not display?

texts:
I WFS request from Leaflet to GeoServer is successful (200). But no features have been displayed. Response of request is big GeoJSON with features. What is the problem and what is wrong with my code (how to display features)? I used one from examples from StackOverflow answers.

var owsrootUrl = 'http://gis-domen/geoserver/ows';

               var defaultParameters = {
                    service : 'WFS',
                    version : '2.0',
                    request : 'GetFeature',
                    typeName : 'test_osm:my_points',
                    outputFormat : 'application/json',
                    format_options : 'callback:getJson',
                    SrsName : 'EPSG:3857'
                };

                var parameters = L.Util.extend(defaultParameters);
                var URL = owsrootUrl + L.Util.getParamString(parameters);

                var WFSLayer = null;

                var ajax = $.ajax({
                    url : URL,
                    dataType : 'json',
                    jsonpCallback : 'getJson',
                    success : function (response) {
                        WFSLayer = L.geoJson(response, {
                            style: function (feature) {
                                return {
                                    stroke: false,
                                    fillColor: 'black',
                                    fillOpacity: 0
                                };
                            },
                            onEachFeature: function (feature, layer) {
                                popupOptions = {maxWidth: 200};
                                layer.bindPopup("geom"
                                    ,popupOptions);
                            }
                        }).addTo(mymap);
                    }
                });


texts: how to insert area of polygon into a column named area in a polygon map in cartodb?

texts:
SELECT ST_Area(the_geom) FROM cartodb_query

gives the area but trying to insert it into an area column using:

UPDATE cartodb_query SET area = ST_Area(the_geom)

doesn't work.


texts: What is the benefit of the arcpy function GetParameterAsText?

texts:
What is the benefit of the arcpy GetParameterAsText function?

I know that its purpose is to return parameters as text but what is the real benefit?


texts: Creating line from point based on intersecting line at 90 degrees to line in ArcMap?

texts:
I am using ArcMap 10.2/10.3 and I need to create lines from points, so I can split polygons at the created line, as per the image below.

So I have to cut the polygon at a 90 degree angle to the line running through the poly, at the point (red line drawn in below). When I have this line I can split my polygons with these lines.

I have 1100 of these so I would prefer to not do it manually..I cannot find a way to automate this process, as the line direction changes for each polygon depending on which direction the road is going.


texts:
I would like to understand why I can't change the files of my mosaic directory in GeoServer. When I create my layers, I specify the URL of my directory with GeoTIFF files and shapefiles. If you change GeoTIFF files and shapes files with new GeoTIFF files (and shape), I see nothing in preview image (OpenLayers).

EDIT : ERROR in GEOSERVER

Caused by: java.lang.IllegalArgumentException: The specified coverageName is unavailable
    at org.geotools.gce.imagemosaic.ImageMosaicReader.checkUnspecifiedCoverage(ImageMosaicReader.java:1092)
    at org.geotools.gce.imagemosaic.ImageMosaicReader.getMetadataValue(ImageMosaicReader.java:1005)
    at org.geoserver.catalog.SingleGridCoverage2DReader.getMetadataValue(SingleGridCoverage2DReader.java:86)
    at org.geoserver.catalog.CoverageDimensionCustomizerReader.getMetadataValue(CoverageDimensionCustomizerReader.java:292)
    at org.geoserver.web.data.resource.DimensionEditor.<init>(DimensionEditor.java:149)
    at org.geoserver.web.data.resource.ResourceDimensionsTabPanelInfo.<init>(ResourceDimensionsTabPanelInfo.java:58)
    ... 108 more


texts: Why does same image in two ArcGIS ArcMap configurations show different extent numbers?

texts:
I would like to get hear from you about the situation I am seeing here. What It got my eye was that when I download an ASTER from Reverb/ Echo from USGS website.
At work, I load my ASTER file to my ArcMap and the ASTER shows the extent is in decimal degrees and the spatial reference shows the UTM Zone 13 Northern Hemisphere.So, I was not able to overlay with my known Projected Coordinate System in NAD 1983 UTM 13 Zone to overlay each other. I have been having some projection issues because I want it to reprojection to NAD 1983 UTM Zone 13N.

Now I backup the file and took it home and load it to my home ArcMap and it shows the extent is in meters and the spatial reference shows UTM Zone 13 Northern Hemisphere.
I am wondering if this has to do with ArcGIS 10.1 at work was not installed properly or did I did do something that cause the different coordinate system on my ArcGIS at work?
I would like to find the solution because I know someone else had the same situation I am in.

I revised the error from home to work


texts: qgis unable to connect to ms sql server using sql authentication

texts:
I am getting the following error when I try to set up a connection to a MS SQL Server database using sql server authentication. I did find a bug report from 2014, but that was apparently fixed and closed.

[Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed QODBC3: Unable to connect

Database connection works fine for lots of other software, so all the databasee connection settings are good.

I have unchecked "Trusted Connection" and the "test connect" is successful. When I actually try to connect in the "ADD MSSQL Table(s)" form, it throws the error.

Any idea, please?


texts: JoinFeature attribute_relationship syntax (arcpy)

texts:
I am building a Python Toolbox for ArcGIS using Python 3 with ArcPy. I have two tables that I need to relate based upon an attribute. The information on the documentation for the JoinFeatures() function has been very helpful, but it omits the syntax for using the attribute_relationship: JoinFeatures Documentation
Each table has a GUID field called C_GUID and another GUID field. The GUID's in this example are simplified, but the C_GUID field is the foreign key attribute that ties the tables together.
Input table 1:

Input table 2:

Desired Output:

I don't know what the syntax is for the "Value Table" that the documentation represents. This is the code that I have tried:
# Attempt to provide column names as a list for attribute_relationship parameter
arcpy.geoanalytics.JoinFeatures("Table1", "Table2", "Output", attribute_relationship=["C_GUID", "C_GUID"])

Which gives me this error message when running the tool from ArcGIS Pro:
File "<string>", line 141, in execute
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoanalytics.py", line 1960, in JoinFeatures
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoanalytics.py", line 1957, in JoinFeatures
retval = convertArcObjectToPythonObject(gp.JoinFeatures_geoanalytics(*gp_fixargs((target_layer, join_layer, output_name, join_operation, spatial_relationship, spatial_near_distance, temporal_relationship, temporal_near_distance, attribute_relationship, summary_fields, join_condition, data_store, keep_all_target_features), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 511, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Traceback (most recent call last):File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\ga_server_joinfeatures.py", line 40, in <module>
params['context'] = set_context(arcpy.env.outputCoordinateSystem,
File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\geoanalyticssoap.py", line 92, in run_portal_tool
self.add_toolbox()
File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\geoanalyticssoap.py", line 76, in add_toolbox
arcpy.ImportToolbox(self.toolbox)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 165, in ImportToolbox
return import_toolbox(input_file, module_name)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\toolbox_code.py", line 486, in import_toolbox
toolbox = gp.createObject("Toolbox", tbxfile)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 388, in createObject
self._gp.CreateObject(*gp_fixargs(args, True)))
OSError: The toolbox file https://geoanalytics1.arcgis.com/arcgis;services/GeoAnalyticsTools;UseSSOIdentityIfPortalOwned was not found.
Failed to execute (JoinFeatures).

So I have two questions here:

Is the syntax for calling the JoinFeatures function correct?
What does the error message mean? Is it trying to find a Toolbox on the web that doesn't exist anymore?


texts: Exiting Google Earth Pro street view jumps to random location

texts:
It used to be that when I exited street view, I would be back in the satellite view at the same location and facing the same direction that I was in street view. This is very helpful if I was trying to find the exact location of a building as I could see the front of the building in street view then exit street view and know which building it was. Lately, when I exit it seems that it jumps to a random location. But with further investigation, I think it is staying in the same location and at the same orientation, but it is jumping up in the air about 1500 feet and tilting to look at a place 3 or 4 km away. I'm pretty sure this is confirmed.
How can I set or restore how much it jumps up and tilts?
I followed the instructions in  a link that asked about this exact problem at https://support.google.com/earth/thread/7079572?hl=en but that was not a solution to my problem.
These other links were related problems I've also seen when exiting street view, but not the exact problem. For completeness, those links are https://support.google.com/earth/thread/10097937?hl=en and https://support.google.com/earth/thread/54611218?hl=en


texts: Grouping polygon neighbors recursively using PyQGIS?

texts:
I have a shapefile with polygons and need to group them with the same Group_ID if they touch each others. The thing is, once I start assigning a number to one polygon, it needs to keep looking for neighbors of neighbors until all are assigned the same ID in the attributes table. For example:

The grouping should be like:

Polygon_ID          Group_ID
1                      1
2                      1
3                      1
4                      1
5                      1
6                      1
7                      1
8                      2
9                      2
10                     3

I am using QGIS for this, trying a script with python with a recursive function that keeps checking for neighbors until no more are found, no luck so far.


texts: How to define workspace as input for GP tool in order to select from list CAD layers as the second input?

texts: How to define workspace (folder) as input for gp tool in order to select CAD layers as the second input that will be obtained from the first input?


texts: Loading external GeoJSON file into Leaflet map?

texts:
I would like to load a geoJSON (polygon) file into my leaflet map. I have seen examples where geoJSON is embedded into the javascript code but I can't find any examples showing how it is done with an external file.

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />

    <div id="map" style="height: 100%"


texts: Label features on hover/click with QGIS?

texts: Simple question: Is there a built in/easy way to show labels for features based on a hover or click action with QGIS 2.0.1?


texts: Clipping raster by multiple datasets or polygons?

texts:
I would like to clip a DEM using a grid of polygons. It's probably easier to use multiple polygons in one shape file, but I haven't managed this so I'm trying to use a for loop so I can loop through each dataset in a gdb (each contains only one polygon).

Here's my code (doing it in the python window).

#creating a workspace and a list of feature classes
arcpy.env.workspace = "C:/data/lidar/lidar.gdb"
fcs = arcpy.ListFeatureClasses()

#looping through each feature class and creating a raster based on the extent of
#feature class

for fc in fcs:
    arcpy.Clip_management("perth", "#", "C:/data/lidar", fc, "", "ClippingGeometry")

My code doesn't execute however, it just sits there, waiting for something else... but what? I can get it to work for one clip, but not with the loop.

I'm sure I should be doing something else for the output, to name each new raster by feature class or something... but again, don't know how. Please let me know if I should add any more info.


texts: Building expression related to Attribute Rules using ArcGIS Pro

texts:
Referencing Creating Attribute Rules using ArcPy in ArcGIS Pro

Now I am trying to build an expression. First it does not give me the option to choose the type of syntax in the expression builder GUI. (ie. Arcade, Python or SQL)

Secondly I used this script

var FID = $tSignalPoles.FID;
if(FID == 0001)
  return "SP-" + NextSequenceValue("tSignalPoles")

But it cannot find feature that I am calling out in the line 1 variable even though that is the correct source name in the database.


texts: Disaggregating multiring polygon for editing, then recombining?

texts:
We have many rows of multi-ring polygons, displayed on a Flex front end.  We need to be able to select a polygon (a row), split the rings for editing, edit them, then combine into one polygon again.  I thought we could mulipart to single part, but that requires a whole FC and copies it to a new FC; whereas we want to be able to split, edit then recombine.

I have built a spatial toolset class in Python and am now building the tools for this.  But, I must admit, I am struggling to conceive how to do it.

I also have another approach, which would be to select the id of the ring associated with the polygon; i.e., the polygon will have 1..n rings.  I don't know the Flex API well, but I am sure you must be able to select the ring id of the polygon and removeRing()?

I am using ArcSDE.


texts:
I am trying to follow PYQGIS documentation for loading a shapefile from inside a script.

http://www.qgis.org/pyqgis-cookbook/intro.html

I was able to set the datasource and run the QgsVectorLayer command from the python console inside QGIS so I am guessing my problem is in the setPrefixPath() portion. Using the 'which qgis' command I got /usr/bin/qgis so that is the path I used. Any help would be appreciated.

from qgis.core import *
import qgis.utils

QgsApplication.setPrefixPath('/usr/bin/qgis', True)
QgsApplication.initQgis()

ds = '/home/user/shapefiles/nodes.shp'

nodes = QgsVectorLayer(ds, 'nodes', 'ogr')
if not nodes.isValid():
    print "Layer failed to load!"


texts: After running the Version Changes tool ..Export pre-reconcile/post records from parent

texts: I would like to export those records identified as changes after running the Version Changes tool before running Reconcile and Post tools.  Preferably with python or having python call a program to do the export of the Version Changes records to somewhere and then continue on with an automated reconcile/post process.  But any solution would be most appreciated.  Thanks.


texts:
I have two vector layers:

"parallel": a vector layer containing a lot of lines, they're all parallel but that shouldnt matter
"polygon": a vector layer with just 1 polygon

I want to create a new layer with the clipped lines in it. So only the part of the lines inside the polygon (easy clip function).

I'm using the "qgis:clip" function, which is pretty easy.
At first I failed beceause I didnt knew that this clip function expects you to select the features (of the line layer), and doesn't just automatically clips ALL the features in the layer.

After I found that out, I restarted but I still can't get it to work ...

parallel = QgsMapLayerRegistry.instance().mapLayersByName("parallel")[0]
polygon = QgsMapLayerRegistry.instance().mapLayersByName("polygon")[0]

selection = []
for feature in parallel.getFeatures():
    selection.append(feature.id())
    parallel.setSelectedFeatures(selection)

processing.runalg("qgis:clip", parallel, polygon, r"C:\Users\Kristof\Desktop\Layer\c5.shp")

layer5 = iface.addVectorLayer(r"C:\Users\Kristof\Desktop\Layer\c5.shp", "c5", "ogr")

But I always end up with an empty vector layer ...


texts: Is there a routing solution for PostGIS that supports Theta Star?

texts:
I have a data set with 10m of accuracy. I have drones with a GPS that provides far finer resolution. I would like to provide pathing for my drone that exceeds the 10m of accuracy.
I believe theta star could do that. Is there a solution for something like pg_routing that supports theta star?


texts: CloudMade Routing with Leaflet: route is not displayed

texts:
I am trying to consume the CloudMade routing API using Leaflet.

So far, I have managed to pass points and receive a response, and parse that response into an array of points. The array of points is then passed to a polyline object, which is added to the map.

I have encountered a problem where the polyline is not displayed on the map. I tried testing whether the points are being read properly, pushed into the point array and to the line object and there have been no issues so far.

This is what the output looks like:

Here is my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 //EN">

        <meta charset="utf-8">
        <title>Routing Using Cloudmade Routing and Leaflet</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="A map to demonstrate routing using CloudMade routing and Leaflet">
        <meta name="author" content="">

        <link rel="stylesheet" href="../leaflet/dist/leaflet.css" />

If anyone could help me, I would be much obliged.


texts: Coordinate tags of GeoTIFF are not recognized

texts: I received a bunch of GeoTIFFs for which the location is not recognized. It think this is because the tags for storing the coordinates are not recognized as such. Is there a way to rename/convert those into tags that are recognized as coordinates?


texts:
I rendert a beautiful with QGIS based on OSM data.
Now I want to publish it via GeoServer.
I am new to GeoServer but as far as I it does not accept SLD files created by QGIS.

My GeoServer cannot validate my code.

Does someone has a clue how to change the style so that GeoServer recognizes it?

The SLD content is:

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>bahn</se:Name>
<UserStyle>
  <se:Name>bahn</se:Name>
  <se:FeatureTypeStyle>
    <se:Rule>
      <se:Name>Railway</se:Name>
      <se:Description>
        <se:Title>Railway</se:Title>
      </se:Description>
      <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
        <ogc:Not>
          <ogc:PropertyIsNull>
            <ogc:PropertyName>type</ogc:PropertyName>
          </ogc:PropertyIsNull>
        </ogc:Not>
      </ogc:Filter>
      <se:MinScaleDenominator>1</se:MinScaleDenominator>
      <se:MaxScaleDenominator>10000</se:MaxScaleDenominator>
      <se:LineSymbolizer>
        <se:Stroke>
          <se:SvgParameter name="stroke">#e4e4e4</se:SvgParameter>
          <se:SvgParameter name="stroke-width">0.26</se:SvgParameter>
          <se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
          <se:SvgParameter name="stroke-linecap">square</se:SvgParameter>
        </se:Stroke>
      </se:LineSymbolizer>
      <se:LineSymbolizer>
        <se:Stroke>
          <se:GraphicStroke>
            <se:Graphic>
              <se:Mark>
                <se:WellKnownName>line</se:WellKnownName>
                <se:Fill>
                  <se:SvgParameter name="fill">#e4e4e4</se:SvgParameter>
                </se:Fill>
                <se:Stroke>
                  <se:SvgParameter name="stroke">#e4e4e4</se:SvgParameter>
                </se:Stroke>
              </se:Mark>
              <se:Size>1</se:Size>
            </se:Graphic>
            <se:Gap>
              <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
                <ogc:Literal>5</ogc:Literal>
              </ogc:Filter>
            </se:Gap>
          </se:GraphicStroke>
        </se:Stroke>
      </se:LineSymbolizer>
    </se:Rule>
  </se:FeatureTypeStyle>
</UserStyle>


texts: ArcMap ModelBuilder: Have iterator run only once to test model?

texts:
I am working on building a model in ArcMap 10.4.1 ModelBuilder. This particular model iterates through rows of a table, running a series of processes/tools on each row.  Since there are 50+ rows in this initial table, it takes some time to iterate through each row and run the entire model.

As I am adding new elements on to the end, I would like to be able to test the model by running through only the first row, to see if the elements I've added are functioning properly. Is there a way to tell the "Iterate Row Selection" tool I only want to run the model using the first row to test things out?

I know I can start the model and simply cancel it once the first iteration has completed, but I am wondering if there is a neater or proper way to do this. My apologies if this question has been asked before or has an obvious answer, I've tried my best to find an answer and haven't been successful.


texts:
I have a column named position with geo data.
Query:

SELECT ST_SRID(position) FROM checkpoint LIMIT 1;

returns 4326

If I try to simplify/compress points with

SELECT st_dumppoints(st_simplify(st_makeline(points.position)), 0.005))).geom
FROM
    (SELECT position
    FROM checkpoint) AS points

it works, but my question is, is st_simplify SRID aware function? Or should I transform the points to another coordinate system with ST_Transform? (The function probably reduces the number of nodes based on line section angles and the simplification may not give the correct results if it does not acknowledge lat lon coordinates - lat : lon ratio is not 1, which is the case with x and y from Cartesian coordinate system).


texts: Computing Shortest Distance using Google Map v3 and Openlayers

texts: How to compute shortest route between two points in google map that user selects and provide all routes from source to destination in Transport system?


texts: Implementing pgRouting in web GIS based on MapServer?

texts:
I have 3d lines in PostGIS database (representing hiking trails). I'm using phpPgAdmin administration tool. I want to use Dijkstra method for finding shortest way. I inserted all needed columns to execute this function, for example:

    SELECT * FROM shortest_path('
   SELECT gid AS id,
          start_id::int4 AS source,
          end_id::int4 AS target,
          cost_length::float8 AS cost
   FROM network',
1,
135,
false,
false)

I have .html file and .map file. I alredy have some functions and layers installed in my web application (like layer for shaded relief map). Also, I already have defined layer for 3d hiking trails from PostGIS database and it is shown on the web map by checkbox.

I never worked with pgRouting and MapServer before and I need help how to implement this function in my web application. I need detailed answer on how to implement it in my .map file and .html file. I need to enable users to choose one starting node (I will name them, but I don't know if I need to name it all?) from the combobox I want to define in my .html file, and one end node, also from the combobox, and then enable showing shortest path, or maybe list of nodes where they need to go for shortest path from start point to end point.

Don't give me links like [1]: http://users.qgis.org/planet/user/4/tag/pgrouting/ because it doesn't give me an explanation about working with MapServer and pgRouting.

This is error when I'm trying to open my application:

writeLog(): Unable to access file. mslog.log msDrawMap(): Image handling error.
Failed to draw layer named 'routing'. msPostGISLayerWhichShapes(): Query error.
Error (ERROR: syntax error at or near "SELECT" LINE 1: ...) as geom,"gid" from
(SELECT * FROM shortest_path(SELECT the... ^ ) executing query:
select encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'hex') as geom,"gid" from
(SELECT * FROM shortest_path(SELECT the_geom as the_geom, gid AS id, %start_id%::int4
AS source, %end_id%::int4 AS target, cost_length::float8 AS cost FROM network, 1, 135,
false, false)) AS foo where the_geom && GeomFromText('POLYGON((561819.89148581
5072537.66277129,561819.89148581 5093307.66277129,589524.782971619
5093307.66277129,589524.782971619 5072537.66277129,561819.89148581
5072537.66277129))',4326)


texts: Returning neighboring polygons which share a boundary, not just a point

texts:
I am currently using geometry().intersects(geom)) in one of my PyQGIS scripts, but it is not returning the outcome I'd like, and I don't think .touches(geom) would either.

I only want to return neighboring polygons which share an edge with the currently selected polygons. I've attached an image below.

My target polygon is in red. Right now it is returning all of the polygons in black and blue, but I only want it to return the polygons in blue. If it is not clear from the image, the red and black polygons touch at a point.

Is there a way to return only polygons which share an edge and not a point, i.e. just the two blue polygons in the image and not the black polygon, using PyQGIS?


texts: Displaying numbers of single band raster layer in QGIS without additional vector layer?

texts:
I wonder if there is a raster symbolizer in QGIS with a label option, that renders the cell values as labels of single band raster layer, a scalar field.

The standard raster symbolizer dialog in QGIS has no label option. So I use two data sources, a raster (geotiff) and a xyz-vector re-incarnation of the raster to draw the map. To be compatible with the GDAL cell addressing I use

   gdal_translate hires.tif hires-point.xyz -of xyz

and apply all the vector symbology and labeling capabilities on/to the xyz-object.

For large scalar fields, this workaround is very slow and not handy. At least I want to build a map for debugging purposes with this look.

Is there a plugin for QGIS that draws raster cells as shown above without the vector handicraft?

I use Debian Jessie Linux, QGIS Pisa 2.10 and gdal 2.0.1

I try to investigate the results of GDAL raster window operations for example (comment @Paulo).


texts: Attached image is missing unit support in GDAL 3+ (and associated PROJ4)

texts:
This image below worked with the GeoTIFF tools in GDAL v2. When loading it in v3 I get "proj_uom_get_info_from_database: unit of measure not found". What unit of measure isn't found, and is that by design? You can see the error with gdalinfo. I'm using GDAL v3.1.2 and proj4 v6.3.1.
Image link: https://drive.google.com/file/d/1DLZlDz-RTrruLWJQ5MbHchXj4WGn4RzU/view?usp=sharing
My old GDAL reports this:
  Raster dataset parameters:
  Projection: PROJCS["UTM Zone 10, Northern Hemisphere",GEOGCS["Unknown datum based upon the GRS 1980 ellipsoid",DATUM["unknown",SPHEROID["GRS 1980",6378137,298.2572221010042,AUTHORITY["EPSG","7019"]]],PRIMEM["Greenwich",0],UNIT[,0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]
  RasterCount: 6
  RasterSize (50,50)
Using driver GeoTIFF
  Metadata:
    0:  AREA_OR_POINT=Area
    1:  DATE_OF_CREATION=17_20 08Jul2002
    2:  DATE_OF_UPDATE=06_41 27Aug2002
    3:  FILE_ID=045025_utm10.pix
    4:  GENERATING_FACILITY=PCI Inc., Richmond Hill, Canada
    5:  SOFTWARE=PACEV6.2

  Image Structure Metadata:
    0:  INTERLEAVE=PIXEL

Corner Coordinates:
  Upper Left (729243, 5542091)
  Lower Left (729243, 5505911)
  Upper Right (764283, 5542091)
  Lower Right (764283, 5505911)
  Center (746763, 5524001)

Coordinate System is:
PROJCS["UTM Zone 10, Northern Hemisphere",
    GEOGCS["Unknown datum based upon the GRS 1980 ellipsoid",
        DATUM["unknown",
            SPHEROID["GRS 1980",6378137,298.2572221010042,
                AUTHORITY["EPSG","7019"]]],
        PRIMEM["Greenwich",0],
        UNIT[,0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-123],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Band 1 :
   DataType: Byte
   ColorInterpretation: Gray
   Description:
   Size (50,50)
   BlockSize (50,27)
   Offset: 0
   Scale: 1
Band 2 :
   DataType: Byte
   ColorInterpretation: Undefined
   Description:
   Size (50,50)
   BlockSize (50,27)
   Offset: 0
   Scale: 1
Band 3 :
   DataType: Byte
   ColorInterpretation: Undefined
   Description:
   Size (50,50)
   BlockSize (50,27)
   Offset: 0
   Scale: 1
Band 4 :
   DataType: Byte
   ColorInterpretation: Undefined
   Description:
   Size (50,50)
   BlockSize (50,27)
   Offset: 0
   Scale: 1
Band 5 :
   DataType: Byte
   ColorInterpretation: Undefined
   Description:
   Size (50,50)
   BlockSize (50,27)
   Offset: 0
   Scale: 1
Band 6 :
   DataType: Byte
   ColorInterpretation: Undefined
   Description:
   Size (50,50)
   BlockSize (50,27)
   Offset: 0
   Scale: 1


texts: How to transpose the lat/lon coordinates of a shapefile?

texts:
I need X to be Y and Y to be X (switching lat/long) within the polygon shapefile. If it were a point shapefile I know I could simply reverse the lat/long or x/y parameter and import from a table. I'm not sure how to do something similar with a polygon layer. Is there any editing tool that would accomplish this? I have QGIS and ArcMap 9.3 ArcInfo licensing available. Its projected as WGS 1984.

I'm working with a large polygon file so manually changing it would be very tedious. Any thoughts on how to do this?


texts: I need to edit the vertices of about 30 polygons in an equal way, how would I go about this? Alternatively is there some method to just increase the size of a group of polygons 200%?


texts: Models -> [Example Models] -> Contour lines from points: on MAC

texts: I'm running QGIS2.6 on a Mac and can't seem to locate the "Contour Lines from Points" Example Model. SAGA is installed.


texts: Why is Delete Highlighted button on Attribute Table grayed out in ArcMap?

texts:
I have a few thousand points of data in one layer in ArcMap. I'm editing those points through the Attribute table and now have the data that I don't want displayed highlighted in the table. About 3.5 thousand of 5 thousand points. However, I can't delete it due to the "Delete Selected" and "Delete Highlighted" being grayed out and I'm not quite sure why or what my options are to filter this data.
Deleting these highlighted lines deletes the actual point on the graph correct?


texts: How to fix 'GEOSDifference: TopologyException'?


texts: How to dynamically move a polygon in map canvas?

texts:
I would like to dynamically move a polygon on QGIS map canvas with a python script. The polygon coordinates are updated every n seconds in txt file by an outside application. I tried the following code:

def main():
    path_coordinates='path_to_polygon_coordinates.txt'
    polygon_coordinates=coords_polygon(path_coordinates) #function that reads coordinates in txt file and return them in a list
    polygon=QgsGeometry.fromPolygon([polygon_coordinates])

    vlayer = QgsVectorLayer('Polygon?crs=epsg:2154&field=id:int(2)',    'Layer 1'   , "memory")
    mapregistry = QgsMapLayerRegistry.instance()
    QgsMapLayerRegistry.instance().addMapLayer(vlayer)
    feature = QgsFeature()
    feature.setGeometry(polygon)
    vpr = vlayer.dataProvider()
    vpr.addFeatures([feature])
    vlayer.updateExtents()

    for k in range(99):
        actualize_position(path_coordinates,vlayer)

def actualize_position(path_coordinates,vlayer):
    polygon_coordinates=coords_polygon(path_coordinates)
    polygon=QgsGeometry.fromPolygon([polygon_coordinates])
    feat_id=1
    vlayer.dataProvider().changeGeometryValues({feat_id:polygon})
    vlayer.updateExtents()
    time.sleep(0.1)

The problem I get while running the script is that QGIS freezes until the script is finished. What I would like to get is to be able to see the polygon moving on the map canvas.


texts: Geospatial algorithm to create area midwayboundaries from lines?

texts:
I am trying to find out if there is any existing geospatial algorithm (in any open Open Source Geospatial software) that would allow to use a network of lines as a start point and expand those in such a way that I can create new area boundaries for each of the lines "coverage area". What I mean with that is if one could "buffer" the lines out in such a way to create boundaries where any potential buffers would meet at the middle way point between the lines so that in the end I could have an area within that is the starting line. On example could look like this (5 hand drawn lines in red and corresponding colored areas that I would want to create). Note that is exact but to communicate the idea) see http://terra5.terragis.net/sites/html/aeras_for_lines%20copy.png

It's kind of similar to Thiessen polygons but for lines instead of points...

One preference would be if there was something that could be used programmatically on large data sets ...


texts:
I have a polygon layer (consist of buildings) and it has different attributes including the height attribute. I want to use that height in order to extrude my all polygons or give height to my building then export the dxf file. Want to give that height to  my all polygons using the PyQGIS. I am able to find extrude documentation but unable to locate any working example as I am confused with two parameters of extrude which is x and y. I guess it should be consist of one parameter of height only.

extrude(self, x: float, y: float) → QgsGeometry
Returns an extruded version of this geometry.

Some code which I have applied without any success(no visual appearance change of polygone)

#getting the desired layer
if QgsProject.instance().mapLayersByName(layerUpdateName):
    layerUpdate = QgsProject.instance().mapLayersByName(layerUpdateName)[0];

for lu in layerUpdate.getFeatures():
    print (lu["Height"])
    #lu.geometry().extrude(lu["Height"],lu["Height"])
    #testExtrude(lu,lu.geometry())
    #geom = lu.geometry().asPolygone()
    lu.setGeometry(lu.geometry().extrude(lu["Height"],lu["Height"]))


texts: QGIS 3.4 layout: fix extent and scale, let size adjust automatically

texts:
I'd like to create maps with a defined extent and scale. Logically, the map size has to adjust accordingly.
Since I will be using the maps as pdfs (and not on paper), this won't bother me.

Is this possible? If yes, how?

So far, I get nan values for extent and scale even though I've defined them by writing the desired values as expressions.

When I enter the approximately correct width and height values, the nan values for extent and scale persist.
When I delete the width and height values, new grey values appear. They don't make sense (much too small).
The map doesn't show at all (neither when updating the preview in layout or in a pdf).

I'm working on mac with QGIS 3.4.2. The only item in my layout is a map with google satellite images added as XYZ tiles as described in Matthias Kuhn's answer to Adding Basemaps from Google or Bing in QGIS??


texts: Using JQueryUI Slider to change Layer Display (Leaflet)?

texts:
Can't seem to figure out how to use JQueryUI Slider to change the layer display on my leaflet map.
Scenario is basically, When user slides bar across a dfferent layer shows up on the map (in years)
Below is the slider script

<script type="text/javascript">
    // set up an array to hold the years
    var years = [1111, 1112];

    var activeYear =

    $(".slider")

        // activate the slider with options
        .slider({
            max: years.length-1,
            value: activeYear
        })
        // add pips with the labels set to "years"
        .slider("pips", {
            rest: "label",
            labels: years
        })
        // and whenever the slider changes, change map display layer
        .on("slidechange", function(e,ui) {
             **UNSURE OF CODE HERE**
        });
</script>

My layers are listed earlier in the map script in a different div, a sample one is

var basemaps = {
oneoneoneone: L.tileLayer.wms("http://localhost:8080/geoserver/wms", {
    layers: 'map:1111',
    transparent: true,
    version: '1.1.0',
    format: 'image/png'

}),

Am i able to relate the oneoneoneone layer to the slider array value 1111 and then when slider is set on that section it will display the layer on the map?


texts: QGIS. Clipping raster layer(asc) with vector layer results in missed color information

texts:
I have an imported asc file, then I generate a vector layer in order to clip part of the raster with that polygon shape.
The result is the correct clip but has lost the gray scale representing the height, it is only black.
This is the general view:

This is the original raster layer:

This is the "clipped" (clip raster by mask layer):

Any idea why the result misses pixel color information?
Thanks.


texts:
My map has labels, which usually should break after the 14th character using "wordwrap":

wordwrap(name,14)

But sometimes I need to suppress the wraping. So I need to use a "No-break space" - is there one?


texts: ArcPy fails to field calculate integer source value to LONG field

texts:
I am working on a script that iterates through the records of "feature class A", performs a spatial selection (flow tracing) with each individual "A" record on "feature class B"  and then field calculates an attribute from "A" into the resulting selected records in "B"

Basically for each downstream-most node on a sewer pipe network, trace upstream and assign the ID of that downstream node to all upstream features.

The attribute value will always be a whole number, but sometimes field in A is formatted as text and sometimes as a number.

I can successfully perform this calulation if:

A is formatted as TEXT

and

B is formatted as LONG

the operation fails to calculate anything if:

A is formatted as LONG

and

B is Formatted as LONG

What am I missing  so that this will work for both potential input cases if the ID for A is either text whole number or an integer whole number format?

...
for row in cursor:
    ID = (str(row.getValue(str(flagname))))
    whereclause = ((str(flagname)) +str(' = ') + "'%s'" %ID)
    fc=str(r"outfalls_lyr")
    arcpy.MakeFeatureLayer_management(traceflag, fc)

    try:
        arcpy.SelectLayerByAttribute_management(fc, "NEW_SELECTION",str(whereclause))
        arcpy.MakeFeatureLayer_management( fc,r"in_memory\temp_of")
        arcpy.TraceGeometricNetwork_management(geomnet, r"in_memory\outNet",r"in_memory\temp_of" , "TRACE_UPSTREAM", "", "", "","", "", "NO_TRACE_ENDS", "NO_TRACE_INDETERMINATE_FLOW", "", "", "AS_IS", "", "", "", "AS_IS")
        for layer in arcpy.mapping.Layer(r"in_memory\outNet"):
            try:
                print arcpy.mapping.ListLayers(layer)
                calc = str('"%s"' %ID)
                arcpy.CalculateField_management (layer, fieldname, calc,"","")
            except:
                print arcpy.GetMessages()

    except:
        print arcpy.GetMessages()

Cross-posted to Stack Overflow, too.


texts: Export curved text labels and lines to SVG in QGIS?

texts:
I try to export a map to SVG in QGIS. The print composer looks like this:

when I open the exported SVG in Illustrator it looks like this:

Now I have 2 problems.

The geometries obiously look very strange and I can't figure out why.
SVG from QGIS to Illustrator CC gets wrong stroke widths (kind of a solution)

The exported labels are NOT text objects. Within the
placement-properties of the labels I checked "curved". Without the
"curved" I get text objects, but that does not help me. I need those
labels curved. Are curved labels AND text objects even possible?

I have read a lot of QGIS / SVG questions and it seems that the SVG export of QGIS is a pure mess. Is this the case or am I doing something wrong? (Exporting lines and labels can't be so hard.)


texts:
I'm just taking a stab at QGIS Cloud to investigate it for a potential client, and I am pleased with the functionality of the web-viewer based on the sample maps. Although I cannot upload my own data.

While attempting to upload a very small layer (3 points) I keep recieving the same error message and I was hoping someone on here may be able to elaborate on what may be the problem.


texts: I am very new to QGIS. I am working from work so there is extra security which is why I think I have problems accessing OpenLayers plugins. The only one that seems to load is Google Maps. Google maps has too many features. I really just need the outlines to some northwest states.  Ideas? recommendations?


texts: Convert Whitebox .dep to ArcMap DEM .tiff?

texts:
I am having difficulty converting my whitebox raster float file to an ArcGIS raster file in ArcMap 10.2.1

I followed the protocol outlined at: http://www.uoguelph.ca/~hydrogeo/Whitebox/Help/ExportArcGrid.html

And although the conversion worked, the maximum elevation raster value decreased by 27m (max:690 to max:663m).

What could have caused this?

Is there any other way to convert whitebox float raster files to ArcGIS integer raster files?

Has anyone else had this problem before?


texts: How to calculate the raster statistics with polygon layer using numpy and scipy in python?

texts:
I have used zonal statistics from processing to calculate the raster statastics with polygon layer.

processing.runalg('qgis:zonalstatistics', rlayersource, 1, vlayer, None, True, Path)

But this is taking more time if the no of polygon blocks are more. So i found that we can use  numpy and scipy to calculate the statistics of the raster.

How can i do that?


texts: Setting a scale range for labels in KML files

texts:
Is there a way for labels to be displayed in KML only when zoomed in (or out) beyond a certain scale range, just as it is possible in ArcGIS?

If exporting to KML from ArcGIS, I guess the first step is to label the features before exporting (correct me if I'm wrong).

How does one set a scale range for a KML file?


texts: Getting the name of the mxd using python

texts:
I have a python script which reads through all the mxd's in a folder and changes their properties from relative file paths to absolute file paths.

I now want to add a bit to the script to change the version of the mxd from 10.1 to 10.0.

I want the 10.0 mxd to be saved into a pre-defined folder.

The new mxd should have the same name as the original mxd.  This is the bit I'm struggling with.

How do I get the name of the original mxd? (defined as basename in the code below).
I'm assuming I need to use an arcpy.mapping function, but I'm completely stumped.

import arcpy, os
#workspace to search for MXDs
Workspace = r"C:\Testing\ImageMapperReplacement\LRM157"
arcpy.env.workspace = Workspace
#list map documents in folder
mxdList = arcpy.ListFiles("*.mxd")
#set relative path setting for each MXD in list.
for file in mxdList:
#set map document to change
filePath = os.path.join(Workspace, file)
mxd = arcpy.mapping.MapDocument(filePath)
#Get the file name
basename = ??????
#set relative paths property
mxd.relativePaths = False
#save map doucment change
mxd.saveACopy (r"C:\Testing\ImageMapperReplacement\LRM157\mxd2\\" + basename + ".mxd", {10.0})


texts: Why is Label Placement Menu Different with Additional Data Frame in ArcMap?

texts:
This is the first time I've tried using multiple data frames in layout view of ArcMap 10.3.1.

I'm trying to label some counties, but the label placement options menu in this additional data frame is different with many, many fewer options than in the original data frame. I want to do a boundary placement in the new data frame, but there are zero options for doing so. What is happening here? I can't seem to find any info on here or through googling it.

This is the menu I get in the original data frame:

This is the one I get with the new data frame:


texts:
I'm using QlistView to show my names of departement in the studied area after using the 'extract by location' processus:

# res=QgsVectorLayer()
    # capture  département inside the studied area :
    res = processing.runalg('qgis:extractbylocation', departementLayer, layerZone, u'intersects', 0, None)
    # Créer une couche vector issue de l'extraction des départements dans la zone
 departementLayer = QgsVectorLayer(res['OUTPUT'], "Departement(s) dans la zone d'etude","ogr")
    features = ObjectifVilleExtract.departementLayer.getFeatures()
    model3 = QStandardItemModel()
    for feature in features:
        item = QStandardItem(feature['name_dept'])
        item.setCheckable(True)
        .model3.appendRow(item)
        self.dlg.listView.setModel(.model3)

Now I would like to show the code for each departement . I know that I can't use "listview" but I have to use 'Qtableview'. How can I do that?


texts: Modis Reprojection Tool mirror or download alternative?

texts:
I need to convert and reproject a complete archive of MODIS *.hdf data.

NASA's Modis Reprojection Tool is literally designed for this, and I even have an old script from the last time I performed this task on this very archive.  However, I can't download the MRT right now because the US Government Shutdown has shut down the download site:

  https://lpdaac.usgs.gov/tools/modis_reprojection_tool

  The requested service is temporarily unavailable. It is either overloaded or under maintenance. Please try later.

Does anyone know an alternate repository where I can download the Linux64 (or 32..) source files or .deb for the MRT?


texts:
I'm a complete GIS newbie so sorry if I'm using the wrong terminology in searching for a solution to this... I'm trying to import a DEM into PostGIS and display it in QGIS. The data is from the EU-DEM and I imported into PostGIS with:

raster2pgsql -s 3035 -t 200x200 -I -d "$TIF_FILE" public.eudem | psql -d postgis

When I try to add this table to QGIS (Add PostGIS Layers...) it seems to have no geometry associated with it.

The GeoTIFF file itself loads directly into QGIS fine, is georeferenced fine, and the CRS is detected correctly etc. PostGIS is set up correctly and connecting to QGIS correctly and I have vector data from shapefiles in it showing in QGIS successfully (and showing overlaid onto the raster DEM loaded when directly into QGIS). But I want to move the raster data into PostGIS. What am I missing? Thanks!

Edit: sorry should have mentioned versions: QGIS 2.2.0-Valmiera, compiled with GDAL 1.11.0, and PostGIS 2.1.2 on Postgres 9.3.4, all built from source using homebrew on OS X.


texts: Is .asc supported raster data source for QGIS?

texts:
I am new using QGIS and struggling with this error "...... .asc is not a supported raster data source" when trying to add a ."asc" file as a raster.

I downloaded the files from http://www.geog.mcgill.ca/landuse/pub/Data/175crops2000/ArcASCII-Zip/

I tried Layer: Add Raster Layer, and also Raster: Conversion: Translate (convert format)
but neither recognized the .asc


texts: Adding fields to temporary layer using PyQGIS?

texts:
I want to add some fields in a temporary layer in order to use it in another process.

What I tried to do is below :

    shp_result = processing.run(
        'native:pixelstopoints',
        {
            'INPUT_RASTER': raster_redim['OUTPUT'],
            'RASTER_BAND': 1,
            'FIELD_NAME': 'VALUE',
            'OUTPUT': 'TEMPORARY_OUTPUT'
        },
        is_child_algorithm=True,
        context=context,
        feedback=feedback)

    # On ajoute 2 autres champs pour contenir les coordonnées X, Y
    # du point de cours d'eau associé au point d'intérêt
    self.maCouche = QgsVectorLayer(shp_result['OUTPUT'], self.nom[0], 'ogr')

    prov = self.maCouche.dataProvider()
    prov.addAttributes([QgsField("X", QVariant.Double)])
    prov.addAttributes([QgsField("Y", QVariant.Double)])
    self.maCouche.updateFields()

    dist_fNul = processing.run(
        'grass7:v.distance',
        {
            'from': self.maCouche.source(),
            'from_type':[0,1,3],
            'to': parameters[self.MASK],
            'to_type':[0,1,3],
            'dmax':-1,
            'dmin':-1,
            'upload':[1,2,3],
            'column':['VALUE', 'X', 'Y'],
            'to_column':None,
            'from_output': parameters[self.OUTPUT],
            'output':'TEMPORARY_OUTPUT',
            'GRASS_REGION_PARAMETER':None,
            'GRASS_SNAP_TOLERANCE_PARAMETER':-1,
            'GRASS_MIN_AREA_PARAMETER':0.0001,
            'GRASS_OUTPUT_TYPE_PARAMETER':0,
            'GRASS_VECTOR_DSCO':'',
            'GRASS_VECTOR_LCO':'',
            'GRASS_VECTOR_EXPORT_NOCAT':False
        },
        is_child_algorithm=True,
        context=context,
        feedback=feedback
        )

But the final result is not what I expect : only the 'VALUE' field is created instead of giving me tree fields 'VALUE', 'X', 'Y' (in dist_fNul).


texts: Image footprint in Landsat mosaic using GDAL?

texts:
I need to produce a Landsat mosaic over part of Indonesia and an extra shapefile containing the dates of each part of the mosaic.

The steps I used are:

Stack 3 bands to produce RGB image
Project images into WGS84 (gdalwarp)
Build a virtual stack (mosaic, in this case) using gdalbuildvrt.

How can I produce polygons shapefile that contains the the footprint of each Landsat image within the mosaic (hence the date)?


texts: Using arcpy.UpdateCursor to delete rows does not delete based on counter?

texts:
I am trying to delete rows from a shapefile using arcpy.UpdateCursor.  The first thing I did was get a unique list of values from the key field "PolyGUID", then I iterate that list doing a arcpy.UpdateCursor.  When inside the cursor I set a counter x=0 then for each record I increment +1.  The deleteRow doesn't seem to happen after the second record is deleted.  Is the object returned by the UpdateCursor not able to operate in this manner?  Here's the code..

import arcpy
from arcpy import env

outPointFromPoint = r"C:\Trash\Nov2011\ResFinalC6.shp"
sql = " \"PolyGUID\" <> ''"
ocur = arcpy.SearchCursor(outPointFromPoint, sql)
listDelete = []
for oc in ocur:
    if oc.PolyGUID not in listDelete:
        listDelete.append(oc.PolyGUID)
print len(listDelete)

del oc, ocur, x, sql
for lD in listDelete:
    sql2 = " \"PolyGUID\" = " + "'" + str(lD) + "'"
    upcur = arcpy.UpdateCursor(outPointFromPoint, sql2, "", "", "FMEAS2 A")
    x=0
    for upc in upcur:
        x=x+1
        print upc.FMEAS2
        #print x
        if x==1:
            print x
        else:
            print "--------------------------" + str(x)
            print "Deleting: " + str(upc.PolyGUID) + str(upc.FMEAS2)
            upcur.deleteRow(upc)
del sql2, upc, upcur, x, lD, listDelete

The PolyGUIDs come from a polygon fc.  Having the polygon guid in the fc, ResFinalC6.shp, means that during a LocateFeatureAlongARoute operation.. the record from the polygon had one or more than one resultant record.  I need to get rid of the any other records if the result was more than one record.  A polygon record intersected the route in more than one place (three times for the problem records). The outcome results in a field displaying the m-value where the intersect occurred.  So what I did was for each unique value in PolyGUID get a UpdateCursor..sort the field that holds the M-value (because I need the record with the lowest m-value) and use the x counter to delete those PolyGUIDs that resulted in more than one record (all except the one with the lowest m-value..which is why I did the sort on the UpdateCursor) resulting from the query with the UpdateCursor.

The issue is that after the cursor has gone through record 1 and set x=1..then to record 2 and set x=2 and then delete record 2..the script gets to those PolyGUIDs that show up three times..my print statement gets hit and x gets set to x=3 but the record doesn't get deleted.  I have ran this numerous times and it's always the same PolyGUIDs left and they all show up three times before the delete tries.  In the python shell window where the printing happens the record 3 gets cursed but no delete.


texts: Point/Feature to Raster-unwanted Grid of missing Data raster Cells-ArcGIS10.5

texts:
I tried to convert some point data (points on a regular grid of 100m by 100m) with the Feature to Raster Tool and the Point to Raster Tool (Rastersize of 100m) but in the resulting Rasterfile there is some kind of Grid of Rasters with Missing Values:

If I use the same tools with a resulting Rastersize of 200m ,it works perfectly fine.

Any suggestions what might be the reason and how to solve this, so I can convert the points into rasters of 100m ?

Additional information that might be a hint:
If you compare the position of the original points with the resulting raster cells, i can see that the closer the resulting raster cell is to the Grid of Rasters with Missing Values, the more the position of the original point is shifting towards the limitation of the resulting raster cell-please compare upper left raster and point with lower right:

Sorry for the different colors of the same problematic layers.


texts: ERROR 000840: The value is not a Raster|Raster Catalog|Mosaic Layer from arcpy.AddJoin_management()?

texts:
I am doing some arcpy -functions and afterwards I'm trying to add the calculated results from one table to another table. I'm using the arcpy.AddJoin_management() function.

As input table I'm using a table which is stored in a personal geodatabase. The personal geodatabase is not the workspace environment! As "JoinTable" a Table of a file geodatabase is used. This file geodatabase is the workspace geodatabase environment.

The initialized function looks like this:

(%self.getWorkspaceEnvironment => "W:/a18fb/data/mypersonalgeodatabase.mdb" and tFactsheetHochwasser => table in the personal geodatabase)

arcpy.AddJoin_management("%s/tFactsheetHochwasser"%self.getWorkspaceEnvironment(),"KPG",
"GebaeudeKtn_BWVred1Stat","KPG","KEEP_ALL")

If the code is executed the following error-message appears:

Failed to execute.Parameters are not valid.
The value cannot be a table

  ERROR 000840: The value is not a Raster Layer.

  ERROR 000840: The value is not a Raster Catalog Layer.

  ERROR 000840: The value is not a Mosaic Layer.

  Failed to execute (AddJoin)`.


texts: ArcGIS Pro Publishing gives Error 00079 (Cache spatial reference does not match)?

texts:
Error 00079 also came up in Map Publishing in ArcGIS Pro gives errors 00216 and 00230?, where this issue was found together with two other error codes. However, there seems to have been no resolution for this particular error code.

For my map, I am using the projected coordinate system "RD New". Now i'm trying to publish the map to my organisations ArcGIS online portal. Even though all environments, layers and the map itself have been set to the same coordinate system, the problem persists. I have also tried clearing the cache for the map and its layers, but to no avail.

Has anyone found a solution for this?


texts: Transform map coordinates to page coordinate in ArcObjects

texts:
I have a map inside a page layout in ArcMap.
Currently, I use this code to convert geographic coordinates to page coordinates:

    IMap map = ...
IPageLayout pageLayout = ...

IDisplayTransformation mapTransformation = ((IActiveView)map).getScreenDisplay().getDisplayTransformation();
IDisplayTransformation pageTransformation = ((IActiveView)pageLayout).getScreenDisplay().getDisplayTransformation();

IPoint mapPoint = ...

int x[] = {0};
int y[] = {0};
mapTransformation.fromMapPoint(mapPoint, x, y);
IPoint pagePoint = pageTransformation.toMapPoint(x[0], y[0]);

For example, if mapPoint = 913767.624037, 6458100.4284 (in meters)

I get:
x[0], y[0] = 18, -2

Then: pagePoint = 18.0, 2.0 (in centimeters

The problem is that x[0], y[0] are intergers as the method IDisplayTransformation.fromMapPoint return integers (for device pixels). Their values are corrects but they are rounded. I would expect for this example a pagePoint = 18.42 cm, 2.19 cm

What's wrong in my conversion method?
Is there an other way to make this conversion with more precision?


texts: Adding Values From List To specific Column In Layer using PyQGIS?

texts:
I'm trying to develop a plugin in QGIS 3.0, and I'm stuck.

A major component of my plugin is the ability to append a list of composite values as a new column to the vector layer of focus.

How do I add the values from a list to a specific column in a layer, with PYQGIS?

I've tried the following, but the column came back as empty.

    # List In Focus
    composite_list = [1,2,3,4,5,6,7,8,9,10]

    # Reference The Vector Layer In Focus
    lyrOutput = QgsVectorLayer(file_path, name + "_", "ogr")
    provider = lyrOutput.dataProvider()

    # Add A new Column To The Vector File
    provider.addAttributes([QgsField("Composite", QVariant.Double)])
    lyrOutput.updateFields()

    # Add Data To Composite Field
    comp_index = lyrOutput.fieldNameIndex('Composite')
    idx = comp_index
    lyrOutput.startEditing()

    for comp in lyrOutput.getFeature():
        lyrOutput.changeAttributeValue(comp.id(), idx, composite_list[0])
    lyrOutput.commitChanges()


texts: Indenting subitems in QGIS Composer legend?

texts:
My legend looks like this:

I would like the items under "Roads & Trails" to be indented to the right.
Likewise for the items under "Streams".

The spacing controls don't affect this. I could add spaces/tabs to the test, but the symbol would still be left-justified.


texts: Using PyQGIS, how do you project a shapefile from EPSG:4326 to 3857?

texts: I downloaded a few shapefiles but they're in EPSG:4326 and I need them in EPSG:3857. Is there a way to convert/save these files using PyQGIS?


texts: "difference" between two rasters using raster calculator QGIS

texts:
I am struggling to find the right equation to use in the raster calculator to achieve my desired result.
Essentially, I have two rasters, with an overlapping portion. See img below:

I want to only keep the grayscale raster in the areas where the colored raster does not overlap, similar to a vector difference.
I am trying to make a combined DEM for the area, but want to have the colored raster and the "clipped" grayscale raster as separate files.
Can anyone help me with the raster calculator equation I should use to only keep the grayscale raster where the other doesnt overlap?
Or any other method that would work?


texts: getting "TypeError :bounds is null" in firebug

texts:
i've got something error when I run my code in firebug..

here this code :

<script type="text/javascript" src="OpenLayers.js"></script>

        <?php
            mysql_connect("localhost", "root", "") or die("koneksi gagal");
            mysql_select_db("jogja") or die ("database tidak bisa dibuka");

                $query="SELECT * FROM jogja ORDER BY idkab";
                $result= mysql_query($query);

                $value=array();
                $kab=array();

                while($data=mysql_fetch_array($result))
                {
                    $value[$data["idkab"]] = $data["value"];
                    $kab[$data["idkab"]] = $data["kab"];
                }

                $bataskelas = array(0, 500, 1000, 2000);
                $warnakelas = array("#EEFFFF", "#6DD5FF", "#19A3FF", "#0048FF");
    ?>

        <script type="text/javascript">

            var map;
            var jogja;
            var data = <?php echo json_encode($value); ?>;
            var kab = <?php echo json_encode($kab); ?>;
            var batas = <?php echo json_encode($bataskelas); ?>;
            var warna = <?php echo json_encode($warnakelas); ?>;

        function init(){
            map = new OpenLayers.Map('map',{
            controls: [
                new OpenLayers.Control.Navigation(),
                new OpenLayers.Control.PanZoom(),
                new OpenLayers.Control.ScaleLine(),
                new OpenLayers.Control.MousePosition(),
            ]});

            var context = {
                getColor: function(feature){
                var id = feature.attributes.IDKAB;
                var val=data[id];
                var color = "white";

                var i =0;
                while(i < batas.length-1){
                    if (val < batas[i+1]){
                        color = warna[i];
                        break;
                    }
                    i++;
                }
                    if (val !=null && color == "white"){
                        color = warna[batas.length-1];
                    }
                    return color;
                },

                getLabel: function (feature){
                    return wilayah[feature.attributes.IDKAB];
                }
            };

            var template = {
                strokeColor: "#808080",
                strokeWidth: 1,
                graphicZIndex: 1,
                fillColor: "${getColor}",
                label: "${getLabel}",
                labelAlign: "cm"

            };

            var style = new OpenLayers.Style(template, {context: context});
            var myStyle = new OpenLayers.StyleMap(style);

            jogja = new OpenLayers.Layer.GML ("GML", "gml/jogja.gml", {
                        isBaseLayer: true, styleMap: myStyle});

            jogja.events.on({'loadend': onLoadEnd});

            map.addLayer(jogja);
            map.zoomToMaxExtent();

        }
        function onLoadEnd(){
            var ext = jogja.getDataExtent();
            map.zoomToExtent(ext,false);
        }

    </script>

and here screenshot error :

what should I do to avoiding this error?? because of this error the map don't show out..

-thanks for answering-


texts: Configuring results from STCentroid select statement?

texts:
Is it possible to configure the results from a STCentroid select statement?

If I run a select statement at the minute, I will get overly precise responses
     i.e. POINT (399419.42500005924 90290.17500002397)
I just need to grab the numbers before the decimal, I don't need the detail provided.


texts: Cannot see PostgreSQL-tables in QGIS as a 'non' super user

texts:
I have established a connection between QGIS and PostgreSQL. As long as the active user has the 'Super User'check-box enabled, all works well. From the moment I disable it only the Schema's remain visible. The layers are gone.
I searched the Internet but can't find any solution.

PostgreSQL 11 /
PostGIS 2.5 /
QGIS 3.4.1 /
Windows 10 (home edition)


texts: How is width commonly defined for areal features?

texts:
Map generalization guidelines, for instance applicable to CORINE Land Cover or Polish BDOO databases state inclusion criteria for areal features like "area should be > 250 000 m^2 and width should be >125 m". How is such width defined? Obviously for curved areas such as vegetation touching rivers (as in BDOO which treats it as a special condition) one may imagine that simple methods related to geometric axes would break down due to meandering.
The fact that these constraints are stated without definition leads me to believe there are established methods of width measurements for polygons, is it so?


texts: Setting up and displaying many-to-many relationships with CartoDB

texts:
I have to display many-to-many relationships between offices and sub-offices for a client. Each office manages many sub-offices, each sub-office can be managed by many offices. The client is requesting the work to be done in CartoDB's online platform so they can easily make changes to it if necessary.

What I'd like to do is create a boundary line, with each office's coordinates as the centrum point, and the line to go around each sub-office. I'll use this to show overlaps.

It's been a few years since I've used any GIS software, and when I did it was QGIS or ArcGIS, mostly through the GUI. Conceptually I'm not sure where to get started. At the moment I have two data files, offices with coordinates, name, and sub-offices covered, and sub-offices with coordinates and names.


texts: Making "heatmap" based on point value not point density using ArcGIS Pro

texts:
I have a CSV file containing readings of dissolved oxygen at various points along an estuary.
I would like to make a layer displaying these results, where the colour (e.g., dark blue for high O2 light blue for low O2) is a gradient between all of the points.
The effect I imagine is similar to a heatmap, but based solely on the point value, and should gradate between points based on they're respective values.
Is there a way to do this?


texts: Updating data from external table in real time using QGIS?

texts:
I have been trying for a long time to connect a external table data[csv] through Excel (for exmaple) with QGis with the objective to each time i change any data in table(for example data location - coordinates [X ; Y]),this changes occur in QGis real time.

Is there any procedure to get it?.


texts: Setting correct project CRS and creating vector file

texts:
I seem to be having difficulties in setting a project CRS in QGIS.
I create a new project, then import a csv points file.  The CRS defaults to WSG 84.  Then I set the layer CRS to British National Grid, and repeat this for the Project CRS.  Then save the project.  Am I doing this right?
When I try to save the points file as a MapInfo tab file (to create a vector file), I get the message that the file could not be created - fault in OGR?

I notice the problem comes to light when I create distance buffers of the points - the distance buffers seem aligned to a WSG 84 projection, they do not look right.


texts: Clipping two shapefiles results in missing features in QGIS?

texts:
I want to clip a shapefile to fit another and when I do parts of my map end up missing.

Any thoughts?
(Clipping census shapefile (blue) to a custom shapefile (grey))


texts: Linking to a particular focus and zoom in Google My Maps

texts: I have a Google My Map which lists places in the US. By default, the map zooms to the full US to include all places. I'd like to be able to link to specific focus/zoom levels (e.g. just places in NYC), but the URL doesn't change when I change focus in the UI. Is there any way to hack the URLs to do this?


texts: Poor rendering performance in ArcGIS Server tiled map service and crashes logged?

texts:
I have a number of map services in ArcGIS Server (10.1, running on 64-bit Windows Server 2008 R2) and only one of them is cached.

Caching is configured on-demand as there's no way I can store the full tile set on disk. Also many of the tiles would be empty as my dataset is quite sparse.

Features are only shown when zoomed quite far into the map, which means the service can go some time without being hit (requests are made from ArcGIS JavaScript API v3.2 which doesn't request a tile unless the user is within the visible range).

After a period of inactivity (I'm not sure how much) the first hit to the tile service takes a long time to respond. I can't say for sure if this only happens when generating a new tile on demand, when loading an existing tile, or both. The delay itself is annoying but it's also accompanied by an error in the AGS logs:

[Severe] Services containing process crashed. MapServiceName.MapServer instance has crashed

The logs provide no more information, and performance picks up after the initial crash.

The map service's data source is a pair of File GeoDatabases, both are registered with the server, both are in EPSG:4326 and output in EPSG:3857 in line with the ESRI base map. Features are very simple (all polygons, usually four-sided shapes) and don't seem to have any geometry problems. The cache disk is nowhere near full and I haven't previously encountered any permissions issues with any of the AGS accounts.

Can anyone suggest why the service might be crashing, why performance might be slow (if not connected to the crash), and where I might want to take my investigation?


texts: Getting Python script tool to take list of variables

texts:
I am looking at making a Python script tool that requires the user to input a series of attributes into a list, which is then used to build a query, to select multiple polygons (i.e. "abc, 123"; "def, 456").
I understand how to script this, but how do I get the script tool to take the arguments?


texts:
I'm having trouble when trying to upload a shape file in postgresql/PostGIS.
There's a field with type "date", but actually there'r two elements with content : '20012060' and it returns ERROR when I start shp2pgsql.
Is there any way to change all fields from dbf to character varying, using shp2pgsql or any other extension from PostGIS?


texts: Georeferencing 3D model or 3D buildings?

texts:
I am working on a 3D project so I have to georeference 3D buildings which are created by 3D designer.

Does anyone know the solution?


texts: Picking points in a specific distance interval

texts:
I have a line of points in .shp file and the distance of the points varies. There can be 20 points in same place and then the distance can be something between 1 to 25 meters.

How can I pick points from the line every approx. 10m or 20 or 25 meters, so that
instead of cluster of 10000 points in one line I would have a nice line with 1000 points every 20 meters?


texts: Requesting a shapefile from geoserver and displaying it on a website that runs openlayers

texts:
So I've taken over a project from two other programmers as a part of my internship and I'm having a little trouble pinpointing why a part of it isn't working properly.

The website itself is a very simple bland site with an openlayers map and three buttons. One button is linked to geoserver, where I can fill in the name of the shapefile (*.shp) that I want to load and then it should load the shapefile data onto the openlayers map. The previous interns had this working on localhost and I've also set it up like that, but I still feel like it's a problem with my geoserver-setup rather than a problem with the file path.

My main question is whether it's possible to place a shapefile in the geoserver map > data_dir > data directory and if Geoserver is able to provide it just like that through the GetMap command of the Geoserver Get Map Service. Or whether I specifically have to add every shapefile manually, as described here: http://docs.geoserver.org/stable/en/user/gettingstarted/shapefile-quickstart/index.html

Adding the shapefile manually seems to require me to create a workspace, store & layer for each shapefile. Another problem I run into when I try this approach is that only the shapefile from the tutorial can be added without running into errors. And I can't load the shapefiles I provide by myself. The previous interns (who did not document how they did it) did manage to get it working, so I'm sure the shapefile itself isn't corrupt.

Steps in which I've added the shapefile to GeoServer:

I've probably added the new workspace correctly:

I've probably also added the new store correctly:

Adding a new Layer is where I believe I'm making a mistake:

I'm not 100% sure that the lon/lat generated from the Declared SRS are the right ones, but when I check it's coordinates it seems to check-out. I need the bounding box of the sea-area (Wadden Sea) in between Northwestern-Holland and the islands.

I also do not know if I picked the right style in the publish tab of the layer.

Anyway, when I preview the layer, I'm supposed to see something similar to the preview in the tutorial, yet what I see is this.

Please help, I have no clue what I'm doing wrong and usually I would second-guess the shapefile itself, but this is the only one I have of this bounding box area and it's the only area I am restricted to look at.

UPDATE:

I've managed to get it to work and the reason this was so difficult was because there were two problems causing this.

The first problem was that I was somehow supplied with a faulty shapefile and as soon as I was given an updated version of it, I was instantly able to display it through the layer preview option in Geoserver.

The second problem was that the coordinates of the Lat/Lon Bounding Box that were automatically computed from native bounds were switched around. So X min and max needed to be moved to Y and Y needed to be moved to X. And this allowed me to display the shapefile in my openlayers web application.


texts:
I am a graduate student in remote sensing studying soil erosion.
  I'm very new to GRASS GIS software. I don't want to use North Carolina data.
I also read the software homepage. Do you have any information on building watershed and getting RUSLE 3D parameters? How do I validate this parameter?


texts:
Just a small disclaimer: I don't have any background in cartography, hence I might have missed the answer to my question in search just because I didn't even know the keywords to look for.

So, I am using R to plot statistical data on maps. It was all fine and understandable when all of the materials came in same units of measurments (lon/lat in form of decimal degrees or degrees/minutes/seconds which have obvious and easy conversion).

So what I have encountered - doing routine fortify(shapeMap) to plot data with ggplot2 yields dataframe with values:

    long    lat order   hole    piece   group   id
1   563656.6    373826.0    1   FALSE   1   0.1 0
2   563864.6    373664.3    2   FALSE   1   0.1 0
3   564272.9    373895.4    3   FALSE   1   0.1 0
4   564491.6    373805.5    4   FALSE   1   0.1 0
5   565151.1    372709.0    5   FALSE   1   0.1 0
6   565328.3    372347.0    6   FALSE   1   0.1 0

...

As far as I understand that this is UTM coordinate system. And hence the question - is there an easy way to convert these coordinates to decimal degrees? I have dug through quite a few materials and online convertors but I can't really seem to get the expected result.

Just for reference - shapefile coordinates above should be somewhere in Latvia. And Latvia is split among 3 UTM grid cells: 34V; 35V and 35U (if that is relevant at all).

Update: I have found out that coordinates are in LKS92 system. Hence now there is a clear objective. Convert LKS92 to WGS84. Guess now it is up to figuring out spTransform() function from rgdal package. Unfortunately it is not an obvious function with "from" and "to" arguments. Or at least at first glance.

Update2: Reference for those that will encounter the same problem:

You have to be sure what coordinate system you want to conver from/into. In my case I found out it was LKS92.
Find specific parameters for the coordinate system on spatialreference.org. In my case parameters look like "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=-6000000 +ellps=GRS80 +units=m +no_defs". Not that these are parameters for coordinate system FROM which I want to convert. If this is not WGS84 then you will want another parameter string for target coordinate system.
R package proj4 has function project(). An example of LKS92 -> WGS84 conversion:

xy <- cbind(c(508148.442), c(319423.294))
project(xy, "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=-6000000 +ellps=GRS80 +units=m +no_defs", inverse = T)

        [,1]     [,2]
[1,] 24.1342 57.01823

Note the inverse=T which means convert to WGS84. Making inverse = F suggests that input coordinates are in WGS84 format.

Another small update:

To convert whole shapefile you would still need rgdal package:

proj4string(shapeMap) <- CRS("+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=-6000000 +ellps=GRS80 +units=m +no_defs")
shapeMap <- spTransform(shapeMap, CRS("+proj=longlat"))

First line defines the CRS of shapefile, second line tells what CRS to transform into.


texts: Can't clip point shapefile with missing attribute data

texts:
I am having trouble clipping a point shapefile to with a polygon shapefile in QGIS 2.18.2. I was able to clip a point shapefile from a different source successfully (using the same polygon) so I think the point shapefile is the issue. I also tried the intersect tool but both provided the same message in the log:

"Algorithm clip starting...

1004 See log for details"

The presumably problematic data was downloaded as a KML file from:

http://ucjeps.berkeley.edu/cgi-bin/get_consort.pl?county=&source=&taxon_name=camissonia%20campestris&collector=&aid=&year=&month=&day=&loc=&coll_num=&max_rec=2000&make_tax_list=&before_after=&last_comments=&VV=&non_native=0&geo_only=&geo_no=&CNPS_listed=0&weed=0&sugg_loc=&tns=&lo_e=&hi_e=&YF=0&VTM=0&baja=0&georef_only=1

One difference that is apparent between the two shapefiles is that the one that works has a normal, complete attribute table, while the problem shapefile has an attribute table that looks like this:

I converted the file to shapefile in QGIS but both the KML and shapefile attribute tables look the same.

If this is the reason I can't clip this shapefile, is there is a way to get the KML file to show the attribute data properly?

If this issue can't be resolved for this file, the data can also be provided as a tab separated list, however, I am having issues getting this into a usable form (or I wouldn't be asking this question), so I will post a separate question to resolve that problem if necessary.


texts:
I'm trying to use gdal_rasterize inside MATLAB via UNIX or system MATLAB command

system('gdal_rasterize').

Despite this command working in my console terminal, I get the following error inside MATLAB:

  gdal_rasterize: symbol lookup error: /usr/lib/libgdal.so.1: undefined symbol: pj_ctx_alloc


texts:
I have few codes that count number of pixels in different classes in GEE, and then calc the precentage of them using the total number of pixels that were count. The code seems to work, but when I check the results, I find out that it never count all the pixels.
for example, here is the results of raster that has only  3 possible class values- high, mean and low.

If you sum all the count, you don't get to the total count numner (338+598+771 =1707, not 1789), and then ,also when I calc precentage I never get to 100%.

I believe it's result of the way that GEE works with polygon that on the border (e.g takes only "whole" pixels), but is there any way to change it and to make it count all of the pixels?

My end goal: when I calculate precentage, to get to 100%.

Edit: link to sample code which  has the same problem:
https://code.earthengine.google.com/761d16596d243e9bc0d053fa84fa2c66


texts: Finding distance of line segment considering elevation in QGIS?

texts:
Normal distance can be easily computed in QGIS. But how can I do it for a line feature in 3d space, simply saying how to to find the line's distance noting its elevation.
For example, if a polyline feature represents a mountain then how to find distance from one end to another end with respect to Elevation?