texts:
I am selecting the following to remove NULL values from a selection, but unable to remove BLANK values from the selection. Would selecting BLANK values only be done by using a string length of 0?  I do not want any field that is BLANK, NULL, or a email in my selection, because I am trying to move all fields with comments or websites into another field named comments.

arcpy.SelectLayerByAttribute_management("contacts", "NEW_SELECTION", "Contact_Email IS NOT NULL" )


texts: GeoServer SLD How to Rotate Group of PointSymbolizers

texts:
Is it possible to group several PointSymbolizers and rotate them all as a group?

Imagine that I have a rule such that for each point I have three small circles, the first offset along the y-axis so that it renders slightly below the point location, and the other two slightly below and to the left and right respectively. That is, the three circles appear as a horizontal line of circles below the location.

Depending on a 'heading' value, I want to rotate them as a group. Eg, given a heading of 90 degrees, I want the first circle to appear offset to the left (along x-axis this time), and the other two also to the left and up/down respectively. That is, the three circles now appear as a vertical line of circles to the left of the location.

I know I can rotate each symbolizer around itself, but I'm trying to rotate the whole group. If this is not possible, I'd have to use trigonometry to calculate the x/y offsets for each of them, plus rotate them around themselves.

Any ideas?

Below is a rule that will put a white dot at the location, and three dots below it. I would like to group these four dots and rotate them around the location (ie the white dot). Is that possible via markup?

I've managed to do it by calculating the offset values using functions ('cos', 'sin'), but it gets quite verbose and if there's a way to group markers and specify a single rotation angle, that would be neater.

    <Rule>
      <PointSymbolizer>
        <Graphic>
          <Mark>
            <WellKnownName>circle</WellKnownName>
            <Fill>
              <CssParameter name="fill">#ffffff</CssParameter>
            </Fill>
          </Mark>
          <Size>4</Size>
        </Graphic>
      </PointSymbolizer>
      <PointSymbolizer>
        <Geometry>
          <ogc:Function name="offset">
            <ogc:PropertyName>geo_pnt</ogc:PropertyName>
            <ogc:Literal>-0.000025</ogc:Literal>
            <ogc:Literal>-0.000025</ogc:Literal>
          </ogc:Function>
        </Geometry>
        <Graphic>
          <Mark>
            <WellKnownName>circle</WellKnownName>
            <Fill>
              <CssParameter name="fill">#ff0000</CssParameter>
            </Fill>
          </Mark>
          <Size>10</Size>
        </Graphic>
      </PointSymbolizer>
      <PointSymbolizer>
        <Geometry>
          <ogc:Function name="offset">
            <ogc:PropertyName>geo_pnt</ogc:PropertyName>
            <ogc:Literal>0</ogc:Literal>
            <ogc:Literal>-0.000025</ogc:Literal>
          </ogc:Function>
        </Geometry>
        <Graphic>
          <Mark>
            <WellKnownName>circle</WellKnownName>
            <Fill>
              <CssParameter name="fill">#00ff00</CssParameter>
            </Fill>
          </Mark>
          <Size>10</Size>
        </Graphic>
      </PointSymbolizer>
      <PointSymbolizer>
        <Geometry>
          <ogc:Function name="offset">
            <ogc:PropertyName>geo_pnt</ogc:PropertyName>
            <ogc:Literal>0.000025</ogc:Literal>
            <ogc:Literal>-0.000025</ogc:Literal>
          </ogc:Function>
        </Geometry>
        <Graphic>
          <Mark>
            <WellKnownName>circle</WellKnownName>
            <Fill>
              <CssParameter name="fill">#0000ff</CssParameter>
            </Fill>
          </Mark>
          <Size>10</Size>
        </Graphic>
      </PointSymbolizer>
    </Rule>


texts:
I have several gpx files of different routes that I want to join and then import to an route planner programm.

So far I have importet the gpx files to QGIS. After that I have converted them into shapefiles and then merged these shapefiles into one singel shapefile. Then I saved it as a gpx file.

The problem now is that if I import the gpx file to the route planner programm, it only importes one of the inital routes and not the whole joined route.

What did I do wrong?


texts: Spatial Overlay or Join with Ranking Logic?

texts:
I have two vector polygon files.
One is flood zones and the other is parcels.
I need to add the flood zone category to the parcel file, this is easy enough.
However, some of the parcels have multiple flood zones running through them.

I need to assign a rule/rank logic to the join so that if:

if: flood zone x is in parcel use this in the join

elif: zone VE is in parcel use this

elif: zone Ae is in parcel use this

else: return none

(that is my python logic) but it can be any sort of tool to accomplish this.
this is similar to the question HERE but I do not care about area percentages to determine which zone is being returned, I want a ranking system.


texts: Prepopulation of "Field" parameter if the field exist using ArcPy?

texts:
I have a python toolbox with a tool that takes two arguments. First parameter is GPFeatureLayer and the second is Field of Integer type. I would like to set the second parameter to a specific field if it exist within the layer but I am unable to figure out a way to do it correctly.

My code looks like this:

def getParameterInfo(self):
    param0 = arcpy.Parameter(
        displayName="Input lines",
        name="in_lines",
        datatype="GPFeatureLayer",
        parameterType="Required",
        direction="Input")
    param0.filter.list = ["Polyline"]

    param1 = arcpy.Parameter(
        displayName="ID source",
        name="in_id_source",
        datatype="Field",
        parameterType="Required",
        direction="Input")
    param1.filter.list = ["Integer"]
    param1.parameterDependencies = [param0.name]
params = [param0, param1]
return params

Later in the code I would like to set parameter 1 to field "OID_SOURCE" as a default value if it exists. However, the following code is not working:

def updateParameters(self, parameters):
    if parameters[0].value:
        fields = arcpy.Describe(parameters[0].valueAsText).fields
        index = None
        for i in range(0, len(fields)):
            if fields[i].name == "OID_SOURCE":
                index = i
        parameters[1].value = fields[index]
    return

This makes the parameter 1 always empty. I tried using this:

parameters[1].value = fields[index].name

But that yelds error "Invalid field type". I do understand why the version with "fields[index].name" is not working as I am trying to asssing String to a Field.

But I am wondering is there any way preset the the parameter with specific field if it exists?


texts:
We have been using ogr2ogr to export data from PostGIS into DXF. Using the default behaviour of the export, all data are put into layer '0'. We would put data into a layer name from the PG table name. It is not really clear if the correct solution is manipulating the header.dxf under the GDAL library or if this can be achieved by using some of the command line options from ogr2ogr.

Thanks for any input.

Rgs.

Ulrik


texts: Data refusing to line up with basemap after re-setting source for data

texts:
I've only been using GIS for a couple of months so this is probably just a really basic/novice problem but I cannot for the life of me fix it.

The other day I managed, with a lot of finagling, to create a map out of an Excel spreadsheet I had made with lat/long in DD and a generic basemap. For some reason the data was not lining up with the basemap and I can't remember how I got it to work in the end - mostly a lot of trial and error. Unfortunately I moved the Excel source so when I reopened it later it had the whole red exclamation mark deal next to the data. I re-set the source but now it's refusing to line up and I CANNOT fix it. I've tried everything I can think of, including starting completely over. The dataframe and Excel sheet layer have the same coordinate system and I added the basemap after defining the coordinate system for the dataframe. The data is showing up directly in the center of the Atlantic Ocean (it should spread from the west coast of US through Europe.)

Is there something obvious I'm missing?


texts: How to change character set in all columns of many tables in Postgresql / PostGIS?

texts:
I have inserted hundreds of tables (from shapefile format) in a Postgresql / Postgis database with the shp2pgsql tool. But because I have encoding issues, I want to change character set in all columns of every table from UTF-8 to ISO-8859-7.
How is it possible ?
Is it feasible with an ALTER TABLE sql statement in every table or it's a more complicated issue ?


texts: Difference between two Browser Panels in QGIS

texts: What is the difference between "Browser Panel" and "Browser (2) Panel" in "View > Panels" menu and in right clik menu?


texts: I've been learning to use TileMill, and I want to be able to copy a layer. I especially want to copy layers connecting to an SQLite or PostGIS database in order to avoid having to type in multiple inputs for each. It gets pretty tedious copying the same database and srs values multiple times. Is there a way to copy a layer?


texts: 10-digit number with leading digit higher than 1 throws an "out of range" error?

texts:
I'm working with some points in ArcMap 10.3 that have specified volumes, and I am plotting them so that the points have graduated symbols. Nothing particularly strenuous.

However, I noticed one of my largest observations, at just over 2,200,000,000, was nullified in the table.

When I went to change it from  to the correct input, it gave me the "the value you have entered is out of range or is not a whole number" error.

I can put in 2 billion, but not anything higher than that.

I don't know if this is related to the fact that the field type is currently set at "Long" or not, but I am trying to find the root of the issue.

Normally I would just exclude the point, but since it's one of the largest it really should be represented on the map.


texts: Geoserver secure layer assess issue via PHP proxy

texts:
I have a PHP script that sends request to geoserver layers. My layers are like this:

topp:layer_unsecured
topp:layer_secured

layer_unsecured is unsecured layer and layer_secured is secured.

I have created a PHP script:

private function execute($url, $returnheader, $timeout, $useragent, $httpheaders, $postfields)
{
    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, $returnheader);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
    curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheaders);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt ($ch, CURLOPT_ENCODING , "gzip, deflate");

    $result = array(
        "OUT"=>curl_exec($ch),
        "INF"=>curl_getinfo($ch),
        "ERR"=>curl_errno($ch)
    );

    curl_close($ch);

    return $result;
}

this script returns data if I send request to my unsecured layer with post data:

$post_data = array(
    'bbox'=>'1,2,3,4',
    'Format'=>'image/png',
    'request'=>'GetMap',
    'layers'=>'topp:layer_unsecured',
    'width'=>'256',
    'height'=>'256',
    'srs'=>'EPSG:4321'
);

this works fine.

But when I post data to secured layer with username and password not working:

    $post_data = array(
        'bbox'=>'1,2,3,4',
        'Format'=>'image/png',
        'request'=>'GetMap',
        'layers'=>'topp:layer_secured',
        'width'=>'256',
        'height'=>'256',
        'srs'=>'EPSG:4321',
        'username'=>'myuser',
        'password'=>'mypass'
    );

this not working.

Error code:

<ServiceExceptionReport version="1.3.0" xsi:schemaLocation="http://www.opengis.net/ogc http://10.2.3.35:8080/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd"><ServiceException code="LayerNotDefined" locator="layers">
      Could not find layer topp:layer_secured
</ServiceException></ServiceExceptionReport>


texts: wfs layer is displaying in ol3 but not in openlayers 2

texts:
I am working in openlayers 2.
I want to diaplay wfs layer in openlayers 2.
But it is not displaying.
When i tried the same in ol3 it is working fine.
But my whole project is in openlayers 2. So i want wfs layer in ol2.
Below is my code in both ol3 and ol2.
Please tell me where i am doing mistake

