New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We can't get option in outputformat obj in MapScript #4553

Closed
yjacolin opened this Issue Dec 28, 2012 · 11 comments

Comments

Projects
None yet
3 participants
@yjacolin
Contributor

yjacolin commented Dec 28, 2012

Outputformat obj can contains FORMATOPTION parameters. In python we can't get any list of existing FORMATOPTION, so we should know which are used:

>>> map = mapscript.mapObj('data/world_mapfile.map')
>>> of = map.getOutputFormatByName('png24')
>>> of.getOption("QUANTIZE_FORCE") 
'on'
@unicolet

This comment has been minimized.

Show comment
Hide comment
@unicolet

unicolet Jan 29, 2013

Contributor

@yjacolin Can you take a look at the above pr before I merge it?

Contributor

unicolet commented Jan 29, 2013

@yjacolin Can you take a look at the above pr before I merge it?

@yjacolin

This comment has been minimized.

Show comment
Hide comment
@yjacolin

yjacolin Jan 29, 2013

Contributor

@unicolet sorry I have not tested this yet. I will try it tonight.

Contributor

yjacolin commented Jan 29, 2013

@unicolet sorry I have not tested this yet. I will try it tonight.

@unicolet

This comment has been minimized.

Show comment
Hide comment
@unicolet

unicolet Jan 30, 2013

Contributor

Documented the new methods in the docs:

mapserver/docs@9db4135

Contributor

unicolet commented Jan 30, 2013

Documented the new methods in the docs:

mapserver/docs@9db4135

@yjacolin

This comment has been minimized.

Show comment
Hide comment
@yjacolin

yjacolin Jan 31, 2013

Contributor

I think I built successfully Python/MapScript, but:

import mapscript
map  = mapscript.mapObj("mapfile.map")
of = map.getOutputFormatByName('png24')
dir(of)

but I have no getNumformatoptions() or getOptionAt() methods.

mapscript.MS_VERSION shows 6.3-dev
and I used: git://github.com/unicolet/mapserver.git

Y.

Contributor

yjacolin commented Jan 31, 2013

I think I built successfully Python/MapScript, but:

import mapscript
map  = mapscript.mapObj("mapfile.map")
of = map.getOutputFormatByName('png24')
dir(of)

but I have no getNumformatoptions() or getOptionAt() methods.

mapscript.MS_VERSION shows 6.3-dev
and I used: git://github.com/unicolet/mapserver.git

Y.

@unicolet

This comment has been minimized.

Show comment
Hide comment
@unicolet

unicolet Feb 1, 2013

Contributor

Works for me. Did you run make install?

Python 2.7.3 (default, Aug  1 2012, 05:16:07) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mapscript
>>> map = mapObj('../../tests/test.map')
>>> of = map.getOutputFormat(0)
>>> of.getOptionAt(0)
Contributor

unicolet commented Feb 1, 2013

Works for me. Did you run make install?

Python 2.7.3 (default, Aug  1 2012, 05:16:07) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mapscript
>>> map = mapObj('../../tests/test.map')
>>> of = map.getOutputFormat(0)
>>> of.getOptionAt(0)
@yjacolin

This comment has been minimized.

Show comment
Hide comment
@yjacolin

yjacolin Feb 1, 2013

Contributor

yes I did it. I will do more test this week-end. Sorry for this delay.

Y.

Contributor

yjacolin commented Feb 1, 2013

yes I did it. I will do more test this week-end. Sorry for this delay.

Y.

@yjacolin

This comment has been minimized.

Show comment
Hide comment
@yjacolin

yjacolin Feb 2, 2013

Contributor

@unicolet I successfuly build mapserver and test your new method (note to myself: please use the correct branch next time). Here are my comments:

  • your doc is not correct for getNumformatoptions() and getNumoutputformats(): numformatoptions and numoutputformats are the correct properties to use.
  • with my mapfile, I get
option = of.getOptionAt(0)
print option
None

dir(option) don't show any property, am I wrong?

Contributor

yjacolin commented Feb 2, 2013

@unicolet I successfuly build mapserver and test your new method (note to myself: please use the correct branch next time). Here are my comments:

  • your doc is not correct for getNumformatoptions() and getNumoutputformats(): numformatoptions and numoutputformats are the correct properties to use.
  • with my mapfile, I get
option = of.getOptionAt(0)
print option
None

dir(option) don't show any property, am I wrong?

@unicolet

This comment has been minimized.

Show comment
Hide comment
@unicolet

unicolet Feb 2, 2013

Contributor

Can you share a meaningful map file together with the expected list of options?

As per the methods names I am pretty sure I got them right in the docs, I will run some more python tests soon.

Contributor

unicolet commented Feb 2, 2013

Can you share a meaningful map file together with the expected list of options?

As per the methods names I am pretty sure I got them right in the docs, I will run some more python tests soon.

@unicolet

This comment has been minimized.

Show comment
Hide comment
@unicolet

unicolet Feb 2, 2013

Contributor

Closed in pull request referenced above

Contributor

unicolet commented Feb 2, 2013

Closed in pull request referenced above

@unicolet unicolet closed this Feb 2, 2013

mkofahl pushed a commit to faegi/mapserver that referenced this issue Apr 9, 2013

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Apr 13, 2013

Member

@unicolet this issue is milestoned for 6.2.1 but has only been applied to master. Should the milestone be updated or should I backport ?

Member

tbonfort commented Apr 13, 2013

@unicolet this issue is milestoned for 6.2.1 but has only been applied to master. Should the milestone be updated or should I backport ?

@tbonfort tbonfort reopened this Apr 13, 2013

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Apr 18, 2013

Member

re-milestoning to 6.4

Member

tbonfort commented Apr 18, 2013

re-milestoning to 6.4

@tbonfort tbonfort closed this Apr 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment