Re: [Qgis-developer] Unicode type QGIS_RELEASE_NAME and QGIS_VERSION

2016-07-12 Thread Minoru Akagi
Hi,

2016-07-12 16:59 GMT+09:00 Akbar Gumbira :
> 2016-07-12 16:35 GMT+09:00 Matthias Kuhn :
>> As a general rule of thumb: don't cast to other types if there is no
>> requirement, that will help to prevent such issues and make the upcoming
>> upgrade to python 3 much easier.
>
> Yes, this should be Python 2.xx's developer haiku: Bytes on the outside,
> unicode on the inside. Encode/decode at the edges.

Unicode type release name (str type in python 3) must be compatible
with the saying.

Fixing the error would be easy for the relevant python devs. But if
the change was introduced in 3.0 (`type(QGis.QGIS_RELEASE_NAME)` gives
me `` in QGIS 2.14. Not sure that it was technically
possible to keep str type for the constants), QGIS 2.16 users didn't
have to wait for the relevant plugin devs to release a modified
version.

Thanks,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Unicode type QGIS_RELEASE_NAME and QGIS_VERSION

2016-07-11 Thread Minoru Akagi
Hi,

Just a quick note for python plugin devs.

I received an error report related to QGis.QGIS_VERSION constant [1].
In QGIS 2.16, QGis.GIS_RELEASE_NAME and QGis.QGIS_VERSION constants
have been changed to unicode type. I guess that the change is
necessary for unicode release name support.

With QGIS 2.16, encoding GIS_RELEASE_NAME/QGIS_VERSION with no
explicit character code specified causes UnicodeEncodeError (try
`str(QGis.QGIS_VERSION)`) and a few plugins seem to be affected (e.g.
profiletool, numericalVertexEdit, etc).

[1] https://github.com/minorua/TileLayerPlugin/issues/20

Regards,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QgsPluginLayer.writeStyle() must be overridden?

2016-07-06 Thread Minoru Akagi
Hi Nathan and devs,

I've updated my installation (to cdf82a2), and the error has gone away. Great!


Many thanks,
Minoru


2016-07-07 14:09 GMT+09:00 Minoru Akagi <akagi...@gmail.com>:
> Hi Nathan,
>
> 2016-07-07 14:03 GMT+09:00 Nathan Woodrow <madman...@gmail.com>:
>> Hi,
>>
>> What is the version you are running.  I think that was patched by Martin at
>> one stage.
>
> Revision is 6035f19. Trying to update the qgis-dev package.
>
>
> Thanks,
> Minoru
>
>> On Thu, Jul 7, 2016 at 3:01 PM, Minoru Akagi <akagi...@gmail.com> wrote:
>>>
>>> Hi devs,
>>>
>>> I'm looking forward to the next wonderful release, and now testing
>>> TileLayerPlugin with qgis-dev (OSGeo4W64), I sometimes encounter the
>>> following error message while loading a project with a plugin layer.
>>>
>>> NotImplementedError: QgsPluginLayer.writeStyle() is abstract and must
>>> be overridden
>>>
>>> According to the API doc [1], QgsMapLayer.writeStyle() has been added
>>> in 2.16 and is reimplemented in QgsVectorLayer and QgsRasterLayer, but
>>> does not seem to be reimplemented in QgsPluginLayer.
>>>
>>> Can QGIS core avoid raising this error? Or should all the subclasses
>>> of QgsPluginLayer override writeStyle()?
>>>
>>> [1] https://qgis.org/api/classQgsMapLayer.html
>>>
>>> Regards,
>>> Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QgsPluginLayer.writeStyle() must be overridden?

2016-07-06 Thread Minoru Akagi
Hi Nathan,

2016-07-07 14:03 GMT+09:00 Nathan Woodrow <madman...@gmail.com>:
> Hi,
>
> What is the version you are running.  I think that was patched by Martin at
> one stage.

Revision is 6035f19. Trying to update the qgis-dev package.


Thanks,
Minoru

> On Thu, Jul 7, 2016 at 3:01 PM, Minoru Akagi <akagi...@gmail.com> wrote:
>>
>> Hi devs,
>>
>> I'm looking forward to the next wonderful release, and now testing
>> TileLayerPlugin with qgis-dev (OSGeo4W64), I sometimes encounter the
>> following error message while loading a project with a plugin layer.
>>
>> NotImplementedError: QgsPluginLayer.writeStyle() is abstract and must
>> be overridden
>>
>> According to the API doc [1], QgsMapLayer.writeStyle() has been added
>> in 2.16 and is reimplemented in QgsVectorLayer and QgsRasterLayer, but
>> does not seem to be reimplemented in QgsPluginLayer.
>>
>> Can QGIS core avoid raising this error? Or should all the subclasses
>> of QgsPluginLayer override writeStyle()?
>>
>> [1] https://qgis.org/api/classQgsMapLayer.html
>>
>> Regards,
>> Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] QgsPluginLayer.writeStyle() must be overridden?