OL3

 <script>
        var formatWFS = new ol.format.WFS();

  var sourceWFS = new ol.source.Vector({
   loader: function (extent) {
    $.ajax('http://localhost:8080/geoserver/cite/wfs/ows', {
        type: 'GET',
        data: {
            service: 'WFS',
            version: '1.1.0',
            request: 'GetFeature',
            typename: 'AMBALA_sma',
            srsname: 'EPSG:3857',
            bbox: extent.join(',') + ',EPSG:3857'
        }
    }).done(function (response) {
        sourceWFS.addFeatures(formatWFS.readFeatures(response));
    });
},

strategy: ol.loadingstrategy.bbox,
projection: 'EPSG:3857'
});

var layerWFS = new ol.layer.Vector({
source: sourceWFS
  });

var map = new ol.Map({
target: 'map',
controls: [],
interactions: [

    new ol.interaction.MouseWheelZoom(),
    new ol.interaction.DragPan()
],
layers: [
    new ol.layer.Tile({
        source: new ol.source.OSM({
           // url: 'https://cartodb-basemaps-{a-d}.global.ssl.fastly.net/dark_nolabels/{z}/{x}/{y}.png',
           // opaque: false,
            attributions: []
        })
    }),
    layerWFS
],
view: new ol.View({
   center: [8561898.130561389, 3547876.863311305],
    zoom: 12
  })
 });

        </script>

OPENLAYERS 2  and geoext

 wfslayer = new OpenLayers.Layer.Vector("WFS", {

    strategies: [new OpenLayers.Strategy.BBOX()],
    protocol: new OpenLayers.Protocol.WFS({

        url: 'http://localhost:8080/geoserver/ows',

  featureType: 'AMBALA_sma',
  featureNS: 'http://www.opengeospatial.net/',
  srsName: 'EPSG:3857',
  geometryName: 'the_geom',
  version: '1.0.0',
   outputFormat: "json",
        readFormat: new OpenLayers.Format.GeoJSON()
    })
});
 mapPanel.map.addLayers([layerWFS]);


texts: How to extract nodes at regular interval using QGIS?

texts: How can I extract nodes at a regular interval say 20 m from a path kml file having point located at random interval.


texts: I have this local map that'd I'm trying to add a grid with decimal points. The internal grid won't show, also when I add the zebra frame the white parts only appear in the corners (as tiny squares). I can't figure out what I'm doing wrong.


texts: Auto populating field in attribute table, using several fields of record information from another table?

texts: I have an attribute table with one field that needs to be populated, but because there are thousands of records, I would like to know a way that it can be done somewhat automatically.  The information that the field needs to be populated with is currently stored in an excel table (this can be changed if necessary).  In order to populate the fields correctly there are several other fields that need to match information in the fields within the attribute table.  Because there are multiple fields that need to match, I cannot get a join to work.


texts:
I'm trying to do a maximum likelihood classification with supervised training samples. I saved the training samples as a .gsg and I was able to load it into a maximum likelihood classification and successfully run the tool.

I want to load the old training samples back into the training sample manager so that I can improve the accuracy, but every time I hit load training samples the folder is blank.

I'm confused because I was able to load it into the tool, but I can't seem to load them in through the training sample manager. Is there a specific way I should save it or open it?

I've attached an image of my screen the GSG appearing as I load it into the geoprocessing tool.


texts: Update Attribute based on spatial location

texts:
I want to spatially (Spatial Join) update few fields, not all, from another feature class.

Is there any way to select and update few fields instead of all the fields from the other layer and spatially update them directly into the target feature class?

I am working in SDE environment.


texts: Learning Python programming with generic GIS goals in mind?

texts:
In your opinion, what is the best book/site to learn Python with GIS goals in mind?

By "best", I mean:

not very long (book)
easy to understand (book/site)
good practical examples (book/site)

For answers specific to learning how to use the ArcPy site-package for Python to customize ArcGIS for Desktop there is a separate Q&A: What are some resources for learning ArcPy?


texts: SQL query : finding a word in a shapefile

texts:
I have a punctual shapefile containing the name of geographic locations (attribute 'name')

Using DB Manager of Qgis, I would like create an SQL query to find, within the shape, the name of a location and, and therefore its point.
I would like to find the name of the location even by writing only one part.

For example:
The name of location is 'Torretta'. Just writing "Torr", I would like to find all the locations that contain the word "Torr" (without considering the upper case and lower case letters).


texts: ModelBuilder, which tool should I use to rename layers with value from table?

texts:
I have a ModelBuilder tool with an iterator that splits a feature into multiple shapefiles based on a attribute field. The problem I'm running into is instead of simply using the number values for naming, I would like to replace the number with what the layer physically represents. For example a few of the new shapefiles are

  M4ExportLine_Layer149.shp

  M4ExportLine_Layer150.shp

  M4ExportLine_Layer153.shp

I would like these to be named respectively

  M4ExportLine_LayerBuriedFiber.shp

  M4ExportLine_LayerAerialFiber.shp

  M4ExportLine_LayerOverlashFiber.shp

And there are quite a few more that need renamed in that fashion.
The problem is there is only layer numbers in the attribute table and nothing represents the physical name except for the legend.
Here is the model I have so far
[Model][1]


texts: Ignoring invalid input features with Intersection tool in QGIS?

texts:
In QGIS 2.18, when I used the Vector > Geoprocessing Tools > Intersection tool, I was able to check an option which said "Ignore NULL geometries [optional]".

Now I've downloaded QGIS 3.2 and that option no longer exists. But when I try to create the intersection between two layers I'm working on, I get a message saying that there is an invalid geometry somewhere and that I should either fix it it or "change the Processing setting to the 'Ignore invalid input features' option."

But that option doesn't exist! Or if it does exist, I just can't find it anywhere.

Does anyone know how/where to change this setting in QGIS 3.2?


texts: QGIS Raster Symbology Gradient with Exceptions

texts:
I'm new to GIS. If I have a raster with a band of continuous numbers, say 0-1000 with decimals. I want that to be on some type of grey gradient.
However, I'm doing a lot of testing and want to be able to see particular values highlighted. For example, 0-1000 continuous can be on a grey gradient but I want to make specific exceptions where any pixel with the value of 400 is red and value of 600 is blue for easier visibility. Is this possible/simple to do?


texts: Running ArcGIS Pro ArcPy on latest PyScripter

texts:
Having PyScripter 4.0.0.6 x64 installed with ArcGIS Pro 2.5 I have set the

I have add/set the arcgispro-py3-clone to Python Path like below

but I am still getting this error message
Traceback (most recent call last):
  File "<module1>", line 12, in <module>
ModuleNotFoundError: No module named 'arcpy'

when trying to import arcpy
I also noticed that after re-opening the Python Path the order list of file path backed to default and not seeing the arcgispro-py3-clone

C:\Users\somebody\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone

in the path list anymore!

What is happening here and how I can fix this?


texts:
I'm quite new to the GIS world and I currently have some technical questions for which I have no answers yet.

I'd like to know the good way to store the attributes for a feature using the PostgreSQL database and its PostGIS extension. For example, a point can be a house located in a street with a name and a number.

I know that applications like MapServer or GeoServer are exactly about doing this, but I'm looking for a simpler solution.

Ideally I'd like to have everything in my database where for each feature I can list the associated attributes. But I would also like to know from a specific attribute, the list of features matching.

Is there any standard/best practice out there to store GIS attributes within a SQL database?

Plus, what about the attributes name themselves? Is there any list of standard attributes that can be associated to a feature. I don't want to re-invent the wheel so where to find the common used terms to define a feature (street, country, zip code, ...)?


texts: I'm wondering if there is any option in eCognition Developer / Architect were I can control Zoom or Scale Factors. It's necessary for my work that I use the same scale for all processing steps.


texts: Spatial query by ESRI ST_Geometry take too long

texts:
I am using ESRI ST_Geometry in my application, and I found that the spatial query is rather slow:

The following sql is used for query pois inside a certain bounding_box:

select * from (

    select name, st_astext(shape) as shape from POIView h where 1 = 1 and ST_Intersects(h.shape, st_geometry('POLYGON ((20.227742
        30.1681829, 20.296578 30.168182, 20.296578 30.21127,20.22774 30.211270, 20.22774 30.16818))',3)) = 1
) where rownum <= 10

Count the total nums:

select count(shape) from POIView h                    where 1 = 1 and ST_Intersects(h.shape, st_geometry('POLYGON ((20.227742
    30.1681829, 20.296578 30.168182, 20.296578 30.21127,20.22774 30.211270, 20.22774 30.16818))',3)) = 1

And the first sql will cost almost 3 seconds, and the second will cost 4+ minutes which is unacceptable.

What' more, the bounding_box is a rather simple polygon with a small area, I can not image how long it will cost once I put a complex polygon as the argument.

Is it possible to fix this?

BTW, all the tables are exported to Oracle 11g by ArcMap 10.0 with the sde connection, and we have only 120k records in the table.

Update: the view:

CREATE OR REPLACE VIEW POIView (objectid, shape, id, name, address, table_name) AS
    SELECT objectid,shape,hotel_id as id,hotel_name as name,address,'HotelPoint' AS table_name from HotelPoint
union ALL
    SELECT objectid,shape,school_id as id,school_name as name,address,'SchoolPoint' AS table_name from SchoolPoint
union ALL
    SELECT objectid,shape,id,name,address,'ImportFeaturePoint' AS table_name from ImportFeaturePoint
union ALL
    SELECT objectid,shape,id,name,address,'ImportFeatureLine' AS table_name from ImportFeatureLine
union ALL
    SELECT objectid,shape,id,name,address,'ImportFeaturePolygon' AS table_name from ImportFeaturePolygon
union ALL
    .....

And once I followed the comment from @Vince, tried to change the sql to:

select * from (

    select name, st_astext(shape) as shape from POIView h where ST_ENVINTERSECTS(h.shape, st_geometry('POLYGON ((20.227742
        30.1681829, 20.296578 30.168182, 20.296578 30.21127,20.22774 30.211270, 20.22774 30.16818))',3)) = 1
) where rownum <= 10

It take 6 seconds now. And the count sql:

select count(shape) from POIView h   where ST_ENVINTERSECTS(h.shape, st_geometry('POLYGON ((20.227742
    30.1681829, 20.296578 30.168182, 20.296578 30.21127,20.22774 30.211270, 20.22774 30.16818))',3)) = 1

takes 240 seconds.

I am downloading the sp5, I will post the new result after I install the patch.

Update after I installed the SP5, and I found that both the query will take longer than before with 24 seconds for the basic query, and 2 minutes for the count query.


texts: How can I measure area in square kilometres from lat / lon gps coordinates?

texts:
I have code from openlayers that I cannot quite handle because I am so new for these kind of codes. My main goal is to measure area from n amount of lat/lon gps coordinates and convert the result into square kilometres.

I have adopted some code from the post here and it seems almost ready but I was not able to figure out how to use it with my test coordinates that are

var lats = [25.767368, 34.088808, 40.727093]
var lons = [-80.18930, -118.40612, -73.97864];

