Re: [Qgis-user] How to import a Google map

2014-09-10 Thread José G Moya Y .
I'm not an expert, just a newbie, but you should be able to export it to
kml / kmz from google maps, google maps engine or google earth. If you use
kmz, you have to unzip the kmz file (if you use windows, you could need to
change its extension to .zip) and take the kml file inside it.
They are also some trouble managing google kml files, since they include
raster info along with vector info. I read about it in previous message
this august.




2014-09-10 12:30 GMT+02:00 labiancamaril...@libero.it 
labiancamaril...@libero.it:

 Hi,
 my colleague has done a map indicating some points
 using google maps.
 I would like to import into Qgis.
 How can I do? Is there a plugin?
 thanks
 Marilena

 ___
 Qgis-user mailing list
 Qgis-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-user

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Rif: Re: In: wps plugin problem

2014-09-10 Thread José G Moya Y .
I think this is similar to a bug I notified earlier in july. There was a
very obvious bug inside the python file and I tried to change it, but It
did not compile. I will look inside my files.

2014-09-10 14:28 GMT+02:00 Salvatore Larosa lrssv...@gmail.com:

 Hi,

 On Wed, Sep 10, 2014 at 2:04 PM, samanta.biasio...@sinergis.it wrote:


 Thank you very much, for your reponse,
 My colleague opened a ticket on their redmine too (
 http://hub.qgis.org/issues/11178) and I hope someone can help us.

 this is a specific issue for the WPS plugin, so you should file a ticket
 to the correct bug tracker [0] in order to warn the maintainer.
 Also, should be helpful adding a sample URL to test.

 Regards,
 -SL

 [0] - http://hub.qgis.org/projects/qgswps

 --
 Salvatore Larosa
 linkedIn: http://linkedin.com/in/larosasalvatore
 twitter: @lrssvt
 skype: s.larosa
 IRC: lrssvt on freenode

 ___
 Qgis-user mailing list
 Qgis-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-user

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] legend feature count - 2 values

2014-09-10 Thread José G Moya Y .
When I see that in the map, it usually means N features in laye, M being
displayed according to style rules. But I'm a newbie, so it could mean
something else.

-
Perdon por  las posibles faltas, escribo desde un móvil...
El 10/09/2014 13:39, ralfwessels g...@ralf-wessels.de escribió:

 hello,
 Does somebody know, why (when feature count in the legend is activated)
 there are 2 values  - one behind the name and one behind the symbol?

 
 http://osgeo-org.1560.x6.nabble.com/file/n5161067/feature_count_screenshot.png
 

 And why they are sometimes different (like in my example of a shapefile)?
 In my opinion the value behind the symbol is correct, but what is the other
 value for?

 ralf





 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/legend-feature-count-2-values-tp5161067.html
 Sent from the Quantum GIS - User mailing list archive at Nabble.com.
 ___
 Qgis-user mailing list
 Qgis-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-user

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] kmz export sed script

2014-09-02 Thread José G Moya Y .
Hi!

As I said in a previous message, I use qgis to put together many geographic
information sources prior to downloading the data as kmz to my mobile.

That's the reason I wrote a small script to generate kmz icons from a
qgis-generated kml.

That script is a sed script, meaning it has to be processed with the
sed utility included in Linux. If you have a Windows version of qgis
bundled with Msys (such as osgeo4win), you could probably execute it from
the msys command line.

Someone could try to adapt it to python, but I don't know how to make
python scripts.

Please note: Lines are long and they could be wrapped when sendind as
email. I will use an empty line (two carriage returns) to mark new line.


---
SCRIPT 1  Generate icons from name field

This script takes a qgis-generated kml file, and adds an icon (called
Cueva.png) to every feature with a name containing Cueva or Sima,
another icon (called .Icnitas.png) to every feature with a name
containing icnita or Icnita,
another icon (called Fosil.png) to every feature with a name like
Fosil, Fósil, fosil or fósil, and another icon (called Mina.png)
to every feature with a name containing Mina.