2016-07-06 Thread Minoru Akagi
Hi devs,

I'm looking forward to the next wonderful release, and now testing
TileLayerPlugin with qgis-dev (OSGeo4W64), I sometimes encounter the
following error message while loading a project with a plugin layer.

NotImplementedError: QgsPluginLayer.writeStyle() is abstract and must
be overridden

According to the API doc [1], QgsMapLayer.writeStyle() has been added
in 2.16 and is reimplemented in QgsVectorLayer and QgsRasterLayer, but
does not seem to be reimplemented in QgsPluginLayer.

Can QGIS core avoid raising this error? Or should all the subclasses
of QgsPluginLayer override writeStyle()?

[1] https://qgis.org/api/classQgsMapLayer.html

Regards,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Qgis2threejs error?

2016-05-02 Thread Minoru Akagi
Hello Paolo,

Please try going to http://get.webgl.org/ and check if your web
browser supports WebGL.


Regards,
Minoru

2016-05-02 19:19 GMT+09:00 Paolo Cavallini :
> Hi all,
> I'm geting a blank page when trying to display the results. There is an
> error:
>
> three.min.js:513 THREE.WebGLRenderer 70
> three.min.js:517 Error creating WebGL context.
> three.min.js:517 Uncaught TypeError: Cannot read property
> 'getShaderPrecisionFormat' of null
>
> Any hint?
> Thanks.
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] 2.5D rendering crowdfunding

2015-11-03 Thread Minoru Akagi
Hi Paolo,

My plan is just to make interactive preview using Qt5 QWebView.
Continue to use JavaScript and three.js library.

Regards,
Minoru

2015-11-04 3:48 GMT+09:00 Paolo Cavallini :
> Hi all,
> regarding:
> http://www.opengis.ch/2015/11/02/qgis-crowdfunding-2-5d-rendering
> I remember Minoru had plans for a complete rewrite of qgis2threejs,
> using native Qt 3D functions: would it be worthwhile to check also this
> approach before starting to code?
> All the best, and thanks.
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Geometry type conversion of 2.6

2014-11-11 Thread Minoru Akagi
Hi,

I just found size of .shp file increases more than twice (2900 bytes
- 6500 bytes when it has 100 points) when I saved a point layer as a
shapefile. I didn't edit the layer anything, but the geometry type was
converted from Point to Multipoint.

Maybe this must not expected behavior. Is this a big bug of 2.6? See
also #11542 and #11597.


Regards,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] qgis2threejs issue

2014-11-09 Thread Minoru Akagi
Hi Paolo,

2014-10-31 18:22 GMT+09:00 Paolo Cavallini cavall...@faunalia.it:
 Il 31/10/2014 09:58, Minoru Akagi ha scritto:
 You need to take some steps. Do not change view extent of map canvas
 while these steps:
 1. save the map canvas as a PNG image.
 2. set the background color as PNG transparent color using a photo
 editor. I used IrfanView for this purpose.
 3. in the plugin dialog, select the image file option in the display
 type group and enter the file path in the edit box.
 4. set transparency to 1% to enable transmission, and uncheck the
 build sides option.
 5. do export

 works smoothly, thanks. IMHO it would be better to make all this automatic.
 should I open another ticket?

I think an option to make the background color of map canvas
transparent is useful. Also, if image file has a transparent color
(GIF) or alpha channel (RGBA PNG), the transmission option should be
automatically enabled.

Please open a ticket if you like.

Regards,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] qgis2threejs issue

2014-10-31 Thread Minoru Akagi
2014-10-31 16:36 GMT+09:00 Paolo Cavallini cavall...@faunalia.it:
 Il 31/10/2014 04:12, Minoru Akagi ha scritto:

 just tested with OrbitControls, and I still can rotate the plane below the 
 surface,
 which does not seem appropriate to me.

 It may be possible to add an option to limit rotation in OrbitControls.

 Taht would be appropriate IMHO. Should I open a ticket?

Yes, please.

 BTW, I also have the background canvas shown in white, which also looks 
 bad: any
 solution for this?

 What browser do you use? I use Chrome, Firefox and IE11 for test.

 Chromium and FF, same thing. See attached.

You need to take some steps. Do not change view extent of map canvas
while these steps:
1. save the map canvas as a PNG image.
2. set the background color as PNG transparent color using a photo
editor. I used IrfanView for this purpose.
3. in the plugin dialog, select the image file option in the display
type group and enter the file path in the edit box.
4. set transparency to 1% to enable transmission, and uncheck the
build sides option.
5. do export

--
Cheers,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] qgis2threejs issue

2014-10-30 Thread Minoru Akagi
Hi Paolo,

2014-10-29 19:12 GMT+09:00 Paolo Cavallini cavall...@faunalia.it:
 Il 28/10/2014 09:36, Minoru Akagi ha scritto:

 Since the last used control is saved, I did not consider it carefully.
 Now it's ok to change the default controls to OrbitControls, which has
 more functions (e.g. arrow-key control and auto-rotation) and is
 probably suitable for flat earth.

 Hi Minoru,
 just tested with OrbitControls, and I still can rotate the plane below the 
 surface,
 which does not seem appropriate to me.