Which I need to use in code like this to get the area and finally convert it into square kilometres. Any help with this? Please make it simple as this is pretty much my first attempt on geagraphic coding.

var area = 0.0;
var len = ring.components && ring.components.length;

if (len > 2) {

var p1, p2;

for (var i=0; i<len-1; i++) {

    p1 = ring.components[i];
    p2 = ring.components[i+1];
    area += OpenLayers.Util.rad(p2.x - p1.x) *
        (2 + Math.sin(OpenLayers.Util.rad(p1.y)) +
        Math.sin(OpenLayers.Util.rad(p2.y)));

}

area = area * 6378137.0 * 6378137.0 / 2.0;

}


texts: Averaging satellite data with missing values (using Python)

texts:
I am using sea surface temperature, chlorophyll, and other data parameters as covariants in a model, and I would like to average them over a particular time period.

I am currently doing this using a simple average of the values across the days in my time period, but this is flawed due to missing data from cloud-cover, etc. (and perhaps other reasons).

filledsst = np.average((datafile.variables["FilledSST"][idx1:idx2,:,:]), axis=0)

What technique is typically used for accounting for such missing data?


texts:
I have a DrawFeature tool.

create= new OpenLayers.Control.DrawFeature(myVecLayer,
OpenLayers.Handler.Polygon);
app.mapPanel.map.addControl(create);

I have a store.

st = new GeoExt.data.FeatureStore({
    layer: myVecLayer,
    fields: [
        {name: 'id', type: 'int'},
        {name: 'mydata', type: 'String'},
    ],
     proxy: new GeoExt.data.ProtocolProxy({
        protocol: new OpenLayers.Protocol.WFS({
            version: "1.0.0",
            srsName:"EPSG:900913",
            url: "http://localhost:8080/geoserver/wfs",
            featureType: "filedata_temp",
            featureNS: "http://www.opengeospatial.net/cite",
            filter:Ffilter
        })
    }),
    autoLoad: true
});

I start drawing

for(var i=0;i<create_cont.length;i++){
   create_cont[1].activate();
}

After I put attributes to feature and save result

Openlayers.Strategy.Save().save()

But it's not saved.

POST

<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0"  xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <wfs:Insert>
  <feature:filedata_temp xmlns:feature="http://www.opengeospatial.net/cite">
   <feature:the_geom>
    <gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:900913">
     <gml:exterior>
      <gml:LinearRing>
       <gml:posList>6756846.305626001 7731074.3336396 6756578.776027001 7730338.6272425 6757696.667564999 7730118.8707862 6758441.928590998 7730978.7873543 6756846.305626001 7731074.3336396</gml:posList>
      </gml:LinearRing>
     </gml:exterior>
    </gml:Polygon>
   </feature:the_geom>
   <feature:id>10</feature:id>
    <feature:mydata>10</feature:mydata>
  </feature:filedata_temp>
 </wfs:Insert>
</wfs:Transaction>

ANSWER

<ows:ExceptionReport version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows">
 <ows:Exception exceptionCode="InvalidParameterValue">
  <ows:ExceptionText>Error performing insert: Error inserting features</ows:ExceptionText>
 </ows:Exception>
</ows:ExceptionReport>

What am I doing wrong?


texts: Error recognising password; importing OSM to PostGIS in QGIS

texts:
When selecting OSM Tools (Import into PostGIS) , attching my .osm file in the Input option, selecting my OSM Database, and then clicking run, I am prompted to enter a password for connection.

"Enter password for connection (or leave blank) "osm":"

When either leaving blank, making up a password, or using my Postgres password I get this error.

Password:
Connection to database failed: FATAL:  password authentication failed for user "osm"
Finshed!

I not sure what I am doing wrong. From what I have read it should authenticate.

Thanks for any time you have.


texts:
I am using GeoServer/OpenLayers to build a map website. One of things I want to do is to export a map to GeoPDF. It's not an export from desktop software. More specifically, map tiles are added as images and GML features are added as vector data. The only thing I have found that could allow me to do that is TerraGo SDK.

Has anybody tried to do the same thing? Could anybody shed some lights?

Thanks,


texts:
I'm trying to upload shapefile to GeoServer with REST API. It is working with most of the shapefiles, but I have problems when I try to upload a large shapefile.

The .zip file is 21.1 MB. Contains the dbf (11mb), prj (145 byte), .shp (33Mb) etc.

The WebResponse gives me:

"The underlying connection was closed: The connection was closed unexpectedly."

Do you have any idea?


texts: Debugging AttributeError: Object: Tool or environment  not found in arcgisscripting?

texts:
I have a problem executing the code below in ArcGIS 9.3.
The file is not found in split_row_0717.py
Please kindly help any modification.

The error said:

 Traceback (most recent call last):   File
 "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",

     line 310, in RunScript
     exec codeObject in __main__.__dict__   File "H:\python_p\python_code\split_row_0717.py",
     line 46, in <module>
     gp.SplitByAttribute_Analysis2(fc, fieldName, outWorkspace, fieldName) AttributeError: Object: Tool or environment
 <SplitByAttribute_Analysis2> not found

The code that generates error:

##Script Name: split rows
##Description: using
##Created By: Elaine Kuo
##Date: 12/07/2012

#Import standard library modules
import arcgisscripting
import os

#Create the Geoprocessor object
gp = arcgisscripting.create(9.3)

#Set the workspace.
gp.Workspace= "H:/temp/test"

#Set the workspace. List all of the feature classes in the dataset
outWorkspace= "H:/temp"

# Add a toolbox with a model to the geoprocessor and set the workspace
gp.AddToolbox("C:/Program       Files/ArcGIS/ArcToolBox/Toolboxes/AdditionalAnalysis/Additional Analysis - Generic Tools.tbx")

#Get a list of the featureclasses in the input folder
fcs = gp.ListFeatureClasses()

# Loop through every item in the list that was just generated
for fc in fcs:

    # Break out the name, no path or extension, using the describe object.
    desc = gp.describe(fc)
    featureName = desc.name

    # Validate the new feature class name for the output workspace.
    OutFeatureClass = outWorkspace + os.sep + gp.ValidateTableName(fc,outWorkspace)

    #get file name
    fcName, fcExt = os.path.splitext(fc)

    #build field name
    fieldName = fcName

    #### Execute Script Tool ####
    gp.SplitByAttribute_Analysis2(fc, fieldName, outWorkspace, fieldName)

gp.AddMessage(gp.GetMessages())
print gp.GetMessages()


texts: Check for whole number in case statement

texts:
In an elevation file I want to find all the 5m contours and mark a column up as major. This has to be done in QGIS in the field calculator or modeler.

I want to do something like the following based on this post

CASE WHEN "elevation" %% 5 THEN 'major'
 WHEN "elevation" %% 1 THEN "moderate"
 ELSE "Minor"
 END

But this doesn't work -

  Parser Error: syntax error, unexpected MOD

  Eval Error: No root node! Parsing failed?

Ideally I want to run it as part of the following (which works but level 50 includes 1m and 5m contours)

CASE WHEN  "contour_level" = 48 THEN 'minor'
 WHEN  "contour_level" = 49 THEN 'minor'
 WHEN  "contour_level" = 50 THEN 'moderate'
 ELSE 'Check'
 END


texts: Enabling georeferenced TIF file to rectify in ArcGIS for Desktop?

texts:
I have added a TIF file (size 1,433 KB) in ArcGIS 10.2.2 and defined numerous georeferencing points, with the aim of creating a raster file for conversion to polygons.

However, on clicking the “Rectify” and "Save" buttons, it returns the message “Error – Failed to save raster dataset”. The same occurred when I repeated the procedure with a BMP file.

Can anybody explain what I am doing wrong, or how I might get it to work?


texts: Projecting WMS layers from GCS_WGS_1984 to UTM ED50 31N using ArcMap?

texts:
I'm using a WMS service to open different layers. Specifically I'm using this link:

http://w24.bcn.cat/WMSBaseGuia/request.aspx

I have the following problem. When I open these layers with Arcmap, its projection is:

Geographic Coordinate System:   GCS_WGS_1984
Datum:  D_WGS_1984
Prime Meridian:     Greenwich
Angular Unit:   Degree

However I would like to transform it (or project) to Europe UTM ED50 31N (units meters).

Anyone can help me to obtain this projection with ArcMap?


texts: Set the same font in QGIS legend as in map

texts: I want to use the same fonts in the legend that are used on the map (different feature = different font). Is it possible? I only get one font for all items.


texts: How can I monitor my arcgis server 10.0 services?

texts:
I regularly have the problem that after windows server updates the application server is automatically restarted and the ArcGIS Server 10.0 services are not restarted. I am not aware of this until my colleagues call to ask why the system isn´t showing Geodata. This then takes 30 minutes to stop the tomcat server, flush logs, restart AGS services and test that everything is running.

Is there a monitoring tool which would indicate or even send emails when the status of running services change?


texts: Order of rings in ESRI Sliverlight API query task

texts:
I have an problem with "Query Task" class of ESRI Sliverlight API 2.1 version.

I am saving a polygon with 2 exclusions [Inner rings] (i.e. say exlcusion 'A' as 4 vertices and exclusion 'B' with 5 vertices) into SDE database.When I do a Sliverlight ESRI query task to retrive the same shape, am getting exclusion B as first inner ring and exclusion A as second inner ring.How do I get a polygon rings (inner) in same order as I saved into database. I have tried Simplify method but still no luck.

Note: shapes from sliverlight has been saved to SDE using GP Tools where inner rings are added into geometry bag in same order and stored in geodatabase.

Let me know if any questions. Posted in ESRI forums no help as on today hence posting here.

From Silverlight client am sending polygon as feature set to store in SDE using GP Tool. In the ArcObjects part of the code, we create the rings and add them to a IGeometry array. The outermost ring gets added first, followed by the inner rings(in the same order in which they were created). Finally IGeometryBridge.AddGeometries method was used to build a polygon from array of rings.

When we check the interior ring order after creation of the polygon geometry, it reflects the same order in which it was created in the Silverlight API. But once we store it in a SDE geodatabase featureclass, immediately the interior ring order gets modified.

I have asked same question in ESRI Forum. ESRI expert saying that order of rings will be changed for performance reasons while storing in SDE. Because of this when I query the same polygon using query task of Silverlight API, order of rings are changed.

If you look into ArcObjects, I can get order in same way using

SimplifyPreserveFromTo((ITopologicalOperator4)inputPoly).IsKnownSimple_2 = false;
inputPoly.SimplifyPreserveFromTo();

What is equivalent of SimplifyPreserveFromTo in ESRI Silverlight, or any best approach to get rings in same order.

Here important point - rings are not changed always, some times I am getting correct order while retriving from query task of Silverlight API.


texts: ArcGIS Custom Toolbox crashes ArcMap 10.0

texts:
I have prepared Custom ArcToolBox using ArcObjects in java. It was working fine before though was giving NullPointerException but this something java related error and that is fine.