The icons should be placed in a folder called images, and zipped along
with the modified kml file in a file with kmz extension.

The script should be invoked like this:

sed mykmlfile.kml -f kmzfromname.sed  newkmlfile.kml

After that, you should use your preferred zip manager to zip together the
files. I use this:

7z -a -tzip newkmlfile.kmz newkmlfilekml images/*.png

but the syntax would be different if you use a different zip manager.

kmziconfromname.sed--CUT
HERE--
#!/bin/sed

#Replace name tag with Cueva or cueva with icon and name tag

/name[^]*[Cc]ueva/{;s/name/iconhrefimages\/Cueva.png\/href\/iconname/;};

#Replace name tag with Sima or sima with icon and name tag

/name[^]*[Ss]ima/{;s/name/iconhrefimages\/Cueva.png\/href\/iconname/;};

#Replace name tag with Icnita or icnita with icon and name tag

/name[^]*[Ii]cnita/{;s/name/iconhrefimages\/Icnitas.png\/href\/iconname/;}

#Replace name tag with F?sil or f?sil (probably, fosil or fósil) with icon
and name tag

/name[^]*[Ff].sil/{;s/name/iconhrefimages\/Fosil.png\/href\/iconname/;}

#Replace name tag with Mina or mina with icon and name tag

/name[^]*[Mm]ina/{;s/name/iconhrefimages\/Mina.png\/href\/iconname/;}

#Previous code for icons was a pseudocode. Replace it with the real code.

s!icon!StyleIconStylescale1.0/scaleIcon!;

s!/icon!/Icon/IconStyleLabelStylescale1.0/scale/LabelStyleLineStylewidth1,0/width/LineStyle/Style!

#I don't know why, but replacing folder with document allows oruxmaps put a
name (instead of a date) to this layer.

s!Folder!Document!

kmziconfromname.sed---END OF
FILE---


SCRIPT 2 - Generate icons from a custom field (not name)

This is a skeleton script. In the previous sample, I used the name to
detect the class of each feature, but my kml file has a field caled
T006_006_C that stores the actual feature class.

So I could use that field instead.

But, in order to do that, I have to read the field inside the
ExtendedData tag and, after that, put a new flag outside that tag.

Doing that with SED is tricky, because SED uses to read one line at a time.
We have to tell it to group the whole ExtendedData group in a single line.

Please notice you should adapt this script to your needs, i.e., replace
T006_006_C with the field name you want, add code to replace the !---icon
-- tags with your preferred icon, and so on.

The usage would be again,

sed mykmlfile.kml -f kmzfromfield.sed  newkmlfile.kml

After that, you should use your preferred zip manager to zip together the
files. I use this:

7z -a -tzip newkmlfile.kmz newkmlfilekml images/*.png

but the syntax would be different if you use a different zip manager.

---kmziconfromfield.sed--CUT
HERE--
#!/usr/bin/sed

#Example: how to make icon from field using SED

#Replace T006_006_C with fieldname

:a

N

#Do not put spaces after the backslash in the next line:

s/\
/ /g


/\/ExtendedData/!ba

s/\(ExtendedData.*SimpleData
name=.T006_006_C.\)\([^]*\)\(.*\/ExtendedData\)/\1\2\3!-- Icon_For:\2
--/

#Step 2: Replace !-- Icon_For:\2 -- with code for icon
(StyleIconStyle... etc) (See script 1)

#Now you have to change all categories with their icon

#This is an example on how to change Icon fror:Modelado K* to the
Cueva.png icon:

s/!-- Icon for:Modelado [Kk].*--/iconCueva.png\/icon/

#Now we change Icon pseudocode with real icon code.

s!icon!StyleIconStylescale1.0/scaleIcon!;

s!/icon!/Icon/IconStyleLabelStylescale1.0/scale/LabelStyleLineStylewidth1,0/width/LineStyle/Style!

#Last of all, we change the Folder 

[Qgis-user] Descriptionfield and Namefield in KML export

2014-08-28 Thread José G Moya Y .
Hi!J


On QGIS 2.4, I have some kind of trouble exporting to KML from SHP files
when the name field is not called name.
If I specify the Name field in the SaveAs-KML file -Datasource options
dialog, QGIS ignores that option.
A workaround is using the Field calculator to generate a new field called
Name. Then, QGIS uses the Name field.

This is the result of my experiments:

1) Export kml from a SHP file without NAME field, specifying field XXX as
Namefield
= Resulting KML file has no name. Field XXX is exported as Extended data
with name XXX.

2) Export kml from a SHP file with NAME field, Specifying field XXX as
Namefield
==Resulting KML file has namefield NAME, XXX field is NOT exported.

3) Export kml from a SHP file with NAME field, Specifying NAME as name
field
==Everything is ok.

Please note the same applies to Description field option.

Also, I use to need calculated descriptions (I.E. to generate a html
description with a table grouping many fields), but I can't use the field
calculator inside the description field option, so I have to make a copy
of the SHP file with the custom Description field, using the field
calculator before exporting to kml.

(Another question: what does mean export simbology? I find the results
are the same with or without clicking that option. I would like an option
to save my custom categorized icons ...)
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] downloading map data

2014-08-06 Thread José G Moya Y .
Hi, Josselyn.

I'm a novice QGIS user, so you'd probably wait for someone more
experienced.

WFS (VECTOR) layers are cacheable, meaning you can save them with the
save option (if you have the translated version it shows as Guardar).

But WMS (TILE) layers and  Web layers are not cacheable - you can't save
them, and in some cases you can't even print them.

If you want to avoid downloading maps once and again, you could use a third
party software to download the tiles. Look for tile downloader. I used
such approach one year go, but I don't remember the configuration details.


There is also a work offline plugin. I haven't tested yet, and I'm away
from my computer, so I can't be very informative --sorry!

Another solution I use to apply is georeferencing a downloaded map, since
my country offers free scanned maps for noncommercial usage. But, as I read
on the official ign.gob.pe, Peru *sells* the scanned/shp maps -- and they
seem very expensive.

Saludos desde España




2014-08-05 18:25 GMT+02:00 Josselyn Agura josselynagur...@gmail.com:

 Dearest Zoltan -

 I am running QGIS 2.4 on a Mac OSX v. 10.9.4. I am able to load Vector
 layers into a project, but whenever I try to load a map - either
 OpenStreetMap, Google Physical, etc - it takes ages to finally load. Is
 there a way I can download specific maps to the program instead of having
 to load them from the internet each time?

 Best

 Health Mapping in Peru

 ___
 Qgis-user mailing list
 Qgis-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-user

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Error in dialog for joining files

2014-07-29 Thread José G Moya Y .
I have detected an error in the dialog for joining files (ftools plugin).

This error is issued:when pressing the accept button in the dialog that
appears at:

Vector = Data management = Combine shape files

(the menu names could differ, I'm translating to english the names that
appear in my localised menu).


  File
C:\OSGEO4~1\apps\qgis\python\plugins\fTools\tools\doMergeShapes.py, line
159, in accept
AttributeError: 'Dialog' object has no attribute 'encoding'


I have qgis instaled from OSGEO4Windows distribution, and OSGeo's Python27
is the first python interpreter in the python search path.


I think changing all references to self.Encoding to System could work as
a quick hack, but I don't manage it to work (I don't remember how did I
recompile a .pyc from a .py last time I needed it).
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] WMS servers, spain

2014-07-28 Thread José G Moya Y .
Hi!
I understand mantaining the right WMS list is a pain, specially in
countries like Spain where WMSs are very decentralized and also change its
domain each few years.

The right WMS server for IDERIOJA Gobierno de La Rioja OGC WMS is:
http://ogc.larioja.org/wms/request.php?

Instead of:
http://wms.larioja.org/request.asp?

(I haven't tried the many, village-scope sub WMSs for La Rioja, but I guess
they use ocg. instead of wms. as its last domain component)

The main WMS aereal photo for spain is not listed, it is:
http://www.idee.es/wms/PNOA/PNOA?


Yours,

José Moya.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user