It may be possible to add an option to limit rotation in OrbitControls.

 BTW, I also have the background canvas shown in white, which also looks bad: 
 any
 solution for this?

What browser do you use? I use Chrome, Firefox and IE11 for test.


Regards,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] [Qgis-tr] size of translations, use a distinct repo?

2014-10-30 Thread Minoru Akagi
Hi,

2014-10-31 1:12 GMT+09:00 Werner Macho werner.ma...@gmail.com:
 Other thing is that I think about only updating all translations in
 source only every two weeks (or probably only in front of a release)
 as the translation should be done in transifex anyway. And only
 updating the english source in transifex (and master of course).
 Pros: even smaller and less commits,
 Cons: Some translators often like to see how it looks like and I
 understand that from time to time you want to see if it fits.

 What do you think about that?

We can download the latest ts file from Transifex and build it with Qt
Linguist or lrelease command. So just one time update of translation
files in GitHub before every release is enough for me. I use a batch
file (below) to build it, and then check the translation appearance
with the qgis-dev of OSGeo4W.

The message location information must be heavy for the git repository,
but it may be useful for translators. I use it to find the relevant
source code, for example, to know what string %1 is replaced with (is
it replaced with a number? layer name? or error message?). We can see
the name of context that a message is located, but it is not always
helpful to find the location of message. Without location information,
I'll find the source location using search from files function of
text editor, but it is not efficient way.

Is it possible to upload the source ts file with location information
to Transifex, and clean up location lines just before the translation
files are committed to the git repository?


### build_ts.bat
---
call C:\OSGeo4W64\bin\o4w_env.bat

SET TS_DIR=translations\QGIS.qgis-application
SET TS_LANG=ja
SET DEST=C:\OSGeo4W64\apps\qgis-dev\i18n\qgis_%TS_LANG%.qm

REM lrelease.exe is included in qt4-devel package of OSGeo4W
lrelease %TS_DIR%\%TS_LANG%.ts

REM backup original file
if not exist %DEST%.orig copy %DEST% %DEST%.orig

REM copy the built qm file
copy %TS_DIR%\%TS_LANG%.qm %DEST%

pause
---

Regards,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] qgis2threejs issue

2014-10-28 Thread Minoru Akagi
Hi Paolo,

2014-10-28 3:45 GMT+09:00 Paolo Cavallini cavall...@faunalia.it:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Il 27/10/2014 19:24, doktoreas ha scritto:

 you need to set control to OrbitControls.

 Oh, I see, thanks.
 Why it is not the default?

Since the last used control is saved, I did not consider it carefully.
Now it's ok to change the default controls to OrbitControls, which has
more functions (e.g. arrow-key control and auto-rotation) and is
probably suitable for flat earth.

Regards,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] symbolForFeature() does not works?

2014-07-03 Thread Minoru Akagi
Hi Alexander,

2014-07-04 0:53 GMT+09:00 Alexander Bruy alexander.b...@gmail.com:
 Hi all,

 seems symbolForFeature() method does not works as expected for most
 renderers:
  * QgsSingleSymbolRendererV2 — returns feature symbol
  * QgsCategorizedSymbolRendererV2 — returns None and in debug output
 I have message saying there are no hashed symbols!!!
  * QgsGraduatedSymbolRendererV2 — just crashes QGIS
  * QgsRuleBasedRendererV2 — returns None

 All tests made with point shapefile. Here is code snipped I used (load vector
 layer and activate it first):

 layer = iface.mapCanvas().currentLayer()
 feat = layer.getFeatures().next()
 renderer = layer.rendererV2()
 symbol = renderer.symbolForFeature(feat)

 For me this is major issue that makes difficult to develop plugins that works
 with layer symbology (e.g. symbology import/export/conversion)

 Anyone confirms? Should I open a ticket?