Later I have reinstalled ArcGIS10.0 and trying to run the same tool. The moment I start the process my ArcMap10.0 is getting closed. Interesting part is if I remove my toolbox related jar from /Desktop10.0/java/lib/ext folder it is working fine again.

Does anyone has any idea what could be the issue?

Thanks in advance.


texts: Get shape filename in attribute field using field calculator

texts:
I apologize for crossposting against the ESRI geoprocessing forum, but it seems like this one gets answers. I'd like to have a modified append tool (ArcToolbox) that takes multiple shapefiles with point attribute data, and copies the inputted shapefile's name(s) to a "filename" attribute column, and then appends it to a target dataset. That way I can track where the data came from. The only way I can think to do this is something along the lines of the following:

for each shp in featureclasses:
  outFeatureClass = os.path.join("C:\GIS\Scripts\temp\temptrks", shp.strip(".shp"))
  arcpy.CopyFeatures_management(shp, outFeatureClass)
  arcpy.AddField_management(outFeatureClass, "filename", "TEXT", "","", "254")
  arcpy.CalculateField_management(outFeatureClass, "filename", str(shp), "PYTHON")

Then perform the append for each file in the new workspace.

What I'd like to do is be able to have a user drag and drop multiple shapefiles from multiple directories into a Multiple Value input box (like that in the Append tool).

I have two questions:

Is there an easier/better way to perform the task?
If not, what should I set the parameter type to (Multiple Value is not a selection).


texts: How i can have the same xMin,yMin for vector files in Qgis 2.4

texts:
i have a .shp file(polygon) in EPSG:2100 - GGRS87 / Greek Grid and an other .shp(points) in the same system(EPSG:2100 - GGRS87 ) but different xMin,yMin.

The first has xMin,yMin 583309.00,4152885.94 and the second xMin,yMin 25.1148,37.6185.

How  can i put them in the same xMin,yMin.


texts: Making QGIS toolbox tool available directly from toolbar?

texts:
At QGIS 2.18.16, I commonly use a tool that is only available (AFAIK) through the Toolbox  (Processing > Toolbox > QGIS Geoalgorithms > Vector table tools > Frequency analysis).

I would like to have this tool directly available on the toolbar, as a button or dropdown, so that it is more easily and quickly accessed.

A Google search turned up nothing.

How do I accomplish this?


texts: Openlayers3 Add click/hover action on ol.layer.Vector

texts:
With drawService function, I add on my map dome circle vectorLayer.

How can I set a click (or hover) event on the added vectors for displaying their long lat coordinates?

function drawService(wktRegion, name, colourValue,strokeColourValue, radiusDim){
    if(radiusDim==0)
        radiusDim=20;

    var format = new ol.format.WKT();
    var feature = format.readFeature(wktRegion);
    feature.getGeometry().transform('EPSG:4326', 'EPSG:3857');

    var style=new ol.style.Style({
                    image: new ol.style.Circle({
                        fill: new ol.style.Fill({ color: colourValue }),
                        stroke: new ol.style.Stroke({ color: strokeColourValue }),
                        radius: radiusDim
                    })
                  });
    feature.setStyle(style);

    var layerVector = new ol.layer.Vector({
            source: new ol.source.Vector({
            features: [feature]
        })
    });
    layerVector.set('name',name);
    map.addLayer(layerVector);
}


texts:
I'm trying to create a function which calculates the nearest neighbors under a certain length in a table s_1 an stores them in an output table.

This is what I've got so far:

CREATE OR REPLACE FUNCTION NearestN()
RETURNS TABLE (
a integer,
b integer,
ST_Distance integer
)
AS
$$

SELECT ST_Distance(a.the_geom , b.the_geom ) from s_1 a, s_1 b
 WHERE a.id < b.id
  AND ST_DWithin(a.the_geom,b.the_geom, 50.0)
   ORDER BY ST_Distance(a.the_geom, b.the_geom) ASC LIMIT 25;
$$
LANGUAGE plpgsql;

