Entradas

Creating views to show specific spatial data [POSGIS POSTGRES QGIS VIEWS]

Imagen
Hello everyone, Sometimes as database managers we need to show only specific data for security or for whetever reason . In this case we are talking about showing geometry that are stored in two (relational) tables the problem remains in not showing the area , descripcion and id_user fields of state table . Fig 1. Tables Solution:  1) Create view,  2) Create role, 3)Setup in QGIS First thing is to create a view, note that is important to add the objectid column otherwise QGIS is going to get an error. CREATE VIEW view_state AS         SELECT   sg.id_state_geom AS objectid,         COALESCE(s.name, 'NO NAME'::character varying) AS name,    FROM (state_geom sg        LEFT JOIN state s ON ((sg.id_state = s.id_state)))        ORDER BY sg.id_state Second step is create a role wich be attached to the view and only to the view. CREATE ROLE xxx WITH L...

Entrust Migration Error Solved

Imagen
Working with JWT and Entrust packages on mi brand new Laravel App I got these errors right after run the command php artisan entrust:migration I know you want the solution right away so... Error: Method Zizaco\Entrust\MigrationCommand::handle() does not exist Solution: Go to the file vendor/zizaco/entrust/src/commands/MigrationCommand.php find the method called "fire" and rename it with "handle" and after the command "php artisan entrust: migration" will be generate. But... If your scenario is identical as mine the next error will be raised... Error: Symfony\Component\Debug\Exception\FatalThrowableError  : Class name must be a valid object or a string Solution: Go to the file vendor/zizaco/entrust/src/commands/MigrationCommand.php (same file we edit before) and change these lines: $usersTable = Config::get('auth.table'); $userModel = Config::get('auth.model'); To: $usersTable = Config::get('auth.providers.user...

Pentaho Data Integration and GIS Plugin

Imagen
Para la manipulación de datos GIS y operaciones con geometría existe un plugin muy interesante el cual es gratuito y puede ser descargado de aquí . La instalación del plugin es de lo más sencillo, primeramente hay que descargar el archivo y el contenido pegarlo dentro de la carpeta plugins en el directorio de pentaho, en mi caso es  D:\data-integration\plugins después de esto   se reinicia Pentaho y para ese momento si todo va bien la barra de herramientas nos mostrará la carpeta Geospatial Barra de herramientas Ahora lo importante, un ejemplo del uso de este plugin. El problema: Tenemos dos capas de datos una capa es de sectores y otra capa con terrenos. Cada terreno debe tener el dato del sector al que pertenece, en este momento los terrenos no poseen información alguna del sector al que pertenecen, hay que realizar la transformación y el resultado debe arrojar cada terreno con su num de sector correspondiente. Capa de sectores Capa de terrenos ...

proc_open(): fork failed - Cannot allocate memory in phar

Today I got an error while I was making updates to my laravel app because of a lack of memory in my digitalocean droplet. I was reading some documentation and the solution was set up a swap file: "Swap is an area on a hard drive that has been designated as a place where the operating system can temporarily store data that it can no longer hold in RAM. Basically, this gives you the ability to increase the amount of information that your server can keep in its working "memory", with some caveats. The swap space on the hard drive will be used mainly when there is no longer sufficient space in RAM to hold in-use application data." as the documentation says we need to configurate the swap area so that composer can do it's thing. The solution sudo dd if=/dev/zero of=/swapfile bs=1024 count=512k sudo mkswap /swapfile sudo swapon /swapfile composer update Regards!

Data Integration

Next posts are related with extraction, transformation and load massive data. Stay tuned.

Título y Fechas Error FullCalendar

Anteriormente tuve un detalle con el calendario de FullCalendar versión minificada, ya que la fecha se mostraba de forma extraña: 1st — 7th June 2018 Si a alguien por ahi le ocurre lo mismo la solución es buscar entre las líneas del archivo minificado fullcalendar.min.js la siguiente variable  titleRangeSeparator y sustituir su valor por un " - ".  Después de esto la fecha debería mostrarse correctamente: 1st - 7th June 2018 ¡Saludos!

Filezilla, DigitalOcean MAC OS

Imagen
Hola, guía rapidísima de como usar Digital Ocean y Filezilla. PRERREQUISITOS: Filezilla Cliente SSH Keys Ok requisito esencial es generar un par de llaves SSH ( si no sabes de que estoy hablando checate esto ) Primero instalamos el cliente de Filezilla, abrimos el programa y nos vamos a Edición>Opciones y dentro de este menú seleccionamos SFTP y veremos algo como esto: Presionamos el botón de ADD KEY FILE el cual nos abrirá una ventana para seleccionar nuestra id_rsa,  en el caso de OS si dejamos la ubicación por default podemos encontrarlas en usuario>.ssh>id_rsa recuerda que para ver archivos ocultos puedes presionar "shit + command + . " luego de presionarlo es probable que nos pida convertir el archivo a un archivo ppk, seleccionamos un nombre distinto con el que podamos identificar esta llave y guardamos. Posteriormente nos dirigimos a Archivo>Gestor de Sitios Añadimos un nuevo sitio con las siguiente características: PROTOCOLO: SFTP - ...