Matthias Kuhn showed me a workaround
(http://hub.qgis.org/issues/10096#note-1). My code is like this:

# initialize symbol rendering
renderer = QgsMapRenderer()
layer.rendererV2().startRender(renderer.rendererContext(),
 layer.pendingFields() if
apiChanged23 else layer)

for f in layer.getFeatures():
  symbol = layer.rendererV2().symbolForFeature(f)
  print symbol.color().name()

layer.rendererV2().stopRender(renderer.rendererContext())

--
Regards,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Updating qgis2threejs

2014-03-20 Thread Minoru Akagi
Hi Anita and all,

2014-03-16 16:58 GMT+09:00 Anita Graser anitagra...@gmx.at:
 Does the data-defined size feature for vector features work for you?
 I tried to create spheres with data-defined radius but they were always
 gigantic - no matter which factor I tried to use as a multiplier.

It works for me. Unit of the value (attribute value * multiplier)
should be that of project CRS. If the problem becomes clearer, please
report issue to GitHub repository of the plugin.

Thanks for your suggestions.

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


Re: [Qgis-developer] QGis2threejs digitize example

2014-02-11 Thread Minoru Akagi
Hi Roberto,

 What can be the reason ?

One vertex of the underlying quadrangle has duplicate points.

Minoru

2014-02-12 0:03 GMT+09:00 Geo DrinX geodr...@gmail.com:
 Hi Minoru,


 look at this example I created:

 https://googledrive.com/host/0Bwg_m86uaXY1RDRrVXpnT2JoV2c/index.html

 as you can see,  the pink cube near the  67  number  have a bug  on the
 roof  :(

 What can be the reason ?



 Ciao

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


Re: [Qgis-developer] About temp directory

2014-01-25 Thread Minoru Akagi
Hi Roberto,

 you asked me  if I had some reason to  define  my GEarthView  temp
 directory  inside the plugin.
 Well, now I found the reason
ok, thanks. In case of processing plugin, by default, temporary
outputs are put into a directory that QDir.tempPath() returns [1].
Qgis2threejs is following it (Processing has an option to change
temporary output directory).

Regards,
Minoru

[1] 
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/system.py#L55

2014-01-26 Geo DrinX geodr...@gmail.com:
 Hi Minoru,


 you asked me  if I had some reason to  define  my GEarthView  temp
 directory  inside the plugin.

 Well, now I found the reason:  where is the temp of  QGis2threejs,  in
 MacOSX  ?

 :(

 I can not find it …Also because you change HTML name   :)



 Ciao

 Roberto

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


Re: [Qgis-developer] About temp directory

2014-01-25 Thread Minoru Akagi
 (Processing has an option to change
 temporary output directory).
I'm sorry. This was not correct. The option is not for temporary files
but for filename without path [1].

[1] http://lists.osgeo.org/pipermail/qgis-user/2013-November/024855.html

Minoru

2014-01-26 Minoru Akagi akagi...@gmail.com:
 Hi Roberto,

 you asked me  if I had some reason to  define  my GEarthView  temp
 directory  inside the plugin.
 Well, now I found the reason
 ok, thanks. In case of processing plugin, by default, temporary
 outputs are put into a directory that QDir.tempPath() returns [1].
 Qgis2threejs is following it (Processing has an option to change
 temporary output directory).

 Regards,
 Minoru

 [1] 
 https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/system.py#L55

 2014-01-26 Geo DrinX geodr...@gmail.com:
 Hi Minoru,


 you asked me  if I had some reason to  define  my GEarthView  temp
 directory  inside the plugin.

 Well, now I found the reason:  where is the temp of  QGis2threejs,  in
 MacOSX  ?

 :(

 I can not find it …Also because you change HTML name   :)



 Ciao

 Roberto

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


Re: [Qgis-developer] Qgis2threejs suggestions...

2014-01-20 Thread Minoru Akagi
Hi Roberto,

2014/1/20 Geo DrinX geodr...@gmail.com:
 I have some other suggestion   :)

 I am testing  with more than one image and DTM files.

 I find that, in this case, it would be useful to have an automatic selector
 of the DTM or DSM layer  (I don't know how, but, for example, it could be
 the layer that starts with DTM_)

Sounds good.

 Other problem is: if there are more than one  DTM_  layers, it could be
 possible to have together clipped in the output ?   Or, only one is possible
 to have ?

Only one. You should merge DTM files into one in advance or make use
of vrt file.

Thanks,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Qgis2threejs suggestions...

2014-01-20 Thread Minoru Akagi
Hi,

2014/1/21 Geodrinx geodr...@gmail.com:

  if there are more than one  DTM_  layers, it could be
 possible to have together clipped in the output ?   Or, only one is possible
 to have ?

 Only one. You should merge DTM files into one in advance or make use
 of vrt file.

 If I well understand from documentation, a .vrt file is an xml index of many 
 raster files.
 It is correct ?
 And QGis supports it, true ?
 I will try it as soon as possible :)

Yes, works fine.

Cheers,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Qgis2threejs suggestions...

2014-01-19 Thread Minoru Akagi
Hi Roberto,

Is your python webbrowser module overlapped by something? For example,
you have a plugin named webbrowser ? : ) Otherwise, please try to
set browser path in the setting dialog.

Regards,
Minoru