Needless to say to function is not working at all (I'm very new to sql) and I think my calculation does not only get me the nearest neighbor but all distances under a certain length.

And is it possible to make the length an argument of the function so I can vary just by calling the function?


texts: Why is arcpy.mapping.ConvertWebMapToMapDocument slow?

texts:
We use arcpy.mapping for print tasks.

The slowest part in workflow is arcpy.mapping function ConvertWebMapToMapDocument; it takes 10-12 seconds each time, doesn't matter if map is big or not.
We use ConvertWebMapToMapDocument(mapJson, templateMxd) form. templateMxd is empty A3 document with empty data frame and north arrow.

Function ExportToPNG takes only 2 seconds while ConvertWebMapToMapDocument eats most of the total printing time.

What can be tips to improve performance here?

Edit: ------------------
Looks it's not possible to solve it for myself as ConvertWebMapToMapDocument implementation spends a lot of time in unnecessary web requests.
Simplest example:

import time
import arcpy

templateMxd = 'C:\\Program Files\\ArcGIS\\Server\\Templates\\ExportWebMapTemplates\\A3 Portrait.mxd'
mapJSON = '{"layoutOptions": {"titleText": "Simple WebMap JSON example"},"operationalLayers": [{"url": "http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer","visibility": true}],"exportOptions": {"outputSize": [1500,1500]},"mapOptions": {"extent": {"xmin": -13077000,"ymin": 4031000,"xmax": -13023000,"ymax": 4053000}},"version": "1.4"}'

timer = time.time()
aTuple = arcpy.mapping.ConvertWebMapToMapDocument(mapJSON, templateMxd)
print('ConvertWebMapToMapDocument took %.2f s' % (time.time() - timer))

Output:

ConvertWebMapToMapDocument took 2.10 s

Now where all this time went? I used Fidler2 to track web requests and got following:

http://maps1.arcgisonline.com/ArcGIS/rest/info?f=json
http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer?f=json
http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer/layers?&f=json
http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer/legend?&f=json
http://maps1.arcgisonline.com/ArcGIS/rest/info?f=json
http://maps1.arcgisonline.com/ArcGIS/rest/info?f=json
http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer?f=json
http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer/layers?&f=json
http://maps1.arcgisonline.com/ArcGIS/rest/info?f=json
http://maps1.arcgisonline.com/ArcGIS/rest/info?f=json
http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer?f=json
http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer/layers?&f=json

Aggregate Session duration: 00:00:01.687

Only first 4 requests are actually needed other requests are duplicates. For these 4 requests

Aggregate Session duration:    00:00:00.683

Such optimization would save 1 second of 2.10 s spent in ConvertWebMapToMapDocument function.


texts: Polygon Torque Map- problem changing polygons to points

texts:
I'm trying to alter my data on cartodb map to get maritime emissions over about 20 years- by country. Hence trying get a torque map for polygons, and  by changing polygons to points based on a previous suggestion:

SELECT ST_Centroid(the_geom) the_geom, carto_date FROM maritime_emissions_my_data_trial_copy

But I keep getting a syntax error at SELECT.... the_geom appears to be properly valued - all rows state "Polygon".

My data is here: http://bit.ly/1M77NjG

I'm quite a novice.


texts: Multiplying/dividing x/y values of line and polygon layer vertices?

texts:
I have several polygon and line layers in shapefile format with no crs so it can't be reprojected. The vertices coordinates need to be divided by 3,600,000 in order for them to match the project crs, EPSG:4326.

Is there a way to do this in field calculator or with a plugin?

Can it be converted to another file format and edited?

Here's an example of the current values.


texts: GeoJSON load Properly in QGIS but not in GeoJSON viewer

texts:
I have a GeoJSON file. It loads properly in QGIS but not in JSON viewer (http://geojson.io). I have select EPSG:4326 as the CRS.

When I open the GeoJSON file in notepad++ and check the coordinates they look like
"coordinates": [ [ [ [ 735162.3406, 1403154.0408 ]...."

I think these are not valid.

Let me explain briefly:

Snapshot: When GeoJSON file load in QGIS -

Snapshot: When same GeoJSON file load in geojson.io

GeoJSON file link - https://drive.google.com/open?id=15iuoKcyHPU7rsJ6VtHMT7ojhKAfHU057


texts: Can't connect to QGIS 2.18 plugin repository

texts:
QGIS 2.18.15 installed from KyngChaos packages on OSX 10.11.5, the official plugin repository reads "unavailable" and I can't grab any more plugins. I'm not using a proxy, I tried reinstalling and changing networks, no dice.

I think it's an authentication issue because when I try to add the same url without HTTPS, it connects to the non-secure one (but doesn't let me install anything because of an SSL error). Also throws "Error reading repository: QGIS official plugin repository. SSL handshake failed."

I can manually add plugins and they work, but that's kind of annoying; anyone see this error before?


texts: Updating and inserting a field within the same loop

texts:
I am working with an empty feature class where I am writing a script to create polylines within the featureclass and attach an associated text value with the polyline.

I am using a for loop as noted below to insert the polyLine feature while updating a previously created field with the name of the polyline. Wonder if someone could provide some guidance as I cannot seem to get the name to write to table. The polyline creation works perfectly its just adding the name to the table that is providing some difficulty. The last bit code I know does not work.

for key in dictionary:

    cursor = arcpy.InsertCursor(trackPolyLine)
    feature = cursor.newRow()
    polyLine = arcpy.Polyline(dictionary[key], prjCode)
    feature.shape = polyLine
    cursor.insertRow(feature)

    name = arcpy.UpdateCursor(trackPolyLine)
    key.PolyLine_Name = key
    dictionary.updateRow(key)


texts: Custom labels when matching to symbols in a style? (ArcGIS 10.3)

texts:
In ArcGIS 10.3 is there a way to automatically label symbols based on a field in my feature class table?

I matched species observations with marker symbols in a style using species abbreviations. Anyway, for the legend I need to display full scientific names.

I am able to manually update each symbol label with the full scientific name, but this is time consuming. Also I have a whole lot of different species varying between feature classes.

Is there a way to automatically assign the field with the full scientific name as symbol label?


texts:
in order to compute distance in WGS84 geometries, I first call DistanceOp.nearestPoints(g1, g2) from JTS 1.13 to compute the nearest points of this geometries, where:

g1 = LINESTRING (14.796 47.9467, 14.7975 47.9476, 14.798 47.9479)

g2 = LINESTRING (14.7979 47.9463, 14.7983 47.947)

and get as result points:

14.797799534826732, 47.947763568684266

14.798254700000001, 47.94696810000001

These are not the nearest points of that two geometries.

Nearest points would be (computed with JTS test builder):

POINT(14.79782352941177 47.947794117647064)

POINT(14.7983 47.947)
I have a unit test to illustrate the problem:

@Test
public void test() {
    WKTReader2 wkt = new WKTReader2(GF.get());
    try {
        this.moehrStr = wkt
                .read("LINESTRING (14.7959896 47.9466932, 14.7974574 47.9475678, 14.7979962 47.9478761)");
        this.laatzerStr = wkt.read("LINESTRING (14.797857 47.9462533, 14.7982547 47.9469681)");
        this.moehrNode = wkt.read("POINT (14.7974574 47.9475678)");
        this.LaatzNode = wkt.read("POINT (14.7982547 47.9469681)");

        System.out.println(OsmDistanceComputer.getDistanceInMeter(this.moehrStr, this.laatzerStr));
        System.out.println(this.moehrStr.contains(this.moehrNode));
        System.out.println(this.laatzerStr.touches(this.LaatzNode));
        System.out.println(OsmDistanceComputer.getDistanceInMeter(this.moehrNode, this.LaatzNode));
    } catch (ParseException e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}

}

GF is a 4326 SRID with 100000d precision. OsmDistanceComputer is :

public class OsmDistanceComputer {

public static Double getDistanceInMeter(Geometry g1, Geometry g2) {
    try {
        Coordinate[] c = DistanceOp.nearestPoints(g1, g2);

        CoordinateReferenceSystem crs = DefaultGeographicCRS.WGS84;
        GeodeticCalculator gc = new GeodeticCalculator(crs);
        gc.setStartingPosition(JTS.toDirectPosition(c[0], crs));
        gc.setDestinationPosition(JTS.toDirectPosition(c[1], crs));
        // Double dist = JTS.orthodromicDistance(c[0], c[1],
        // DefaultGeographicCRS.WGS84);
        double dist = gc.getOrthodromicDistance();

        return dist;
    } catch (Exception e) {
        e.printStackTrace();
    }
    return null;
}

}

As result i get:

  94.43004352415576

  true

  true

  89.06942899300353

I compute distance between linestrings and than between points which are part of the linestrings. What does not make sense is why the distance of the linestrings is greater than that of the points which are contained in the linestrings.


texts: Extracting certain landcover type in CONUS with Google Earth Engine?

texts:
I am new to Google Earth Engine and I would like to export the pixels with landcover type of deciduous broadleaf forest (MCD12Q1 with LC_Type1 equals to 4) in google earth engine. And the following is my code:

import ee
import ee.mapclient
import datetime

# generate region of interest
ee.Initialize()
#Define a region roughly covering the continental US.
roi = ee.Geometry.Rectangle(-127.18, 19.39, -62.75, 51.29)

# Load country boundaries from a Fusion Table.
countries = ee.FeatureCollection('ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw');

# Get a feature collection with just the US feature.
US = countries.filter(ee.Filter.eq('Country', 'United States'));

# create clipping function
def clip_roi(image):
    return image.clip(roi)
def clip_US(image):
    return image.clip(roi).clip(US)

# create a QA mask function
def dbfmasker(image):
    mask1=image.select('LC_Type1').eq(4)
    mask2=image.select('QC').eq(0)
    mask3=image.select('LW').eq(1)
    return image.updateMask(mask1).updateMask(mask2).updateMask(mask3)

# compilie the data
dataset =(  ee.ImageCollection('MODIS/006/MCD12Q1')\
         .filterDate('2010-01-01', '2015-12-31')\
         .select(['LC_Type1:Land_Cover_Type1','QC','LW']) \
         .map(dbfmasker)
         .map(clip_US)          )

count = dataset.size()
print count

I got stuck here because the count value I printed here was not a number. However, I tended to use it as the iteration range later when exporting the data pixel by pixel.


texts: Cannot read property 'wrapDateLine' of null - OpenLayers

texts:
My code is giving the error:

Uncaught TypeError: Cannot read property 'wrapDateLine' of null OpenLayers.js:192
OpenLayers.Map.OpenLayers.Class.isValidLonLat OpenLayers.js:192
OpenLayers.Map.OpenLayers.Class.moveTo OpenLayers.js:187
OpenLayers.Map.OpenLayers.Class.setCenter OpenLayers.js:184
init chapter_8_ex9_using_multiple_maps_custom_event_app.html:38
onload chapter_8_ex9_using_multiple_maps_custom_event_app.html:63

<!DOCTYPE html>

 <meta charset='utf-8' />
 <title>My OpenLayers Map</title>


texts: can not use geoserver rest API with geoserver-manager

texts:
I want to use rest API of geoserver with geoserver-manager plugin. In netbeans I create a new web application maven project:

then in pom.xml file in dependencies I add bellow dependency:

<dependency>
     <groupId>it.geosolutions</groupId>
     <artifactId>geoserver-manager</artifactId>
     <version>1.5.1</version>
     <scope>provided</scope>
</dependency>

in index.jsp file I add bellow code:

<%@page import="it.geosolutions.geoserver.rest.GeoServerRESTReader"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
            String RESTURL  = "http://localhost:8080/geoserver/web/";
            String RESTUSER = "admin";
            String RESTPW   = "geoserver";

            GeoServerRESTReader reader = new GeoServerRESTReader(RESTURL, RESTUSER, RESTPW);
            //GeoServerRESTPublisher publisher = new GeoServerRESTPublisher(RESTURL, RESTUSER, RESTPW);
        %>

    </body>
</html>

but the result is:

Where is problem?


texts: Importing from a PostGIS database into Carto using Carto's Import API

texts:
I am not new to Carto, but I'm new to the command line. I am able to import local files using this sample code Carto has in their documentation:

curl -v -F file=@/home/documentation/Documents/prism_tour.csv
"https://documentation.carto.com/api/v1/imports/?api_key=3102343c42da0f1ffe6014594acea8b1c4e7fd64"

I want to connect to and import from an existing PostGIS DB I have. Carto's documentation shows the following code:

{
  "connector": {
    "provider": "postgres",
    "connection": {
      "server":"pgserver.com",
      "database":"pgdatabase",
      "username":"pgusername",
      "password":"pgpassword"
    },
    "schema": "public",
    "table": "pgtable"
  }
}

I have all the parameters needed. But 1. I don't know how to force lines without them executing. (everything is one line) For this reason, seems that the terminal is only running the first line and the error I get is " 'connector' is not recognized as an internal command.

Does this have anything to do with setting up environment variables?

And how do I type this on the command line so that it looks like a block of code like in the example?


texts: How to check if line goes through point with PostGIS

texts:
I have a line representing a bus line and a stop representing a bus stop

The following sample data represents the problem

LINESTRING(-70.65357957000000511 -33.42323483999999922, -70.65181886999999961 -33.4232948200000024)
POINT(-70.65199072011725434 -33.42328896575632768)

The point was create with the Shapely interpolate method.

Now I want to test if the line goes through the bus stop.

I tried the following:

SELECT
ST_Intersects(
ST_GeomFromText('LINESTRING(-70.65357957000000511 -33.42323483999999922, -70.65181886999999961 -33.4232948200000024)'),
ST_GeomFromText('POINT(-70.65199072011725434 -33.42328896575632768)'))

This returns false. Is it possible with PostGIS to find out if the line crosses the point?

As a workaround I was thinking to buffer the points, but I am hoping for a cleaner solution.

Overall I want to do a spatial join, joining the lines id to the bus stops.

select lines.ogc_fid, stops.wkb_geometry from lines, stops WHERE ST_Intersects  (lines.wkb_geometry, stops.wkb_geometry)

UPDATE:
I realised the points are simply not on the line. I zoomed in really far and the point is next to the line, not on the line. So only a solution like buffer will work.


texts: PostGIS: calculate area of intersection of EPSG:27700 polygons?

texts:
I have two tables in Postgres, both of type geometry(MultiPolygon,27700) and I would like to find any that intersect with an area of more than 100 square metres.

I know how to get any that intersect above an arbitrary threshold:

SELECT *
FROM aTable a
JOIN bTable b
WHERE ST_Area(ST_Intersection(a.geom, b.geom)) > 1;

However, the area returned here is in (I think) decimal degrees. How can I ensure it is always more than 100 square metres?

Perhaps if I do something like:

WHERE ST_Area(ST_Transform(ST_Intersection(i.wkb_geometry, w.wkb_geometry), 3857)) > 100

that would work, since the unit of EPSG:3857 is metres?

I've read this and this but I don't know what projection to pick.


texts: How to produce a vegetation stress map utilizing the spectral blue shift of the red edge?

texts:
I am interested in mapping vegetation stress utilizing the blue shift to the red edge phenomenon in remote sensing.  The figure below shows the expected change in reflectance of green leaves under stress.  I would ideally like to produce a raster-based change map utilizing commonly available multispectral imagery (e.g. 4-band NAIP, Landsat, etc).  Are there any well developed methods to put this phenomenon into practice within a GIS or digital image processing software?  Any step-wise advice to accomplish this would be of great help.

More details:

Remote Sensing for Sustainable Forest Management link
Comparison of In Situ and Airborne Spectral Measurements of the Blue
Shift Associated with Forest Decline


texts: How to make elements size fixed (Arcobjects)?

texts:
I'm using arcobjects .Net 10 to add graphic elements to my map.
My problem is that when the map scale changes, the element size change too.
How to fix element size at all scales?


texts: Over how large of an area can I assume the Earth is flat?

texts:
I'm making some calculations between lat/lon coordinates in a neighborhood. I'm running this analysis as if the Earth were flat because the planet's curvature doesn't change my calculations over the mile(ish) that I'm measuring.

How large of a distance can be accurately measured before you need to take the planet's shape into account?

For the sake of the question, let's say "accurately" means "off by less than 1%."


texts: Gdal Dataset.ReadAsArray() crashes Python

texts:
I am using Python 2.6.5 (32bit) with Numpy 1.3 and Gdal 1.9.1 installed on Windows 7 64bit.  I am trying to read an 800 MB Imagine (.img) raster dataset into a Numpy array to do some raster algebra, but as soon as I run the following code, Python.exe crashes.

from osgeo import gdal

g = gdal.Open(r'path\to\dataset', gdal.GA_Readonly)
b = g.GetRasterBand(1)
data = b.ReadAsArray()

Python.exe crashes on the b.ReadAsArray() call.  I did some Google searching and found articles dated from Gdal 1.6 that mentioned this issue with Windows 7 64bit, but they also mentioned that it had been fixed in the latest development versions at that time.

Has anyone else had this issue?  Any workarounds?

UPDATE:

I decided to debug the code in PyDev to try to determine where it is failing.  From what I can tell (still not getting any error messages) it is failing on line 22 of gdal_array.py.

_mod = imp.load_module('_gdal_array', fp, pathname, description)

When I step into the line of code above, it brings me into the init.py module of numpy.  When I reach the end of the numpy.__init__.py module, it steps out back to the above line of code.  Then, when I hit the step into button, which should bring me to the next line within gdal_array.py, the script just terminates with no error messages or anything.

UPDATE #2:

I uninstalled GDAL 1.9.1 and installed GDAL 1.6.1 from the Python Cheeseshop and OSGeo's Windows Binaries.  Still had the same issue.


texts: Sublayers or Multiple Visualizations for CartoDB

texts:
I'm trying to learn a bit of CartoDB by creating a heatmap using crime data available on the city's website where the raw number of crimes are displayed for each police district.

So far I've been able to draw the district polygon shapes, assign the data for several crimes to each district, and create visualizations for each set of data using the chloropleth style, and toggle different vizualizations on a map using cartodb.js.

Before I move forward with adding the remaining crime data (50+ categories) for multiple years I'm hoping to learn a bit of best practices.

Should I be using layers/sublayers or multiple visualizations to display crime rates using CartoDB?

The main reason for asking is that some crimes like curfew/loitering have 1000+ incidents, whereas others like murder or rape have 0 or 1 for an entire year and I want to be sure I'm representing the severity properly.


texts: Lealfet spin path in a Django application

texts:
I work with Django and Leaflet to create maps applications. I can display a Leaflet map and load data from a GEOJSON. While this GEOJON is loading I wan't to display a spinner. I used bower to install leaflet-spin :
bower install leaflet-spin

After this, I can see leaflet-spin and spin.js folders and files in myApp/templates/myApp/nodes_modules. Then I added static files in my settings.py :
STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'static'),
)

And scripts in my index.html :
{% load static %}
<script src="{% static 'myApp/spin.min.js' %}"></script>
<script src="{% static 'myApp/leaflet.spin.js' %}"></script>

But when the map is loading, Django terminal return me this :
[29/Jul/2020 07:56:30] "GET /static/myApp/leaflet.spin.js HTTP/1.1" 404 1696
Not Found: /favicon.ico

I can see icon file in myApp/templates/myApp/nodes_modules/spin.js/.grunt/grunt-gh-pages/gh-pages/release/favicon.ico but it seems path is not good.
Is there something wrong in my config or have I missing something in my files structure ?
Here is my full index.html
<html>
{% load leaflet_tags %}
{% load static %}
    <head>
        <title>My map</title>
        {% leaflet_js %}
        {% leaflet_css %}
        <script src="{% static 'myApp/spin.min.js' %}"></script>
        <script src="{% static 'myApp/leaflet.spin.js' %}"></script>
        <script src="{% static 'myApp/jquery.min.js' %}"></script>
        <style media="screen">
        #main {width:100%; height:100%;}
        </style>
    </head>
    <body>
        <script type="text/javascript">
            function main_map_init (map, options) {

                // Basemap
                var osm = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
                var esri = L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}');
                var google = L.tileLayer('http://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}');
                var baseLayers = {
                    "Carte OSM": osm,
                    "Photo ESRI": esri,
                    "Google Hybrid": google
                };
                L.control.layers(baseLayers).addTo(map);

                // Layer
                var dataurl = '{% url "myData" %}';
                var cadastre = L.geoJson().addTo(map);

                $.getJSON(dataurl, function (data) {
                    cadastre.fire('data:loaded');
                    cadastre.addData(data, {
                        onEachFeature:function(feature, layer) {
                            layer.bindPopup(feature.properties.reference_cadastrale.toString());
                        }
                    });
                    window.alert("Data loaded");
                    map.fitBounds(cadastre.getBounds());
                });
            }
        </script>
        {% leaflet_map "main" callback="window.main_map_init" %}
    </body>
</html>


texts: Transform Data with Microsoft Spatial SQL

texts:
Is there a way to transform geographic data in SQL Server 2008 R2?

Specifically, I want to take Lat/Long data and convert it to a State Plane coordinate system.


texts: Geocoding Guam addresses with their latitude/longuitude?

texts:
I am attempting to get lat/longs for a table of 25,000 addresses for Guam. Guam's addressing style doesn't follow the typical address number range. I've exhausted all of my geocoding resources. ESRI, Google, Bing, Yahoo, HERE, and various educational facilities. Google, thus far, has been most promising, but I am only get street centerline values returned.

I was curious whether anyone out there had attempted this before, and if anyone had any resources/ideas about how I can go about this.

Using ArcGIS 10.2 Advanced

Sample Addresses:

103 Ciriaco Loop, 96910-2070
143 Taluba Rd, 96910-2078
176 Chorito Blvd, 96910-1600
310 Ladera Ln, 96913-5868
141 Jolene Leon Guerrero St, 96913-1324


texts: How to integrate search functionality on the map filtering information in the data table?

texts:
I want to a site with the same functionality just like AZAVEA created the energy station with search functionality

http://www.afdc.energy.gov/locator/stations/results?utf8=%E2%9C%93&location=&filtered=true&fuel=E85&owner=all&payment=all&ev_level1=true&ev_level2=true&ev_dc_fast=true&radius_miles=5


texts: Is ArcGIS 10 compatible with Windows Server 2012 OS?

texts: Is ArcGIS 10 for Desktop, ArcSDE 10 for Windows, and/or ArcGIS Server 10 for Enterprise compatible with Windows Server 2012 OS? Or do we have to install 10.1 on Windows Server 2012?


texts:
I tried to make a WebMap with GeoExt and everything is working, but I don't see a scalebar.

var mapPanel, tree;
    Ext.application({
        name: 'test',
        launch: function() {
           mapPanel = Ext.create('GeoExt.panel.Map', {
                title: 'test',
                border: true,
                region: "center",
                map: {allOverlays: false},
                center: [14.000000,47.00000],
                zoom: 11,

              layers: [

                    new OpenLayers.Layer.WMS("OpenStreetMap",
                        "http://ows.terrestris.de/osm-gray/service?",
                        {layers: 'OSM-WMS' },
                        {
                            attribution: '&copy; terrestris GmbH & Co. KG
' +
                                'Data &copy; OpenStreetMap ' +
                                'contributors'
                        }
                    ), .... ]

        var store = Ext.create('Ext.data.TreeStore', {
            model: 'GeoExt.data.LayerTreeModel',
            root: {
                expanded: true,
                children: [
                   {
                        plugins: ['gx_overlaylayercontainer'],
                        expanded: true,
                        text: "Layer"
                    },
                     {
                        plugins: ['gx_baselayercontainer'],
                        expanded: true,
                        text: "Base Maps"
                    }

                ]
            }
        });

       tree = Ext.create('GeoExt.tree.Panel', {
            border: true,
            region: "west",
            title: "Layers",
            width: 285,
            height: 200,
            split: true,
            collapsible: true,
            collapseMode: "mini",
            autoScroll: true,
            store: store,
            rootVisible: false,
            lines: false,
            tbar: true
        });

        Ext.create('Ext.Viewport', {
            layout:"fit",
            hideBorders: true,
            items: {
                layout: "border",
                background: "red",
                deferredRender: false,
                items: [mapPanel, tree, {
                    contentEl: "desc",
                    region: "north",
                    bodyStyle: {"padding": "5px"},
                    collapsible: true,
                    collapseMode: "mini",
                    split: true,
                    width: 200,
                    height: 150,
                    title: "test"

                }]
            }
        });

    }
});

How can I change the code to get the scale bar for the OSM?


texts:
I want to make an asset/inventory map of locations (points only) that can be viewed and queried easily from computers and mobile devices. The dataset is not very large, and the user traffic would be quite low. I had used Google Fusion Tables and Google Maps API in the past for similar projects. I'm looking for the simplest options.
What are some of the most user-friendly options for accomplishing this?
Open-source would be ideal, but definitely not a requirement.


texts: I have a DEM layer in ArcMap 10.2 which I then clipped to fit a large shapefile. I'm trying to find the area of the new DEM shape using the Image Analysis tools, specifically the Mensuration tools. I keep getting an error message "Not all points are in the current image". I haven't used these tools before and I'm relatively new at working with DEMs. Is there a better tool to use or a different process for measuring DEM files?


texts: How do I set QgsVectorFileWriter.SaveVectorOptions for QGIS 3?

texts:
I wrote a processing scrip for QGIS 2.18 to create a multi-distance buffer rings using the haversine formula. Unfortunately, it no longer works after I updated to QGIS 3.4.5. I've tried updating the script wherever I can but I can't figure out how to fix the part of the code where it writes the buffers to a shapefile.

Here's my code:

from math import *
from qgis.core import *
from qgis.utils import iface
from PyQt5.QtCore import *
from PyQt5.QtGui import *

layer = iface.activeLayer()
for feat in layer.selectedFeatures():
    geom = feat.geometry()

start_x = geom.asPoint().x()
start_y = geom.asPoint().y()
sides = 64
radius = 6378137.0  # meters

# create layer
vl = QgsVectorLayer("Polygon", "Distance Buffers", "memory")
pr = vl.dataProvider()

# changes are only possible when editing the layer
vl.startEditing()

# add fields
pr.addAttributes([QgsField("Distance", QVariant.Int), QgsField("Label", QVariant.String)])

distance = [250, 500, 1000, 2000, 3000, 4000, 5000, 10000, 15000, 20000, 25000, 30000, 40000, 50000]
for i in range(len(distance)):
    points = []
    dist = distance[i]
    degrees = 0
    while degrees <= 360:
        degrees = degrees + 360 / sides

        start_lon = start_x * pi / 180
        start_lat = start_y * pi / 180
        bearing = degrees * pi / 180

        end_lat = asin((sin(start_lat) * cos(dist / radius)) + (cos(start_lat) * sin(dist / radius) * cos(bearing)))
        end_lon = start_lon + atan2(sin(bearing) * sin(dist / radius) * cos(start_lat),
                                    cos(dist / radius) - (sin(start_lat) * sin(end_lat)))

        points.append(QgsPointXY(end_lon * 180 / pi, end_lat * 180 / pi))

        fet_name = str(distance[i])
        if distance[i] < 1000:
            label = str(distance[i]) + "m"
        else:
            label = str(distance[i]/1000) + "km"

    # add a feature
    fet = QgsFeature()
    geometry = QgsGeometry.fromPolygonXY([points])
    fet.setGeometry(geometry)
    fet.setAttributes([fet_name,label])
    pr.addFeatures([fet])

# commit to stop editing the layer
vl.commitChanges()

# update layer's extent when new features have been added
# because change of extent in provider is not propagated to the layer
vl.updateExtents()

myDir = QgsProject.instance().readPath("./")
file_name = 'Distance Buffers' + '.shp'
ShapefileDir = myDir + "/Shapefiles/" + file_name

_writer = QgsVectorFileWriter.writeAsVectorFormat(vl, ShapefileDir, "utf-8", None, "ESRI Shapefile")

At the last line of the code I get this error:

  Traceback (most recent call last): File
  "C:/PROGRA~1/QGIS3~1.4/apps/qgis-ltr/./python/plugins\processing\script\ScriptEditorDialog.py",
  line 227, in runAlgorithm exec(self.editor.text(), d) File "", line
  68, in TypeError: QgsVectorFileWriter.writeAsVectorFormat(): arguments
  did not match any overloaded call: overload 1: argument 4 has
  unexpected type 'NoneType' overload 2: argument 4 has unexpected type
  'NoneType' overload 3: argument 3 has unexpected type 'str'

Based on the QGIS 3.0 documentation, I think writeAsVectorFormat now takes the following arguments: writeAsVectorFormat(layer: QgsVectorLayer, fileName: str, options: QgsVectorFileWriter.SaveVectorOptions, newFilename: str = ‘’) but I can't figure out how to set the SaveVectorOptions.

Can someone show me how this is done with this script, or with any other working examples?


texts:
I'm a recent convert to QGIS from arc and think it's amazing, so much more efficient and usable. It also doesn't crash constantly which helps me keep some of my sanity.

I was having issues finding some features though.
Mainly an alternating scale bar like in Arc, where there are smaller grading's at the start of the scale bar moving to larger near the end, (to help emphasize distance) and i think it looks cleaner.


texts:
I am using a layer named Faser,which I took from a program called locus GIS as ready layer,it was called power_lines_10kv30kv , I changed name to Faser  and drew the lines with it :

hier is the original layer :

when I want to save the project it says:couldn't save changes to layer Faser,couldn't add object
Konnte Änderungen am Layer Faser nicht festschreiben
Fehler: FEHLER: Objekt nicht hinzugefügt.

  Datenanbieterfehler:
      OGR-Fehler beim Erzeugen des Objekts -32: In CreateFeature(): sqlite3_prepare_v2(INSERT INTO 'power_lines_10kv30kv' ("GEOMETRY","name","power","frequency","voltage","operator","ref","cables","ground_con","lg_attach") VALUES (?,?,?,?,?,?,?,?,?,?)):
      no such module: rtree

the layer has fields "name","power","frequency","voltage","operator","ref","cables","ground_con","lg_attach"  , I tried to set values to these fields, but didn't help.
I tried to delet these fields also didn't help, and showed attributes weren't deleted :
Konnte Änderungen am Layer Faser nicht festschreiben

Fehler: FEHLER: 9 Attribute nicht gelöscht.

  Datenanbieterfehler:
      OGR-Fehler beim Löschen des Felds 8: Failed to remove field lg_attach from table power_lines_10kv30kv:
     error in trigger gii_power_areals_GEOMETRY: no such module: rtree
      OGR-Fehler beim Löschen des Felds 7: Failed to remove field ground_con from table power_lines_10kv30kv:
     error in trigger gii_power_areals_GEOMETRY: no such module: rtree
      OGR-Fehler beim Löschen des Felds 6: Failed to remove field cables from table power_lines_10kv30kv:
     error in trigger gii_power_areals_GEOMETRY: no such module: rtree
      OGR-Fehler beim Löschen des Felds 5: Failed to remove field ref from table power_lines_10kv30kv:
     error in trigger gii_power_areals_GEOMETRY: no such module: rtree
      OGR-Fehler beim Löschen des Felds 4: Failed to remove field operator from table power_lines_10kv30kv:
     error in trigger gii_power_areals_GEOMETRY: no such module: rtree
      OGR-Fehler beim Löschen des Felds 3: Failed to remove field voltage from table power_lines_10kv30kv:
     error in trigger gii_power_areals_GEOMETRY: no such module: rtree
      OGR-Fehler beim Löschen des Felds 2: Failed to remove field frequency from table power_lines_10kv30kv:
     error in trigger gii_power_areals_GEOMETRY: no such module: rtree
      OGR-Fehler beim Löschen des Felds 1: Failed to remove field power from table power_lines_10kv30kv:
     error in trigger gii_power_areals_GEOMETRY: no such module: rtree
      OGR-Fehler beim Löschen des Felds 0: Failed to remove field name from table power_lines_10kv30kv:
     error in trigger gii_power_areals_GEOMETRY: no such module: rtree


texts:
IRasterLayer layer = map.getLayer(0);

I want know that how can get attribute table of raster layer.
Such as how many rows that attribute table of raster layer have and...


texts: QGIS PointConnector Plugin - x out of x lines not drawn

texts:
Unfortunately every try to generate lines between points (.shp) with ids (1-6) and a csv-file with from - to values failed. Maybe you can give me a hint whats wrong with my workflow?

1) I generated a point-shape with ids 1 to 6, no other column
2) I created a csv with this content (from, to)

1,2
3,2
4,2
5,2
6,2

Here's the plugin repo: https://github.com/peterahlstrom/PointConnector

Do you have any ideas?


texts: Creating relative hyperlinks in QGIS PDF output

texts:
I am attempting to add text labels in the composer that will result in clickable relative hyperlinks in the PDF output.
Adding a text label, ticking "Render as HTML" and adding www.google.com results in a clickable hyperlink from the PDF to Google. However, I'm struggling to generate a clickable relative hyperlink in the PDF. I'm aware the format of a relative path needs to use \ rather than /. I've even attempted to wrap it in the following HTML code: Link but does not help.
How do I create a clickable relative hyperlink in the PDF output please?
Two related questions are:
Clickable HTML link in QGIS print composer pdf export?
Creating Mapbook with Hyperlink texts in PDF using QGIS Atlas?
I've tried this in QGIS 3.0.3


texts: Error when computing confusion matrix in ArcGIS Pro 2.7.1

texts:
I have created a classified image and I am seeking to evaluate it using the following workflow:

Create Accuracy Assessment Points (tool)
Update Accuarcy Accessment Points (tool)
Compute Confusion Matrix (tool)

The workflow is demonstrated in this video: https://www.youtube.com/watch?v=-x1ipu5-7L8
When I try to generate a confusion matrix, I receive the following error:

Troubleshooting did not yield any answers so far.


texts: Generate a custom GRID & Zonal statistics for the given Geometry in Google Earth Engine?

texts:
What are the ways to generate a Custom GRID (Ex: 100m x 100m) in Google Earth Engine for a given extent.

Once the GRID is generated how to populate zonal statistics for the same GRID using any raster image?


texts: Plugin to run one function when run button is clicked

texts:
My plugin gui is attached below which has two functions one is selecting state, cities from the combo box and distance to be entered in the lineedit and the other is if we click a pushbutton it will automatically allows user to select features from mapcanvas and provided the distance is entered in lineedit, it will find buffer for all the selected features. But Run button is common for both the functions. I want my code to do one function when run button is clicked. To be more detail, the 1st part has 3 functions
1.add state names
2.find city names
3.calc buffer

And 2nd part, Select area from map has 1 function
1.Bufferarea

Now i want my run button to perform one part when clicked depends on the user selection. FOr example, if the user clicks select area from map (2nd part) it should call bufferarea function and should give result and it should not check the functions under first part and throws error. How this can be done in my py file and what changes should be done in the codes?

It would be more clear if you can see my image.


texts: FME - ImageRasterizer fails to detect resolution of existing raster file

texts:
I have a .ecw raster that I read in and then converted into a polygon using BoundingBoxAccumulator transformer.

I am now trying to rasterize this polygon using ImageRasterizer into the same resolution as the orginial raster. If I define an exact number of columns/rows of cells, the process works.

However, if I define the number of columns and rows by referencing the original .ecw, it fails. (Inside ImageRasterizer, I define the number of cells as '$(SourceDataset_ECW)')

  ImageRasterizer(VectorToRasterFactory): Cannot convert 'WIDTH' value
  of 'C:\input.ecw' The value may be out of range or in wrong format.
  Please see factory documentation for specific range or format


texts:
I'm currently working with a DEM (10 m x 10 m resolution) that has a lot of faulty elevation values in river corridors. In order to run a hydrodynamic model I'm trying to get the following done in an autmated process (the goal is to create a Python script tool for the whole process, so I strictly want to avoid manual work on the data):

Fill rivers in the DEM using a predefined boundary polygon for these rivers. The filling should reach from the upper edge of one bank to the other in order to only simulate the known discharges that leave the river corridors during a flood event.

So far I have used the following tools and commands to get the job done:

Clipped the buffered river polygons from the original DEM
Run focal statistics using 3 pixel circular search distance and the MAXIMUM values
Run the focal statistics tool using 3 pixel circular search distance and the MEAN values three times in a row in order to even out the result from step 2
Clipped the resulting river corridor DEM to its original extend
Mosaiced the evend out rivers onto the original DEM

This process works fine for relatively flat areas. However there are numerous rivers in mountainous areas that have rather cliffs at one or either side of the banks. In these cases step 2 resolves in the river corridor being up way too high in the final product.

I've also tested focal statistics only using MEAN for five times in a row. This leads to partially filled river corridors, the effect is not distinct enough.

What am I missing? Any suggestions to my problem? Who has tried something similar?

(I'm using ArcGIS 10.3 on a 64bit system with an Advanced Licence)


texts: Turning off all pulsing-heartbeat and other animated effects in ArcGIS Pro?

texts:
Every time I select a feature or edit or split a feature the selection, appears to slowly pulse which is a new visual effect in Pro.

The pulse effect takes way too long bordering on annoying which is especially cumbersome when splitting a feature to many parts as every part slowly pulses after the split operation completes.

The whole editing experience feels slower and non-responsive as a result.

Is there a way to turn off ALL such animated effects in ArcGIS Pro?


texts: Cutting a line by a list of varied percentages along

texts: Does anyone know a way to cut a line at specified percentages along that line? I know you can do this in ArcGIS if you have a specific percentage in mind, but I want to do it at varied percentages (5, 25, 26.5, 55.5, etc.). Hoas anyone figured out an easy way to do this? Can it be done in QGIS? ArcGIS?


texts: Seeking publicly available ArcIMS server?

texts:
Does anyone know of a publicly / externally available ESRI ArcIMS server / service / services with the full US base map?

Doesn't have to be free, but that's always good.  I've seen some city-specific ones, but I need a USA one with street-level detail.


texts: Creating an ESRI dashboard that displays species occurrence by watershed

texts:
I have an area of interest broke into regions with the typical attributes you would expect (area, perimeter, name, type, etc.) and added a 'Species Present' field that I populated using a large database of point observations. The 'Species Present' field records are entered as text separated by a comma ie, dog, cat, fish, etc. however I did also add fields for each individual species which could be used instead (there are ~25 species of interest).
I would like to create a web application with ArcGIS Online tools that displays two things:

A map of my area of interest where each region can be selected and then display the species present within it. This seems fairly straight forward in the most basic sense however I want it to interact with the second feature I would like included.
A list of all species present (along with photo and brief description) that you can select a species and have the regions it is present within be highlighted on the map.

I thought dashboards would work well for this but I'm new to dashboards and I can't seem to wrap my head around how to make it function the way I want it to. Some of the basic tools I need seem to exist (like filtering by "contains") but I think I am approaching it wrong.


texts:
I am trying to implement line simplification on a polyline dataset using SimpliPy in QGIS but there is not an option for the output dataset. There are two notes mentioned in the plugins repository ( https://plugins.qgis.org/plugins/simplipy/ ):
- You must have installed Shapely 1.2.18 or you will get an error installing or using this plugin.
- The output can only be saved to a "New layer" for now. (The Output:Field isn't working).

Can anyone help me with that?


texts:
I'm working on a tool that identifies features and repairs them using an existing tool. At the moment I am struggling to put my idea into code however. The purpose is to use a search cursor from a Select Features By Location layer to identify and then select features in the original data and execute another tool. As of right now, my code looks something like this (in ArcMap 9.3):

Junctions_Lyr = "Junctions_Lyr"
gp.MakeFeatureLayer_management(Junctions, Junctions_Lyr, "", "", "")
gp.SelectLayerByLocation_management(Junctions_Lyr, "INTERSECT", Corrupt_Lyr, "", "NEW_SELECTION")
gp.SaveToLayerFile_management(Junctions_Lyr, "Junctions.lyr", Workspace)
rows = gp.SearchCursor(Junctions, "OBJECTID")
curs = gp.SearchCursor(Junctions_Lyr, "OBJECTID")
for row in rows:
    if row.OBJECTID = curs.OBJECTID:
        # Something to select the feature and run clean up tool.
        rows.next()
    else:
        rows.next()

Essentially, this will (hopefully) select features in the Junctions Feature class if they intersect with a corrupted layer. They will then be selected and saved to file. The original feature class will then have a search cursor run through it, and, if the Object ID matches with one from the Saved Layer file, it will select the feature and run the clean up tool.

Am I approaching this correctly? I think my inability to properly articulate this is making the issue a lot more difficult to resolve.


texts: I am working in QGIS and would like the grid frame to align with the edges of my conic projection region. Is there a way to do this? In arc it is very straightforward but I have yet to find a method within print composer. Does anyone know of a plugin capable of clipping frames? The region is between lat 52 and lat 60.5, and between lon --115 and lon -126. The projection is canada equal area albers conic (epsg:102001). See image below for reference:


texts: Leaflet.label and MarkerCluster problem with zoom dependent add/remove layers

texts:
Here's the setup:   I have a leaflet map with point data,  to which I have applied leaflet.label and leaflet.markercluster. I add the clustered point data at a particular zoom level (code below). All works as planned until I zoom back out (points removed) and in again (points added). The labels no longer work for the points that don't get clustered. Labels still work for points within a cluster (even if they become unclustered with zoom.)

Is there something in my code that's throwing it off when it re adds the point cluster layer? Has anyone experienced this and found a solution?  Or can anyone suggest something, such as binding the label somewhere else, etc?

    var cpWells = new L.geoJson(json_cpWellsMin, {
        onEachFeature: pop_cpWellsMin,
        pointToLayer: function(feature, latlng) {
            return L.circleMarker(latlng, doStylecpWellsMin(feature))
                .bindLabel(feature.properties['wellID'], {
                    direction: 'auto',
                    offset: [20, -12.5]
            })
        }
    });

    var clusterWells = new L.MarkerClusterGroup({
        showCoverageOnHover: false,
        maxClusterRadius: 20,
        spiderfyDistanceMultiplier: 4
    });
    clusterWells.addLayer(cpWells);

    map.on('zoomend ', function(e) {
        if (map.getZoom() < 10) {
            map.removeLayer(clusterWells)
            map.addLayer(json_countyPoints)
            json_countiesJSON.setStyle({
                'fillOpacity': '0.7'
            });
        } else if (map.getZoom() >= 10) {
            map.addLayer(clusterWells)
            map.removeLayer(json_countyPoints)
            json_countiesJSON.setStyle({
                'fillOpacity': '0.0'
            });
        }
    });


texts:
I'm trying to install a QGIS web server on windows 7 (64 bit), and request maps on HTTP. I followed this tutorial: http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial

I installed apache separately (via xampp), because if I installed it via the osgeo4w setup, it gave me errors saying that the DLLs of IPP codec pack are missing. I also disabled FastCGI, because that gave me some other kind of errors. Now I got to the point where the server works, it starts up, and it answers to requests on HTTP. The problem is that it always sends back a black white picture. I checked the .qgis project file several times and everything is fine. I tryed adding layers through WMS to the QGIS desktop app, and I was successfull, and got a nice map in the desktop app.

What could the problem be, why does the server send back a blank picture?


texts: How to connect to ArcSDE for using the ArcObjects Erase tool in C#?

texts:
I want to make use of geoprocessing via .NET ArcObjects, in this case of the "Erase" tool. This is easy once dealing with a local gdb file what I did for feasibility study. The issue occurs when I want to work on feature classes of MS SQL ArcSDE database. Normally, all operations are done on a IWorkSpace that is created and opened. Here, this page http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Working_with_ArcSDE_data/0001000001zs000000/ states that I can either use so called .sde file or property set. So I tried to use the PropertySet I created for the IWorkspace before, but it did not work - it expects IVariantArray. In the aforementioned website, iVariantArray is used to launch a tool that creates the .sde file. There is no description on the order of parameters passed, I can only guess what means what.

Obviously I understand, that I need to pass also the three parameters for Erase tool: in_features,out_feature_class and erase_features. Can someone please explain to me how can I do that?

Am I doing something wrong? I can't understand why is the creation of .sde file described in the topic concerning geoprocessing, while it's clearly missing the description of a second way to connect via property set.


texts: How to Identify Coordinate System (CRS) from projection file using Python

texts:
I am working on many shapefiles (their corresponding projection files are also presented).

Every shapefile has a different Coordinate System, so it becomes difficult to plot these in a generic manner.

How can I identify with Python what is the CRS used in the shapefile?

For example, the ".prj" file for some shapefiles is given below, but I am not able to identify what is the CRS to be used.

GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]]

GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]]


