I am trying to upload aerial photos to geoserver to be shown as background. But everytime the image is black instead of detailed satellite image. Also tried on single tif files, but same result. Anybody have experience with this issue and know a solution?
I use ImageMosaic as plugin to upload the tifs.
This is the result of gdalinfo:
C:\Program Files\QGIS 3.8\bin>gdalinfo --format GTIFF D:\tile-20000-380000.tif
Format Details:
Short Name: GTiff
Long Name: GeoTIFF
Supports: Raster
Extensions: tif tiff
Mime Type: image/tiff
Help Topic: frmt_gtiff.html
Supports: Subdatasets
Supports: Open() - Open existing dataset.
Supports: Create() - Create writable dataset.
Supports: CreateCopy() - Create dataset by copying another.
Supports: Virtual IO - eg. /vsimem/
Creation Datatypes: Byte UInt16 Int16 UInt32 Int32 Float32 Float64 CInt16 CInt32 CFloat32 CFloat64
<CreationOptionList>
<Option name="COMPRESS" type="string-select">
<Value>NONE</Value>
<Value>LZW</Value>
<Value>PACKBITS</Value>
<Value>JPEG</Value>
<Value>CCITTRLE</Value>
<Value>CCITTFAX3</Value>
<Value>CCITTFAX4</Value>
<Value>DEFLATE</Value>
<Value>LZMA</Value>
<Value>ZSTD</Value>
<Value>WEBP</Value>
<Value>LERC</Value>
<Value>LERC_DEFLATE</Value>
<Value>LERC_ZSTD</Value>
</Option>
<Option name="PREDICTOR" type="int" description="Predictor Type (1=default, 2=horizontal differencing, 3=floating point prediction)" />
<Option name="DISCARD_LSB" type="string" description="Number of least-significant bits to set to clear as a single value or comma-separated list of values for per-band values" />
<Option name="JPEG_QUALITY" type="int" description="JPEG quality 1-100" default="75" />
<Option name="JPEGTABLESMODE" type="int" description="Content of JPEGTABLES tag. 0=no JPEGTABLES tag, 1=Quantization tables only, 2=Huffman tables only, 3=Both" default="1" />
<Option name="ZLEVEL" type="int" description="DEFLATE compression level 1-9" default="6" />
<Option name="LZMA_PRESET" type="int" description="LZMA compression level 0(fast)-9(slow)" default="6" />
<Option name="ZSTD_LEVEL" type="int" description="ZSTD compression level 1(fast)-22(slow)" default="9" />
<Option name="MAX_Z_ERROR" type="float" description="Maximum error for LERC compression" default="0" />
<Option name="WEBP_LOSSLESS" type="boolean" description="Whether lossless compression should be used" default="FALSE" />
<Option name="WEBP_LEVEL" type="int" description="WEBP quality level. Low values result in higher compression ratios" default="75" />
<Option name="NUM_THREADS" type="string" description="Number of worker threads for compression. Can be set to ALL_CPUS" default="1" />
<Option name="NBITS" type="int" description="BITS for sub-byte files (1-7), sub-uint16 (9-15), sub-uint32 (17-31), or float32 (16)" />
<Option name="INTERLEAVE" type="string-select" default="PIXEL">
<Value>BAND</Value>
<Value>PIXEL</Value>
</Option>
<Option name="TILED" type="boolean" description="Switch to tiled format" />
<Option name="TFW" type="boolean" description="Write out world file" />
<Option name="RPB" type="boolean" description="Write out .RPB (RPC) file" />
<Option name="RPCTXT" type="boolean" description="Write out _RPC.TXT file" />
<Option name="BLOCKXSIZE" type="int" description="Tile Width" />
<Option name="BLOCKYSIZE" type="int" description="Tile/Strip Height" />
<Option name="PHOTOMETRIC" type="string-select">
<Value>MINISBLACK</Value>
<Value>MINISWHITE</Value>
<Value>PALETTE</Value>
<Value>RGB</Value>
<Value>CMYK</Value>
<Value>YCBCR</Value>
<Value>CIELAB</Value>
<Value>ICCLAB</Value>
<Value>ITULAB</Value>
</Option>
<Option name="SPARSE_OK" type="boolean" description="Should empty blocks be omitted on disk?" default="FALSE" />
<Option name="ALPHA" type="string-select" description="Mark first extrasample as being alpha">
<Value>NON-PREMULTIPLIED</Value>
<Value>PREMULTIPLIED</Value>
<Value>UNSPECIFIED</Value>
<Value aliasOf="NON-PREMULTIPLIED">YES</Value>
<Value aliasOf="UNSPECIFIED">NO</Value>
</Option>
<Option name="PROFILE" type="string-select" default="GDALGeoTIFF">
<Value>GDALGeoTIFF</Value>
<Value>GeoTIFF</Value>
<Value>BASELINE</Value>
</Option>
<Option name="PIXELTYPE" type="string-select">
<Value>DEFAULT</Value>
<Value>SIGNEDBYTE</Value>
</Option>
<Option name="BIGTIFF" type="string-select" description="Force creation of BigTIFF file">
<Value>YES</Value>
<Value>NO</Value>
<Value>IF_NEEDED</Value>
<Value>IF_SAFER</Value>
</Option>
<Option name="ENDIANNESS" type="string-select" default="NATIVE" description="Force endianness of created file. For DEBUG purpose mostly">
<Value>NATIVE</Value>
<Value>INVERTED</Value>
<Value>LITTLE</Value>
<Value>BIG</Value>
</Option>
<Option name="COPY_SRC_OVERVIEWS" type="boolean" default="NO" description="Force copy of overviews of source dataset (CreateCopy())" />
<Option name="SOURCE_ICC_PROFILE" type="string" description="ICC profile" />
<Option name="SOURCE_PRIMARIES_RED" type="string" description="x,y,1.0 (xyY) red chromaticity" />
<Option name="SOURCE_PRIMARIES_GREEN" type="string" description="x,y,1.0 (xyY) green chromaticity" />
<Option name="SOURCE_PRIMARIES_BLUE" type="string" description="x,y,1.0 (xyY) blue chromaticity" />
<Option name="SOURCE_WHITEPOINT" type="string" description="x,y,1.0 (xyY) whitepoint" />
<Option name="TIFFTAG_TRANSFERFUNCTION_RED" type="string" description="Transfer function for red" />
<Option name="TIFFTAG_TRANSFERFUNCTION_GREEN" type="string" description="Transfer function for green" />
<Option name="TIFFTAG_TRANSFERFUNCTION_BLUE" type="string" description="Transfer function for blue" />
<Option name="TIFFTAG_TRANSFERRANGE_BLACK" type="string" description="Transfer range for black" />
<Option name="TIFFTAG_TRANSFERRANGE_WHITE" type="string" description="Transfer range for white" />
<Option name="STREAMABLE_OUTPUT" type="boolean" default="NO" description="Enforce a mode compatible with a streamable file" />
<Option name="GEOTIFF_KEYS_FLAVOR" type="string-select" default="STANDARD" description="Which flavor of GeoTIFF keys must be used">
<Value>STANDARD</Value>
<Value>ESRI_PE</Value>
</Option>
</CreationOptionList>
<OpenOptionList>
<Option name="NUM_THREADS" type="string" description="Number of worker threads for compression. Can be set to ALL_CPUS" default="1" />
<Option name="GEOTIFF_KEYS_FLAVOR" type="string-select" default="STANDARD" description="Which flavor of GeoTIFF keys must be used (for writing)">
<Value>STANDARD</Value>
<Value>ESRI_PE</Value>
</Option>
<Option name="GEOREF_SOURCES" type="string" description="Comma separated list made with values INTERNAL/TABFILE/WORLDFILE/PAM/NONE that describe the priority order for georeferencing" default="PAM,INTERNAL,TABFILE,WORLDFILE" />
<Option name="SPARSE_OK" type="boolean" description="Should empty blocks be omitted on disk?" default="FALSE" />
</OpenOptionList>
Other metadata items:
LIBTIFF=INTERNAL
We recently found out the compression type was wrong. WEBP instead of Geotiff. It will be resolved.
Related
Is it possible to pass environmental variable as a parameter to executable?
I tried this, but I get a string "job_$JOB_ID" in my app instead of "job_123"
Another question that can be a workaround for me:
Is there a way to access this config dialog parameters as a text file? So that I cen edit Program arguments in text editor instead of CLion UI. Those configs must be stored somewhere in CLion app folder
If you are looking to pass a environment variable that is defined by in run config, then it is not possible.
If you want to edit the configuration in file. Then usually it is stored in .idea/workspace.xml. This has all the run configurations and everything stored.
I don't have clion but have PyCharm, any a sample from same is
...
...
<configuration name="scrape2" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="scripts" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/deprecated" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/deprecated/scrape2.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
...
You can see the environment variables are defined inside envs.
You can pass a externally defined environment variable using ${ENVNAME}. See below thread on SO
How to pass an environment variable as a command line parameter in Run/Debug configuration in PyCharm?
I build a Joomla 3.x extension : https://github.com/Sagenda/joomla/
When I use the Joomla internal update system, I got this error :
JInstaller: :Install: File does not exist /home/synergie/public_html/synergie/contao/joomla30/tmp/install_5bd443ecad85c/joomla-0.7.1/ mod_sagenda_calendar.xml
Module %s: Could not copy files from the source.
How to I correct this? Thanks
You have added extra spaces in between the filename tags so filenames became different. I have given the corrected one below;
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.8.13" client="site" method="upgrade">
<name>Sagenda booking and scheduling calendar</name>
<author>Iteration.info SARL</author>
<version>0.7.1</version>
<description>A Booking Calendar for your Joomla Website</description>
<files>
<filename>mod_sagenda_calendar.xml</filename>
<filename>mod_sagenda_calendar_update.xml</filename>
<filename module="mod_sagenda_calendar">mod_sagenda_calendar.php</filename>
<filename>index.html</filename>
<filename>helper.php</filename>
<folder>mashape</folder>
<folder>tmpl</folder>
</files>
<config>
<fields name="params">
<fieldset name="basic">
<field name="sagendaToken" required="true" type="text" label="Token" description="Please paste here the token that you can found on your dashboard : https://sagenda.net/Dashboard" size="200" default="" />
<field name="sagendaWeekStartsOn" type="list" label="Week start on" description="Please select which day your week should start on your calendar." size="200" default="1">
<option value="0">
Sunday
</option>
<option value="1">
Monday
</option>
<option value="2">
Tuesday
</option>
<option value="3">
Wednesday
</option>
<option value="4">
Thursday
</option>
<option value="5">
Friday
</option>
<option value="6">
Saturday
</option>
</field>
<field name="sagendaDateFormat" type="text" label="Date format" description="Define the format of date you want, <br/> YYYY-MM-DD for 1981-10-25 <br/> DD.MM.YY for 25.10.1981" size="200" default="DD MMMM YYYY" required="true" hint="Please enter a format" />
<field name="sagendaTimeFormat" type="text" label="Time format" description="Define the format of time you want, <br/> HH:mm for 18:00<br/> hh:mm A for 06:00 PM" size="200" required="true" default="HH:mm" hint="Please enter a format" />
<field name="note11" type="note" label="You will find the complete list of possible date and time format here : <a href='https://momentjs.com/docs/#/displaying/' target='blank'>https://momentjs.com/docs/#/displaying/</a> " class="alert alert-info"/>
</fieldset>
</fields>
</config>
<updateservers>
<server type="extension" name="mod_sagenda_calendar">
https://raw.githubusercontent.com/Sagenda/joomla/master/mod_sagenda_calendar_update.xml
</server>
</updateservers>
</extension>
System: Windows 10 64bit, PhpStorm 2016.2 (the backslashes are not the problem, they are in the screenshot, but not in my actual code anymore)
This is my file structure
/css -> css files
/sass -> sass files
The app.sass is in the /sass directory, and when I change something there, the compiler automatically runs. But it puts the app.css and app.css.map in the /sass directory. Instead I like to have have it save to the /css directory.
This is my watcherTask.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectTasksOptions">
<TaskOptions isEnabled="true">
<option name="arguments" value="--no-cache --update $FileName$:$FileNameWithoutExtension$.css" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" value="Compiles .sass files into .css files" />
<option name="exitCodeBehavior" value="ERROR" />
<option name="fileExtension" value="sass" />
<option name="immediateSync" value="true" />
<option name="name" value="Sass" />
<option name="output" value="$FileParentDir$/css/$FileNameWithoutExtension$.css:$FileParentDir$/css/$FileNameWithoutExtension$.css.map" />
<option name="outputFilters">
<array />
</option>
<option name="outputFromStdout" value="false" />
<option name="program" value="C:/Ruby22/bin/sass.bat" />
<option name="scopeName" value="Project Files" />
<option name="trackOnlyRoot" value="true" />
<option name="workingDir" value="$FileDir$" />
<envs />
</TaskOptions>
</component>
</project>
Any clue about what I am missing here?
Update: As requested, a screenshot of the watcher:
The field "output paths to refresh" corresponds to the "output" option.
The field "arguments" to the eh... arguments option.
The arguments option determines where the file source and target are:
--no-cache --update Source:Target
The default is
--no-cache --update $FileName$:$FileNameWithoutExtension$.css
which I then had to change to
--no-cache --update $FileName$:$FileParentDir$/css/$FileNameWithoutExtension$.css
This causes the system to save both the css and the css.map to the right folder.
Thanks #LazyOne for pointing this out.
I am trying to read the content of an XML file (configs.xml) and insert it somewhere in the middle of another XML file (workspace.xml).
This is the code:
require "nokogiri"
workspace = File.open("workspace.xml")
xml = Nokogiri::XML(workspace)
workspace.close
# Add new configs
configs = File.read("configs.xml")
xml.search('component[name="RunManager"]').each do |node|
node.content=configs
end
puts xml
The output looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidLayoutPreviewToolWindow">
<option name="state">
<GlobalState/>
</option>
</component>
<component name="RunManager" selected="Android Application.Run on device">
<configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
<module name="" />
<option name="TESTING_TYPE" value="0" />
<option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
<option name="METHOD_NAME" value="" />
<option name="CLASS_NAME" value="" />
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false"/>
<component name="SliceManager" selected="Android Application.Run on device">
<option name="analysisUIOptions">
<AnalysisUIOptions/>
</option>
</component>
</project>
As you can see, the inserted content in the middle has all angular braces < > replaced with HTML codes < >, and I don't know why, though I suspect this has to do something with encodings.
What is most interesting is that if printing the content of configs.xml alone (the one that gets inserted and modified) then the output is as expected:
<configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
<option name="TESTING_TYPE" value="0" />
<option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
<option name="METHOD_NAME" value="" />
// ............
</configuration>
When you set the contents of a node you actually set its text contents, meaning, Nokogiri automatically escapes it.
To add a node to your XML you need to use add_child
configs = File.read("configs.xml")
xml.search('component[name="RunManager"]').each do |node|
node.add_child configs
end
<field name="name" type="radio"
class="btn-group"
label="label"
description="description"
default="0"
disabled = "true"
filter="raw">
<option value="0">No</option>
<option value="1">Yes</option>
</field>
How are you disable radio button with xml ?
One thing is that the disabled feature only works on option level, not for the whole field.
So you would need to set it like this:
<field name="name" type="radio"
class="btn-group"
label="label"
description="description"
default="0"
filter="raw">
<option value="0" disabled="true">No</option>
<option value="1" disabled="true">Yes</option>
</field>
However it doesn't work well together with the btn-group class. This is probably a Bootstrap bug.