2014/1/18 Geo DrinX geodr...@gmail.com:
 Hi Minoru ,

 I taken QGis2threejs now from  repository and I am testing on  MacOSX.

 I had this:

 Traceback (most recent call last):
   File
 /Users/rrr/.qgis2/python/plugins/Qgis2threejs/qgis2threejsdialog.py, line
 334, in run
 if not tools.openHTMLFile(htmlfilename):
   File /Users/rrr/.qgis2/python/plugins/Qgis2threejs/qgis2threejstools.py,
 line 128, in openHTMLFile
 webbrowser.open(htmlfilename, new=2)# new=2: new tab if possible
 AttributeError: 'module' object has no attribute 'open'

 Versione Python:
 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
 [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]



 Also on Windows 7  I have the same…


 :(


 Tell me if you need more info to debug.



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


Re: [Qgis-developer] Qgis2threejs suggestions...

2014-01-18 Thread Minoru Akagi
 Do you know other/better solutions then raycasting? Maybe through shaders?

I don't know...

Minoru

2014/1/17 G. Allegri gioha...@gmail.com:
 Hi Minoru,
 I have another question for you :)
 I'm dong some tests to apply vector draping on top of the PlanarGeometry,
 i.e. positioning vector vertices on the terrain when they don't have z
 values.
 I've done a test with ray casting. Here a result which seems a caterpillar
 walking along our mountains :)
 https://dl.dropboxusercontent.com/u/13861666/2014-01-17%2011_27_15-firenze.png
 Do you know other/better solutions then raycasting? Maybe through shaders?

 giovanni


 2014/1/17 Geodrinx geodr...@gmail.com

 Hi Minoru,


  Using QGIS
  API (QgsRasterDataProvider) in addition to GDAL API to support more
  data sources (1 band rasters) may be a good idea.

 Great !  :)

 Roberto

 
  Minoru
 
  2014/1/16 Geo DrinX geodr...@gmail.com:
  Hi Minoru,
 
 
  You can do it with latest code on GitHub.
  https://github.com/minorua/Qgis2threejs
 
 
 
  I tested it   :)
 
  I have an idea and a suggestion:
 
  if a level was a WMS PNG24 or PNG32 of a DTM, do you think it would be
  possible to use it to create 3D with your plugin?
 
  This would be a very useful feature :)
 
  Roberto
 
 
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




 --
 Giovanni Allegri
 http://about.me/giovanniallegri
 blog: http://blog.spaziogis.it
 GEO+ geomatica in Italia http://bit.ly/GEOplus
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Qgis2threejs suggestions...

2014-01-16 Thread Minoru Akagi
Hi Roberto,

The way of getting elevation values from 3 or 4 bands image data seems
a little strange. AFAIK, at least it is not common, and WCS is a more
ordinary way to get elevation data through internet access. Using QGIS
API (QgsRasterDataProvider) in addition to GDAL API to support more
data sources (1 band rasters) may be a good idea.

Minoru

2014/1/16 Geo DrinX geodr...@gmail.com:
 Hi Minoru,


 You can do it with latest code on GitHub.
 https://github.com/minorua/Qgis2threejs



 I tested it   :)

 I have an idea and a suggestion:

 if a level was a WMS PNG24 or PNG32 of a DTM, do you think it would be
 possible to use it to create 3D with your plugin?

 This would be a very useful feature :)

 Roberto


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


Re: [Qgis-developer] Qgis2threejs suggestions...

2014-01-07 Thread Minoru Akagi
2014/1/8 Etienne Trimaille etienne.trimai...@gmail.com:
 2014/1/2 Minoru Akagi akagi...@gmail.com:
 It seems that 3D html model  has exagerated height.  True ?

 Yes, it is exaggerated (x 1.5) currently.

 Can we set the value in the form ?
 For me, it's not enough :)

You can do it with latest code on GitHub.
https://github.com/minorua/Qgis2threejs

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


Re: [Qgis-developer] Qgis2threejs suggestions...

2014-01-03 Thread Minoru Akagi
Hi gene,

I'm sorry for the inconvenience, and thank you for your concrete report.
I've changed the plugin code to do DEM warp with gdal.ReprojectImage
instead of gdalwarp program to store warped DEM data in memory raster,
so it may work in also Mac OS X, I guess. I will also fix the other
issue. Feel free to comment about the plugin.

Thanks,
Minoru

2014/1/3 gene martin.lal...@gmail.com:
 Hi Minoru,

 First of all, many thanks for your plugin.

 As I use Mac OS X and the QGIS version of Kyngchaos, the path of gdalwarp is
 /Library/Frameworks/GDAL.framework/Versions/1.10/Programs/gdalwarp but this
 QGIS version does not recognize  the PATHs defined in the UNIX environment
 of MAC OS X ie:

 export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH
 which gdalwarp
/Library/Frameworks/GDAL.framework/Programs/gdalwarp

 So I had to make some changes in your qgis2threejs.py script to run on Mac
 OS X with this version of QGIS.
 I know that you can not change your script for a specific case but I hope
 that this will help Mac users  who want to use your plugin.

 General:
 --
 The os.system() works but it is marked as deprecated in the doc , so I use
 the Python module subprocess to make the job (as in Processing or the old
 Sextante) and it works:

 original line 185
 os.system(cmd.encode(fsenc))
 my solution:
  proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
 stdin=subprocess.PIPE,stderr=subprocess.STDOUT)
  proc.stdout.read()