texts: ArcObjects: AfterItemDraw only fires for layers in the root of TOC

texts:
As I mentioned at the end of this answer the IActiveViewEvents.AfterItemDraw event (even with IViewManager.VerboseEvents enabled) only seems to fire for layers in the root of ArcMap's table of contents, not nested sublayers, so if you want individual events to be fired for a layer it must be moved into the root of the TOC and not within a group layer.

Does anyone know of a workaround for this or have findings to the contrary?


texts:
I'm trying to create a DEM from this raster map:

I managed to clean all the shapes and text. I tried to write a program which finds the curve pieces and connects them. But, I realized that it is not simple. Is there a program which takes this raster map and gives me DEM. I want to create a 3D model of this terrain.


texts:
I am trying to generate a series of maps suburb-wise for my municipality. All these years I've been doing it manually by panning around the municipality layer and zooming into the suburbs to create individual maps. This year I am giving the Map Atlas feature in QGIS a go. I am extremely impressed with its capabilities. After exploring a bit I realised I am unable to swap between the 'landscape' and 'portrait' mode on the fly. Expectedly some suburbs are better suited to 'portrait' mode whilst others 'landscape'.

I am sure there must be a way to swap between the two. Can anyone point me in the right direction?


texts: I have an implementation of a computer vision algorithm in python. I would like to contribute this to opencv-python. This is my first time contributing to FOSS. How should I go about it?


