Changeset 8214 in genesis


Ignore:
Timestamp:
Aug 3, 2010, 10:06:58 AM (14 years ago)
Author:
rick
Message:

Make RDNAP convertion optional, as it not installed by default and somehow hard to get sometimes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nodes/genesis-to-py.pl

    r8057 r8214  
    11#!/usr/bin/env perl
    2 use Geo::Coordinates::RDNAP qw/from_rd to_rd dms/;
    32
     3eval {
     4  require Geo::Coordinates::RDNAP;
     5};
     6if (! $@) {
     7  print "Foo";
     8  Geo::Coordinates::RDNAP->import(qw/from_rd to_rd dms/);
     9} else {
     10  print STDERR "[WARN] Geo::Coordinates::RDNAP not installed\n";
     11  sub from_rd {
     12    return (0,0,0);
     13  }
     14}
    415
    516# RD X,Y -> RD Noorderbreedte, Oosterbreedte
     
    1122$argc = $#ARGV + 1;
    1223if ($argc == 0) {
    13   print "Usage $_ <wleiden.conf> ...\n";
     24  print STDERR  "Usage $_ <wleiden.conf> ...\n";
    1425  exit 1;
    1526# Hack to easy support multiple files without remembering any variable in between
Note: See TracChangeset for help on using the changeset viewer.