(subprocess.check_call(cmd,shell=True) does not work )

 Specific to Mac OS X:
 -
 - I change the line 182
 cmd = gdalwarp  + u .join(options)
 in
 cmd = /Library/Frameworks/GDAL.framework/Versions/1.10/Programs/gdalwarp
 + u .join(options)

 - and I have removed the conditional statement
 #if not os.path.exists(demfilename):
 #

 - the same with line 160 which becomes:

 #options.append(--config GDAL_FILENAME_IS_UTF8 NO)

 - a final command which works  is, for example:

 /Library/Frameworks/GDAL.framework/Versions/1.10/Programs/gdalwarp -r
 bilinear -te 201132.706856 87080.384980 206579.284551 91865.013464 -ts 214
 188 -t_srs EPSG:31370 /Users/Shared/Dropbox/my.asc
 /var/folders/vu/vu099NovH-KZpE5TEa83BU+++TI/-Tmp-/dem20140101164100.tif

 Cosmetic
 ---
 As I still use Snow Leopard version (witch uses Python 2.6, I know, I know,
 it is old, but...), the line 48
   locale= localePath = os.path.join(plugin_dir, 'i18n',
 'qgis2threejs_{}.qm'
 becomes
   localePath = os.path.join(self.plugin_dir, 'i18n',
 'qgis2threejs_{0}.qm'.format(locale))

 (working with Python 2.6.x and 2.7.x versions)
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Qgis2threejs suggestions...

2014-01-02 Thread Minoru Akagi
2014/1/2 Geo DrinX geodr...@gmail.com:
 Minoru,

 Other argument:
 in this image, on the left you can see GoogleEarth, and on the right the
 threejs.html :

 https://drive.google.com/file/d/0Bwg_m86uaXY1QVVGVnJmMlBfOEk/edit?usp=sharing

 It seems that 3D html model  has exagerated height.  True ?

Yes, it is exaggerated (x 1.5) currently.

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


Re: [Qgis-developer] Qgis2threejs suggestions...

2014-01-02 Thread Minoru Akagi
Hi Roberto,

Happy new year to you, too. : )

2014/1/2 Geo DrinX geodr...@gmail.com:
 before all, happy new year :)

 Then, with the new year, I had an idea: what do you think of a QT window
 inside QGIS, which displays the 3D html page ?

 Could it be doable ?   Do you have just tested ?

Interesting, but I have not tested it yet.

Regards,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Qgis2threejs suggestions...

2013-12-31 Thread Minoru Akagi
Hi Roberto,

Thank you for your suggestions.

2013/12/31 Geo DrinX geodr...@gmail.com:
 The only thing that I find to be improved is the fact that it opens a new
 web page, and that is opened in QGis an information panel on which (if any)
 choose the DEM layer.

 For me, the panel should be confined in a panel on Settings, and instead
 the function must be called directly (and using the same web page)

 Sure, with this, everything would be (even more) immediate and amazing.

I will increase the number of items in the dialog. I have already
implemented multiple resolution output that has both detailed close
view and rough distant view, and would like to challenge vector data
output. I think it is good to provide an option to output simple one
by 1-click from the toolbar button so that user can preview easily. I
will also consider an option to open page in existing tab.

 Also I suggest to use a temporary directory inside the plugin directory, as
 in my GEarthView plugin.

I'll consider it. If you have some reasons that temporary directory
inside the plugin directory is better than system temporary directory,
please tell me.

Regards,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Qgis2threejs suggestions...

2013-12-31 Thread Minoru Akagi
Hi Paolo,

Can you view a sample page linked from README [1]? WebGL support is
required. A list of browsers that support WebGL is on Wikipedia page
[2].

Regards,
Minoru

[1] 
https://dl.dropboxusercontent.com/u/21526091/qgis-plugins/samples/threejs/mt_fuji.html
[2] http://en.wikipedia.org/wiki/WebGL


2013/12/31 Paolo Cavallini cavall...@faunalia.it:
 Il 31/12/2013 09:52, Geo DrinX ha scritto:
 Hello Minoru,


 Your  Qgis2threejs  is  great !

 Hi,
 a quick test on Debian showed a blank page on Iceweasel, and a couple of
 (movable) grey polygons on a blue background on Chromium.
 Possibly a missing lib, or missing webgl support? Any hint?
 All the best.

 --
 Paolo Cavallini - www.faunalia.eu
 QGIS  PostGIS courses: http://www.faunalia.eu/training.html
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Plugin [412] Qgis2threejs approval notification.

2013-12-23 Thread Minoru Akagi
Recently some 3D maps using WebGL were released [1][2](in Japanese).
They inspired me to make this plugin.

Enjoy!
Minoru