texts:
I'm trying to run a python script in QGIS which imports the colour module. However, when I run it via the python console in QGIS, I receive the ModuleNotFoundError:

Python Console
Use iface to access QGIS API interface or Type help(iface) for more info
Security warning: typing commands from an untrusted source can lead to data loss and/or leak
import colour
Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS 3.10\apps\Python37\lib\code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "C:/PROGRA~1/QGIS 3.10/apps/qgis-ltr/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'colour'
from qgis.core import *

This seems to be a fairly common issue and probably relates to the environment variables. I followed the instructions here for setting my PATH and PYTHONPATH variables but still haven't had much success. Oddly enough, I can import colour but not qgis.core in OSGeo4W. Any advice on how to import the colour module in QGIS successfully?

C:\WINDOWS\system32>python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import colour
>>> from qgis.core import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'qgis'
>>>


texts: How to draw a Polyline using a Cartesian array?

texts:
I need to draw a polyline using the mouse click.

All examples I've found only show the polyline positions using a Cesium.Cartesian3.fromDegreesArray:

var glowingLine = viewer.entities.add({
    name : 'Glowing blue line on the surface',
    polyline : {
        positions : Cesium.Cartesian3.fromDegreesArray([-75, 37,
                                                        -125, 37]),
        width : 10,
        material : new Cesium.PolylineGlowMaterialProperty({
            glowPower : 0.2,
            taperPower : 0.5,
            color : Cesium.Color.CORNFLOWERBLUE
        })
    }
});

But I need to use a cartesian comming from

var cartesian = viewer.camera.pickEllipsoid( movement.position, scene.globe.ellipsoid );

This is what I've done but with no success:

// Just to illustrate the mouse click consider movement.position different here.

var cartesian1 = viewer.camera.pickEllipsoid( movement.position, scene.globe.ellipsoid );
var cartesian2 = viewer.camera.pickEllipsoid( movement.position, scene.globe.ellipsoid );

    var entity = viewer.entities.add({
        polyline: {
            positions: [cartesian1, cartesian2],
            width : 5,
            material : new Cesium.PolylineOutlineMaterialProperty({
                color : Cesium.Color.ORANGE,
                outlineWidth : 2,
                outlineColor : Cesium.Color.BLACK
            })
        }
    });

This don't work. The error is:

An error occurred while rendering. Rendering has stopped.
RangeError: invalid array length
m.generateArc@http://localhost:36215/resources/Cesium/Workers/createPolylineGeometry.js:231:7308
m.generateCartesianArc@http://localhost:36215/resources/Cesium/Workers/createPolylineGeometry.js:231:8334
T.createGeometry@http://localhost:36215/resources/Cesium/Workers/createPolylineGeometry.js:231:12962
n@http://localhost:36215/resources/Cesium/Workers/createPolylineGeometry.js:231:14985
o@http://localhost:36215/resources/Cesium/Workers/createGeometry.js:231:22277
i@http://localhost:36215/resources/Cesium/Workers/createGeometry.js:231:21277
a/<@http://localhost:36215/resources/Cesium/Workers/createGeometry.js:231:21418

I have a 3D globe with terrain heights.


texts: Tile Mill error MBTiles: "out of bounds geographic extent"

texts:
I'm trying to make MBTiles using Tile Mill. The data source is a geotiff exported from ArcMap Desktop 10.5 from a map document in the Web Mercator WGS84 Coordinate Reference system. Tile Mill keeps giving me the following:

  Detected out of bounds geographic extent
  (-180,7409548.0421638,-462071.4434831566,85.051) for layer 'untitled'.
  Please ensure that the SRS for this layer is correct. Its native
  extent is '-467352.53737867775,7409548.0421638,-462071.4434831566,7413358.049783817'

GDALinfo gives: Size is 3119, 2250
Coordinate System is:
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],
    AUTHORITY["EPSG","3857"]]
Origin = (-467352.537378677749075,7413358.049783816561103)
Pixel Size = (1.693200992472309,-1.693336720007161)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_XRESOLUTION=300
  TIFFTAG_YRESOLUTION=300
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -467352.537, 7413358.050) (  4d11'53.88"W, 55d15'51.97"N)
Lower Left  ( -467352.537, 7409548.042) (  4d11'53.88"W, 55d14'41.75"N)
Upper Right ( -462071.443, 7413358.050) (  4d 9' 3.09"W, 55d15'51.97"N)
Lower Right ( -462071.443, 7409548.042) (  4d 9' 3.09"W, 55d14'41.75"N)
Center      ( -464711.990, 7411453.046) (  4d10'28.48"W, 55d15'16.87"N)
Band 1 Block=3119x8 Type=Byte, ColorInterp=Red
Band 2 Block=3119x8 Type=Byte, ColorInterp=Green
Band 3 Block=3119x8 Type=Byte, ColorInterp=Blue