[1] Topographic maps of the moon http://gisstar.gsi.go.jp/selene/
[2] Eruption of Nishinoshima (GSI Maps)
http://portal.cyberjapan.jp/site/mapuse4/index.html?lat=27.246226lon=140.878773z=16did=DJBMMtab=3lkey1=seisya1311nishinoshimalopa1=1lkey2=3D1311nishinoshimalopa2=1#lat=27.24623lon=140.87877z=16did=DJBMMtab=3lkey1=seisya1311nishinoshimalopa1=1lkey2=3D1311nishinoshimalopa2=1zoom=16layers=BTT
(e.g. 
http://saigai.gsi.go.jp/2/20131120nishinoshima/nishinoshima_3d/20131204nishinoshima_all.html)
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Plugin [400] TileLayer Plugin approval notification.

2013-12-02 Thread Minoru Akagi
Hi Andre,

2013/12/1 Andre Joost andre+jo...@nurfuerspam.de:
 Unfortunately,it does not work with the qgis dev version. It claims to
 require EPSG:3857 (which my project has), but maybe gets disturbed by the
 new datumshift selection of QGIS 2.1.0.

I've fixed it, and I'll update the plugin within several days.

Thanks,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] OGR SQL encoding problems

2013-08-06 Thread Minoru Akagi
Hi Marco,

2013/8/7 Marco Hugentobler marco.hugentob...@sourcepole.ch:
 Btw., I noticed that creating new attributes with non-latin characters does
 not work. It however seems to work with utf-8 encoded shapes. Is it a dbf
 limitation or a QGIS bug?

I guess it's a GDAL issue but, fortunately, it has been already fixed.
With GDAL 1.10, creating attributes with non-ascii characters works
fine even if the Ignore shapefile encoding declaration option is not
checked.

Thanks,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] QGIS QgsVectorFileWriter

2013-07-31 Thread Minoru Akagi
Hi,

I guess that the 3rd argument (fields) should be a QgsFields object.
You can create it like this.

fields = QgsFields()
fields.append( QgsField( id, QVariant.Int ) )
fields.append( QgsField( desc, QVariant.String ) )

Cheers,
Minoru

2013/7/31 Bjorn Nyberg bjorn.burr.nyb...@gmail.com:
 I have a list of Linestrings [(x,y),(x,y)] pairs that i've created as

 shapelist.append(([QgsPoint(x1,y1),QgsPoint(x2,y2)]))


 shapelist[:5]
 [[(4.11658e+06,5.18318e+06), (4.11717e+06,5.18218e+06)],
 [(4.11847e+06,5.18323e+06), (4.11771e+06,5.18223e+06)],
 [(4.1064e+06,5.17508e+06), (4.10647e+06,5.17408e+06)],
 [(4.10755e+06,5.1749e+06), (4.10693e+06,5.1739e+06)],
 [(4.11138e+06,5.15935e+06), (4.112e+06,5.15835e+06)]]


 MultiPolyLine = QgsGeometry.fromMultiPolyline(shapelist)

 However when I attempt to apply the writer by

 writer = QgsVectorFileWriter(out, CP1250, fields, QGis.WKBMultiLineString,
 layer.crs(), ESRI Shapefile)

 I receive the following traceback:

 Traceback (most recent call last):
   File input, line 1, in module
 TypeError: arguments did not match any overloaded call:
   QgsVectorFileWriter(QString, QString, QgsFields, QGis.WkbType,
 QgsCoordinateReferenceSystem, QString driverName=ESRI Shapefile,
 QStringList datasourceOptions=QStringList(), QStringList
 layerOptions=QStringList(), QString newFilename=None): argument 3 has
 unexpected type 'dict'
   QgsVectorFileWriter(QgsVectorFileWriter): argument 1 has unexpected type
 'str'


 What does a Qstring imply here? Do I need to apply
 PyQt4.QtCore.QString(out)?

 Cheers,
 Bjorn

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

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


[Qgis-developer] OGR SQL encoding problems

2013-07-31 Thread Minoru Akagi
Hi,

Problems on this topic have been reported several times.
- OGR SQL: REPACK fails if filename includes non-ascii characters,
http://hub.qgis.org/issues/8391
- Fail create a spatial index with shape file that contain Japanese in
the file name, http://hub.qgis.org/issues/7794
- Points are deleted but still exist, http://hub.qgis.org/issues/6134
- spatial index fails, http://trac.osgeo.org/qgis/ticket/1295

I think these problems have not been completely fixed. Please see
#7794 and #8391 for the steps to reproduce the problems. I would like
to fix the problems before the 2.0 release. There is a pull request to
fix the problems.
https://github.com/qgis/Quantum-GIS/pull/584

Could any developers review the pull request?


Regards,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Spatial Join error

2013-07-05 Thread Minoru Akagi
Hi,

I reported this error to http://hub.qgis.org/issues/8206. It has
already been fixed.

Minoru

2013/7/6 Sanghee Shin endof...@gmail.com:
 Hi,

 If this report is repeated one, sorry for that.

 I got this error message when I tried to do spatial join.

 I used latest weekly master version on Windows.

 
 An error has occured while executing Python code:

 Traceback (most recent call last):
   File C:\QGIS\apps\qgis-dev\python\plugins\fTools\tools\doSpatialJoin.py, 
 line 99, in accept
 res = self.compute(inName, joinName, outPath, summary, sumList, keep, 
 self.progressBar)
   File C:\QGIS\apps\qgis-dev\python\plugins\fTools\tools\doSpatialJoin.py, 
 line 145, in compute
 fieldList1.extend(fieldList)
 TypeError: QgsFields.extend(QgsFields): argument 1 has unexpected type 'list'

 Python version:
 2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]


 QGIS version:
 1.9.0-Master Master, 1ad59b7

 

 According to http://hub.qgis.org/issues/7103, this should be fixed around 4 
 months ago.

 Any idea on this?

 Sanghee

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


Re: [Qgis-developer] Adding a feature to a layer with joined fields

2013-05-30 Thread Minoru Akagi
Hi,

2013/5/30 Denis Rouzaud denis.rouz...@gmail.com:
 Hi all,

 Regarding blocker #7072, I wonder if it really makes sense to have joined
 fields than can be filled by the user in the edit form while creating a
 feature. These fields should not be edited at all.
 I would suggest not to show them at creation and to disable the joined
 fields while editing.

 What do you think?

I think it's right. In 1.8, joined fields are editable. Input values
are displayed in the attribute table, but their values are not saved
when I save the layer as a new file.
My patch[1] does not hide joined fields in new feature form, but it
makes joined fields uneditable. As soon as we create a new feature on
join layer, fields in the joined table are bind to the new feature
corresponding to the value of the target field. I believe that editing
join layer should work well with two patches[1][2].

[1] https://github.com/qgis/Quantum-GIS/pull/576
[2] https://github.com/qgis/Quantum-GIS/pull/546

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


Re: [Qgis-developer] Is there anybody interested whether QGIS 2.0 will support non-Latin1 Shapefiles?

2013-04-25 Thread Minoru Akagi
Hi Borys,

I agree to specify the ENCODING option. LDID/87 does not have definite
meaning (depending on the environment), so avoiding to write shapefile
with the value would be nice. If the output encoding is UTF-8,
QGIS/OGR will generate cpg file that contains UTF-8. This behavior
must be ideal. In case of the other encoding, even if there is a
problem with the content of a cpg file (e.g. use in another
application. I am not much sure about cpg file), the user will be able
to fix it easily.

Similarly, how about specifying the ENCODING when creating new
shapefile (in createEmptyDataSource())?

 And one longterm:
 - after iconv conversion tio UTF-8 the layer doesn't remember the source
 encoding, so it's impossible to preserve it e.g when saving from Table
 Manager.

In QgsVectorFileWriter, how about always using SHAPE_ENCODING= ? It
will solve the problem and never make any encoding conversion failure
with current encoding listbox.

 I also added Shift-JIS to the Shapefile Encoding Fixer plugin. Please let me
 know if any of you needs (or just knows) another important encodings.

Thank you for your work on the plugin.

Regards,
Minoru Akagi
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Possible memory leak in rendering code

2013-04-22 Thread Minoru Akagi
Hi,

I found some memory leaks and attached a patch to ticket #6795.

Regards,
Minoru Akagi

2013/4/22 Matthias Kuhn matthias.k...@gmx.ch:
 Hi Alex,

 I found in the past particularly two things making the rendering more
 stable:
 * Disable Render Cache
 * Enable Backbuffer (only availale in X11/Linux)

 Can you check if one of these two changes in the options fix this issue?
 (Restart after changing)

 Cheers,
 Matthias

 On Mon 22 Apr 2013 10:50:29 CEST, Alexander Bruy wrote:
 Hi all,

 working on QTiles plugin we found one odd issue — when number of
 canvas redraws is relatively big (around 200 000 - 300 000) QGIS
 crashed with segmentation fault. Seems there is a memory leak
 somewhere.

 I'll try to debug this more, but as I'm  not very familiar with rendering 
 code any help and suggestions are welcome. Small test
 plugin to replicate this issue attached. Also it is possible to use
 QTiles plugin for this: just set extent and zoom levels so number of
 tiles is greater that 200 000 and start process. QGIS will crash
 at 60-70%.



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


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


Re: [Qgis-developer] again on encoding problems

2012-10-26 Thread Minoru Akagi
Paolo Cavallini wrote
 Il 26/10/2012 14:25, Minoru Akagi ha scritto:
 Hi,

 In Japanese Windows environment, GRASS commands output xml text of
 interface
 description that begins with the following line.
 ?xml version=1.0 encoding=CP932?

 CP932 is the system default encoding of Japanese Windows environment.
 QDomDocument has ability of detecting encoding, but it doesn't recognize
 encoding name CP932. See
 http://qt-project.org/doc/qt-4.8/QTextCodec.html

 Just a quick note to let you know where the problem is.
 Thanks for this. Any suggestion about how to circumvent this?
 All the best.
 
 -- 
 Paolo Cavallini - Faunalia
 www.faunalia.eu
 Full contact details at www.faunalia.eu/pc
 Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
 
 ___
 Qgis-developer mailing list

 Qgis-developer@.osgeo

 http://lists.osgeo.org/mailman/listinfo/qgis-developer

See http://hub.qgis.org/issues/4547

--
Minoru Akagi



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/again-on-encoding-problems-tp5010701p5011438.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer